* [PATCH 0/2] bitops: __fls adjustments
@ 2022-05-25 14:48 ` Amadeusz Sławiński
0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Sławiński @ 2022-05-25 14:48 UTC (permalink / raw)
To: Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel, Amadeusz Sławiński
Apparently on few architectures __fls is defined incorrectly. Fix this
by adjusting declarations to asm-generic ones.
As far as I can tell there should be no functional changes, but I don't
have devices to test it, so it was only compile tested.
Amadeusz Sławiński (2):
ARC: bitops: Change __fls to return unsigned long
m68k: bitops: Change __fls to return and accept unsigned long
arch/arc/include/asm/bitops.h | 2 +-
arch/m68k/include/asm/bitops.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/2] bitops: __fls adjustments
@ 2022-05-25 14:48 ` Amadeusz Sławiński
0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Sławiński @ 2022-05-25 14:48 UTC (permalink / raw)
To: Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel, Amadeusz Sławiński
Apparently on few architectures __fls is defined incorrectly. Fix this
by adjusting declarations to asm-generic ones.
As far as I can tell there should be no functional changes, but I don't
have devices to test it, so it was only compile tested.
Amadeusz Sławiński (2):
ARC: bitops: Change __fls to return unsigned long
m68k: bitops: Change __fls to return and accept unsigned long
arch/arc/include/asm/bitops.h | 2 +-
arch/m68k/include/asm/bitops.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.25.1
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long
2022-05-25 14:48 ` Amadeusz Sławiński
@ 2022-05-25 14:48 ` Amadeusz Sławiński
-1 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Sławiński @ 2022-05-25 14:48 UTC (permalink / raw)
To: Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel, Amadeusz Sławiński
As per asm-generic definition and other architectures __fls should
return unsigned long.
No functional change is expected as return value should fit in unsigned
long.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
arch/arc/include/asm/bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h
index bdb7e190a294..4076607e7168 100644
--- a/arch/arc/include/asm/bitops.h
+++ b/arch/arc/include/asm/bitops.h
@@ -82,7 +82,7 @@ static inline __attribute__ ((const)) int fls(unsigned int x)
/*
* __fls: Similar to fls, but zero based (0-31)
*/
-static inline __attribute__ ((const)) int __fls(unsigned long x)
+static inline __attribute__ ((const)) unsigned long __fls(unsigned long x)
{
if (!x)
return 0;
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long
@ 2022-05-25 14:48 ` Amadeusz Sławiński
0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Sławiński @ 2022-05-25 14:48 UTC (permalink / raw)
To: Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel, Amadeusz Sławiński
As per asm-generic definition and other architectures __fls should
return unsigned long.
No functional change is expected as return value should fit in unsigned
long.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
arch/arc/include/asm/bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h
index bdb7e190a294..4076607e7168 100644
--- a/arch/arc/include/asm/bitops.h
+++ b/arch/arc/include/asm/bitops.h
@@ -82,7 +82,7 @@ static inline __attribute__ ((const)) int fls(unsigned int x)
/*
* __fls: Similar to fls, but zero based (0-31)
*/
-static inline __attribute__ ((const)) int __fls(unsigned long x)
+static inline __attribute__ ((const)) unsigned long __fls(unsigned long x)
{
if (!x)
return 0;
--
2.25.1
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] m68k: bitops: Change __fls to return and accept unsigned long
2022-05-25 14:48 ` Amadeusz Sławiński
@ 2022-05-25 14:48 ` Amadeusz Sławiński
-1 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Sławiński @ 2022-05-25 14:48 UTC (permalink / raw)
To: Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel, Amadeusz Sławiński
As per asm-generic definition and other architectures __fls should
return and accept unsigned long as its parameter.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
arch/m68k/include/asm/bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h
index 51283db53667..87c2cd66a9ce 100644
--- a/arch/m68k/include/asm/bitops.h
+++ b/arch/m68k/include/asm/bitops.h
@@ -510,7 +510,7 @@ static inline int fls(unsigned int x)
return 32 - cnt;
}
-static inline int __fls(int x)
+static inline unsigned long __fls(unsigned long x)
{
return fls(x) - 1;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] m68k: bitops: Change __fls to return and accept unsigned long
@ 2022-05-25 14:48 ` Amadeusz Sławiński
0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Sławiński @ 2022-05-25 14:48 UTC (permalink / raw)
To: Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel, Amadeusz Sławiński
As per asm-generic definition and other architectures __fls should
return and accept unsigned long as its parameter.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
arch/m68k/include/asm/bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h
index 51283db53667..87c2cd66a9ce 100644
--- a/arch/m68k/include/asm/bitops.h
+++ b/arch/m68k/include/asm/bitops.h
@@ -510,7 +510,7 @@ static inline int fls(unsigned int x)
return 32 - cnt;
}
-static inline int __fls(int x)
+static inline unsigned long __fls(unsigned long x)
{
return fls(x) - 1;
}
--
2.25.1
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long
2022-05-25 14:48 ` Amadeusz Sławiński
@ 2022-05-26 3:42 ` Vineet Gupta
-1 siblings, 0 replies; 12+ messages in thread
From: Vineet Gupta @ 2022-05-26 3:42 UTC (permalink / raw)
To: Amadeusz Sławiński, Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel
Hi,
On 5/25/22 07:48, Amadeusz Sławiński wrote:
> As per asm-generic definition and other architectures __fls should
> return unsigned long.
>
> No functional change is expected as return value should fit in unsigned
> long.
>
> Signed-off-by: Amadeusz Sławiński<amadeuszx.slawinski@linux.intel.com>
Applied to for-curr.
Thx,
-Vineet
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long
@ 2022-05-26 3:42 ` Vineet Gupta
0 siblings, 0 replies; 12+ messages in thread
From: Vineet Gupta @ 2022-05-26 3:42 UTC (permalink / raw)
To: Amadeusz Sławiński, Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel
Hi,
On 5/25/22 07:48, Amadeusz Sławiński wrote:
> As per asm-generic definition and other architectures __fls should
> return unsigned long.
>
> No functional change is expected as return value should fit in unsigned
> long.
>
> Signed-off-by: Amadeusz Sławiński<amadeuszx.slawinski@linux.intel.com>
Applied to for-curr.
Thx,
-Vineet
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] bitops: __fls adjustments
2022-05-25 14:48 ` Amadeusz Sławiński
@ 2022-05-26 10:08 ` Cezary Rojewski
-1 siblings, 0 replies; 12+ messages in thread
From: Cezary Rojewski @ 2022-05-26 10:08 UTC (permalink / raw)
To: Amadeusz Sławiński, Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel
On 2022-05-25 4:48 PM, Amadeusz Sławiński wrote:
> Apparently on few architectures __fls is defined incorrectly. Fix this
> by adjusting declarations to asm-generic ones.
>
> As far as I can tell there should be no functional changes, but I don't
> have devices to test it, so it was only compile tested.
>
> Amadeusz Sławiński (2):
> ARC: bitops: Change __fls to return unsigned long
> m68k: bitops: Change __fls to return and accept unsigned long
>
> arch/arc/include/asm/bitops.h | 2 +-
> arch/m68k/include/asm/bitops.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
Thanks for the fixes Amadeo!
I wonder if there are more places like this to address..
Not tested but I do not see any issues with the code so:
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Regards,
Czarek
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] bitops: __fls adjustments
@ 2022-05-26 10:08 ` Cezary Rojewski
0 siblings, 0 replies; 12+ messages in thread
From: Cezary Rojewski @ 2022-05-26 10:08 UTC (permalink / raw)
To: Amadeusz Sławiński, Vineet Gupta, Geert Uytterhoeven
Cc: linux-snps-arc, linux-m68k, linux-kernel
On 2022-05-25 4:48 PM, Amadeusz Sławiński wrote:
> Apparently on few architectures __fls is defined incorrectly. Fix this
> by adjusting declarations to asm-generic ones.
>
> As far as I can tell there should be no functional changes, but I don't
> have devices to test it, so it was only compile tested.
>
> Amadeusz Sławiński (2):
> ARC: bitops: Change __fls to return unsigned long
> m68k: bitops: Change __fls to return and accept unsigned long
>
> arch/arc/include/asm/bitops.h | 2 +-
> arch/m68k/include/asm/bitops.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
Thanks for the fixes Amadeo!
I wonder if there are more places like this to address..
Not tested but I do not see any issues with the code so:
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Regards,
Czarek
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long
2022-05-26 3:42 ` Vineet Gupta
@ 2022-05-27 8:37 ` Amadeusz Sławiński
-1 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Sławiński @ 2022-05-27 8:37 UTC (permalink / raw)
To: Vineet Gupta, Geert Uytterhoeven; +Cc: linux-snps-arc, linux-m68k, linux-kernel
On 5/26/2022 5:42 AM, Vineet Gupta wrote:
> Hi,
>
> On 5/25/22 07:48, Amadeusz Sławiński wrote:
>> As per asm-generic definition and other architectures __fls should
>> return unsigned long.
>>
>> No functional change is expected as return value should fit in unsigned
>> long.
>>
>> Signed-off-by: Amadeusz Sławiński<amadeuszx.slawinski@linux.intel.com>
>
> Applied to for-curr.
>
> Thx,
> -Vineet
And apparently __fls is defined in two places in ARC header and I only
changed one, should I send incremental patch on top of already merged
one or v2?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long
@ 2022-05-27 8:37 ` Amadeusz Sławiński
0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Sławiński @ 2022-05-27 8:37 UTC (permalink / raw)
To: Vineet Gupta, Geert Uytterhoeven; +Cc: linux-snps-arc, linux-m68k, linux-kernel
On 5/26/2022 5:42 AM, Vineet Gupta wrote:
> Hi,
>
> On 5/25/22 07:48, Amadeusz Sławiński wrote:
>> As per asm-generic definition and other architectures __fls should
>> return unsigned long.
>>
>> No functional change is expected as return value should fit in unsigned
>> long.
>>
>> Signed-off-by: Amadeusz Sławiński<amadeuszx.slawinski@linux.intel.com>
>
> Applied to for-curr.
>
> Thx,
> -Vineet
And apparently __fls is defined in two places in ARC header and I only
changed one, should I send incremental patch on top of already merged
one or v2?
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-05-27 8:38 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 14:48 [PATCH 0/2] bitops: __fls adjustments Amadeusz Sławiński
2022-05-25 14:48 ` Amadeusz Sławiński
2022-05-25 14:48 ` [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long Amadeusz Sławiński
2022-05-25 14:48 ` Amadeusz Sławiński
2022-05-26 3:42 ` Vineet Gupta
2022-05-26 3:42 ` Vineet Gupta
2022-05-27 8:37 ` Amadeusz Sławiński
2022-05-27 8:37 ` Amadeusz Sławiński
2022-05-25 14:48 ` [PATCH 2/2] m68k: bitops: Change __fls to return and accept " Amadeusz Sławiński
2022-05-25 14:48 ` Amadeusz Sławiński
2022-05-26 10:08 ` [PATCH 0/2] bitops: __fls adjustments Cezary Rojewski
2022-05-26 10:08 ` Cezary Rojewski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.