Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp366233rdb; Sat, 19 Aug 2023 05:10:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKy5V+Ypq50b/BatGXSwogLCNUQb0m0iaf2oYUfQdMf8Vyz7o4LzoeUzW8ZDuZlY9uFST9 X-Received: by 2002:a05:6a20:6a05:b0:136:f3ef:4d2 with SMTP id p5-20020a056a206a0500b00136f3ef04d2mr2574692pzk.3.1692447000682; Sat, 19 Aug 2023 05:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692447000; cv=none; d=google.com; s=arc-20160816; b=WGg5WGVI9syznh5izAjKrusHoqcVp4NWSA8rjw9H7dR5wPrxWF8FSllMmWR6YjzvDP kbQRSqEM1/NCaqxEbIOcXGJlLJHKgqM+EWCPXLQ9iTtz1XHqi/DToCI0gyOFzBWS2+xK ZXhR3hQgidIsTJ0bSkZobuHNWLuNQvtMq/GjEC948bNxdsyvJ05gmNh3ZU7JuMIwdoiP h17rqu5J0gdPjEeRS3caZmPHv1tRIymlv5TzrPQg0SqmMP3UlDCeDyGMcWGC3/+7Uopd 50ziP9hcgJMhRZL+so9WgWHq4XfVi6iV5WvS/XGE309j19H9jwfAjopYaNx9akKw5TD7 jNBA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=32Gnoi4Z3caiTP+30lS3YbkJT6xZ1ZW6FhxJGbTEXxM=; fh=q1l97cAlFaGSc4+A3+FSYM//eCKGB9AynL+xhMonGpQ=; b=pNtTINXVTEvJxNNjNjSmLR333mMP0rx3Q2iZHCH9gZPyrpaOZauOUCX9aqyMrmZ9Ht ahB1+doJj1lLoqTgeURY1LQq//QuWeQXjME6JDE4dMjrsod3xitz8ljbnIfomZay4g+n F43ZjHfyu+qkLyi7hzESS13Ri/EpksbV/OWJOddbLcLK6C3FtClDl0QWqSziphdAfaQ+ HzTmQ0n4w6ivnxI+S9MxGx3H0kUx1c1Th3165MD6zxh0F+/fAwdqBaFtrHl1mukXhUtW 3kI5qSTR8rqY3dBa/oxHDe83yzF7rJRMWV7KcXnZlcFHXnixL4rwrjD4vdo2q6nUcxQc LGHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tspQuu8P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g26-20020a639f1a000000b005694e223cafsi2966762pge.182.2023.08.19.05.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 05:10:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tspQuu8P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 19F91798D8; Sat, 19 Aug 2023 01:36:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349791AbjHRP6h (ORCPT + 99 others); Fri, 18 Aug 2023 11:58:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378419AbjHRP6X (ORCPT ); Fri, 18 Aug 2023 11:58:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 778322D57 for ; Fri, 18 Aug 2023 08:58:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0D763630A4 for ; Fri, 18 Aug 2023 15:58:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEB29C433C7; Fri, 18 Aug 2023 15:58:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692374299; bh=HPX1jLHX4ON6VlyL/GBvHpUzxySBROUCaipWI2UOZwI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tspQuu8Pd09F7olmQVFCWeIUv0Xc7Jpa7xbgBx5xvw7TEn9QBTKKLb++w3bahMa2f Lg/OdBpqS7avR+Um56xAWIUuty0+wmU2uTeCF3/5El+JYJZRSQhyekOqNvseeOExCw fd8T0wc1lFQxKn07seLOtETsyTd3s9LKRT+2+sRmqDx2ljnqDIg2Jvtc1mdACmp6Vt 4zsmW6pDfc5erBg3NoEio5heEA0AKb7dO5eD2HS8oLzNfjlQrGwtU8I54ENE/9doI0 7Lu4SU4PcgPUwbMQI9YEJaGH+l7xR5ZRE9B03CS6FNi3cHhxqHRGy/s45Be8o70pB+ VSnSa8YhYoP1A== Date: Fri, 18 Aug 2023 16:58:15 +0100 From: Lee Jones To: =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: core: Un-constify mfd_cell.of_reg Message-ID: <20230818155815.GY986605@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 On Wed, 16 Aug 2023, Michał Mirosław wrote: > of_reg is the only constant member of struct mfd_cell. It seems to be Sorry, what? struct mfd_cell { const char *name; [...] const struct mfd_cell_acpi_match *acpi_match; [...] const struct software_node *swnode; [...] const char *of_compatible; [...] const u64 of_reg; [...] const struct resource *resources; [...] const char * const *parent_supplies; [...] }; > accidental and prevents dynamically filling in mfd_cells that use of_reg. > Remove the `const`. Dynamically filling mfd_cells is generally frowned upon. Please submit this with the code that will be using it. > Fixes: 466a62d7642f ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") > Signed-off-by: Michał Mirosław > --- > include/linux/mfd/core.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h > index 47e7a3a61ce6..e8bcad641d8c 100644 > --- a/include/linux/mfd/core.h > +++ b/include/linux/mfd/core.h > @@ -92,7 +92,7 @@ struct mfd_cell { > * (above) when matching OF nodes with devices that have identical > * compatible strings > */ > - const u64 of_reg; > + u64 of_reg; > > /* Set to 'true' to use 'of_reg' (above) - allows for of_reg=0 */ > bool use_of_reg; > -- > 2.39.2 > -- Lee Jones [李琼斯]