public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers
@ 2015-11-04 17:13 Fabio Estevam
  2015-11-04 17:13 ` [U-Boot] [PATCH 2/4] arc: " Fabio Estevam
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-11-04 17:13 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Applies against u-boot-spi next

 arch/mips/include/asm/bitops.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h
index b5c2a63..c31ff6e 100644
--- a/arch/mips/include/asm/bitops.h
+++ b/arch/mips/include/asm/bitops.h
@@ -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.
  */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/4] arc: Use the generic bitops headers
  2015-11-04 17:13 [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Fabio Estevam
@ 2015-11-04 17:13 ` Fabio Estevam
  2015-11-04 17:13 ` [U-Boot] [PATCH 3/4] avr32: " Fabio Estevam
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-11-04 17:13 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Applies against u-boot-spi next

 arch/arc/include/asm/bitops.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h
index 85721aa..370cb46 100644
--- a/arch/arc/include/asm/bitops.h
+++ b/arch/arc/include/asm/bitops.h
@@ -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 */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 3/4] avr32: Use the generic bitops headers
  2015-11-04 17:13 [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Fabio Estevam
  2015-11-04 17:13 ` [U-Boot] [PATCH 2/4] arc: " Fabio Estevam
@ 2015-11-04 17:13 ` Fabio Estevam
  2015-11-04 17:13 ` [U-Boot] [PATCH 4/4] spi: sf_ops: Use size_t for len Fabio Estevam
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-11-04 17:13 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Applies against u-boot-spi next

 arch/avr32/include/asm/bitops.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/avr32/include/asm/bitops.h b/arch/avr32/include/asm/bitops.h
index 0ec6784..0d425c2 100644
--- a/arch/avr32/include/asm/bitops.h
+++ b/arch/avr32/include/asm/bitops.h
@@ -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 */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 4/4] spi: sf_ops: Use size_t for len
  2015-11-04 17:13 [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Fabio Estevam
  2015-11-04 17:13 ` [U-Boot] [PATCH 2/4] arc: " Fabio Estevam
  2015-11-04 17:13 ` [U-Boot] [PATCH 3/4] avr32: " Fabio Estevam
@ 2015-11-04 17:13 ` Fabio Estevam
  2015-11-04 17:21 ` [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Dinh Nguyen
  2015-11-04 17:58 ` Daniel Schwierzeck
  4 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-11-04 17:13 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

Let the function and its prototype use the same variable type for 'len'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Applies against u-boot-spi next

 drivers/mtd/spi/sf_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c
index 31c79c6..d832464 100644
--- a/drivers/mtd/spi/sf_ops.c
+++ b/drivers/mtd/spi/sf_ops.c
@@ -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;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers
  2015-11-04 17:13 [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Fabio Estevam
                   ` (2 preceding siblings ...)
  2015-11-04 17:13 ` [U-Boot] [PATCH 4/4] spi: sf_ops: Use size_t for len Fabio Estevam
@ 2015-11-04 17:21 ` Dinh Nguyen
  2015-11-05 13:21   ` Fabio Estevam
  2015-11-04 17:58 ` Daniel Schwierzeck
  4 siblings, 1 reply; 8+ messages in thread
From: Dinh Nguyen @ 2015-11-04 17:21 UTC (permalink / raw)
  To: u-boot

On 11/04/2015 11:13 AM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers
  2015-11-04 17:13 [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Fabio Estevam
                   ` (3 preceding siblings ...)
  2015-11-04 17:21 ` [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Dinh Nguyen
@ 2015-11-04 17:58 ` Daniel Schwierzeck
  2015-11-05 13:21   ` Fabio Estevam
  4 siblings, 1 reply; 8+ messages in thread
From: Daniel Schwierzeck @ 2015-11-04 17:58 UTC (permalink / raw)
  To: u-boot



Am 04.11.2015 um 18:13 schrieb Fabio Estevam:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> The generic bitops headers are required when calling logarithimic
> functions, such as ilog2().
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Applies against u-boot-spi next
> 
>  arch/mips/include/asm/bitops.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

--
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.

-- 
- Daniel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers
  2015-11-04 17:58 ` Daniel Schwierzeck
@ 2015-11-05 13:21   ` Fabio Estevam
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-11-05 13:21 UTC (permalink / raw)
  To: u-boot

Hi Daniel,

On Wed, Nov 4, 2015 at 3:58 PM, Daniel Schwierzeck
<daniel.schwierzeck@gmail.com> wrote:

> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
>
> --
> 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.

Thanks for reviewing it. This makes sense. Will do as suggested.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers
  2015-11-04 17:21 ` [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Dinh Nguyen
@ 2015-11-05 13:21   ` Fabio Estevam
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-11-05 13:21 UTC (permalink / raw)
  To: u-boot

On Wed, Nov 4, 2015 at 3:21 PM, Dinh Nguyen
<dinguyen@opensource.altera.com> wrote:
> On 11/04/2015 11:13 AM, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-05 13:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 17:13 [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Fabio Estevam
2015-11-04 17:13 ` [U-Boot] [PATCH 2/4] arc: " Fabio Estevam
2015-11-04 17:13 ` [U-Boot] [PATCH 3/4] avr32: " Fabio Estevam
2015-11-04 17:13 ` [U-Boot] [PATCH 4/4] spi: sf_ops: Use size_t for len Fabio Estevam
2015-11-04 17:21 ` [U-Boot] [PATCH 1/4] mips: Use the generic bitops headers Dinh Nguyen
2015-11-05 13:21   ` Fabio Estevam
2015-11-04 17:58 ` Daniel Schwierzeck
2015-11-05 13:21   ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox