linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry
@ 2018-12-10 23:51 Nathan Chancellor
  2019-01-26 19:11 ` Nathan Chancellor
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2018-12-10 23:51 UTC (permalink / raw)
  To: GOTO Masanori, YOKOTA Hiroshi, James E.J. Bottomley, Martin K. Petersen
  Cc: linux-scsi, linux-kernel, Nathan Chancellor

Clang warns:

drivers/scsi/nsp32.c:2444:14: warning: explicitly assigning value of
variable of type 'unsigned char' to itself [-Wself-assign]
        offset      = offset;
        ~~~~~~      ^

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/scsi/nsp32.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 5aac3e801903..7ce6e7acf2f3 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -2441,7 +2441,6 @@ static void nsp32_set_sync_entry(nsp32_hw_data *data,
 
 	period      = data->synct[entry].period_num;
 	ackwidth    = data->synct[entry].ackwidth;
-	offset      = offset;
 	sample_rate = data->synct[entry].sample_rate;
 
 	target->syncreg    = TO_SYNCREG(period, offset);
-- 
2.20.0


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

* Re: [PATCH] scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry
  2018-12-10 23:51 [PATCH] scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry Nathan Chancellor
@ 2019-01-26 19:11 ` Nathan Chancellor
  2019-01-27  8:42   ` Masanori Goto
  2019-01-29  6:27   ` Martin K. Petersen
  0 siblings, 2 replies; 5+ messages in thread
From: Nathan Chancellor @ 2019-01-26 19:11 UTC (permalink / raw)
  To: GOTO Masanori, YOKOTA Hiroshi, James E.J. Bottomley, Martin K. Petersen
  Cc: linux-scsi, linux-kernel

On Mon, Dec 10, 2018 at 04:51:56PM -0700, Nathan Chancellor wrote:
> Clang warns:
> 
> drivers/scsi/nsp32.c:2444:14: warning: explicitly assigning value of
> variable of type 'unsigned char' to itself [-Wself-assign]
>         offset      = offset;
>         ~~~~~~      ^
> 
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>  drivers/scsi/nsp32.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
> index 5aac3e801903..7ce6e7acf2f3 100644
> --- a/drivers/scsi/nsp32.c
> +++ b/drivers/scsi/nsp32.c
> @@ -2441,7 +2441,6 @@ static void nsp32_set_sync_entry(nsp32_hw_data *data,
>  
>  	period      = data->synct[entry].period_num;
>  	ackwidth    = data->synct[entry].ackwidth;
> -	offset      = offset;
>  	sample_rate = data->synct[entry].sample_rate;
>  
>  	target->syncreg    = TO_SYNCREG(period, offset);
> -- 
> 2.20.0
> 

Ping?

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

* Re: [PATCH] scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry
  2019-01-26 19:11 ` Nathan Chancellor
@ 2019-01-27  8:42   ` Masanori Goto
  2019-01-28  1:23     ` Nathan Chancellor
  2019-01-29  6:27   ` Martin K. Petersen
  1 sibling, 1 reply; 5+ messages in thread
From: Masanori Goto @ 2019-01-27  8:42 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: YOKOTA Hiroshi, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, linux-kernel

Thanks for the fix!

2019年1月27日(日) 4:11 Nathan Chancellor <natechancellor@gmail.com>:
>
> On Mon, Dec 10, 2018 at 04:51:56PM -0700, Nathan Chancellor wrote:
> > Clang warns:
> >
> > drivers/scsi/nsp32.c:2444:14: warning: explicitly assigning value of
> > variable of type 'unsigned char' to itself [-Wself-assign]
> >         offset      = offset;
> >         ~~~~~~      ^
> >
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Acked-by: GOTO Masanori <gotom@debian.or.jp>

> > ---
> >  drivers/scsi/nsp32.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
> > index 5aac3e801903..7ce6e7acf2f3 100644
> > --- a/drivers/scsi/nsp32.c
> > +++ b/drivers/scsi/nsp32.c
> > @@ -2441,7 +2441,6 @@ static void nsp32_set_sync_entry(nsp32_hw_data *data,
> >
> >       period      = data->synct[entry].period_num;
> >       ackwidth    = data->synct[entry].ackwidth;
> > -     offset      = offset;
> >       sample_rate = data->synct[entry].sample_rate;
> >
> >       target->syncreg    = TO_SYNCREG(period, offset);
> > --
> > 2.20.0
> >
>
> Ping?

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

* Re: [PATCH] scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry
  2019-01-27  8:42   ` Masanori Goto
@ 2019-01-28  1:23     ` Nathan Chancellor
  0 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2019-01-28  1:23 UTC (permalink / raw)
  To: Masanori Goto
  Cc: YOKOTA Hiroshi, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, linux-kernel

On Sun, Jan 27, 2019 at 05:42:01PM +0900, Masanori Goto wrote:
> Thanks for the fix!
> 
> 2019年1月27日(日) 4:11 Nathan Chancellor <natechancellor@gmail.com>:
> >
> > On Mon, Dec 10, 2018 at 04:51:56PM -0700, Nathan Chancellor wrote:
> > > Clang warns:
> > >
> > > drivers/scsi/nsp32.c:2444:14: warning: explicitly assigning value of
> > > variable of type 'unsigned char' to itself [-Wself-assign]
> > >         offset      = offset;
> > >         ~~~~~~      ^
> > >
> > > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> 
> Acked-by: GOTO Masanori <gotom@debian.or.jp>

Thank you for the reply and the review :)

Nathan

> 
> > > ---
> > >  drivers/scsi/nsp32.c | 1 -
> > >  1 file changed, 1 deletion(-)
> > >
> > > diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
> > > index 5aac3e801903..7ce6e7acf2f3 100644
> > > --- a/drivers/scsi/nsp32.c
> > > +++ b/drivers/scsi/nsp32.c
> > > @@ -2441,7 +2441,6 @@ static void nsp32_set_sync_entry(nsp32_hw_data *data,
> > >
> > >       period      = data->synct[entry].period_num;
> > >       ackwidth    = data->synct[entry].ackwidth;
> > > -     offset      = offset;
> > >       sample_rate = data->synct[entry].sample_rate;
> > >
> > >       target->syncreg    = TO_SYNCREG(period, offset);
> > > --
> > > 2.20.0
> > >
> >
> > Ping?

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

* Re: [PATCH] scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry
  2019-01-26 19:11 ` Nathan Chancellor
  2019-01-27  8:42   ` Masanori Goto
@ 2019-01-29  6:27   ` Martin K. Petersen
  1 sibling, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2019-01-29  6:27 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: GOTO Masanori, YOKOTA Hiroshi, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, linux-kernel


Nathan,

>> drivers/scsi/nsp32.c:2444:14: warning: explicitly assigning value of
>> variable of type 'unsigned char' to itself [-Wself-assign]
>>         offset      = offset;
>>         ~~~~~~      ^

Applied to 5.1/scsi-queue. Thanks.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2019-01-29  6:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 23:51 [PATCH] scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry Nathan Chancellor
2019-01-26 19:11 ` Nathan Chancellor
2019-01-27  8:42   ` Masanori Goto
2019-01-28  1:23     ` Nathan Chancellor
2019-01-29  6:27   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).