mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] paride: remove redundant variable n
@ 2018-07-02  8:14 Colin King
  2018-07-02 14:28 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-02  8:14 UTC (permalink / raw)
  To: Tim Waugh, Jens Axboe, linux-block; +Cc: kernel-janitors, linux-kernel

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

Variable n is being assigned but is never used hence it is redundant
and can be removed. Also put spacing between variables in declaration
to clean up checkpatch warnings.

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/block/paride/bpck.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/block/paride/bpck.c b/drivers/block/paride/bpck.c
index 4f27e7392e38..89a96786f6ae 100644
--- a/drivers/block/paride/bpck.c
+++ b/drivers/block/paride/bpck.c
@@ -347,7 +347,7 @@ static int bpck_test_proto( PIA *pi, char * scratch, int verbose )
 
 static void bpck_read_eeprom ( PIA *pi, char * buf )
 
-{       int i,j,k,n,p,v,f, om, od;
+{       int i, j, k, p, v, f, om, od;
 
 	bpck_force_spp(pi);
 
@@ -356,7 +356,6 @@ static void bpck_read_eeprom ( PIA *pi, char * buf )
 
 	bpck_connect(pi);
 	
-	n = 0;
 	WR(4,0);
 	for (i=0;i<64;i++) {
 	    WR(6,8);  
-- 
2.17.1


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

* Re: [PATCH] paride: remove redundant variable n
  2018-07-02  8:14 [PATCH] paride: remove redundant variable n Colin King
@ 2018-07-02 14:28 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-07-02 14:28 UTC (permalink / raw)
  To: Colin King, Tim Waugh, linux-block; +Cc: kernel-janitors, linux-kernel

On 7/2/18 2:14 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable n is being assigned but is never used hence it is redundant
> and can be removed. Also put spacing between variables in declaration
> to clean up checkpatch warnings.
> 
> Cleans up clang warning:
> warning: variable 'n' set but not used [-Wunused-but-set-variable]

Applied for 4.19, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2018-07-02 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02  8:14 [PATCH] paride: remove redundant variable n Colin King
2018-07-02 14:28 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome