lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 14 Aug 2013 11:06:07 -0500
From:	Richard Kuo <rkuo@...eaurora.org>
To:	Akinobu Mita <akinobu.mita@...il.com>
CC:	linux-kernel@...r.kernel.org, Mikael Starvik <starvik@...s.com>,
	Jesper Nilsson <jesper.nilsson@...s.com>,
	linux-cris-kernel@...s.com, linux-hexagon@...r.kernel.org,
	linux-arch@...r.kernel.org
Subject: Re: [PATCH 1/2] hexagon: fix return type of ffs()

On 08/07/2013 08:42 AM, Akinobu Mita wrote:
> 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 <akinobu.mita@...il.com>
> Reported-by: Fengguang Wu <fengguang.wu@...el.com>
> Cc: Mikael Starvik <starvik@...s.com>
> Cc: Jesper Nilsson <jesper.nilsson@...s.com>
> Cc: linux-cris-kernel@...s.com
> Cc: Richard Kuo <rkuo@...eaurora.org>
> Cc: linux-hexagon@...r.kernel.org
> Cc: linux-arch@...r.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;
>   

For Hexagon:

Acked-by: Richard Kuo <rkuo@...eaurora.org>

-- 

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ