Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933186Ab3HGNni (ORCPT ); Wed, 7 Aug 2013 09:43:38 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:44091 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933144Ab3HGNnh (ORCPT ); Wed, 7 Aug 2013 09:43:37 -0400 From: Akinobu Mita To: linux-kernel@vger.kernel.org Cc: Akinobu Mita , Mikael Starvik , Jesper Nilsson , linux-cris-kernel@axis.com, Richard Kuo , linux-hexagon@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 1/2] hexagon: fix return type of ffs() Date: Wed, 7 Aug 2013 22:42:38 +0900 Message-Id: <1375882959-26853-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1667 Lines: 48 The return type of ffs() is 'int' on all architectures except cris and hexagon. This unifies the return type to 'int'. The problem I'm seeing is that the following line generates a warning on cris and hexagon because of the mismatch between format '%u' and return type of ffs(). printk("bits in OOB size: %u\n", ffs(ns->geom.oobsz) - 1); But removing this warning by casting to 'int' looks odd, so I suggest unifying the return type of ffs() on all architectures. Signed-off-by: Akinobu Mita Reported-by: Fengguang Wu Cc: Mikael Starvik Cc: Jesper Nilsson Cc: linux-cris-kernel@axis.com Cc: Richard Kuo Cc: linux-hexagon@vger.kernel.org Cc: linux-arch@vger.kernel.org --- This patch is not compile tested yet, because I couldn't find cross compiler for hexagon. arch/hexagon/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/hexagon/include/asm/bitops.h b/arch/hexagon/include/asm/bitops.h index 9b1e4af..80e34a6 100644 --- a/arch/hexagon/include/asm/bitops.h +++ b/arch/hexagon/include/asm/bitops.h @@ -234,7 +234,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; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/