From patchwork Wed Jul 19 22:03:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 122860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2743821vqt; Wed, 19 Jul 2023 15:27:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlFNRAbTO++YFuEIikiIH1NBUYHf2Qi3tCYos1BImYgtiyL1s7WVg+u5bkoYRgUtP7YUidMv X-Received: by 2002:aa7:d04a:0:b0:51e:3427:63ea with SMTP id n10-20020aa7d04a000000b0051e342763eamr3568384edo.8.1689805622336; Wed, 19 Jul 2023 15:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689805622; cv=none; d=google.com; s=arc-20160816; b=vkxIf+K/g4iJJl4qQtKMcWB+pmadv54lAvCTvCQiFpB155K+wle36x/DzPBr72PkD/ ElV4jBmS/I6qBjb9uF6tqxZWDCKlAL7keZtvnSqs+xBP0SgIS3tN7PHFmg7L8mA3o/XL SNefcVqSRgDN/YkG9fsvCphzwu0hsvWsD6z9gEj7loustcqzK/o6WtJ56z1B5eUX0WT/ P37Hmme4M1E1qjYtO1JLx/vqGUvjIeC+QSnsjhdiuyh1mgen40BBq2+dbBuxncn/mgaL U/rU3i0FsSKJoiXVtaQYq1Q/78FivQz8Z8mTPo+vJt/Si8xiat8xCYPveh5jqweWN92d mJdg== 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=8T/pGdV18zCBoMdZ9g0wiioI9df4Q4Rox4Haloc5AWk=; fh=O/hjEvlM0nIN8LC6WbIQ4s0L6nmnRMOzajXXMF81As0=; b=beQsAumoFDw1Ai9tc8dt8KNzr1MZnx9+K2afOQBPjmTRl4GHd44KVNgqLrdM0/2xOl TtTa2pY/GdtV5SWPOrWu79nLNCBwvtjbI8b01qQaIDO1gzfC2cAE1v/yGnTIuXhcaoo9 AQNziOQVA1+yXpre4N58Up9+7j4PdA/7wxIirMqE9q/L4xtly9t/nykN17w/039CzNcg AnuCenYEiR6mKWtXVIPSPazG3+KWzFOzEyRl5E3Y/5RLaaeVsXA2jFyz4hQhd6QZX/pr cV1sRpbzvlwQQvCn4mK7cVEWs5r94O1URNEbvgeYwFZVeH9zjhdNKwjzSR0NdnpN9WhA 1XrA== 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 d5-20020a50fb05000000b0051e0f20cf13si3517090edq.138.2023.07.19.15.26.38; Wed, 19 Jul 2023 15:27:02 -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 S230261AbjGSWFN (ORCPT + 99 others); Wed, 19 Jul 2023 18:05:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjGSWFL (ORCPT ); Wed, 19 Jul 2023 18:05:11 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE5C22699; Wed, 19 Jul 2023 15:04:51 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qMFH4-0008NR-0M; Wed, 19 Jul 2023 22:03:58 +0000 Date: Wed, 19 Jul 2023 23:03:49 +0100 From: Daniel Golle To: Jens Axboe , Ulf Hansson , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dave Chinner , Matthew Wilcox , Thomas =?iso-8859-1?q?Wei=DFschuh?= , Jan Kara , Daniel Golle , Damien Le Moal , Ming Lei , Min Li , Christian Loehle , Adrian Hunter , Hannes Reinecke , Jack Wang , Florian Fainelli , Yeqi Fu , Avri Altman , Hans de Goede , Ye Bin , Greg Kroah-Hartman , =?utf-8?b?UmFmYcWCIE1pxYJl?= =?utf-8?b?Y2tp?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [RFC PATCH 5/6] mtd: ubi: block: set GENHD_FL_NO_NVMEM Message-ID: <077dbe0a6354edc3acded24e2552cfc3f2968903.1689802933.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771889620246703617 X-GMAIL-MSGID: 1771889620246703617 As the UBI volumes may already act as a NVMEM providers, emulated ubiblock devices should not be considered NVMEM providers. Signed-off-by: Daniel Golle --- drivers/mtd/ubi/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 1d5148371991b..62d9461395b37 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -410,7 +410,7 @@ int ubiblock_create(struct ubi_volume_info *vi) ret = -ENODEV; goto out_cleanup_disk; } - gd->flags |= GENHD_FL_NO_PART; + gd->flags |= GENHD_FL_NO_PART | GENHD_FL_NO_NVMEM; gd->private_data = dev; sprintf(gd->disk_name, "ubiblock%d_%d", dev->ubi_num, dev->vol_id); set_capacity(gd, disk_capacity);