Message ID | 65171d5da3daba24315ecdfef6727442baae5bbf.1689802933.git.daniel@makrotopia.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2743032vqt; Wed, 19 Jul 2023 15:25:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlG2saLCIgUVKvp5v7UsIFdbTSoBewa1wyODtrTkPOIwsozEprTYZAD4BQwo4B+D8ILasSE/ X-Received: by 2002:a17:906:259:b0:988:882b:9a3 with SMTP id 25-20020a170906025900b00988882b09a3mr3129369ejl.36.1689805505617; Wed, 19 Jul 2023 15:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689805505; cv=none; d=google.com; s=arc-20160816; b=KPY5qnJHg5OXimx1eLeeQ4Bzwhw/zJRL0wBH3HPS0o2vfzEdhvRfIuS2EaStSm9ODG DapJEcZEAfdQcyaOfETVwIZfG9nqr9rdUFcI/rhO50zD95SiGTMUZe8+J98tebp+bzei RZC23/46HLMe9Tr/VRwVFQLKJT68L4aDW5qVS0bPrqlpOx+q/zHpwbtamMSgcLcKdGvq rOA/8gClXRMUEm+INxKRGgbgEN0NH4DN7RpaeQwPOWbIJXI1VvPh0GjvsBm8cBO/4Y+z ABB5I6ui5dkaAaAwlUjmtWePgrfyzM6NL06yoUv183mA5/0F0qXSWuWlAEMqXnsye/48 hWMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=iEeYBEjsIBJWhzSbPPgkyfe9pv22ydHcI0JBCsLArbs=; fh=O/hjEvlM0nIN8LC6WbIQ4s0L6nmnRMOzajXXMF81As0=; b=xOMeT29E0WW8kDLpFIsGnfgcsoupngMiHOqpgvNn/e3yWIYNJo+5rChoh7KJ7CNdWe kQkbBqzWZCuK/Dqcpl72kH4h4djA2if163SnbbWImqcyJ0yMlxN/AVQAi9FAkxCaHV50 mPcexugDTIQ9dQWITzeg62B5qk7TJnbivD7GtS1kRioBKNNe4L14X1I7Ny/0ZkzUASzb 2phw/IlyHEUQnIxALb1uUFv5Axz2BNl3UKLcMK+wB1kK5eH+uVwJ1jeQ8auWqJJ72zh0 KJDk3INHdedb55GUF0vqVO+zxfY9f/ehLj/b/0EIf5l75eE9brjelRy1kW874MpolVRe GYvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r2-20020a170906350200b0098decd9e210si3093538eja.19.2023.07.19.15.24.40; Wed, 19 Jul 2023 15:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbjGSWEc (ORCPT <rfc822;daweilics@gmail.com> + 99 others); Wed, 19 Jul 2023 18:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjGSWEa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Jul 2023 18:04:30 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EB251FD9; Wed, 19 Jul 2023 15:04:23 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from <daniel@makrotopia.org>) id 1qMFGe-0008Lk-2E; Wed, 19 Jul 2023 22:03:32 +0000 Date: Wed, 19 Jul 2023 23:03:24 +0100 From: Daniel Golle <daniel@makrotopia.org> To: Jens Axboe <axboe@kernel.dk>, Ulf Hansson <ulf.hansson@linaro.org>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Dave Chinner <dchinner@redhat.com>, Matthew Wilcox <willy@infradead.org>, Thomas =?iso-8859-1?q?Wei=DFschuh?= <linux@weissschuh.net>, Jan Kara <jack@suse.cz>, Daniel Golle <daniel@makrotopia.org>, Damien Le Moal <dlemoal@kernel.org>, Ming Lei <ming.lei@redhat.com>, Min Li <min15.li@samsung.com>, Christian Loehle <CLoehle@hyperstone.com>, Adrian Hunter <adrian.hunter@intel.com>, Hannes Reinecke <hare@suse.de>, Jack Wang <jinpu.wang@ionos.com>, Florian Fainelli <f.fainelli@gmail.com>, Yeqi Fu <asuk4.q@gmail.com>, Avri Altman <avri.altman@wdc.com>, Hans de Goede <hdegoede@redhat.com>, Ye Bin <yebin10@huawei.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, =?utf-8?b?UmFmYcWCIE1pxYJl?= =?utf-8?b?Y2tp?= <rafal@milecki.pl>, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [RFC PATCH 4/6] mtd: blkdevs: set GENHD_FL_NO_NVMEM Message-ID: <65171d5da3daba24315ecdfef6727442baae5bbf.1689802933.git.daniel@makrotopia.org> References: <cover.1689802933.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <cover.1689802933.git.daniel@makrotopia.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771889498188606722 X-GMAIL-MSGID: 1771889498188606722 |
Series |
nvmem: add block device NVMEM provider
|
|
Commit Message
Daniel Golle
July 19, 2023, 10:03 p.m. UTC
As the MTD subsystem already acts as an NVMEM provider, emulated mtdblock
devices should not be considered NVMEM providers.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/mtd/mtd_blkdevs.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hi Daniel, daniel@makrotopia.org wrote on Wed, 19 Jul 2023 23:03:24 +0100: > As the MTD subsystem already acts as an NVMEM provider, emulated mtdblock > devices should not be considered NVMEM providers. > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > --- > drivers/mtd/mtd_blkdevs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c > index ff18636e08897..82d5afba6a25a 100644 > --- a/drivers/mtd/mtd_blkdevs.c > +++ b/drivers/mtd/mtd_blkdevs.c > @@ -362,6 +362,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) > gd->flags |= GENHD_FL_NO_PART; > } > > + gd->flags |= GENHD_FL_NO_NVMEM; > set_capacity(gd, ((u64)new->size * tr->blksize) >> 9); > > /* Create the request queue */ Acked-by: Miquel Raynal <miquel.raynal@bootlin.com> Thanks, Miquèl
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index ff18636e08897..82d5afba6a25a 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -362,6 +362,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) gd->flags |= GENHD_FL_NO_PART; } + gd->flags |= GENHD_FL_NO_NVMEM; set_capacity(gd, ((u64)new->size * tr->blksize) >> 9); /* Create the request queue */