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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161115182205.GA11024@kroah.com>
Date:   Tue, 15 Nov 2016 19:22:05 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Sergio Paracuellos <sergio.paracuellos@...il.com>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        liodot@...il.com, charrer@...critech.com
Subject: Re: [PATCH] staging: slicoss: fix different address space warnings

On Tue, Nov 15, 2016 at 06:19:37PM +0100, Sergio Paracuellos wrote:
> This patch fix the following sparse warnings in slicoss driver:
> warning: incorrect type in assignment (different address spaces)
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@...il.com>
> ---
>  drivers/staging/slicoss/slic.h    |  7 ++++
>  drivers/staging/slicoss/slicoss.c | 83 ++++++++++++++++++++++-----------------
>  2 files changed, 55 insertions(+), 35 deletions(-)
> 
> diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h
> index 420546d..f76c0cd 100644
> --- a/drivers/staging/slicoss/slic.h
> +++ b/drivers/staging/slicoss/slic.h
> @@ -540,6 +540,13 @@ static inline void slic_flush_write(struct adapter *adapter)
>  	ioread32(adapter->regs + SLIC_REG_HOSTID);
>  }
>  
> +#define IOMEM_GET_FIELDADDR(base, member)				\
> +({									\
> +	char __iomem *_base = (char __iomem *)base;			\
> +	_base += offsetof(typeof(*base), member);			\
> +	(void __iomem *)_base;						\
> +})

Really?  Why?  Shouldn't you be marking base as __iomem all the time?
That way you don't need this mess of a cast.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ