All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: fec: remove redundant variable 'inc'
@ 2018-07-04  7:49 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2018-07-04  7:49 UTC (permalink / raw)
  To: Fugang Duan, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable 'inc' is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'inc' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/freescale/fec_ptp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 36c2d7d6ee1b..7e892b1cbd3d 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -99,7 +99,6 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
 {
 	unsigned long flags;
 	u32 val, tempval;
-	int inc;
 	struct timespec64 ts;
 	u64 ns;
 	val = 0;
@@ -114,7 +113,6 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
 
 	fep->pps_channel = DEFAULT_PPS_CHANNEL;
 	fep->reload_period = PPS_OUPUT_RELOAD_PERIOD;
-	inc = fep->ptp_inc;
 
 	spin_lock_irqsave(&fep->tmreg_lock, flags);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] net: fec: remove redundant variable 'inc'
@ 2018-07-04  7:49 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2018-07-04  7:49 UTC (permalink / raw)
  To: Fugang Duan, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable 'inc' is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'inc' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/freescale/fec_ptp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 36c2d7d6ee1b..7e892b1cbd3d 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -99,7 +99,6 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
 {
 	unsigned long flags;
 	u32 val, tempval;
-	int inc;
 	struct timespec64 ts;
 	u64 ns;
 	val = 0;
@@ -114,7 +113,6 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
 
 	fep->pps_channel = DEFAULT_PPS_CHANNEL;
 	fep->reload_period = PPS_OUPUT_RELOAD_PERIOD;
-	inc = fep->ptp_inc;
 
 	spin_lock_irqsave(&fep->tmreg_lock, flags);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH] net: fec: remove redundant variable 'inc'
  2018-07-04  7:49 ` Colin King
@ 2018-07-04  7:54   ` Andy Duan
  -1 siblings, 0 replies; 6+ messages in thread
From: Andy Duan @ 2018-07-04  7:54 UTC (permalink / raw)
  To: Colin King, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com> Sent: 2018年7月4日 15:50
> Variable 'inc' is being assigned but is never used hence it is redundant and
> can be removed.
> 
> Cleans up clang warning:
> warning: variable 'inc' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks.

Acked-by: Fugang Duan <fugang.duan@nxp.com>

> ---
>  drivers/net/ethernet/freescale/fec_ptp.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c
> b/drivers/net/ethernet/freescale/fec_ptp.c
> index 36c2d7d6ee1b..7e892b1cbd3d 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -99,7 +99,6 @@ static int fec_ptp_enable_pps(struct
> fec_enet_private *fep, uint enable)  {
>  	unsigned long flags;
>  	u32 val, tempval;
> -	int inc;
>  	struct timespec64 ts;
>  	u64 ns;
>  	val = 0;
> @@ -114,7 +113,6 @@ static int fec_ptp_enable_pps(struct
> fec_enet_private *fep, uint enable)
> 
>  	fep->pps_channel = DEFAULT_PPS_CHANNEL;
>  	fep->reload_period = PPS_OUPUT_RELOAD_PERIOD;
> -	inc = fep->ptp_inc;
> 
>  	spin_lock_irqsave(&fep->tmreg_lock, flags);
> 
> --
> 2.17.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] net: fec: remove redundant variable 'inc'
@ 2018-07-04  7:54   ` Andy Duan
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Duan @ 2018-07-04  7:54 UTC (permalink / raw)
  To: Colin King, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

RnJvbTogQ29saW4gS2luZyA8Y29saW4ua2luZ0BjYW5vbmljYWwuY29tPiBTZW50OiAyMDE45bm0
N+aciDTml6UgMTU6NTANCj4gVmFyaWFibGUgJ2luYycgaXMgYmVpbmcgYXNzaWduZWQgYnV0IGlz
IG5ldmVyIHVzZWQgaGVuY2UgaXQgaXMgcmVkdW5kYW50IGFuZA0KPiBjYW4gYmUgcmVtb3ZlZC4N
Cj4gDQo+IENsZWFucyB1cCBjbGFuZyB3YXJuaW5nOg0KPiB3YXJuaW5nOiB2YXJpYWJsZSAnaW5j
JyBzZXQgYnV0IG5vdCB1c2VkIFstV3VudXNlZC1idXQtc2V0LXZhcmlhYmxlXQ0KPiANCj4gU2ln
bmVkLW9mZi1ieTogQ29saW4gSWFuIEtpbmcgPGNvbGluLmtpbmdAY2Fub25pY2FsLmNvbT4NCg0K
VGhhbmtzLg0KDQpBY2tlZC1ieTogRnVnYW5nIER1Y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FBTX09V
UFVUX1JFTE9BRF9QRVJJT0Q7DQo+IC0JaW5jID0gZmVwLT5wdHBfaW5jOw0KPiANCj4gIAlzcGlu
X2xvY2tfaXJxc2F2ZSgmZmVwLT50bXJlZ19sb2NrLCBmbGFncyk7DQo+IA0KPiAtLQ0KPiAyLjE3
LjENCg=

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: fec: remove redundant variable 'inc'
  2018-07-04  7:49 ` Colin King
@ 2018-07-04 13:40   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-07-04 13:40 UTC (permalink / raw)
  To: colin.king; +Cc: fugang.duan, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Wed,  4 Jul 2018 08:49:43 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable 'inc' is being assigned but is never used hence it is
> redundant and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'inc' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: fec: remove redundant variable 'inc'
@ 2018-07-04 13:40   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-07-04 13:40 UTC (permalink / raw)
  To: colin.king; +Cc: fugang.duan, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Wed,  4 Jul 2018 08:49:43 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable 'inc' is being assigned but is never used hence it is
> redundant and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'inc' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-04 13:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04  7:49 [PATCH] net: fec: remove redundant variable 'inc' Colin King
2018-07-04  7:49 ` Colin King
2018-07-04  7:54 ` Andy Duan
2018-07-04  7:54   ` Andy Duan
2018-07-04 13:40 ` David Miller
2018-07-04 13:40   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.