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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10DF0C2B9F4 for ; Tue, 22 Jun 2021 13:17:29 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58AB66113E for ; Tue, 22 Jun 2021 13:17:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58AB66113E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EED3D829D5; Tue, 22 Jun 2021 15:16:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="De+5X3bu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A120E829C8; Tue, 22 Jun 2021 15:16:47 +0200 (CEST) Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F154C829B9 for ; Tue, 22 Jun 2021 15:16:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pl1-x633.google.com with SMTP id m17so7241625plx.7 for ; Tue, 22 Jun 2021 06:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rnCGiX86oUOVR4Sn2iiF0xVKIW+oWH/1g/nd/gvrDpI=; b=De+5X3buD+UofXH4t8ngDXm3y73UMIWCJCTejqW+QSqfZS8L9B/iGjGWnoMbMckF2f 7xQ/7RWzbhAx2Sv2qro/wE2o5e25V2F/E0t8UuOiEmtDEyslhXK+QMvGt0tRnZu5rFOh XvvdDujYbTdeRpm4xDHOo2CP0V0FWw8ojseWPCKGda7O61dcl/2tcP3QpUbLF8RlPA/A Am3DyW5OC7w7cErspAGDJn/X3cBTaEGQrd5Fxx6iOrYpufjlBSiIAg/tMTI0JkoS4K2Q 1WfU28tM2FkEPNq978QnSAylhC6GibQkeU8Rx+iKoh+bONMNHmueSPxkLsZXFpTIPmc6 90AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rnCGiX86oUOVR4Sn2iiF0xVKIW+oWH/1g/nd/gvrDpI=; b=IJSuywU7j8WXb1XVJdc+0qM5xtSycDvf6gnx0LTuY2AubKaGoVcFeVdux+qmh5Ojz9 PpVAMEBRHAFc7Fy0cr4i2bOAQnRv614MumLfBbNYTvtDvTi1FMuO/rj6miCAuW+VbpJ4 j2dE/U7OH8gOH/GSMgfXoegFLUMiEhDhWog5a2GypwB50qvUKNmNf+7FgWJEV+r0OYcC j+/0/CGkXVE2xPCvSkL1lRaZ1U2jV+KG+DDlYvXI8+BJ3WbSRkF9yCraw5i96vYxKhxj Yk9JpMh3zC60A4ayFxGW4CMmAP7KYX3Sb0BDTaRj9Sua4Q82qxz5am0fjJHkleL/iUpC 87SQ== X-Gm-Message-State: AOAM5328wVTiRXgXzK8sZjQQaKerYcsSDnEwEOWRl82RA9Hu1KGBPpE0 24W6Olxus7u4fbTFFt1nNhuvDFg4FQI= X-Google-Smtp-Source: ABdhPJzWH43jZWL9L5siR6q1G61u/zAeNQfYl2bQuahXEK5jlt6TxQhAIHjwn5iDKm5zAwaJS/A7gw== X-Received: by 2002:a17:90a:c791:: with SMTP id gn17mr3761012pjb.221.1624367799530; Tue, 22 Jun 2021 06:16:39 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id j24sm18456482pfe.58.2021.06.22.06.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 06:16:39 -0700 (PDT) From: Bin Meng To: Tom Rini , u-boot@lists.denx.de Cc: Bin Meng Subject: [PATCH v2 4/7] nvme: Drop useless members of 'struct nvme_ns' Date: Tue, 22 Jun 2021 21:16:20 +0800 Message-Id: <20210622131623.21265-4-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210622131623.21265-1-bmeng.cn@gmail.com> References: <20210622131623.21265-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean mode_select_num_blocks and mode_select_block_len in 'struct nvme_ns' are not useful. Drop them. Signed-off-by: Bin Meng --- Changes in v2: - new patch: Drop useless members of 'struct nvme_ns' drivers/nvme/nvme.c | 4 +--- drivers/nvme/nvme.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index 97c665d6a3..e2e13dbf66 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -719,11 +719,9 @@ static int nvme_blk_probe(struct udevice *udev) flbas = id->flbas & NVME_NS_FLBAS_LBA_MASK; ns->flbas = flbas; ns->lba_shift = id->lbaf[flbas].ds; - ns->mode_select_num_blocks = le64_to_cpu(id->nsze); - ns->mode_select_block_len = 1 << ns->lba_shift; list_add(&ns->list, &ndev->namespaces); - desc->lba = ns->mode_select_num_blocks; + desc->lba = le64_to_cpu(id->nsze); desc->log2blksz = ns->lba_shift; desc->blksz = 1 << ns->lba_shift; desc->bdev = udev; diff --git a/drivers/nvme/nvme.h b/drivers/nvme/nvme.h index aa4b3bac67..c6aae4da5d 100644 --- a/drivers/nvme/nvme.h +++ b/drivers/nvme/nvme.h @@ -633,8 +633,6 @@ struct nvme_ns { int devnum; int lba_shift; u8 flbas; - u64 mode_select_num_blocks; - u32 mode_select_block_len; }; #endif /* __DRIVER_NVME_H__ */ -- 2.25.1