lkml.org 
[lkml]   [2018]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] isdn: hfc_{pci,sx}: Avoid empty body if statements
From
From: Nathan Chancellor <natechancellor@gmail.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.

\
 
 \ /
  Last update: 2018-10-19 00:42    [W:0.118 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site