Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3502187rdb; Wed, 27 Dec 2023 09:18:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdtelfx9/x6ch8a1ibz2/jdKSYTqmEFO64a7L0zUqicvvf7dTV6lMEyS5H+GJXPSuW3ZLi X-Received: by 2002:a17:906:958:b0:a26:97f3:2558 with SMTP id j24-20020a170906095800b00a2697f32558mr4434824ejd.26.1703697523474; Wed, 27 Dec 2023 09:18:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703697523; cv=none; d=google.com; s=arc-20160816; b=rUvvlW0WGzi/pK97Jn4OIwEkYzJ92r4W8h7Ow6/T6HRxKlroSJSPLxmdvI5VonGO/J dkdg4xGWz/FLsj4Dl2Hs2W1qpi8svsLyghE2b6AiIPobld/RZ+yIGBodnF0LCGBi6CAD TGLAsYePTXx6ZTL6eKMB723M3DRitEP8SpDQeTAv8PI9zmun7fv8zEz/sdibpuhhD+Hq +kCrMpRXd+SzXS8o2IBW5IN1wZ4cQgnX0x3WOjYo7Mx5cFf/EID7SOsUnHriC8NqKj+r 1fhAsxV0XIwOoAEqONvSNET10HQO7FLyqAaQouhYxGYtj6rUXrwlsSoimaPism9JroJ1 9UoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=+O0oPr+Mg6QszQgfZABvkLHy4AjtH4pOlEZxLxJuPoU=; fh=QwQFw7l43djd2WVi5dPHV52gp53o7xSFxqQ0Hz9q52Y=; b=NBw54fUpi5RUMAgVhuWCjFd+tU8Ca6wd1+470d7ooDkmWX4QtZTlAEgf863lLXiPaf YEheRlNFniwEsfHFBUOYqrqFV2+oOdCp42ur7Fz11fuN1SthNDbbCk68P2kK9CKi7vRX Z/sfSz9OP4ZU5NtAlf0bDTftMgX/vPPyhK4c5JcunpsjCy35IzOoXwTgus+DUqJI1c+i UrLapjasTU5VdJIdwgrDj0JvGdIQsEI8dywS83vG6ujSz31UbmczKoCNbry9s4KEQwJI pFnBkVFG9SIO0Rb3458dbCaKD7uvPcGn3xr60bBa50hP4pHzkj0zhHgvXAsmROBTIZcs HNag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=PWyawNPC; spf=pass (google.com: domain of linux-kernel+bounces-12166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12166-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u17-20020a1709060b1100b00a236e97fbdfsi6374253ejg.677.2023.12.27.09.18.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 09:18:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=PWyawNPC; spf=pass (google.com: domain of linux-kernel+bounces-12166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12166-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3C77A1F22FC5 for ; Wed, 27 Dec 2023 17:18:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5DC4A4645A; Wed, 27 Dec 2023 17:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="PWyawNPC" X-Original-To: linux-kernel@vger.kernel.org Received: from mout.web.de (mout.web.de [212.227.15.3]) (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 5A16046420; Wed, 27 Dec 2023 17:18:31 +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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1703697488; x=1704302288; i=markus.elfring@web.de; bh=dwFepwTmoz1K5UBHElv534KOXOgEY3BfjF5zKd4bVyg=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=PWyawNPC21xNRABWg/UjEGrcxM8lY6DWQkdkc0YOqXNNk7ndtp8CHqNT/7AxnVRs vY+eRPVcxm08w4WnQ3bBq4Wvs9+iwu6tdrZYbDOVStXMkirOUxmwz0n2zu21Ejyno 5/60gSbl1KZe2Cv/yaFTKVXF/wa/OxoP9q7ZAuzIkPHwot098Mu3CfTTb2sRYiAG9 hyNp7SoUx4yj7gMO5tg05TXIWLN94jmPLxgMyHjk7168ZAPcSR7wcBdfuJ2kvLeCf rvnkC2a57MzRgp4ISBg/lM2vSQQclUkQrZ0P8I+Pi21faj1OsSHo/VPFCMb+zraYi yxo+EzVjzJwZs29JCA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M6pYY-1rKA6Y2S34-008fhK; Wed, 27 Dec 2023 18:18:08 +0100 Message-ID: <40059711-eec1-4e52-9ef8-1ebf066aa11d@web.de> Date: Wed, 27 Dec 2023 18:18:07 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 2/2] nvmet-fc: Improve a size determination in nvmet_fc_alloc_ls_iodlist() Content-Language: en-GB From: Markus Elfring To: linux-nvme@lists.infradead.org, kernel-janitors@vger.kernel.org, Chaitanya Kulkarni , Christoph Hellwig , James Smart , Sagi Grimberg Cc: LKML , cocci@inria.fr References: <6b821c46-7248-4882-aa6b-0279803f4235@web.de> In-Reply-To: <6b821c46-7248-4882-aa6b-0279803f4235@web.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:aUG30CfZLJU1YbJxvTKb5BgY2Fh5dGqh4jBoV4TVF1WoxvGbQjt ilLMXEtVceGDKtnCW5fqr736P+8WTFRJy9I7KmsiKE7AgAYPUKdMgIY4139MmtTwdukN344 dudh+1cIBRZFvAT7dqOyQnoZXRPp2ICnsqlRjvBBSrde7naIRdQl3CI18QcrlvLVXU74kM4 5np5ozRi0Ux0rqBYokQyg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:CBX/uooqcM8=;WzKz1uEE85xPvuxjzgRPPWoEw79 UuoBnLCA0bmw0gB2lANhPNXrTNr2RH3SG6ZX8uoL5tH391fp59GcwkPeqNJazkSfyD/6/tfAY U73rwP7hripkGjTGQcq98S6VJwDPqbsPESGUZgIJry43L5hU0Q/LPROkClR53dB2+cA3ZgXDO RiUr1Jid4uziu62aB5hC/q3s5aOYgA6AmBOn0/wLlJC+uQ2UC8StnX6zg6gs6GAWhjv3/LKaU Qf63cav4DChBGg3H5Ztv+hA9LbjZW+pmihnX3qf4HVlUCNJTtKIpIvBUac/yGNMlPjOhkIaKA Kb8VofK+gu4CQxPCLTAz68Kb1IIoAiJ5VLkpYSmduqBzklUeiATSxq1/GPaZSY6pY6RTNT6/z ksbzKDhyQBLX3G1yidETNZUlrWi1nDzJTQ2uDO9w65JU4dSYLsQTJaRnLX8uIrCVAjM0WK+kn icIQ9nt0p04ZhmOVSOISfkbZdSm6uewvnKyl2giEK9FVMtiknOREbJ9q41GrljudrUCT0rWx6 oqLvrCv3hpkbSXOXcuJHC52OsOZWE41honvBEGq5NU3xJNWOIEkO2nEgzuUB4Xp4CMBjipRN7 Z+HVQSJLapvTnkDL98YFQZ0SZGS3OX2OAdsuP85T5rA0gt0sgmVmk/4mtcm34orsWzbGlEMM9 5uMjGjhb4nT7HzRYguPMoJfldS5gFPac2DEYhUQVzh0Y1ZAE1OGa2CdGlfYeWC4d9wSauLwgU e5wcU2vd4c+UWnpadtpobvpwr3Cg5zir4YYgD36U73I92qcJHp23inQgTeIOSCCg3cn4YaYCQ uR3xstgt9WcEW6mALEy5S7r9UvyOnmKN4S6g1gapasa+FQPk1IZuCWLI3GHak2HrqTC6EFYDV 3UH/tMKfO3eof5CqwS0bOBgEFnqdxywNjTZg3v6EQ0cJavRq+Qg72y+TV+EIXaqpsCyTGUoMD 8VZcGQ== From: Markus Elfring Date: Wed, 27 Dec 2023 18:03:10 +0100 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring =2D-- drivers/nvme/target/fc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c index 856a68404f32..ada257b3c681 100644 =2D-- a/drivers/nvme/target/fc.c +++ b/drivers/nvme/target/fc.c @@ -537,8 +537,7 @@ nvmet_fc_alloc_ls_iodlist(struct nvmet_fc_tgtport *tgt= port) struct nvmet_fc_ls_iod *iod; int i; - iod =3D kcalloc(NVMET_LS_CTX_COUNT, sizeof(struct nvmet_fc_ls_iod), - GFP_KERNEL); + iod =3D kcalloc(NVMET_LS_CTX_COUNT, sizeof(*iod), GFP_KERNEL); if (!iod) return -ENOMEM; =2D- 2.43.0