public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: fnic: Replace use of sizeof with standard usage
@ 2025-02-25 21:50 Karan Tilak Kumar
  2025-03-04  3:07 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Karan Tilak Kumar @ 2025-02-25 21:50 UTC (permalink / raw)
  To: sebaddel
  Cc: arulponn, djhawar, gcboffa, mkai2, satishkh, aeasi, jejb,
	martin.petersen, linux-scsi, linux-kernel, Karan Tilak Kumar,
	Dan Carpenter

Remove cast and replace use of sizeof(struct) with standard usage of
sizeof.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: a63e78eb2b0f ("scsi: fnic: Add support for fabric based solicited requests and responses")
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
---
 drivers/scsi/fnic/fdls_disc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/fnic/fdls_disc.c b/drivers/scsi/fnic/fdls_disc.c
index ff9ba7cafc01..3a41e92d5fd6 100644
--- a/drivers/scsi/fnic/fdls_disc.c
+++ b/drivers/scsi/fnic/fdls_disc.c
@@ -318,8 +318,7 @@ void fdls_schedule_oxid_free_retry_work(struct work_struct *work)
 			"Schedule oxid free. oxid idx: %d\n", idx);
 
 		spin_unlock_irqrestore(&fnic->fnic_lock, fnic->lock_flags);
-		reclaim_entry = (struct reclaim_entry_s *)
-						kzalloc(sizeof(struct reclaim_entry_s), GFP_KERNEL);
+		reclaim_entry = kzalloc(sizeof(*reclaim_entry), GFP_KERNEL);
 		spin_lock_irqsave(&fnic->fnic_lock, fnic->lock_flags);
 
 		if (!reclaim_entry) {
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-04  3:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 21:50 [PATCH] scsi: fnic: Replace use of sizeof with standard usage Karan Tilak Kumar
2025-03-04  3:07 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox