Message ID | 20240301144458.2810597-1-usama.anjum@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-88580-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp1126576dyb; Fri, 1 Mar 2024 06:46:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZvYVrG0qyyAdpVqaYlJVpXXcp7fkb+A9Mnjc6m5sZ16iLFOFW7TuVw2mcgvYnwCCxIp0p7ga5DwaomY0MsYhIkLIF3Q== X-Google-Smtp-Source: AGHT+IGl7jkr/pTuZ10HrLAIFQkFYvZgp+Y6BT26sVmCbA0tkTV6KYQahuE+o8YM1/kL8fxuPCUe X-Received: by 2002:a17:902:e741:b0:1dc:30f1:b8d3 with SMTP id p1-20020a170902e74100b001dc30f1b8d3mr2176610plf.18.1709304374300; Fri, 01 Mar 2024 06:46:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709304374; cv=pass; d=google.com; s=arc-20160816; b=iTVb9U5EKUzn+6nJe8y5hRF8ynjywItj7utRIiMYqTLUXD1LbZyZcycWy+vx1pDTrB 0NZ2wTEnQPvZFINyxjgcBzLvKfIPIvCZbQxG88AQV3LxWLHXUY3qcu0Is8sqqVo5NOjs yXszWgJbDucE4ywkpy8Nl9/2/r78L0nnOQsF2N5XhbvSsdsSV5a/RzNPrRTGcjtylPvH ERbvOolOG5l4gIdco5mwUPdqPD/wJDzQMqetZcbiE7neeX/zji/KMxODN8lM3btVY9jN ctaZKkeelr9hKv8lvg+rUUJ5Hd4wtSGSnnoBkfdMyiocGGuSLPOx6T6hVrUbN78gY0Y9 Y1lA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=tngFSi/7Lm47c8pGR1u977N2nKlcciSZX2zmRDXnkOQ=; fh=KjgQo1wrCvZYydXzDdCwRCQBa3U7cwe/h3vhSPRQBtI=; b=pA0z9KNal3QHyVgibib5vh5N1Vsuq5PcKMQ7Yey6iVJ7MGa9UDUwvqn7nqO0vRKKx8 iC2B8pSOSpWnVuj+DmqVdPNM0SkCBPXKClIoB29OUqmBNWoR2oM4cThTc/yfzggEOznn svD84bxgvokwaYtgAwRR3PyCBX3kAKCyk9GYWhUimKeSjGMWGiAGHc+mRN9FYtKT4eeF YougLg7JkJaKGgX41f9hD2xNpIyL+pIzCT2oPxKdGcYD4/cFqme2GtGLRCq7fcjePq4f /yAWfFxdluem5HcgniJpz7qsMSkWmT/d71GJIzLR1U+A5z8CU5/KQBgcmTMBDdJd5KrL cvfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cpR+v1Mo; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-88580-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88580-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g11-20020a170902740b00b001dc88b8c170si3540607pll.408.2024.03.01.06.46.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 06:46:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88580-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cpR+v1Mo; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-88580-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88580-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3C5E8282151 for <ouuuleilei@gmail.com>; Fri, 1 Mar 2024 14:46:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C5EC6E60B; Fri, 1 Mar 2024 14:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="cpR+v1Mo" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 CA64F39AC7; Fri, 1 Mar 2024 14:44:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709304283; cv=none; b=SypqkX9LN+aQndsPG7CDua9uy+TpaGgWmeXQyjN5528+5I8rLqVLVdypIX50Cb9ruYnDgsC2wT6/LjIPsba9DONordMeX5mEmBDfH+VZE5QtAvJ4ssQgxWbHl5hniIEwz45fdkmE+2c3P+HLx+sEYaoGBrzMOpGcDsy/tVnQBKw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709304283; c=relaxed/simple; bh=qJfz/gwS3bbppBLBLznSkEs8J38LclOY++ed9FAyW4Q=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rKu5jBLj4s1g8rNVfjO/LvvV9CSRzTThjKNXDSS2+TaS9idtn8nIJyyGqN9Qo3jvm3Ngw3+X+jfhBbnMpkaZNeFbzl7dAt3wRmUrMDfkt3PpppNizkRnNi9rJTAMyygbviwiSrMv1uhXq1s2PuaDDagktczbLDXg2+rSt378+mg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=cpR+v1Mo; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709304279; bh=qJfz/gwS3bbppBLBLznSkEs8J38LclOY++ed9FAyW4Q=; h=From:To:Cc:Subject:Date:From; b=cpR+v1MoxzSyZ6lE2WfINuZwTAYBlrrmfH2fZlwlpqnl3UV5U2zi80Sft1F+wlIza YFi56/dnEPppzFXQYHQZUFdQ1GcGfWZ21JnCZkQU70h9mb/V/4RfMlokhUtpmSc0iV Z+CBGPlKRnOZZ2zpUelWTHlw95mFgjTy9A0dGrBwGBgn38+mBJ/Wqh3aTvvybOEwa/ QLXrwa/gH5x+9UMkXBjoQej74zfqIkCUU6E7+5IzNphg0TDoin1J2xf5dU7O1IHZfc zmEfTUhOmCFe8wDZBPJnIl9KJVTbKUoDp+MTUnxR168XTTMOIt8g9KODpWQNuVjrj4 D8K9pzwWn5ARg== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id C580C3782076; Fri, 1 Mar 2024 14:44:34 +0000 (UTC) From: Muhammad Usama Anjum <usama.anjum@collabora.com> To: James Smart <james.smart@broadcom.com>, Dick Kennedy <dick.kennedy@broadcom.com>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, Hannes Reinecke <hare@suse.com> Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>, kernel@collabora.com, kernel-janitors@vger.kernel.org, James Smart <jsmart2021@gmail.com>, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: lpfc: correct size for wqe for memset Date: Fri, 1 Mar 2024 19:44:58 +0500 Message-Id: <20240301144458.2810597-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792335543850822180 X-GMAIL-MSGID: 1792335543850822180 |
Series |
scsi: lpfc: correct size for wqe for memset
|
|
Commit Message
Muhammad Usama Anjum
March 1, 2024, 2:44 p.m. UTC
The wqe is of type lpfc_wqe128. It should be memset with the same type.
Fixes: 6c621a2229b0 ("scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
drivers/scsi/lpfc/lpfc_nvmet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Muhammad, > - memset(wqe, 0, sizeof(union lpfc_wqe)); > + memset(wqe, 0, sizeof(union lpfc_wqe128)); How about instead memset(wqe, 0, sizeof(*wqe)); Thanks, Justin
I'll send v2. On 3/2/24 12:02 AM, Justin Tee wrote: > Hi Muhammad, > >> - memset(wqe, 0, sizeof(union lpfc_wqe)); >> + memset(wqe, 0, sizeof(union lpfc_wqe128)); > > How about instead memset(wqe, 0, sizeof(*wqe)); > > Thanks, > Justin >
Il 01/03/24 15:44, Muhammad Usama Anjum ha scritto: > The wqe is of type lpfc_wqe128. It should be memset with the same type. > > Fixes: 6c621a2229b0 ("scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context") > Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> > --- > drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c > index 8258b771bd009..29bc6cd10fd69 100644 > --- a/drivers/scsi/lpfc/lpfc_nvmet.c > +++ b/drivers/scsi/lpfc/lpfc_nvmet.c > @@ -1586,7 +1586,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) > wqe = &nvmewqe->wqe; > > /* Initialize WQE */ > - memset(wqe, 0, sizeof(union lpfc_wqe)); > + memset(wqe, 0, sizeof(union lpfc_wqe128)); memset(wqe, 0, sizeof(*wqe)); Cheers, Angelo
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index 8258b771bd009..29bc6cd10fd69 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -1586,7 +1586,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) wqe = &nvmewqe->wqe; /* Initialize WQE */ - memset(wqe, 0, sizeof(union lpfc_wqe)); + memset(wqe, 0, sizeof(union lpfc_wqe128)); ctx_buf->iocbq->cmd_dmabuf = NULL; spin_lock(&phba->sli4_hba.sgl_list_lock);