diff mbox

[U-Boot] net: usb: r8152: fix "duplicate 'const' declaration specifier"

Message ID 1498423635-59799-1-git-send-email-philipp.tomsich@theobroma-systems.com
State Accepted
Commit 734f9abd179eb0d9b550993d50e4966ad0d99e92
Delegated to: Joe Hershberger
Headers show

Commit Message

Philipp Tomsich June 25, 2017, 8:47 p.m. UTC
After upgrading to GCC 7.1, the duplicate const specifies in the
r8152 driver trigger the following build warnings with buildman
(observed on a 'buildman rockchip' test)::
  ../drivers/usb/eth/r8152.c:62:35: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
   static const struct r8152_version const r8152_versions[] = {
                                     ^~~~~

This commit fixes these by removing the duplicate 'const' specifier
from the declarations.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---

 drivers/usb/eth/r8152.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass July 7, 2017, 3:57 a.m. UTC | #1
On 25 June 2017 at 14:47, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> After upgrading to GCC 7.1, the duplicate const specifies in the
> r8152 driver trigger the following build warnings with buildman
> (observed on a 'buildman rockchip' test)::
>   ../drivers/usb/eth/r8152.c:62:35: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
>    static const struct r8152_version const r8152_versions[] = {
>                                      ^~~~~
>
> This commit fixes these by removing the duplicate 'const' specifier
> from the declarations.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
>
>  drivers/usb/eth/r8152.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger July 27, 2017, 10:03 p.m. UTC | #2
On Sun, Jun 25, 2017 at 3:47 PM, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> After upgrading to GCC 7.1, the duplicate const specifies in the
> r8152 driver trigger the following build warnings with buildman
> (observed on a 'buildman rockchip' test)::
>   ../drivers/usb/eth/r8152.c:62:35: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
>    static const struct r8152_version const r8152_versions[] = {
>                                      ^~~~~
>
> This commit fixes these by removing the duplicate 'const' specifier
> from the declarations.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger Aug. 7, 2017, 8:31 p.m. UTC | #3
Hi Philipp,

https://patchwork.ozlabs.org/patch/780519/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
index ed441f3..e09351b 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -26,7 +26,7 @@  struct r8152_dongle {
 	unsigned short product;
 };
 
-static const struct r8152_dongle const r8152_dongles[] = {
+static const struct r8152_dongle r8152_dongles[] = {
 	/* Realtek */
 	{ 0x0bda, 0x8050 },
 	{ 0x0bda, 0x8152 },
@@ -59,7 +59,7 @@  struct r8152_version {
 	bool           gmii;
 };
 
-static const struct r8152_version const r8152_versions[] = {
+static const struct r8152_version r8152_versions[] = {
 	{ 0x4c00, RTL_VER_01, 0 },
 	{ 0x4c10, RTL_VER_02, 0 },
 	{ 0x5c00, RTL_VER_03, 1 },