Re: [PATCH v2] isdn: hfc_{pci,sx}: Avoid empty body if statements
From: David Miller
Date: Thu Oct 18 2018 - 18:42:22 EST
From: Nathan Chancellor <natechancellor@xxxxxxxxx>
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.