mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Richard Kuo <rkuo@codeaurora.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] hexagon: fix ffz/fls/ffs return type
Date: Fri,  6 Apr 2018 16:28:21 +0200	[thread overview]
Message-ID: <20180406142832.2243021-1-arnd@arndb.de> (raw)

Let's use the same return type as the major architectures to
avoid warnings like

drivers/ata/libahci_platform.c: In function 'ahci_platform_init_host':
drivers/ata/libahci_platform.c:561:12: warning: comparison of distinct pointer types lacks a cast [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/hexagon/include/asm/bitops.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/hexagon/include/asm/bitops.h b/arch/hexagon/include/asm/bitops.h
index 5e4a59b3ec1b..8790a50b1f5e 100644
--- a/arch/hexagon/include/asm/bitops.h
+++ b/arch/hexagon/include/asm/bitops.h
@@ -194,7 +194,7 @@ static inline int __test_bit(int nr, const volatile unsigned long *addr)
  *
  * Undefined if no zero exists, so code should check against ~0UL first.
  */
-static inline long ffz(int x)
+static inline int ffz(int x)
 {
 	int r;
 
@@ -211,7 +211,7 @@ static inline long ffz(int x)
  * This is defined the same way as ffs.
  * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
  */
-static inline long fls(int x)
+static inline int fls(int x)
 {
 	int r;
 
@@ -232,7 +232,7 @@ static inline long fls(int x)
  * the libc and compiler builtin ffs routines, therefore
  * differs in spirit from the above ffz (man ffs).
  */
-static inline long ffs(int x)
+static inline int ffs(int x)
 {
 	int r;
 
-- 
2.9.0

             reply	other threads:[~2018-04-06 14:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 14:28 Arnd Bergmann [this message]
2018-04-06 14:28 ` [PATCH 2/3] hexagon: add memset_io() helper Arnd Bergmann
2018-04-08  1:31   ` Richard Kuo
2018-04-06 14:28 ` [PATCH 3/3] hexagon: export csum_partial_copy_nocheck Arnd Bergmann
2018-04-08  1:32   ` Richard Kuo
2018-04-10  6:33     ` Arnd Bergmann
2018-04-08  1:35 ` [PATCH 1/3] hexagon: fix ffz/fls/ffs return type Richard Kuo
2018-04-10  6:31   ` Arnd Bergmann

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=20180406142832.2243021-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkuo@codeaurora.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

all inboxes | Powered by JetHome®