From b6533640ed3e25e9a12497dbc679a10896848c91 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 22 Jan 2019 16:09:01 +0100 Subject: scsi: csiostor: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Varun Prakash Cc: Bjorn Helgaas Cc: Johannes Thumshirn Cc: Oza Pawandeep Cc: linux-scsi@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- drivers/scsi/csiostor/csio_init.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/scsi/csiostor') diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c index cf629380a981..460e4ee1c8fe 100644 --- a/drivers/scsi/csiostor/csio_init.c +++ b/drivers/scsi/csiostor/csio_init.c @@ -167,14 +167,10 @@ csio_dfs_destroy(struct csio_hw *hw) * csio_dfs_init - Debug filesystem initialization for the module. * */ -static int +static void csio_dfs_init(void) { csio_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL); - if (!csio_debugfs_root) - pr_warn("Could not create debugfs entry, continuing\n"); - - return 0; } /* -- cgit 1.4.1 From e18e9dac9cdc9f4d048115cd4b9b0ff40c190555 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Fri, 25 Jan 2019 01:57:19 +0000 Subject: scsi: csiostor: Remove set but not used variable 'pln' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/csiostor/csio_attr.c: In function 'csio_fcoe_free_vnp': drivers/scsi/csiostor/csio_attr.c:500:21: warning: variable 'pln' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Varun Prakash Signed-off-by: Martin K. Petersen --- drivers/scsi/csiostor/csio_attr.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/scsi/csiostor') diff --git a/drivers/scsi/csiostor/csio_attr.c b/drivers/scsi/csiostor/csio_attr.c index 8a004036e3d7..017423b09669 100644 --- a/drivers/scsi/csiostor/csio_attr.c +++ b/drivers/scsi/csiostor/csio_attr.c @@ -497,7 +497,6 @@ out: static int csio_fcoe_free_vnp(struct csio_hw *hw, struct csio_lnode *ln) { - struct csio_lnode *pln; struct csio_mb *mbp; struct fw_fcoe_vnp_cmd *rsp; int ret = 0; @@ -514,8 +513,6 @@ csio_fcoe_free_vnp(struct csio_hw *hw, struct csio_lnode *ln) goto out; } - pln = ln->pln; - csio_fcoe_vnp_free_init_mb(ln, mbp, CSIO_MB_DEFAULT_TMO, ln->fcf_flowid, ln->vnp_flowid, NULL); -- cgit 1.4.1 From f50e76052321cc49f9d49fe444c3d3806f223dc3 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 26 Feb 2019 15:56:41 +0100 Subject: scsi: csiostor: drop serial_number usage Use request tag instead of the serial number when printing out logging messages. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/scsi/csiostor/csio_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/scsi/csiostor') diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index bc5547a62c00..462560b2855e 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c @@ -1984,15 +1984,15 @@ inval_scmnd: /* FW successfully aborted the request */ if (host_byte(cmnd->result) == DID_REQUEUE) { csio_info(hw, - "Aborted SCSI command to (%d:%llu) serial#:0x%lx\n", + "Aborted SCSI command to (%d:%llu) tag %u\n", cmnd->device->id, cmnd->device->lun, - cmnd->serial_number); + cmnd->request->tag); return SUCCESS; } else { csio_info(hw, - "Failed to abort SCSI command, (%d:%llu) serial#:0x%lx\n", + "Failed to abort SCSI command, (%d:%llu) tag %u\n", cmnd->device->id, cmnd->device->lun, - cmnd->serial_number); + cmnd->request->tag); return FAILED; } } -- cgit 1.4.1