From patchwork Thu Dec 28 17:22:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 13506149 Received: from mout.web.de (mout.web.de [217.72.192.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3D78F9C7; Thu, 28 Dec 2023 17:22:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="qNO5iXGk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1703784122; x=1704388922; i=markus.elfring@web.de; bh=X/gKRB8Ifpq3Kc0ZFe/BKNuVoOjfjzMQxZThCkDRvjc=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=qNO5iXGkYXAaJJk/swBDMVii4SHZm7mEsIRQSq+9a9WzXT7r2XBGPbQSYzvZ2POu AowrRyal6e8iaBKxqohIc3OjBRcgHaSbOU/7eSCYf28X4EhgC7KeBJatiq3uZ7Zqs lX0t4YV5ZpM41hB7A6UTPC2gOEyWFPC65fi/CE8jPBk077iHrdiZEm/7/8CDSGDYx ZBcZ+V0v9RB20lwwFwREjviWJEqhk85DadTAxS4wbAcdFjAzi7rTgd/VCcB9QMLMK wGLQxZpK53IImxal0yCpY/HrkTxzN0mU5wUFsaK33KFDH/2EZPbVcEm5yOFJ+pRDF txmNlJJwhrzXERyhWA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MZjIb-1rmvHR1T8R-00Wt5l; Thu, 28 Dec 2023 18:22:02 +0100 Message-ID: <562d25d9-9550-4dc2-a7d9-40af3109e3db@web.de> Date: Thu, 28 Dec 2023 18:22:01 +0100 Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 1/4] scsi: lpfc: Improve exception handling in lpfc_rcv_plogi() Content-Language: en-GB From: Markus Elfring To: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, Dick Kennedy , James Smart , "James E. J. Bottomley" , "Martin K. Petersen" Cc: LKML References: <48a127e8-ca4f-4fc4-81b7-226080fba720@web.de> In-Reply-To: <48a127e8-ca4f-4fc4-81b7-226080fba720@web.de> X-Provags-ID: V03:K1:PfPgGX9wqxCqCOCcwdoypN85NPCwwIWH1fFjD6sPXjtEvgFZjiy CFtls3X4+2+fyyKPS6F/wvPlaZU6YGMXuT2vNcHqfH8EHI1+MxzublFag9fOQdACFyYKoHR Vf/ooIuhH+dB0v0IZ3njZ5FLtH34rwkHAfQWeINzH8mFHO1zHvdjYVUZCuliAcUMgpwMxv+ TxY8NtMqAsFmvXn7mpPww== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:PGu0RpL5zzo=;7LyogwglXRvDOIz4ELTClkKFIC/ 2xHXh1dzuYt8S0eY8JKF6InUpgW8dDJuCGyO3TrM6kwfbW3PC8l3ufmpHbkiUMCGd27CxtWQM TWJTaWeGYNOi5gmkdva+/+NNl22kzNS6AjWFJSILzmcvR3Vz2Tez86ytfBHOkkwA6L9CaVNq1 6WfvGOHyz0I6XlnfSq6lazjgRdBHtekK0a7vR9Z4jBwW44adLLABHJhWDe5IhnVcFtoxA7yc4 US+krwNqKcW5hflyNTauCbDJEbR0BIC2HDRQfB3Su/ulqgNDwediuytz4Oou6Edf/rUxrnoW+ 5MhF2M6AKJ3nuYeDOJpDr99aMl3aapmGNp8NOgq5fDVNcbH4Lj2dluVNNDDDOSX46+/LvJMrE 42nY/ykz2nMGigXTZbR9Ak2k4/FsEa7drHsqwXZmDaEoCjg1b+iuS0GywvcW7DB9OTC6ac4ab Lf7jx8Lmc4iWIl4g3NTIQsPiSkJClZ3mW8Mq0oK1IRRnz9GZy5KCI28lvmp5ln2vyZCPvOPYn gAiR3JcHkgJgI3h6pDtQDJe+tDHeJoBucFvK/LPslV7Yk/VQP8BlDyalsRpFuKj8r8ZYTvES2 xdTugIPhQcuxrqPHoHR08dSSZZI5Se89lQ20ePKACV8xbp3hjGSGMoP8N3bRDxeJ85KN5LNZ5 Mnpf0Qc+b+H/wLTOmClA1a+mXmwGNJfMOJHVJ7z2V73ssWAnRmbOf1jCbCp7DML9NRITWQjQT cuIa6ySqhq7IdMBNwEZJ4SKxVuE7DOUfve9h2v4tSE/Jm+npsNIV5gb1cVvKxtCDBbTUoPRD0 tw2+A1OPKD/s8ynzLQBqmIEFtLGvdi62CLP6Jo6O9DBNXPhc0F9OyiBOHB0ka0x0KtXw48p17 wvZMUh0beuhx9kojioKc+6hQFBFuzmsnCjZdPvXpGOBvDoFE19UJfj5UbIFgwQsB8GR8Svnxr NSOyHGPhMphz0p2NUqAufDfw50A= From: Markus Elfring Date: Thu, 28 Dec 2023 17:00:07 +0100 The kfree() function was called in one case by the lpfc_rcv_plogi() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. * Thus adjust jump targets. * Delete three variable assignments and a repeated pointer check which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/scsi/lpfc/lpfc_nportdisc.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) -- 2.43.0 diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index d9074929fbab..2559f2ac7277 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -459,10 +459,6 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, ndlp->nlp_nvme_info &= ~NLP_NVME_NSLER; ndlp->nlp_flag &= ~NLP_FIRSTBURST; - login_mbox = NULL; - link_mbox = NULL; - save_iocb = NULL; - /* Check for Nport to NPort pt2pt protocol */ if ((vport->fc_flag & FC_PT2PT) && !(vport->fc_flag & FC_PT2PT_PLOGI)) { @@ -509,7 +505,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, link_mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); if (!link_mbox) - goto out; + goto reject_response; lpfc_config_link(phba, link_mbox); link_mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl; link_mbox->vport = vport; @@ -522,7 +518,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, rc = lpfc_sli_issue_mbox(phba, link_mbox, MBX_NOWAIT); if (rc == MBX_NOT_FINISHED) { mempool_free(link_mbox, phba->mbox_mem_pool); - goto out; + goto reject_response; } } @@ -540,11 +536,11 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, login_mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); if (!login_mbox) - goto out; + goto reject_response; save_iocb = kzalloc(sizeof(*save_iocb), GFP_KERNEL); if (!save_iocb) - goto out; + goto free_mempool; /* Save info from cmd IOCB to be used in rsp after all mbox completes */ memcpy((uint8_t *)save_iocb, (uint8_t *)cmdiocb, @@ -657,9 +653,9 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, return 1; out: kfree(save_iocb); - if (login_mbox) - mempool_free(login_mbox, phba->mbox_mem_pool); - +free_mempool: + mempool_free(login_mbox, phba->mbox_mem_pool); +reject_response: stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; stat.un.b.lsRjtRsnCodeExp = LSEXP_OUT_OF_RESOURCE; lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); From patchwork Thu Dec 28 17:24:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 13506150 Received: from mout.web.de (mout.web.de [212.227.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83E19F9C1; Thu, 28 Dec 2023 17:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="woj0ouMH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1703784246; x=1704389046; i=markus.elfring@web.de; bh=4XlxHJDHSmu9DTtlturBDNHee1wz7AQbL0bmz7RZbq0=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=woj0ouMHLYY7ibHMUL64iTcnX7olMYiuDthJKiG0aiwdNFxCjFdWrJdmvRen4gYg SHqbn57hkBus4CTgbjtjLaJ9uYCutP+KzqWHQCBerfHQm1s+osrG6x7P0asxx4yRB IUK1eK5Hfcx7zjJ9x2qjlLd/swBA3fJjo6D0ALXdjFONd/x4z8iDMVkKPXiPJZjjZ Y+up3bOXLWNUEq8DFeH1jiF0MuUI2eeN8pBjudwmbr8XU0tMxwojjUHkHICCjQwV8 BpMv3idkQvYY7YGDDFtgXsucVClXHIdwsVqrDJl7WP0PoU8Q6KaIWxBkQHQWlDRon xFN9fqGKIL8B4gPBzQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M43GU-1rIu7439Si-000Ft3; Thu, 28 Dec 2023 18:24:06 +0100 Message-ID: Date: Thu, 28 Dec 2023 18:24:05 +0100 Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 2/4] scsi: lpfc: Return directly after a failed kzalloc() in lpfc_sli_read_link_ste() Content-Language: en-GB From: Markus Elfring To: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, Dick Kennedy , James Smart , "James E. J. Bottomley" , "Martin K. Petersen" Cc: LKML References: <48a127e8-ca4f-4fc4-81b7-226080fba720@web.de> In-Reply-To: <48a127e8-ca4f-4fc4-81b7-226080fba720@web.de> X-Provags-ID: V03:K1:uIeGhHJ9SX2ZMZpWX85Jqs1cor36TOwqWrCC1YmAOQ9bZYmxpo9 JaxrzdcpwFOx6pDeiYXUJbUUa6Qq3lLprlWCa+GnuKzgMrGr2kkeVmkV3qwZZD0N1dGu1cs fMnEjuqBqYXQzIOxXKkZqD5NjYFmufdbCGiG651kYOGxzrmxo3S7VkejiLxUHvYBvGH0s8p a25p4oBUcrSr2I+Q+VdVQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:DmmwTBIHlcM=;+v8eqOTTMeJo2NnLUZzwP3IWP/U ebNYeII958j7OGFbNxPZaxR4ksv6TRTf4qOwfmKCpPtsT5hhlIgK9jAHu9NRM6rmXKlEGz1gJ ClIAwTWUbrYJaagSyo893Nh6Ce2/eJzlJ2/7LkFxdIv+Ks4Orlt0yWA7DD84TRTYFfysn83nb vDIgDTivGvYhtcjaH9p2BCBNpuSShzjiPQMpSnEV62wCSagWzlOBvfzImxcDXDoC2mDqZDBOl sEkxmmOGuncbGXraij6wG+vJi9L7D9D/Uppe2DikDMdP7r2bnES/JUFQhdtbmj5BCAB7Rl2ww +jiKDXSwDQWF4hY/iYm9oAi8koYDSJHhXDfDbHufklpFfTtvnnJO9H6Q0q12J0R0h1lytT6DY BH0Ng72TXIdzny7QGJgzpC/QJGK0rgy1tXJsLi/gSAN0Fyv3WL4DKt5OD3LC5BywNvA6drnvb rtDo0qv21wQRbKePmjv2nMutGU34+kf8wkLb49wDnEYKY3SjxfjIjAPt6QsL9GZRIMKqwhdPR HGeK+BU2DZqpT7qD5IYGQDEna1BELAURaP1vGGD8CqpqBZIky5786mh97wbTyhl5kXqae0Z0C L9evAfZAvfAyMrqJyjCYOx4+wTIDmDgJkoeEA5iVi/GREwiOE30blI32RfuvkBGMFtRZ419LU 8OzUEcrWIunzV2iuyeA9ViOxw0jzPV1+anSGOaee0fioWLA3FL/4wSV3gBdq/iLfOCGjoL7ek TImXNxf6QCqd4m3kzVcPJsFWyOgtwImVVl60YQbweA6UkBsfL/yqkxzSd8Q7zf55HHm8qrJpP vCQmqbqSmFVvR1Ij0FVFsjOtT1eOPCe6/4Jb6VcchH/Tk5XPUKiR4+pxm13gknqnH8Tru8bv5 xIGK5RMXE+CsAVhdT1nBbceIt3sJh1JVGzViLWAxPYshRwrBpGqywbeHJ4l19IRAe45qPJbGi wIlz9A== From: Markus Elfring Date: Thu, 28 Dec 2023 17:13:50 +0100 The kfree() function was called in one case by the lpfc_sli_read_link_ste() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. Thus return directly after a call of the function “kzalloc” failed at the beginning. Signed-off-by: Markus Elfring --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.43.0 diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 706985358c6a..93339425ce3c 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -20701,7 +20701,7 @@ lpfc_sli_read_link_ste(struct lpfc_hba *phba) /* Get adapter Region 23 data */ rgn23_data = kzalloc(DMP_RGN23_SIZE, GFP_KERNEL); if (!rgn23_data) - goto out; + return; if (phba->sli_rev < LPFC_SLI_REV4) data_size = lpfc_sli_get_config_region23(phba, rgn23_data); From patchwork Thu Dec 28 17:26:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 13506151 Received: from mout.web.de (mout.web.de [212.227.17.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53BC3F51F; Thu, 28 Dec 2023 17:26:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="Vi3h62jX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1703784367; x=1704389167; i=markus.elfring@web.de; bh=nENeSFE2OfbA9iTcUIGri8Kr4fNiIopTSZGwGt/7Yhg=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=Vi3h62jXDDODEK0LqbLIQ49NCjBR5R3NC2GdjFiEliruaVRytDLr6CSWT2Bz+haB U0zyGF5Im2U1ccAlr/GoNxyTlx3iMGp04pGErrlF936iMDvUwmtLH09PYqKkx6+T4 Q0KwfaoKQ5KDif+2L3zi00iRTquJT7QKGP+m84Aoe8PS7gFOFHQg18N/4RXep5DpI 5xDmWdkYKt8phqwRO6F0u+WH5KAKOA+mGih2m9iB82NFUlFM3cIYzrA40u6PlAnJX vJ9F5UD0ggqXDP0DNhNcHwWTEYiSxcALCV5v7FQY2qSzBPRBVt4J/d40ull90jQ5Y MbXYUxaU8oRVqlPr+A== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MP3CA-1rbg152Vzg-00Pkmx; Thu, 28 Dec 2023 18:26:07 +0100 Message-ID: <8007263d-fe17-454e-92f3-cde218b7ed4f@web.de> Date: Thu, 28 Dec 2023 18:26:06 +0100 Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 3/4] scsi: lpfc: Delete an unnecessary return statement in lpfc_sli_read_link_ste() Content-Language: en-GB From: Markus Elfring To: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, Dick Kennedy , James Smart , "James E. J. Bottomley" , "Martin K. Petersen" Cc: LKML References: <48a127e8-ca4f-4fc4-81b7-226080fba720@web.de> In-Reply-To: <48a127e8-ca4f-4fc4-81b7-226080fba720@web.de> X-Provags-ID: V03:K1:LDGrC+vqHWIocEGPv0lD4hzzP1mq5REoUWT0LydrdmXSQuolF8h cqwB1fOHHm19gObqS/eG0H5PdmvJm+/zyZTzrg+haOR9R39wBU+0qY1a5byXl3nHxUsjXB+ /lC+QedabMdUv0S/EaZ2PjeFSXGJDBSOyfqg/fTE2CHprAl3xzSClwnoJtnhTaKr2eq57XN eHhB9L/t6Es1aqCwtLDkg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:slsbpT8E4KY=;5AKxhEkof4r2xFb7LF3LQMHrzyO 5kjWrd6r+vEvsq3MZV/P14SyUprcw5EX5jvnil9JKPd0c5LD+YWT7kwd/Q/CqgQtUZsjAzYOD i1WEfRR7gsdeOvcvrDKJ81tVeEV//lDHKB2n8G+/mGcsssl/Yp+Myj/68GQQT1WgBvMWWmkeL Ntp01nArKiD19atcLdHh5zjwVi8BIatGafsI5Rj8Hax9Ht9BaLW5FNJCC52AXsodMQZqhW8FA oN1OHl93PlYJRLLyYkaF5kaXJaPSYeu8NcNU8ZSDGAKmwl8U+K1gYxBgKztK6Z6FBzuk8rUQp OC7OoCaLnmIcAme5JzU6gvBJl1voAKztWmJX/AKp4VAEeNdlLiLWLvOyVwBLWPFt6t6ABtLxi AKegdAsw0r3x/0kQEd1WkdwyDYnt0znmbHR5w2gK/uVwuwK7zFB9yETVhEfDsT2UyrQ8sc5xV 1E/2wrJejoil5omf3+pEVdW7kAKM4uXE3kC7bj2GNS8md1sCEOhTY4GqRL4U4yH57ZwtzUFec J3SWxj600iQi76+uqN/fOfr+PchTOGtPkR9wa6ex3EI+PshnGuwDITBZlS8NlE0faeRn6ABZk scmoD41IA8+LyCzkYFGq48ey4xXBWdPeTUrRdd5DvnPTnBP9ZdiR/77U8Idk3LT3DNJJGlgvJ Ifx5zuskHKK6QEINPnGuVUIOQLfpbuN+7YjmPBzFhbumy+7kL/k9oi468ZP3GZ6Ji3Qr0h28J NTCcI26W51ExMbaJOPYB3TNAVstGIpeFGpO4yldWooqRaRkxIfQYFX8dc3IJyB5GCstk0WsIi BtPIMfNNMHz6aLFtr5VC33oSMah+nG90VXWstMsqr6uvTjKWD4hVZtWWE3VrhZXAry3q96Uxz TpPfv64RFPLgec6JXuknFOf/ALzCkpwy3xyIqKUDtpAnYmOEDqNA0St06ER1ATwbgRSW1g7rD TUPLDg== From: Markus Elfring Date: Thu, 28 Dec 2023 17:45:29 +0100 The script “checkpatch.pl” pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring --- drivers/scsi/lpfc/lpfc_sli.c | 1 - 1 file changed, 1 deletion(-) -- 2.43.0 diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 93339425ce3c..8de598c9e03b 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -20778,7 +20778,6 @@ lpfc_sli_read_link_ste(struct lpfc_hba *phba) out: kfree(rgn23_data); - return; } /** From patchwork Thu Dec 28 17:28:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 13506154 Received: from mout.web.de (mout.web.de [212.227.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DCECF51F; Thu, 28 Dec 2023 17:28:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="iN6+QnsI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1703784488; x=1704389288; i=markus.elfring@web.de; bh=bZIUiXqM0iUtPLxaSty3O0T6RhxO0I6eQJgl62PzlfM=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=iN6+QnsIE6tetReld5k2uZNh3q6iuqTtJ0Xk4Ge5+1qaZzgkMa47VEgPFy8BIAwm vJ1WttlhVpCGpVysvCA+SLydzJ/7UaM9wp2FGLSjIluiwLLz4XvOo66VzAY5kIF/o kSTmgshI//10mM928uiCZslT79GyJB/JJlhee9dCcMo3mNE9Qi4nbUVpCeihuixOL kxGvlQebmRoV6bKDTw4b8ImuorIFmqlpPYBTH/na9KHfe4F8JCrdEQiygrRBPQ8es 2DGErXjCXqEBy31OfTCgr4/J2W5wA/GbRrIL3PXVV9RQ9B2KGnQZvTc2W/UASXZi/ MKVHX15fAo4O/3DE6A== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mm9Va-1qsKql3sG0-00i55t; Thu, 28 Dec 2023 18:28:07 +0100 Message-ID: <98f99041-e089-4253-9195-6a26b986658e@web.de> Date: Thu, 28 Dec 2023 18:28:06 +0100 Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 4/4] scsi: lpfc: Delete an unnecessary variable initialisation in lpfc_sli_read_link_ste() Content-Language: en-GB From: Markus Elfring To: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, Dick Kennedy , James Smart , "James E. J. Bottomley" , "Martin K. Petersen" Cc: LKML References: <48a127e8-ca4f-4fc4-81b7-226080fba720@web.de> In-Reply-To: <48a127e8-ca4f-4fc4-81b7-226080fba720@web.de> X-Provags-ID: V03:K1:STSMzfYc67LKhAslNGaZdX4bp6OTa7800mET5EYlhf7vUhCK6Lm Ifqyt7MS+yD6MlIY/3dNgCFbV6/dDcnWYSmWrabZ7L8YoIB9RbqaRvL5ING8Ku9Xv26bGd3 iif/S0BKAFaf/rIl0b7wbKgm01nrQMYWHBFuMm58B/2e6WK7mMoMa/len0eorM8rua5rosz CgtspMAQ5PSUUaJF16AVQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:gGJWmcBxQXs=;U1pG/0wNPXece0P+dqVanmQytTQ WLCrpq0mp/1yuggSzMAAQf4MCI6fPGsDYbTSoZ2Sx+HM7+52S5wOP6BGNW9/kOXaHs5K1aLhc c02hcybWUpDx4ejZ+BMsA7b6sWPD42BMQRQoS9cHp7vv3h8dZ5jOb3RXYGdsxjrYAX9aIJ46f NMD8UXU4KVdzSk01vCdv/odEJBlFB7mk75I2eljDK7vQlXyvG+j4C03aPGHKH9hi/DYgtoHED L0PRnODx9oSdo5XGfopg+/bNj095vs9phJGDBOvG8l1Nt3sc1dr6/1nAVArsmC/7DzRsfuSEi s6YQvjBwpqMfn+xF3VP0ffpPTZ+NXbKDrjzlsDjv4HmUVrSEcaFCXKXU7gHVze+m3oYR8DX+l cTZ/lT8OdxOv9fZY059MqdTL3IxFEOZJB2mZDQTwwcf5chnBBhFFMuUqPja7iuCBBBgt2F92m 8uCX7w6qyH5KuAgdUuGKA3GKIEIHrQm3vlvOV3L1EsjMHeOpytVU0oX2FuekbfX578+N7RMux GWEPeaz3ZiO1ubPm8GFFLSMTW5coWY7jswgi2tu5NNvPgD/zCh9CF2S66FaMi/nmJZVDANhmX IV0pK4sEkSCqs63DyIs1HMzp5OzpXiBxlkEta112NzC5Jp+55ATQS3LJEI/tHmyoX/7dFZW4p HUYGoMahxVavBFUIN5J2Ft31Lop3PwmC3FUqfvKWPDTcm0atX/kqUsIVcSI8tXMCNZiqTTgQ5 +WkaU9VRLSA7TV9ywZ7HnaIbtx9b3xRKDhbnipJIDQNv6Z5SAXR6kOPOCJmDjuhiyqOcNO1Z0 /LhNO6TWX+rXPjrwwSXSRa6ZrS7PW/vvn/v2ZNIbYNtHMHSE6fS+1IDVJO+/J4vfOpBqljCZz ByKxcSQfX8qC/Wbol1kaTDNongA6tj+B8Y1SaXCho7qwX8xtpH8EYb5YkR0ixXj9zIbXIdeNM CVq95abh9gFa99myyIBDpPySwUI= From: Markus Elfring Date: Thu, 28 Dec 2023 18:00:11 +0100 The variable “rgn23_data” will be reassigned by a following statement. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.43.0 diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 8de598c9e03b..1ce5671a7e07 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -20694,7 +20694,7 @@ lpfc_sli4_get_config_region23(struct lpfc_hba *phba, char *rgn23_data) void lpfc_sli_read_link_ste(struct lpfc_hba *phba) { - uint8_t *rgn23_data = NULL; + uint8_t *rgn23_data; uint32_t if_type, data_size, sub_tlv_len, tlv_offset; uint32_t offset = 0;