scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry
diff mbox series

Message ID 20181210235156.6237-1-natechancellor@gmail.com
State Deferred
Headers show
Series
  • scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry
Related show

Commit Message

Nathan Chancellor Dec. 10, 2018, 11:51 p.m. UTC
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(-)

Comments

Nathan Chancellor Jan. 26, 2019, 7:11 p.m. UTC | #1
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?
Masanori Goto Jan. 27, 2019, 8:42 a.m. UTC | #2
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?
Nathan Chancellor Jan. 28, 2019, 1:23 a.m. UTC | #3
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?
Martin K. Petersen Jan. 29, 2019, 6:27 a.m. UTC | #4
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.

Patch
diff mbox series

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);