From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Vineet Gupta <vgupta@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-snps-arc@lists.infradead.org,
linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Subject: [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long
Date: Wed, 25 May 2022 16:48:43 +0200 [thread overview]
Message-ID: <20220525144844.1571705-2-amadeuszx.slawinski@linux.intel.com> (raw)
In-Reply-To: <20220525144844.1571705-1-amadeuszx.slawinski@linux.intel.com>
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
next prev parent reply other threads:[~2022-05-25 14:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 14:48 [PATCH 0/2] bitops: __fls adjustments Amadeusz Sławiński
2022-05-25 14:48 ` Amadeusz Sławiński [this message]
2022-05-26 3:42 ` [PATCH 1/2] ARC: bitops: Change __fls to return unsigned long Vineet Gupta
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-26 10:08 ` [PATCH 0/2] bitops: __fls adjustments Cezary Rojewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220525144844.1571705-2-amadeuszx.slawinski@linux.intel.com \
--to=amadeuszx.slawinski@linux.intel.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=vgupta@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox