2013-05-22 05:55:44

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the final tree (net-next tree related)

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
produced this warning:

drivers/net/ethernet/sun/sunbmac.c: In function 'bigmac_set_multicast':
drivers/net/ethernet/sun/sunbmac.c:998:6: warning: unused variable 'i' [-Wunused-variable]

Introduced by commit bfd428daaf61 ("net: ethernet: sun: initialize
variables directly") from the net-next tree.
--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (453.00 B)
(No filename) (836.00 B)
Download all attachments

2013-05-22 13:24:40

by Emilio López

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the final tree (net-next tree related)

Hi Stephen,

El 22/05/13 02:55, Stephen Rothwell escribi?:
> Hi all,
>
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> produced this warning:
>
> drivers/net/ethernet/sun/sunbmac.c: In function 'bigmac_set_multicast':
> drivers/net/ethernet/sun/sunbmac.c:998:6: warning: unused variable 'i' [-Wunused-variable]
>
> Introduced by commit bfd428daaf61 ("net: ethernet: sun: initialize
> variables directly") from the net-next tree.
>

Thank you for notifying.

After a second look at the code, I see the apple and korina patch
counterparts also leave an extra i variable now; the dm9000 patch should
be unaffected as it still uses i for other things.

@David, what would you like me to do? I can send another set of patches
fixing this, resend the full original series but fixed, or resend just
the affected patches.

Emilio

2013-05-22 19:26:26

by David Miller

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the final tree (net-next tree related)

From: Emilio L?pez <[email protected]>
Date: Wed, 22 May 2013 10:24:28 -0300

> @David, what would you like me to do? I can send another set of patches
> fixing this, resend the full original series but fixed, or resend just
> the affected patches.

Your patch series is in my tree and will not be reverted, we never do
that. Therefore you must send me patches which fix up these problems.

2013-05-23 00:00:22

by Emilio López

[permalink] [raw]
Subject: [PATCH 1/3] net: ethernet: apple: drop unused variable

Commit 3b0aaef ("net: ethernet: apple: initialize variables directly")
dropped the only loop that was using i but did not remove the actual
variable, therefore causing a warning when building. This patch drops
the now redundant line.

Signed-off-by: Emilio López <[email protected]>
---
drivers/net/ethernet/apple/bmac.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c
index 714dcfe..a597b76 100644
--- a/drivers/net/ethernet/apple/bmac.c
+++ b/drivers/net/ethernet/apple/bmac.c
@@ -1016,7 +1016,6 @@ static void bmac_set_multicast(struct net_device *dev)
static void bmac_set_multicast(struct net_device *dev)
{
struct netdev_hw_addr *ha;
- int i;
unsigned short rx_cfg;
u32 crc;

--
1.8.2.3

2013-05-23 00:00:39

by Emilio López

[permalink] [raw]
Subject: [PATCH 2/3] net: ethernet: korina: drop unused variable

Commit e998fd4 ("net: ethernet: korina: initialize variables directly")
dropped the only loop that was using i but did not remove the actual
variable, therefore causing a warning when building. This patch drops
the now redundant line.

Signed-off-by: Emilio López <[email protected]>
---
drivers/net/ethernet/korina.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c
index 0b57085..e7851d1 100644
--- a/drivers/net/ethernet/korina.c
+++ b/drivers/net/ethernet/korina.c
@@ -483,7 +483,6 @@ static void korina_multicast_list(struct net_device *dev)
unsigned long flags;
struct netdev_hw_addr *ha;
u32 recognise = ETH_ARC_AB; /* always accept broadcasts */
- int i;

/* Set promiscuous mode */
if (dev->flags & IFF_PROMISC)
--
1.8.2.3

2013-05-23 00:00:56

by Emilio López

[permalink] [raw]
Subject: [PATCH 3/3] net: ethernet: sun: drop unused variable

Commit bfd428d ("net: ethernet: sun: initialize variables directly")
dropped the only loop that was using i but did not remove the actual
variable, therefore causing a warning when building. This patch drops
the now redundant line.

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Emilio López <[email protected]>
---
drivers/net/ethernet/sun/sunbmac.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/sun/sunbmac.c b/drivers/net/ethernet/sun/sunbmac.c
index 09b4f8c..0d43fa9 100644
--- a/drivers/net/ethernet/sun/sunbmac.c
+++ b/drivers/net/ethernet/sun/sunbmac.c
@@ -995,7 +995,6 @@ static void bigmac_set_multicast(struct net_device *dev)
struct bigmac *bp = netdev_priv(dev);
void __iomem *bregs = bp->bregs;
struct netdev_hw_addr *ha;
- int i;
u32 tmp, crc;

/* Disable the receiver. The bit self-clears when
--
1.8.2.3

2013-05-23 06:43:09

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 1/3] net: ethernet: apple: drop unused variable

From: Emilio L?pez <[email protected]>
Date: Wed, 22 May 2013 20:57:35 -0300

> Commit 3b0aaef ("net: ethernet: apple: initialize variables directly")
> dropped the only loop that was using i but did not remove the actual
> variable, therefore causing a warning when building. This patch drops
> the now redundant line.
>
> Signed-off-by: Emilio L?pez <[email protected]>

Applied.

2013-05-23 06:43:16

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 2/3] net: ethernet: korina: drop unused variable

From: Emilio L?pez <[email protected]>
Date: Wed, 22 May 2013 20:57:36 -0300

> Commit e998fd4 ("net: ethernet: korina: initialize variables directly")
> dropped the only loop that was using i but did not remove the actual
> variable, therefore causing a warning when building. This patch drops
> the now redundant line.
>
> Signed-off-by: Emilio L?pez <[email protected]>

Applied.

2013-05-23 06:43:21

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 3/3] net: ethernet: sun: drop unused variable

From: Emilio L?pez <[email protected]>
Date: Wed, 22 May 2013 20:57:37 -0300

> Commit bfd428d ("net: ethernet: sun: initialize variables directly")
> dropped the only loop that was using i but did not remove the actual
> variable, therefore causing a warning when building. This patch drops
> the now redundant line.
>
> Reported-by: Stephen Rothwell <[email protected]>
> Signed-off-by: Emilio L?pez <[email protected]>

Applied.

2013-05-23 12:54:35

by Emilio López

[permalink] [raw]
Subject: Re: [PATCH 3/3] net: ethernet: sun: drop unused variable

Hi David,

El 23/05/13 03:43, David Miller escribi?:
> From: Emilio L?pez <[email protected]>
> Date: Wed, 22 May 2013 20:57:37 -0300
>
>> Commit bfd428d ("net: ethernet: sun: initialize variables directly")
>> dropped the only loop that was using i but did not remove the actual
>> variable, therefore causing a warning when building. This patch drops
>> the now redundant line.
>>
>> Reported-by: Stephen Rothwell <[email protected]>
>> Signed-off-by: Emilio L?pez <[email protected]>
>
> Applied.

I see that you applied the series in net instead of net-next; the
previous patches were in net-next only. This will cause build breakage
in net because the loop is still there.

Regards,

Emilio

2013-05-23 19:13:32

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 3/3] net: ethernet: sun: drop unused variable

From: Emilio L?pez <[email protected]>
Date: Thu, 23 May 2013 09:54:23 -0300

> Hi David,
>
> El 23/05/13 03:43, David Miller escribi?:
>> From: Emilio L?pez <[email protected]>
>> Date: Wed, 22 May 2013 20:57:37 -0300
>>
>>> Commit bfd428d ("net: ethernet: sun: initialize variables directly")
>>> dropped the only loop that was using i but did not remove the actual
>>> variable, therefore causing a warning when building. This patch drops
>>> the now redundant line.
>>>
>>> Reported-by: Stephen Rothwell <[email protected]>
>>> Signed-off-by: Emilio L?pez <[email protected]>
>>
>> Applied.
>
> I see that you applied the series in net instead of net-next; the
> previous patches were in net-next only. This will cause build breakage
> in net because the loop is still there.

My bad, I'll fix this up.