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:	Sat, 15 Feb 2014 11:41:42 -0800
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Johannes Berg <johannes@...solutions.net>
Subject: Re: [PATCH] lib: Fix some sparse warnings in devres.c

On Thu, Feb 06, 2014 at 11:13:46AM -0500, Steven Rostedt wrote:
> Having a discussion about sparse warnings in the kernel, and that we
> should clean them up, I decided to pick a random file to do so. This
> happened to be devres.c which gives the following warnings:
> 
>   CHECK   lib/devres.c
> lib/devres.c:83:9: warning: cast removes address space of expression
> lib/devres.c:117:31: warning: incorrect type in return expression (different address spaces)
> lib/devres.c:117:31:    expected void [noderef] <asn:2>*
> lib/devres.c:117:31:    got void *
> lib/devres.c:125:31: warning: incorrect type in return expression (different address spaces)
> lib/devres.c:125:31:    expected void [noderef] <asn:2>*
> lib/devres.c:125:31:    got void *
> lib/devres.c:136:26: warning: incorrect type in assignment (different address spaces)
> lib/devres.c:136:26:    expected void [noderef] <asn:2>*[assigned] dest_ptr
> lib/devres.c:136:26:    got void *
> lib/devres.c:226:9: warning: cast removes address space of expression
> 
> Mostly it's just the use of typecasting to void * without adding
> __force, or returning ERR_PTR(-ESOMEERR) without typecasting to a
> __iomem type.
> 
> I added a helper macro IOMEM_ERR_PTR() that does the typecast to make
> the code a little nicer than adding ugly typecasts to the code.
> 
> This is applied against linux-next.
> 
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>

Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
--
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