From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16A38E77180 for ; Wed, 11 Dec 2024 18:53:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YVmB09UuOHxtIh7hJamCy8XcgOQnadiPWwObSJBSAyY=; b=CoNBinGX/8kSbIyLOjYyhuCPJX s5r/q36YmzcVyVSIxpXfnPVl3dCY86B2khnH1ew6nw6ZYe2bJunrVWiAiB+X6mIftogT6MFIY4UCV m9f2eql4Yz7zDMuSDl7vzio12ACLS098zM+tawIAL0c9fU9RqS8JrnZ5a6yo+IGqmE/2zuYrHUzaa fAegKQa02FRDsFsQKBiMUM5TKLHV6kmG3qk25F/h1B8atz+PpLeMlXEtS2TLk1megjK4uQQrTjbxg K30XSgq6T/Yy6fg6EArCFVSXA/q1Pts8YF/3lWc4MaU6hRGT9sqKOHIS08tyS2GyVj7ouYpQa3Um/ NvPk+3Ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tLRqI-0000000FmYz-36VA; Wed, 11 Dec 2024 18:53:50 +0000 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tLRnE-0000000Flde-1w8G for linux-nvme@lists.infradead.org; Wed, 11 Dec 2024 18:50:42 +0000 Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BBFI9E8019381 for ; Wed, 11 Dec 2024 10:50:38 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=s2048-2021-q4; bh=YVmB09UuOHxtIh7hJamCy8XcgOQnadiPWwObSJBSAyY=; b=MxKP2nsjedl5 84WEoUAVWkOmbhenOK9PZasjiu6eD0TmrElKb2gh+wlMS04J6G15hg9KBTvaMVdL jEonyKwrGqluYfUzZ5W2ArZCdtTbt/tXQqIhbT5TYSX2ely9ovRYa73bb8Ev86/p 1aD34c2nxvtj9wm0UAyDDH25IcN5Nkarl82G65w9aEHxfIWjkBdZ2ENvxE4ZMoK0 9Mky+gCFQ1zV6nin7MtwZiMPWCYnwogQ48hKOZW3COUUDPxMlAyDcxOqFp9ofTc+ vb01OYn8+qglUfB2U4TZDJgan5iX72wE/ZKE8vYmd4syDbhccqEnRLZAo01SdFPv SaXXGqTRdg== Received: from maileast.thefacebook.com ([163.114.135.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 43faw8asy5-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 11 Dec 2024 10:50:37 -0800 (PST) Received: from twshared40462.17.frc2.facebook.com (2620:10d:c0a8:1b::2d) by mail.thefacebook.com (2620:10d:c0a9:6f::237c) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1544.11; Wed, 11 Dec 2024 18:50:36 +0000 Received: by devbig638.nha1.facebook.com (Postfix, from userid 544533) id 945A615DE3961; Wed, 11 Dec 2024 10:35:16 -0800 (PST) From: Keith Busch To: , , , , , CC: , , , , Hannes Reinecke , Nitesh Shetty , Keith Busch Subject: [PATCHv14 08/11] nvme: pass a void pointer to nvme_get/set_features for the result Date: Wed, 11 Dec 2024 10:35:11 -0800 Message-ID: <20241211183514.64070-9-kbusch@meta.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241211183514.64070-1-kbusch@meta.com> References: <20241211183514.64070-1-kbusch@meta.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-ORIG-GUID: YMx2TSpSl0SxIj0Q2GjUYa7EqhwUdEJ3 X-Proofpoint-GUID: YMx2TSpSl0SxIj0Q2GjUYa7EqhwUdEJ3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-05_03,2024-10-04_01,2024-09-30_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241211_105040_585434_C0BDDB05 X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org From: Christoph Hellwig That allows passing in structures instead of the u32 result, and thus reduce the amount of bit shifting and masking required to parse the result. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch --- drivers/nvme/host/core.c | 4 ++-- drivers/nvme/host/nvme.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 36c44be98e38c..c2a3585a3fa59 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1678,7 +1678,7 @@ static int nvme_features(struct nvme_ctrl *dev, u8 = op, unsigned int fid, =20 int nvme_set_features(struct nvme_ctrl *dev, unsigned int fid, unsigned int dword11, void *buffer, size_t buflen, - u32 *result) + void *result) { return nvme_features(dev, nvme_admin_set_features, fid, dword11, buffer= , buflen, result); @@ -1687,7 +1687,7 @@ EXPORT_SYMBOL_GPL(nvme_set_features); =20 int nvme_get_features(struct nvme_ctrl *dev, unsigned int fid, unsigned int dword11, void *buffer, size_t buflen, - u32 *result) + void *result) { return nvme_features(dev, nvme_admin_get_features, fid, dword11, buffer= , buflen, result); diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 611b02c8a8b37..c1995d89ffdb8 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -890,10 +890,10 @@ int __nvme_submit_sync_cmd(struct request_queue *q,= struct nvme_command *cmd, int qid, nvme_submit_flags_t flags); int nvme_set_features(struct nvme_ctrl *dev, unsigned int fid, unsigned int dword11, void *buffer, size_t buflen, - u32 *result); + void *result); int nvme_get_features(struct nvme_ctrl *dev, unsigned int fid, unsigned int dword11, void *buffer, size_t buflen, - u32 *result); + void *result); int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count); void nvme_stop_keep_alive(struct nvme_ctrl *ctrl); int nvme_reset_ctrl(struct nvme_ctrl *ctrl); --=20 2.43.5