mips: Use the generic bitops headers
PATCH 1/4 mips: Use the generic bitops headers
From: Fabio Estevam <[email protected]>
The generic bitops headers are required when calling logarithimic functions, such as ilog2().
---
Applies against u-boot-spi next
arch/mips/include/asm/bitops.h | 5 +++++ 1 file changed, 5 insertions(+)
arch/mips/include/asm/bitops.h +5 -0
@@ -17,6 +17,11 @@#include <asm/sgidefs.h> #include <asm/system.h> +#include <asm-generic/bitops/fls.h> +#include <asm-generic/bitops/__fls.h> +#include <asm-generic/bitops/fls64.h> +#include <asm-generic/bitops/__ffs.h> +/* * clear_bit() doesn't provide any barrier for the compiler. */
Signature · 1 line
1.9.1
PATCH 2/4 arc: Use the generic bitops headers
From: Fabio Estevam <[email protected]>
The generic bitops headers are required when calling logarithimic functions, such as ilog2().
---
Applies against u-boot-spi next
arch/arc/include/asm/bitops.h | 5 +++++ 1 file changed, 5 insertions(+)
arch/arc/include/asm/bitops.h +5 -0
@@ -16,4 +16,9 @@#define hweight16 (x) generic_hweight16(x)#define hweight8 (x) generic_hweight8(x) +#include <asm-generic/bitops/fls.h> +#include <asm-generic/bitops/__fls.h> +#include <asm-generic/bitops/fls64.h> +#include <asm-generic/bitops/__ffs.h> +#endif /* __ASM_ARC_BITOPS_H */
Signature · 1 line
1.9.1
PATCH 3/4 avr32: Use the generic bitops headers
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
The generic bitops headers are required when calling logarithimic functions, such as ilog2().
---
Applies against u-boot-spi next
arch/avr32/include/asm/bitops.h | 5 +++++ 1 file changed, 5 insertions(+)
arch/avr32/include/asm/bitops.h +5 -0
@@ -6,4 +6,9 @@#ifndef __ASM_AVR32_BITOPS_H#define __ASM_AVR32_BITOPS_H +#include <asm-generic/bitops/fls.h> +#include <asm-generic/bitops/__fls.h> +#include <asm-generic/bitops/fls64.h> +#include <asm-generic/bitops/__ffs.h> +#endif /* __ASM_AVR32_BITOPS_H */
Signature · 1 line
1.9.1
PATCH 4/4 spi: sf_ops: Use size_t for len
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Let the function and its prototype use the same variable type for 'len'.
---
Applies against u-boot-spi next
drivers/mtd/spi/sf_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/spi/sf_ops.c +2 -2
@@ -652,7 +652,7 @@ int stm_is_locked(struct spi_flash *flash, u32 ofs, size_t len)* * Returns negative on errors, 0 on success. */ -int stm_lock (struct spi_flash *flash,u32 ofs,u32 len) +int stm_lock (struct spi_flash *flash,u32 ofs,size_t len) {u8 status_old, status_new;u8 mask =SR_BP2 |SR_BP1 |SR_BP0 ;
@@ -703,7 +703,7 @@ int stm_lock(struct spi_flash *flash, u32 ofs, u32 len)* * Returns negative on errors, 0 on success. */ -int stm_unlock (struct spi_flash *flash,u32 ofs,u32 len) +int stm_unlock (struct spi_flash *flash,u32 ofs,size_t len) {uint8_t status_old, status_new;u8 mask =SR_BP2 |SR_BP1 |SR_BP0 ;
Signature · 1 line
1.9.1
PATCH 1/4 mips: Use the generic bitops headers
In reply to Fabio EstevamQuoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
The generic bitops headers are required when calling logarithimic functions, such as
ilog2().
s/logarithimic/logarithmic
Same comment for 2/4 and 3/4
Dinh
PATCH 1/4 mips: Use the generic bitops headers
Quoted 10 lines · Dinh Nguyen
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
The generic bitops headers are required when calling logarithimic functions, such as
ilog2().s/logarithimic/logarithmic
Same comment for 2/4 and 3/4
Good catch, thanks Dinh
PATCH 1/4 mips: Use the generic bitops headers
In reply to Fabio EstevamAm 04.11.2015 um 18:13 schrieb Fabio Estevam:
Quoted 5 lines
From: Fabio Estevam <[email protected]>
The generic bitops headers are required when calling logarithimic functions, such as
ilog2().
Quoted 7 lines
Signed-off-by Fabio Estevam <[email protected]>---
Applies against u-boot-spi nextarch/mips/include/asm/bitops.h | 5 +++++ 1 file changed, 5 insertions(+)
--
After applying your patches
include: Add log2 header from the kernel
include: Add generic bitops headers
I've got warnings on almost all MIPS boards. Maybe you should move your modification on "include/linux/bitops.h" in the second patch to a separate patch to be applied after all arch-specific patches to avoid this. I guess the other archs have the same problem.
Signature · 1 line
- Daniel
PATCH 1/4 mips: Use the generic bitops headers
Hi Daniel,
Quoted 5 lines · Daniel Schwierzeck
Reviewed-by Daniel Schwierzeck <[email protected]>--
After applying your patches
Quoted 7 lines
include: Add log2 header from the kernel
include: Add generic bitops headersI've got warnings on almost all MIPS boards. Maybe you should move your modification on "
include/linux/bitops.h" in the second patch to a separate patch to be applied after all arch-specific patches to avoid this. I guess the other archs have the same problem.
Thanks for reviewing it. This makes sense. Will do as suggested.