tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   aab7ee9f8ff0110bfcd594b33dc33748dc1baf46
commit: 18bc435e0a1de21a5036a03f7a729b15b21d4689 [7985/9127] scsi: arcmsr: 
Remove some set but unused variables
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-m001-20200719 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
drivers/scsi/arcmsr/arcmsr_hba.c:1490 arcmsr_done4abort_postqueue() warn: 
statement has no effect 8
drivers/scsi/arcmsr/arcmsr_hba.c:2459 arcmsr_hbaD_postqueue_isr() warn: 
statement has no effect 8
drivers/scsi/arcmsr/arcmsr_hba.c:3526 arcmsr_hbaD_polling_ccbdone() warn: 
statement has no effect 8

# 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=18bc435e0a1de21a5036a03f7a729b15b21d4689
git remote add linux-next 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 18bc435e0a1de21a5036a03f7a729b15b21d4689
vim +1490 drivers/scsi/arcmsr/arcmsr_hba.c

1a4f550a09f89e Nick Cheng  2007-09-13  1401  static void 
arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
1a4f550a09f89e Nick Cheng  2007-09-13  1402  {
1a4f550a09f89e Nick Cheng  2007-09-13  1403     int i = 0;
9e386a55e07253 Ching Huang 2018-12-19  1404     uint32_t flag_ccb;
cdd3cb156f190e Nick Cheng  2010-07-13  1405     struct ARCMSR_CDB *pARCMSR_CDB;
cdd3cb156f190e Nick Cheng  2010-07-13  1406     bool error;
cdd3cb156f190e Nick Cheng  2010-07-13  1407     struct CommandControlBlock 
*pCCB;
18bc435e0a1de2 Lee Jones   2020-07-13  1408     unsigned long ccb_cdb_phy;
9e386a55e07253 Ching Huang 2018-12-19  1409  
1a4f550a09f89e Nick Cheng  2007-09-13  1410     switch (acb->adapter_type) {
1a4f550a09f89e Nick Cheng  2007-09-13  1411  
1a4f550a09f89e Nick Cheng  2007-09-13  1412     case ACB_ADAPTER_TYPE_A: {
80da1adbbf8805 Al Viro     2007-10-29  1413             struct MessageUnit_A 
__iomem *reg = acb->pmuA;
1a4f550a09f89e Nick Cheng  2007-09-13  1414             uint32_t 
outbound_intstatus;
80da1adbbf8805 Al Viro     2007-10-29  1415             outbound_intstatus = 
readl(&reg->outbound_intstatus) &
1a4f550a09f89e Nick Cheng  2007-09-13  1416                                     
acb->outbound_int_enable;
1a4f550a09f89e Nick Cheng  2007-09-13  1417             /*clear and abort all 
outbound posted Q*/
1a4f550a09f89e Nick Cheng  2007-09-13  1418             
writel(outbound_intstatus, &reg->outbound_intstatus);/*clear interrupt*/
80da1adbbf8805 Al Viro     2007-10-29  1419             while(((flag_ccb = 
readl(&reg->outbound_queueport)) != 0xFFFFFFFF)
e4587f455f2724 Ching Huang 2017-12-05  1420                             && (i++ 
< acb->maxOutstanding)) {
9e386a55e07253 Ching Huang 2018-12-19  1421                     ccb_cdb_phy = 
(flag_ccb << 5) & 0xffffffff;
9e386a55e07253 Ching Huang 2018-12-19  1422                     if 
(acb->cdb_phyadd_hipart)
9e386a55e07253 Ching Huang 2018-12-19  1423                             
ccb_cdb_phy = ccb_cdb_phy | acb->cdb_phyadd_hipart;
9e386a55e07253 Ching Huang 2018-12-19  1424                     pARCMSR_CDB = 
(struct ARCMSR_CDB *)(acb->vir2phy_offset + ccb_cdb_phy);
cdd3cb156f190e Nick Cheng  2010-07-13  1425                     pCCB = 
container_of(pARCMSR_CDB, struct CommandControlBlock, arcmsr_cdb);
cdd3cb156f190e Nick Cheng  2010-07-13  1426                     error = 
(flag_ccb & ARCMSR_CCBREPLY_FLAG_ERROR_MODE0) ? true : false;
cdd3cb156f190e Nick Cheng  2010-07-13  1427                     
arcmsr_drain_donequeue(acb, pCCB, error);
1a4f550a09f89e Nick Cheng  2007-09-13  1428             }
1a4f550a09f89e Nick Cheng  2007-09-13  1429             }
1a4f550a09f89e Nick Cheng  2007-09-13  1430             break;
1a4f550a09f89e Nick Cheng  2007-09-13  1431  
1a4f550a09f89e Nick Cheng  2007-09-13  1432     case ACB_ADAPTER_TYPE_B: {
80da1adbbf8805 Al Viro     2007-10-29  1433             struct MessageUnit_B 
*reg = acb->pmuB;
1a4f550a09f89e Nick Cheng  2007-09-13  1434             /*clear all outbound 
posted Q*/
97b991277a9966 NickCheng   2011-01-06  1435             
writel(ARCMSR_DOORBELL_INT_CLEAR_PATTERN, reg->iop2drv_doorbell); /* clear 
doorbell interrupt */
1a4f550a09f89e Nick Cheng  2007-09-13  1436             for (i = 0; i < 
ARCMSR_MAX_HBB_POSTQUEUE; i++) {
c10b1d544aaaf9 Ching Huang 2014-08-19  1437                     flag_ccb = 
reg->done_qbuffer[i];
c10b1d544aaaf9 Ching Huang 2014-08-19  1438                     if (flag_ccb != 
0) {
c10b1d544aaaf9 Ching Huang 2014-08-19  1439                             
reg->done_qbuffer[i] = 0;
e66764f276e9dc Ching Huang 2018-12-19  1440                             
ccb_cdb_phy = (flag_ccb << 5) & 0xffffffff;
e66764f276e9dc Ching Huang 2018-12-19  1441                             if 
(acb->cdb_phyadd_hipart)
e66764f276e9dc Ching Huang 2018-12-19  1442                                     
ccb_cdb_phy = ccb_cdb_phy | acb->cdb_phyadd_hipart;
e66764f276e9dc Ching Huang 2018-12-19  1443                             
pARCMSR_CDB = (struct ARCMSR_CDB *)(acb->vir2phy_offset + ccb_cdb_phy);
cdd3cb156f190e Nick Cheng  2010-07-13  1444                             pCCB = 
container_of(pARCMSR_CDB, struct CommandControlBlock, arcmsr_cdb);
cdd3cb156f190e Nick Cheng  2010-07-13  1445                             error = 
(flag_ccb & ARCMSR_CCBREPLY_FLAG_ERROR_MODE0) ? true : false;
cdd3cb156f190e Nick Cheng  2010-07-13  1446                             
arcmsr_drain_donequeue(acb, pCCB, error);
1a4f550a09f89e Nick Cheng  2007-09-13  1447                     }
cdd3cb156f190e Nick Cheng  2010-07-13  1448                     
reg->post_qbuffer[i] = 0;
1a4f550a09f89e Nick Cheng  2007-09-13  1449             }
1a4f550a09f89e Nick Cheng  2007-09-13  1450             reg->doneq_index = 0;
1a4f550a09f89e Nick Cheng  2007-09-13  1451             reg->postq_index = 0;
1a4f550a09f89e Nick Cheng  2007-09-13  1452             }
1a4f550a09f89e Nick Cheng  2007-09-13  1453             break;
cdd3cb156f190e Nick Cheng  2010-07-13  1454     case ACB_ADAPTER_TYPE_C: {
c10b1d544aaaf9 Ching Huang 2014-08-19  1455             struct MessageUnit_C 
__iomem *reg = acb->pmuC;
e4587f455f2724 Ching Huang 2017-12-05  1456             while 
((readl(&reg->host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) && (i++ < 
acb->maxOutstanding)) {
cdd3cb156f190e Nick Cheng  2010-07-13  1457                     /*need to do*/
cdd3cb156f190e Nick Cheng  2010-07-13  1458                     flag_ccb = 
readl(&reg->outbound_queueport_low);
cdd3cb156f190e Nick Cheng  2010-07-13  1459                     ccb_cdb_phy = 
(flag_ccb & 0xFFFFFFF0);
c71ec5511b14dc Ching Huang 2018-12-19  1460                     if 
(acb->cdb_phyadd_hipart)
c71ec5511b14dc Ching Huang 2018-12-19  1461                             
ccb_cdb_phy = ccb_cdb_phy | acb->cdb_phyadd_hipart;
c71ec5511b14dc Ching Huang 2018-12-19  1462                     pARCMSR_CDB = 
(struct  ARCMSR_CDB *)(acb->vir2phy_offset + ccb_cdb_phy);
cdd3cb156f190e Nick Cheng  2010-07-13  1463                     pCCB = 
container_of(pARCMSR_CDB, struct CommandControlBlock, arcmsr_cdb);
cdd3cb156f190e Nick Cheng  2010-07-13  1464                     error = 
(flag_ccb & ARCMSR_CCBREPLY_FLAG_ERROR_MODE1) ? true : false;
cdd3cb156f190e Nick Cheng  2010-07-13  1465                     
arcmsr_drain_donequeue(acb, pCCB, error);
cdd3cb156f190e Nick Cheng  2010-07-13  1466             }
cdd3cb156f190e Nick Cheng  2010-07-13  1467             }
5b37479adee716 Ching Huang 2014-08-19  1468             break;
5b37479adee716 Ching Huang 2014-08-19  1469     case ACB_ADAPTER_TYPE_D: {
5b37479adee716 Ching Huang 2014-08-19  1470             struct MessageUnit_D  
*pmu = acb->pmuD;
3b8155d582968f Ching Huang 2014-09-15  1471             uint32_t 
outbound_write_pointer;
3b8155d582968f Ching Huang 2014-09-15  1472             uint32_t doneq_index, 
index_stripped, addressLow, residual, toggle;
3b8155d582968f Ching Huang 2014-09-15  1473             unsigned long flags;
5b37479adee716 Ching Huang 2014-08-19  1474  
5b37479adee716 Ching Huang 2014-08-19  1475             residual = 
atomic_read(&acb->ccboutstandingcount);
5b37479adee716 Ching Huang 2014-08-19  1476             for (i = 0; i < 
residual; i++) {
3b8155d582968f Ching Huang 2014-09-15  1477                     
spin_lock_irqsave(&acb->doneq_lock, flags);
3b8155d582968f Ching Huang 2014-09-15  1478                     
outbound_write_pointer =
3b8155d582968f Ching Huang 2014-09-15  1479                             
pmu->done_qbuffer[0].addressLow + 1;
3b8155d582968f Ching Huang 2014-09-15  1480                     doneq_index = 
pmu->doneq_index;
3b8155d582968f Ching Huang 2014-09-15  1481                     if 
((doneq_index & 0xFFF) !=
5b37479adee716 Ching Huang 2014-08-19  1482                             
(outbound_write_pointer & 0xFFF)) {
3b8155d582968f Ching Huang 2014-09-15  1483                             toggle 
= doneq_index & 0x4000;
3b8155d582968f Ching Huang 2014-09-15  1484                             
index_stripped = (doneq_index & 0xFFF) + 1;
3b8155d582968f Ching Huang 2014-09-15  1485                             
index_stripped %= ARCMSR_MAX_ARC1214_DONEQUEUE;
3b8155d582968f Ching Huang 2014-09-15  1486                             
pmu->doneq_index = index_stripped ? (index_stripped | toggle) :
3b8155d582968f Ching Huang 2014-09-15  1487                                     
((toggle ^ 0x4000) + 1);
5b37479adee716 Ching Huang 2014-08-19  1488                             
doneq_index = pmu->doneq_index;
3b8155d582968f Ching Huang 2014-09-15  1489                             
spin_unlock_irqrestore(&acb->doneq_lock, flags);
18bc435e0a1de2 Lee Jones   2020-07-13 @1490                             
pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
                                                                        
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Delete this line.

5b37479adee716 Ching Huang 2014-08-19  1491                             
addressLow = pmu->done_qbuffer[doneq_index &
5b37479adee716 Ching Huang 2014-08-19  1492                                     
0xFFF].addressLow;
5b37479adee716 Ching Huang 2014-08-19  1493                             
ccb_cdb_phy = (addressLow & 0xFFFFFFF0);
a36ade416db782 Ching Huang 2018-12-19  1494                             if 
(acb->cdb_phyadd_hipart)
a36ade416db782 Ching Huang 2018-12-19  1495                                     
ccb_cdb_phy = ccb_cdb_phy | acb->cdb_phyadd_hipart;
5b37479adee716 Ching Huang 2014-08-19  1496                             
pARCMSR_CDB = (struct  ARCMSR_CDB *)
5b37479adee716 Ching Huang 2014-08-19  1497                                     
(acb->vir2phy_offset + ccb_cdb_phy);
5b37479adee716 Ching Huang 2014-08-19  1498                             pCCB = 
container_of(pARCMSR_CDB,
5b37479adee716 Ching Huang 2014-08-19  1499                                     
struct CommandControlBlock, arcmsr_cdb);
5b37479adee716 Ching Huang 2014-08-19  1500                             error = 
(addressLow &
5b37479adee716 Ching Huang 2014-08-19  1501                                     
ARCMSR_CCBREPLY_FLAG_ERROR_MODE1) ?
5b37479adee716 Ching Huang 2014-08-19  1502                                     
true : false;
5b37479adee716 Ching Huang 2014-08-19  1503                             
arcmsr_drain_donequeue(acb, pCCB, error);
5b37479adee716 Ching Huang 2014-08-19  1504                             
writel(doneq_index,
5b37479adee716 Ching Huang 2014-08-19  1505                                     
pmu->outboundlist_read_pointer);
3b8155d582968f Ching Huang 2014-09-15  1506                     } else {
3b8155d582968f Ching Huang 2014-09-15  1507                             
spin_unlock_irqrestore(&acb->doneq_lock, flags);
5b37479adee716 Ching Huang 2014-08-19  1508                             
mdelay(10);
3b8155d582968f Ching Huang 2014-09-15  1509                     }
5b37479adee716 Ching Huang 2014-08-19  1510             }
5b37479adee716 Ching Huang 2014-08-19  1511             pmu->postq_index = 0;
5b37479adee716 Ching Huang 2014-08-19  1512             pmu->doneq_index = 
0x40FF;
5b37479adee716 Ching Huang 2014-08-19  1513             }
5b37479adee716 Ching Huang 2014-08-19  1514             break;
235090241c55e9 Ching Huang 2017-12-05  1515     case ACB_ADAPTER_TYPE_E:
235090241c55e9 Ching Huang 2017-12-05  1516             
arcmsr_hbaE_postqueue_isr(acb);
235090241c55e9 Ching Huang 2017-12-05  1517             break;
1a4f550a09f89e Nick Cheng  2007-09-13  1518     }
1a4f550a09f89e Nick Cheng  2007-09-13  1519  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to