From patchwork Thu Apr 13 11:06:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiong X-Patchwork-Id: 673561 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77CC5C77B6C for ; Thu, 13 Apr 2023 11:10:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbjDMLKD (ORCPT ); Thu, 13 Apr 2023 07:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbjDMLKC (ORCPT ); Thu, 13 Apr 2023 07:10:02 -0400 X-Greylist: delayed 120 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 13 Apr 2023 04:09:53 PDT Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 133477D9C; Thu, 13 Apr 2023 04:09:52 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 50B0318010E345; Thu, 13 Apr 2023 19:07:38 +0800 (CST) X-MD-Sfrom: liqiong@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Li Qiong To: Nilesh Javali , GR-QLogic-Storage-Upstream@marvell.com, "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Li Qiong Subject: [PATCH 1/4] scsi: qla2xxx: Remove unnecessary (void*) conversions Date: Thu, 13 Apr 2023 19:06:41 +0800 Message-Id: <20230413110641.3760-1-liqiong@nfschina.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org No need to cast (void*) pointer to other type. Signed-off-by: Li Qiong --- drivers/scsi/qla2xxx/qla_nvme.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 648e8f798606..93996bd70380 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -100,7 +100,7 @@ static int qla_nvme_alloc_queue(struct nvme_fc_local_port *lport, if (qidx) qidx--; - vha = (struct scsi_qla_host *)lport->private; + vha = lport->private; ha = vha->hw; ql_log(ql_log_info, vha, 0x2104, @@ -141,7 +141,7 @@ static int qla_nvme_alloc_queue(struct nvme_fc_local_port *lport, static void qla_nvme_release_fcp_cmd_kref(struct kref *kref) { struct srb *sp = container_of(kref, struct srb, cmd_kref); - struct nvme_private *priv = (struct nvme_private *)sp->priv; + struct nvme_private *priv = sp->priv; struct nvmefc_fcp_req *fd; struct srb_iocb *nvme; unsigned long flags; @@ -173,7 +173,7 @@ static void qla_nvme_release_fcp_cmd_kref(struct kref *kref) static void qla_nvme_release_ls_cmd_kref(struct kref *kref) { struct srb *sp = container_of(kref, struct srb, cmd_kref); - struct nvme_private *priv = (struct nvme_private *)sp->priv; + struct nvme_private *priv = sp->priv; struct nvmefc_ls_req *fd; unsigned long flags; From patchwork Thu Apr 13 11:10:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiong X-Patchwork-Id: 673072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98659C77B6C for ; Thu, 13 Apr 2023 11:11:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbjDMLLc (ORCPT ); Thu, 13 Apr 2023 07:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbjDMLLb (ORCPT ); Thu, 13 Apr 2023 07:11:31 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id C0FC77687; Thu, 13 Apr 2023 04:11:27 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 2509C18010E345; Thu, 13 Apr 2023 19:11:20 +0800 (CST) X-MD-Sfrom: liqiong@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Li Qiong To: "James E . J . Bottomley" , "Martin K . Petersen" , James Smart , Dick Kennedy Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Li Qiong Subject: [PATCH 2/4] scsi: lpfc: Remove unnecessary (void*) conversions Date: Thu, 13 Apr 2023 19:10:31 +0800 Message-Id: <20230413111031.9034-1-liqiong@nfschina.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org No need to cast (void*) pointer to other type. Signed-off-by: Li Qiong --- drivers/scsi/lpfc/lpfc_attr.c | 2 +- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/lpfc/lpfc_nvme.c | 32 ++++++++++++++++---------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 22f2e046e8eb..0a8c872efc02 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -514,7 +514,7 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr, wwn_to_u64(vport->fc_portname.u.wwn)); return len; } - lport = (struct lpfc_nvme_lport *)localport->private; + lport = localport->private; if (strlcat(buf, "\nNVME Initiator Enabled\n", PAGE_SIZE) >= PAGE_SIZE) goto buffer_done; diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index f5252e45a48a..99a6d338ed80 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -1166,7 +1166,7 @@ lpfc_debugfs_nvmestat_data(struct lpfc_vport *vport, char *buf, int size) localport = vport->localport; if (!localport) return len; - lport = (struct lpfc_nvme_lport *)localport->private; + lport = localport->private; if (!lport) return len; diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 152245f7cacc..7aedbc811502 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -91,7 +91,7 @@ lpfc_nvme_create_queue(struct nvme_fc_local_port *pnvme_lport, if (!pnvme_lport->private) return -ENOMEM; - lport = (struct lpfc_nvme_lport *)pnvme_lport->private; + lport = pnvme_lport->private; vport = lport->vport; if (!vport || vport->load_flag & FC_UNLOADING || @@ -151,7 +151,7 @@ lpfc_nvme_delete_queue(struct nvme_fc_local_port *pnvme_lport, if (!pnvme_lport->private) return; - lport = (struct lpfc_nvme_lport *)pnvme_lport->private; + lport = pnvme_lport->private; vport = lport->vport; lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME, @@ -370,7 +370,7 @@ lpfc_nvme_ls_req_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, status = bf_get(lpfc_wcqe_c_status, wcqe) & LPFC_IOCB_STATUS_MASK; if (vport->localport) { - lport = (struct lpfc_nvme_lport *)vport->localport->private; + lport = vport->localport->private; if (lport) { atomic_inc(&lport->fc4NvmeLsCmpls); if (status) { @@ -666,8 +666,8 @@ lpfc_nvme_ls_req(struct nvme_fc_local_port *pnvme_lport, struct lpfc_vport *vport; int ret; - lport = (struct lpfc_nvme_lport *)pnvme_lport->private; - rport = (struct lpfc_nvme_rport *)pnvme_rport->private; + lport = pnvme_lport->private; + rport = pnvme_rport->private; if (unlikely(!lport) || unlikely(!rport)) return -EINVAL; @@ -766,7 +766,7 @@ lpfc_nvme_xmt_ls_rsp(struct nvme_fc_local_port *localport, if (axchg->phba->pport->load_flag & FC_UNLOADING) return -ENODEV; - lport = (struct lpfc_nvme_lport *)localport->private; + lport = localport->private; rc = __lpfc_nvme_xmt_ls_rsp(axchg, ls_rsp, __lpfc_nvme_xmt_ls_rsp_cmp); @@ -803,7 +803,7 @@ lpfc_nvme_ls_abort(struct nvme_fc_local_port *pnvme_lport, struct lpfc_nodelist *ndlp; int ret; - lport = (struct lpfc_nvme_lport *)pnvme_lport->private; + lport = pnvme_lport->private; if (unlikely(!lport)) return; vport = lport->vport; @@ -979,7 +979,7 @@ lpfc_nvme_io_cmd_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, phba->sli4_hba.hdwq[idx].nvme_cstat.io_cmpls++; if (unlikely(status && vport->localport)) { - lport = (struct lpfc_nvme_lport *)vport->localport->private; + lport = vport->localport->private; if (lport) { if (bf_get(lpfc_wcqe_c_xb, wcqe)) atomic_inc(&lport->cmpl_fcp_xb); @@ -1545,7 +1545,7 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport, /* Validate pointers. LLDD fault handling with transport does * have timing races. */ - lport = (struct lpfc_nvme_lport *)pnvme_lport->private; + lport = pnvme_lport->private; if (unlikely(!lport)) { ret = -EINVAL; goto out_fail; @@ -1585,7 +1585,7 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport, if (phba->ktime_on) start = ktime_get_ns(); #endif - rport = (struct lpfc_nvme_rport *)pnvme_rport->private; + rport = pnvme_rport->private; lpfc_queue_info = (struct lpfc_nvme_qhandle *)hw_queue_handle; /* @@ -1866,7 +1866,7 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport, /* Validate pointers. LLDD fault handling with transport does * have timing races. */ - lport = (struct lpfc_nvme_lport *)pnvme_lport->private; + lport = pnvme_lport->private; if (unlikely(!lport)) return; @@ -2192,7 +2192,7 @@ lpfc_nvme_create_localport(struct lpfc_vport *vport) lpfc_nvme_template.max_sgl_segments); /* Private is our lport size declared in the template. */ - lport = (struct lpfc_nvme_lport *)localport->private; + lport = localport->private; vport->localport = localport; lport->vport = vport; vport->nvmei_support = 1; @@ -2309,7 +2309,7 @@ lpfc_nvme_destroy_localport(struct lpfc_vport *vport) localport = vport->localport; if (!localport) return; - lport = (struct lpfc_nvme_lport *)localport->private; + lport = localport->private; lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME, "6011 Destroying NVME localport x%px\n", @@ -2359,7 +2359,7 @@ lpfc_nvme_update_localport(struct lpfc_vport *vport) "6710 Update NVME fail. No localport\n"); return; } - lport = (struct lpfc_nvme_lport *)localport->private; + lport = localport->private; if (!lport) { lpfc_printf_vlog(vport, KERN_WARNING, LOG_NVME, "6171 Update NVME fail. localP x%px, No lport\n", @@ -2404,7 +2404,7 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) if (!localport) return 0; - lport = (struct lpfc_nvme_lport *)localport->private; + lport = localport->private; /* NVME rports are not preserved across devloss. * Just register this instance. Note, rpinfo->dev_loss_tmo @@ -2593,7 +2593,7 @@ lpfc_nvme_unregister_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) if (!localport) return; - lport = (struct lpfc_nvme_lport *)localport->private; + lport = localport->private; if (!lport) goto input_err; From patchwork Thu Apr 13 11:12:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiong X-Patchwork-Id: 673560 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA4CFC77B6C for ; Thu, 13 Apr 2023 11:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbjDMLNm (ORCPT ); Thu, 13 Apr 2023 07:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbjDMLNl (ORCPT ); Thu, 13 Apr 2023 07:13:41 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id D930A59F0; Thu, 13 Apr 2023 04:13:39 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 0C39418010E345; Thu, 13 Apr 2023 19:13:37 +0800 (CST) X-MD-Sfrom: liqiong@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Li Qiong To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Li Qiong Subject: [PATCH 3/4] scsi: csiostor: Remove unnecessary (void*) conversions Date: Thu, 13 Apr 2023 19:12:48 +0800 Message-Id: <20230413111248.12279-1-liqiong@nfschina.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org No need to cast (void*) pointer to other type. Signed-off-by: Li Qiong --- drivers/scsi/csiostor/csio_lnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c index d5ac93897023..ff9cd26703aa 100644 --- a/drivers/scsi/csiostor/csio_lnode.c +++ b/drivers/scsi/csiostor/csio_lnode.c @@ -782,7 +782,7 @@ csio_fcoe_enable_link(struct csio_lnode *ln, bool enable) static void csio_ln_read_fcf_cbfn(struct csio_hw *hw, struct csio_mb *mbp) { - struct csio_lnode *ln = (struct csio_lnode *)mbp->priv; + struct csio_lnode *ln = mbp->priv; struct csio_fcf_info *fcf_info; struct fw_fcoe_fcf_cmd *rsp = (struct fw_fcoe_fcf_cmd *)(mbp->mb); From patchwork Thu Apr 13 11:15:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiong X-Patchwork-Id: 673071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C51EC77B6C for ; Thu, 13 Apr 2023 11:16:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230344AbjDMLQL (ORCPT ); Thu, 13 Apr 2023 07:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbjDMLQJ (ORCPT ); Thu, 13 Apr 2023 07:16:09 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id C57405BB1; Thu, 13 Apr 2023 04:16:06 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 01C6518010E36D; Thu, 13 Apr 2023 19:15:58 +0800 (CST) X-MD-Sfrom: liqiong@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Li Qiong To: "James E . J . Bottomley" , "Martin K . Petersen" , Karan Tilak Kumar , Sesidhar Baddela Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Li Qiong Subject: [PATCH 4/4] scsi: snic: Remove unnecessary (void*) conversions Date: Thu, 13 Apr 2023 19:15:11 +0800 Message-Id: <20230413111511.15579-1-liqiong@nfschina.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org No need to cast (void*) pointer to other type. Signed-off-by: Li Qiong --- drivers/scsi/snic/snic_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/snic/snic_debugfs.c b/drivers/scsi/snic/snic_debugfs.c index 9dd975b36b5b..06de583caed1 100644 --- a/drivers/scsi/snic/snic_debugfs.c +++ b/drivers/scsi/snic/snic_debugfs.c @@ -164,7 +164,7 @@ snic_reset_stats_release(struct inode *inode, struct file *filp) static int snic_stats_show(struct seq_file *sfp, void *data) { - struct snic *snic = (struct snic *) sfp->private; + struct snic *snic = sfp->private; struct snic_stats *stats = &snic->s_stats; struct timespec64 last_isr_tms, last_ack_tms; u64 maxio_tm;