Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1429355rwd; Tue, 13 Jun 2023 09:02:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6TQ9uAp/X9j0/E9xzqe9x9XW7vvKi1tbqYk3+gEMw80Q3zCQS+iekKMFmP6tr6PrWpGSii X-Received: by 2002:a17:902:c406:b0:1b0:48e9:cddd with SMTP id k6-20020a170902c40600b001b048e9cdddmr11705982plk.69.1686672145512; Tue, 13 Jun 2023 09:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686672145; cv=none; d=google.com; s=arc-20160816; b=YlJVi9DlJo49HrrwiTYrdZdEe2g2PGfJSsAYeRGK+7rJwlNhK9KAgNLl0Z7eFn6Mny /0xGe98mexazw1gEsX/xEWyk8aVvBREtNd3S7bmZtSMuaXCEKEYe+yLkJG4Zp+SJdEw1 bXOWJp3J4avxmw/Qpss7pTk3/EUc8nAqZrlcr1aSYRPxUdq/vy0AMeZtXiz2K/J4vD/C +o2eB1F875C+GyhymRYr1u9MQPjnmPkKJMLDw6Gb8vE7+Jig6qpK4SIPj/kvVNjD3YCB itwvYsn6i977hAZK27NIZw3MeHz92Vrxfk7UDT2e4pOHNv143YAiOEwGAc2YJ92nCZeM g9vA== 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:cc:to:from:date:dkim-signature; bh=iceBwyDzeW2dT6se1YZcoUMniJA9kKfRJp05AnOvsfM=; b=Dxv6ByBfEQVn7xf4OXoQraKFokavvTjWQbGQjH/xBFMyYaeAsTeNWEfqODep1Y585+ MdJGECk1l6dy44M0lhvpfdc+FcS9qzZiaGILNIei6FzaYw2wmDZmAoEkgnVdJb5fbCTa rVx2JVPgGALbqZo7FyGxHNYF8/wniECD4AEXdzb5LobqyYfa5EPz/cPGf59sXFkPw0XB U+Z3CpS9DDxG3DClom3Wu1qiPZfLvZJLbTw3rwoqvk2JszoBPUNQ/y6iEERhaZP4Of2T B9+7OYKXMJCskq5ANCWadybE4W1DscR67HBtDkFKJxZxJykY4wJ1czMSJ7WVA6mFN5X2 jxIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="c/bw0zNf"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv15-20020a17090ae40f00b0025bec0eac2csi463335pjb.65.2023.06.13.09.02.09; Tue, 13 Jun 2023 09:02:25 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="c/bw0zNf"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243160AbjFMPk1 (ORCPT + 99 others); Tue, 13 Jun 2023 11:40:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242675AbjFMPjz (ORCPT ); Tue, 13 Jun 2023 11:39:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A36E1BD3 for ; Tue, 13 Jun 2023 08:39:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4E21962D2F for ; Tue, 13 Jun 2023 15:39:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19011C43392; Tue, 13 Jun 2023 15:39:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686670750; bh=bqhbfxfuVVbH/p+/UQRRfRNgV8oXiTFi0OTEAjc9R/I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c/bw0zNfo6o1AHPdh4s1EYe30nvhRPcLooJ5+5dKlgi6UOF9qzBNL+/+iIiyuHmjL 3la+m4er+B9Xs73vcuhGYZaZyz/e0VC2YCJWlTGJ/Izn+iXPNckxydHeXxJJvYgPSC CQMt5Ew4xMerOSeddTd0naww3NoJQu3lvTWb7E8u4xQ09w9xwtqsD0+7cG2Ki0Nwoc 3J5SDOi8XBzEs8yI1yD/CLtwNrUPGr1vPDbH1FNSjb828wkBdp16cja31kQihV6iaD asrDmgi8VvPPVPTlfIU/D4QD+EStOqVcSkw2E3Cw44NC0aDkcwiRjMdN/54Qfb2GCD unbtQOz9jFrmA== Date: Tue, 13 Jun 2023 16:39:05 +0100 From: Mark Brown To: Greg Kroah-Hartman Cc: Waqar Hameed , "Rafael J. Wysocki" , kernel@axis.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] regmap: Add debugfs file for forcing field writes Message-ID: <8da4b552-740f-489f-a2ae-1a6e87c41463@sirena.org.uk> References: <2023061322-garter-linseed-6dfe@gregkh> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0npxGfmuYZo3rjJ2" Content-Disposition: inline In-Reply-To: <2023061322-garter-linseed-6dfe@gregkh> X-Cookie: Not a flying toy. X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 --0npxGfmuYZo3rjJ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 13, 2023 at 05:02:27PM +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 13, 2023 at 01:42:27PM +0200, Waqar Hameed wrote: > > +#undef REGMAP_ALLOW_FORCE_WRITE_FIELD_DEBUGFS > > +#ifdef REGMAP_ALLOW_FORCE_WRITE_FIELD_DEBUGFS > > + debugfs_create_bool("force_write_field", 0600, map->debugfs, > > + &map->force_write_field); > > +#endif > Please no, that means this will never ever ever get used, and if it > happens to break the build or runtime, no one will ever notice it. > If you need this for your device/tree/distro, great, just keep it as an > out-of-tree patch with the huge header "NEVER ENABLE THIS IN A REAL > SYSTEM" or something like that. We have an existing setting that parallels this which enables writes via debugfs - there *is* demand for this sort of thing in development where this is a viable configuration mechanism, having something in tree in a way that requires an out of tree patch like you're suggesting to enable it documents why the feature isn't something you can enable without code changes whereas just not having anything means people send patches adding the feature. This one is very much safer than the general write thing, we probably *could* have a Kconfig option but changing the guarantees underneath drivers feels like it's going to explode if we just let it happen. --0npxGfmuYZo3rjJ2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmSIjZgACgkQJNaLcl1U h9DVmQf8DHD4US+VwJB2+GIOnP9xJerSq1q68bKEagqHIyrFqegoJicQgpq3LZV+ uW1DIiGptfDQ//XDqIWs8Bj66EnJsms1Cmh+aN5ZBx+mIxfJa2rijKWplv9w5ic7 MjtnAZtiRdMqGXkar/E4ym2wFpHlqvBSygEZJdQhIbiflO3uFAK7iAxJJzcmoN+h lu9gE+WSnp2Fb6FOZBvOychVs4wP+68Lx/hhEHxKjwzhfgPXzqde1TkV65nfch72 czAvYpj6ZLO400CZpMjyPCn6Mjs3qbJRH2WgE9KbW0lNe7v6wbq0TT8IaVdNBW4g uw0m6+BWS3NyVP8+8/GXCLgTBhtqzA== =FSRD -----END PGP SIGNATURE----- --0npxGfmuYZo3rjJ2--