[bug report] scsi: mpi3mr: Debug ability improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ranjan Kumar,

Commit 0a2714b787b9 ("scsi: mpi3mr: Debug ability improvements") from
Mar 13, 2024 (linux-next), leads to the following Smatch static
checker warning:

	drivers/scsi/mpi3mr/mpi3mr_app.c:1609 mpi3mr_bsg_process_mpt_cmds()
	warn: inconsistent indenting

drivers/scsi/mpi3mr/mpi3mr_app.c
    1592         wait_for_completion_timeout(&mrioc->bsg_cmds.done,
    1593             (karg->timeout * HZ));
    1594         if (block_io && stgt_priv)
    1595                 atomic_dec(&stgt_priv->block_io);
    1596         if (!(mrioc->bsg_cmds.state & MPI3MR_CMD_COMPLETE)) {
    1597                 mrioc->bsg_cmds.is_waiting = 0;
    1598                 rval = -EAGAIN;
    1599                 if (mrioc->bsg_cmds.state & MPI3MR_CMD_RESET)
    1600                         goto out_unlock;
    1601                 if (((mpi_header->function != MPI3_FUNCTION_SCSI_IO) &&
    1602                     (mpi_header->function != MPI3_FUNCTION_NVME_ENCAPSULATED))
    1603                     || (mrioc->logging_level & MPI3_DEBUG_BSG_ERROR)) {
    1604                         ioc_info(mrioc, "%s: bsg request timedout after %d seconds\n",
    1605                             __func__, karg->timeout);
    1606                         if (!(mrioc->logging_level & MPI3_DEBUG_BSG_INFO)) {
    1607                                 dprint_dump(mpi_req, MPI3MR_ADMIN_REQ_FRAME_SZ,
                                         ^^^^^^^^^^^^
    1608                             "bsg_mpi3_req");
--> 1609                         if (mpi_header->function ==
                                 ^^^^
Smatch complains because these aren't aligned.  The if statement should
be indented another tab.

    1610                             MPI3_FUNCTION_MGMT_PASSTHROUGH) {
    1611                                 drv_buf_iter = &drv_bufs[0];
    1612                                 dprint_dump(drv_buf_iter->kern_buf,
    1613                                     rmc_size, "mpi3_mgmt_req");
    1614                                 }
    1615                         }
    1616                 }
    1617                 if ((mpi_header->function == MPI3_BSG_FUNCTION_NVME_ENCAPSULATED) ||
    1618                         (mpi_header->function == MPI3_BSG_FUNCTION_SCSI_IO)) {
    1619                         dprint_bsg_err(mrioc, "%s: bsg request timedout after %d seconds,\n"
    1620                                 "issuing target reset to (0x%04x)\n", __func__,
    1621                                 karg->timeout, mpi_header->function_dependent);
    1622                         mpi3mr_issue_tm(mrioc,
    1623                             MPI3_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
    1624                             mpi_header->function_dependent, 0,
    1625                             MPI3MR_HOSTTAG_BLK_TMS, MPI3MR_RESETTM_TIMEOUT,
    1626                             &mrioc->host_tm_cmds, &resp_code, NULL);
    1627                 }
    1628                 if (!(mrioc->bsg_cmds.state & MPI3MR_CMD_COMPLETE) &&
    1629                     !(mrioc->bsg_cmds.state & MPI3MR_CMD_RESET))
    1630                         mpi3mr_soft_reset_handler(mrioc,
    1631                             MPI3MR_RESET_FROM_APP_TIMEOUT, 1);
    1632                 goto out_unlock;
    1633         }
    1634         dprint_bsg_info(mrioc, "%s: bsg request is completed\n", __func__);

regards,
dan carpenter




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux