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 4C4A2EB64DC for ; Thu, 20 Jul 2023 07:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4phqMP0YD7kO4KNZc+AKhlQxV+ye9E9SuHI+ID6kl5g=; b=ZSZHSh9+shK8Oz +/K9rz5EZb/l2x6Im+N7DHyMRH5n2SC9toaAyZPytmRpsbsm3cz6vYc+BCJZ+WfQrbnLcCNa5kp9e JRHPkUsG7TvthswCehGTkjTMunqixdJKlMsJ+TLNC/lzCEMBw9qGakil9pVL3xDQN2meTqJo7fQ+D cCbszYswfo5G1kFznXieNYbxk3DLn0Ccu4YSGw5RhwtCjC3yS/wWmsFmgDkIKHJfT9OvXc181d8uQ 6nnmaOpbXF+8CDYci+ZO5GMtLlNvtXfWFdsHi06l8fpmsmZxz/ojEPqrYs5Cq5z4T2scxAeRhzXzq 1q1uaKafjtdO9hVATrKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qMNiU-00A2sD-22; Thu, 20 Jul 2023 07:04:50 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qMNiO-00A2qs-00; Thu, 20 Jul 2023 07:04:44 +0000 Date: Thu, 20 Jul 2023 00:04:43 -0700 From: Christoph Hellwig To: Daniel Golle Cc: Jens Axboe , Ulf Hansson , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dave Chinner , Matthew Wilcox , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Jan Kara , 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?UmFmYcWCIE1pxYJlY2tp?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [RFC PATCH 6/6] block: implement NVMEM provider Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org The layering here is exactly the wrong way around. This block device as nvmem provide has not business sitting in the block layer and being keyed ff the gendisk registration. Instead you should create a new nvmem backed that opens the block device as needed if it fits your OF description without any changes to the core block layer. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/