| .. | .. |
|---|
| 16 | 16 | #define BYTE_OFFSET(nr) ((nr) % BITS_PER_BYTE) |
|---|
| 17 | 17 | #endif |
|---|
| 18 | 18 | |
|---|
| 19 | | -#define IS_IMMEDIATE(nr) (__builtin_constant_p(nr)) |
|---|
| 20 | | - |
|---|
| 21 | 19 | static inline void __set_bit(int nr, volatile unsigned long *addr) |
|---|
| 22 | 20 | { |
|---|
| 23 | | - if (IS_IMMEDIATE(nr)) { |
|---|
| 21 | + if (__builtin_constant_p(nr)) { |
|---|
| 24 | 22 | __asm__ __volatile__ ( |
|---|
| 25 | 23 | "bset.b %1, @(%O2,%0) ! __set_bit\n\t" |
|---|
| 26 | 24 | : "+r" (addr) |
|---|
| .. | .. |
|---|
| 37 | 35 | |
|---|
| 38 | 36 | static inline void __clear_bit(int nr, volatile unsigned long *addr) |
|---|
| 39 | 37 | { |
|---|
| 40 | | - if (IS_IMMEDIATE(nr)) { |
|---|
| 38 | + if (__builtin_constant_p(nr)) { |
|---|
| 41 | 39 | __asm__ __volatile__ ( |
|---|
| 42 | 40 | "bclr.b %1, @(%O2,%0) ! __clear_bit\n\t" |
|---|
| 43 | 41 | : "+r" (addr) |
|---|
| .. | .. |
|---|
| 64 | 62 | */ |
|---|
| 65 | 63 | static inline void __change_bit(int nr, volatile unsigned long *addr) |
|---|
| 66 | 64 | { |
|---|
| 67 | | - if (IS_IMMEDIATE(nr)) { |
|---|
| 65 | + if (__builtin_constant_p(nr)) { |
|---|
| 68 | 66 | __asm__ __volatile__ ( |
|---|
| 69 | 67 | "bxor.b %1, @(%O2,%0) ! __change_bit\n\t" |
|---|
| 70 | 68 | : "+r" (addr) |
|---|