[01/33] fix arithmetic on pointer to void is a GNU extension warning
diff mbox series

Message ID 20191017182121.103569-1-zenczykowski@gmail.com
State Accepted
Delegated to: John Linville
Headers show
Series
  • [01/33] fix arithmetic on pointer to void is a GNU extension warning
Related show

Commit Message

Maciej Żenczykowski Oct. 17, 2019, 6:20 p.m. UTC
From: Maciej Żenczykowski <maze@google.com>

This fixes:
  external/ethtool/marvell.c:127:22: error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wpointer-arith]
  dump_timer("LED", p + 0x20);

(and remove some spare whitespace while we're at it)

Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia49b0baa9b8d00ccbe802780c226ca03ec9307f0
---
 marvell.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Michal Kubecek Oct. 21, 2019, 6:26 a.m. UTC | #1
On Thu, Oct 17, 2019 at 11:20:49AM -0700, Maciej Żenczykowski wrote:
> From: Maciej Żenczykowski <maze@google.com>
> 
> This fixes:
>   external/ethtool/marvell.c:127:22: error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wpointer-arith]
>   dump_timer("LED", p + 0x20);
> 
> (and remove some spare whitespace while we're at it)
> 
> Signed-off-by: Maciej Żenczykowski <maze@google.com>
> Change-Id: Ia49b0baa9b8d00ccbe802780c226ca03ec9307f0
> ---
>  marvell.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/marvell.c b/marvell.c
> index af21188..27785be 100644
> --- a/marvell.c
> +++ b/marvell.c
> @@ -118,13 +118,13 @@ static void dump_fifo(const char *name, const void *p)
>  	printf("\n%s\n", name);
>  	printf("---------------\n");
>  	printf("End Address                      0x%08X\n", r[0]);
> -  	printf("Write Pointer                    0x%08X\n", r[1]);
> -  	printf("Read Pointer                     0x%08X\n", r[2]);
> -  	printf("Packet Counter                   0x%08X\n", r[3]);
> -  	printf("Level                            0x%08X\n", r[4]);
> -  	printf("Control                          0x%08X\n", r[5]);
> -  	printf("Control/Test                     0x%08X\n", r[6]);
> -	dump_timer("LED", p + 0x20);
> +	printf("Write Pointer                    0x%08X\n", r[1]);
> +	printf("Read Pointer                     0x%08X\n", r[2]);
> +	printf("Packet Counter                   0x%08X\n", r[3]);
> +	printf("Level                            0x%08X\n", r[4]);
> +	printf("Control                          0x%08X\n", r[5]);
> +	printf("Control/Test                     0x%08X\n", r[6]);
> +	dump_timer("LED", r + 8);
>  }
>  
>  static void dump_gmac_fifo(const char *name, const void *p)

Reviewed-by: Michal Kubecek <mkubecek@suse.cz>

Patch
diff mbox series

diff --git a/marvell.c b/marvell.c
index af21188..27785be 100644
--- a/marvell.c
+++ b/marvell.c
@@ -118,13 +118,13 @@  static void dump_fifo(const char *name, const void *p)
 	printf("\n%s\n", name);
 	printf("---------------\n");
 	printf("End Address                      0x%08X\n", r[0]);
-  	printf("Write Pointer                    0x%08X\n", r[1]);
-  	printf("Read Pointer                     0x%08X\n", r[2]);
-  	printf("Packet Counter                   0x%08X\n", r[3]);
-  	printf("Level                            0x%08X\n", r[4]);
-  	printf("Control                          0x%08X\n", r[5]);
-  	printf("Control/Test                     0x%08X\n", r[6]);
-	dump_timer("LED", p + 0x20);
+	printf("Write Pointer                    0x%08X\n", r[1]);
+	printf("Read Pointer                     0x%08X\n", r[2]);
+	printf("Packet Counter                   0x%08X\n", r[3]);
+	printf("Level                            0x%08X\n", r[4]);
+	printf("Control                          0x%08X\n", r[5]);
+	printf("Control/Test                     0x%08X\n", r[6]);
+	dump_timer("LED", r + 8);
 }
 
 static void dump_gmac_fifo(const char *name, const void *p)