From patchwork Wed Jul 19 22:03:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 122856 Return-Path: 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 + 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 ); 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 ) id 1qMFGe-0008Lk-2E; Wed, 19 Jul 2023 22:03:32 +0000 Date: Wed, 19 Jul 2023 23:03:24 +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 4/6] mtd: blkdevs: set GENHD_FL_NO_NVMEM Message-ID: <65171d5da3daba24315ecdfef6727442baae5bbf.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: 1771889498188606722 X-GMAIL-MSGID: 1771889498188606722 As the MTD subsystem already acts as an NVMEM provider, emulated mtdblock devices should not be considered NVMEM providers. Signed-off-by: Daniel Golle Acked-by: Miquel Raynal --- 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 */