Commit 18c2fc04 authored by Ben Hutchings's avatar Ben Hutchings Committed by Jeff Garzik

sfc: Change first parameter type of {set,clear}_bit_le() to unsigned

This means the compiler doesn't need to use real division instructions.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 767e468c
...@@ -886,13 +886,13 @@ static inline struct efx_rx_buffer *efx_rx_buffer(struct efx_rx_queue *rx_queue, ...@@ -886,13 +886,13 @@ static inline struct efx_rx_buffer *efx_rx_buffer(struct efx_rx_queue *rx_queue,
} }
/* Set bit in a little-endian bitfield */ /* Set bit in a little-endian bitfield */
static inline void set_bit_le(int nr, unsigned char *addr) static inline void set_bit_le(unsigned nr, unsigned char *addr)
{ {
addr[nr / 8] |= (1 << (nr % 8)); addr[nr / 8] |= (1 << (nr % 8));
} }
/* Clear bit in a little-endian bitfield */ /* Clear bit in a little-endian bitfield */
static inline void clear_bit_le(int nr, unsigned char *addr) static inline void clear_bit_le(unsigned nr, unsigned char *addr)
{ {
addr[nr / 8] &= ~(1 << (nr % 8)); addr[nr / 8] &= ~(1 << (nr % 8));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment