[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181018.154219.1246620018001438422.davem@davemloft.net>
Date: Thu, 18 Oct 2018 15:42:19 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: natechancellor@...il.com
Cc: isdn@...ux-pingi.de, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, yamada.masahiro@...ionext.com
Subject: Re: [PATCH v2] isdn: hfc_{pci,sx}: Avoid empty body if statements
From: Nathan Chancellor <natechancellor@...il.com>
Date: Wed, 17 Oct 2018 20:49:36 -0700
> @@ -228,8 +228,8 @@ typedef union {
> } fifo_area;
>
>
> -#define Write_hfc(a, b, c) (*(((u_char *)a->hw.hfcpci.pci_io) + b) = c)
> -#define Read_hfc(a, b) (*(((u_char *)a->hw.hfcpci.pci_io) + b))
> +#define Write_hfc(a, b, c) (writeb(c, (a->hw.hfcpci.pci_io) + b))
> +#define Read_hfc(a, b) (readb((a->hw.hfcpci.pci_io) + b))
This will add new kinds of warnings.
The problem is that readb/writeb/etc. take an __iomem pointer, but pci_io
is declared as plain "unsigned char *". It should be something like
"void * __iomem" of similar.
Powered by blists - more mailing lists