Skip to contentSkip to conversation

scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry

PATCH Applied Nathan Chancellor 3 participants 5 messages Dec 10, 2018 – Jan 29, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: nsp32: Remove unnecessary self assignment in nsp32_set_sync_entry

Clang warns:

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

        offset      = offset;
        ~~~~~~      ^
---
 drivers/scsi/nsp32.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/nsp32.c +0 -1
index 5aac3e801903..7ce6e7acf2f3 100644
@@ -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);
Signature · 1 line
2.20.0
#1 lore raw
Quoted 27 lines · 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;
        ~~~~~~      ^
---
 drivers/scsi/nsp32.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/nsp32.c +0 -1
index 5aac3e801903..7ce6e7acf2f3 100644
@@ -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);
Signature · 1 line
2.20.0

Ping?

maintainer Acked-by
#2 lore raw

Thanks for the fix!

2019年1月27日(日) 4:11 Nathan Chancellor <[email protected]>:

Quoted 10 lines · Nathan Chancellor
Quoted 8 lines

Clang warns:

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

        offset      = offset;
        ~~~~~~      ^
Quoted 21 lines
Quoted 17 lines
---
 drivers/scsi/nsp32.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/nsp32.c +0 -2
index 5aac3e801903..7ce6e7acf2f3 100644
@@ -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);
--
Quoted 2 lines

2.20.0

Ping?

#3 lore raw
Quoted 7 lines · Masanori Goto

Thanks for the fix!

2019年1月27日(日) 4:11 Nathan Chancellor <[email protected]>:

Quoted 4 lines · Nathan Chancellor
Quoted 2 lines

Clang warns:

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

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

        offset      = offset;
        ~~~~~~      ^

Thank you for the reply and the review :)

Nathan

Quoted 22 lines
Quoted 22 lines
Quoted 18 lines
---
 drivers/scsi/nsp32.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/nsp32.c +0 -2
index 5aac3e801903..7ce6e7acf2f3 100644
@@ -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);
--
Quoted 2 lines

2.20.0

Ping?

#4 lore raw
In reply to Nathan Chancellor

Nathan,

Quoted 4 lines
Quoted 4 lines

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.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering