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]
Date:	Tue, 10 Mar 2015 10:00:14 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Lorenzo Stoakes <lstoakes@...il.com>
Cc:	sudipm.mukherjee@...il.com, teddy.wang@...iconmotion.com,
	gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
	linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: sm750fb: Fix sparse warning

On Mon, Mar 09, 2015 at 08:57:08PM +0000, Lorenzo Stoakes wrote:
> This patch fixes the following sparse warning:-
> 
> drivers/staging/sm750fb/ddk750_help.c: warning: incorrect type in assignment (different address spaces)
> 
> Signed-off-by: Lorenzo Stoakes <lstoakes@...il.com>
> ---
>  drivers/staging/sm750fb/ddk750_chip.h | 4 +++-
>  drivers/staging/sm750fb/ddk750_help.c | 2 +-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h
> index 1c78875..a4e5bcc 100644
> --- a/drivers/staging/sm750fb/ddk750_chip.h
> +++ b/drivers/staging/sm750fb/ddk750_chip.h
> @@ -3,6 +3,8 @@
>  #define DEFAULT_INPUT_CLOCK 14318181 /* Default reference clock */
>  #define SM750LE_REVISION_ID (char)0xfe
>  
> +#include <asm/io.h>
> +
>  /* This is all the chips recognized by this library */
>  typedef enum _logical_chip_type_t
>  {
> @@ -70,7 +72,7 @@ logical_chip_type_t getChipType(void);
>  unsigned int calcPllValue(unsigned int request,pll_value_t *pll);
>  unsigned int calcPllValue2(unsigned int,pll_value_t *);
>  unsigned int formatPllReg(pll_value_t *pPLL);
> -void ddk750_set_mmio(volatile unsigned char *,unsigned short,char);
> +void ddk750_set_mmio(volatile unsigned char __iomem *,unsigned short,char);

No need for the volatile.  Really mmio750 should be a "void __iomem *"
it is declared as "unsigned char __iomem *" but it's not a char pointer
that's only to make the pointer math work.  It would work just as well
as a void and we could remove some ugly casting.

regards,
dan carpenter

--
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