Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1715782lqg; Mon, 4 Mar 2024 01:11:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW4gXR6anbU4sxkRTH9s3fJdIXbCv/itENtgWSuFNJ+7UGhCxqy3+Xf50Ddyq1xKOOopLw+iP/PQ1i/S98tU9EoS/deOPRoouwdnKYGUg== X-Google-Smtp-Source: AGHT+IHwHapQpdGN7x7Q5H/FVYu0ih+9l+9zUv1cvQGZL3sSsDVcGunxdNWR4QAkjXwtVZcWGh/o X-Received: by 2002:a05:6102:2ca:b0:472:a200:8e3 with SMTP id h10-20020a05610202ca00b00472a20008e3mr4140634vsh.20.1709543478683; Mon, 04 Mar 2024 01:11:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709543478; cv=pass; d=google.com; s=arc-20160816; b=s+2x9ibGgfnZ6GEavZ6mxiiPkq+qjj975Zd0yP1sldM68miwJ6bOwVViKQXKKLqI6x X5tliHH4aAmG8EY6RsKFA3jexvKUTIopYUUWrvg+/+qkK3lKlBOLQEv3h8m3/FWYEHG8 8+0kLMualtZFGp3iQxBFuUrXg7xkExMz4rdjBpGrTNBOiJ/WqKh6Ob1uGWiYyxnFdYQ2 gXOemAgJ3xGLPy8rpBwebssrSCbCVzeD3r6T+QEVJEBvbbacWtoHk7BmhKW6UC2xpjSX GNpH2QNiQcxx37XdDIyg/oct9Cf9MoySNeJxPZQdkTyzKi64TPfnNM5k0riF8AqUcZmt iEvA== 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=3lkIZ2OM4oFtAgxGkqD49dcNUa6VndjzCJM+flEKP6U=; fh=G1JQDcvZJZ1fI8H2pWZ5vLMfMZtEEwTwrGhyLHhwtJI=; b=KT4R8oEs+2sehxj/rVha/Ui/etm5rqS9mBjfo1AWxczS05Lx/P/XxvprtP5UknHoJ5 +ITSIaFKy/2jgXIWF4Or0Q0qVUWcLY/uLEi10PFaCAeWmxR/1JIJk7ffr73Us8N7mxXu KXZinuZwg9ZC2cfaWg4GxMStf+90QOqTIh+FF/LaYlL9LUTuePiicJm02o4NR9gOVoji ItXklaAUJu3jrQspOA3qHqZ2zaCWxnvgFMVrW3x2k5Bo2kDsaYTarkTfTOOlHDdaPezO 8ObvoW21lRa6glmxjpnz7GiZkJVhEAfBimRgVu8iY3zuiMpnZgjw+LMQfBenzvhLGuDn 1K7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MoQtuYqx; 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-90277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h2-20020ac87d42000000b0042ee033d68esi4195539qtb.581.2024.03.04.01.11.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:11:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MoQtuYqx; 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-90277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90277-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 69DDF1C22287 for ; Mon, 4 Mar 2024 09:11:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E0D31BF3D; Mon, 4 Mar 2024 09:11:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="MoQtuYqx" 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 F216A19472; Mon, 4 Mar 2024 09:11:02 +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=1709543465; cv=none; b=IxWPWBBGYJv/YpH7TRhPqxsfEolgYB14f0lYXlnF7QU8+R3rQ2C3Pjzvk8r4Z5vP47bc0nVWt1Xg5ucyFmMGbl/Xj99fwaet+rhbVLRqVTAebE5AUCYP6jh5ZsMka3aMGyo2nYSYiWykDdV/wMxNyPiLE7oYD8eSTioon5uUGyQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709543465; c=relaxed/simple; bh=CVm0itqbknJclQDsY4Frf9OoAkYPPa/1GZRo1JGqk0M=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=FdxqIAI+JTPMe72VE7cjnBeV74+jAICEoA5gS2Uql1xw4Jsy5otUQAtE1kfJ5CNp7s6q794BYW5XaHBQ8gDF53HAEjr1Svl0e6xMHekrQDOPuGo5q5yz2YeFQ17NWaG3cgBicCIwIdcpBtbFnoBTLZup8zIZ11NJnTeZGCz4Mw0= 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=MoQtuYqx; 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=1709543461; bh=CVm0itqbknJclQDsY4Frf9OoAkYPPa/1GZRo1JGqk0M=; h=From:To:Cc:Subject:Date:From; b=MoQtuYqxH59MYYoqJHYWXgE/CvSNkS4FDInxOYwx+mBhrrD6EgejdXCyXE9MrjrDc JdM39yfc+uT7tRfH7HbyGWnZzyafiz0GiKY/DXxXIY6i8A66/aIYv0SdnLxGWOHMkm ScjWEkYMttvzFGh6aEzmCCGOMq31NUtCyDf1yb31FEArCD6dkMM9eNf0QLqxh83vrI 8Ui56w0i4qR/Wyd3GXS2TFEeaZ70jlH8tuVXkVqg5Gu/15cXZiCCFgSOzDWkLfrEmh nPAFMC2dj0ptermIeZBQFZ7dRJAieLIHyIoXCDebuPBkF88nytOK/Kb1Vufxx0O840 DCdQioVds9PdQ== 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 580A73781FE9; Mon, 4 Mar 2024 09:10:58 +0000 (UTC) From: Muhammad Usama Anjum To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , Justin Tee Cc: Muhammad Usama Anjum , kernel@collabora.com, kernel-janitors@vger.kernel.org, James Smart , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] scsi: lpfc: correct size for cmdwqe/rspwqe for memset Date: Mon, 4 Mar 2024 14:11:19 +0500 Message-Id: <20240304091119.847060-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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The cmdwqe and rspwqe are of type lpfc_wqe128. They should be memset with the same type. Fixes: 61910d6a5243 ("scsi: lpfc: SLI path split: Refactor CT paths") Signed-off-by: Muhammad Usama Anjum --- Changes since v1: - Use *ptr instead of specifying type in sizeof --- drivers/scsi/lpfc/lpfc_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index d80e6e81053b0..7d5275d3a7406 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -3169,10 +3169,10 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job) } cmdwqe = &cmdiocbq->wqe; - memset(cmdwqe, 0, sizeof(union lpfc_wqe)); + memset(cmdwqe, 0, sizeof(*cmdwqe)); if (phba->sli_rev < LPFC_SLI_REV4) { rspwqe = &rspiocbq->wqe; - memset(rspwqe, 0, sizeof(union lpfc_wqe)); + memset(rspwqe, 0, sizeof(*rspwqe)); } INIT_LIST_HEAD(&head); -- 2.39.2