Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3483150rwb; Mon, 19 Sep 2022 23:36:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7htIcNo8R+ndLIR7sBhulhI9QjE5HFDvOcH3Ahc32uRmAkCu3kJsy64Z3xkqjrfbWvWleT X-Received: by 2002:a17:906:4783:b0:780:5be5:c81b with SMTP id cw3-20020a170906478300b007805be5c81bmr15984855ejc.76.1663655778286; Mon, 19 Sep 2022 23:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663655778; cv=none; d=google.com; s=arc-20160816; b=r2bkWoByaRRuuAHuiJQAJJvjQ4PpfugvohOhi3xR11IMzzXKY8BJfje3DwCap/E5Xb kL7obuC3tzGkFU7bFi+pQNp+wzB+2jp1D1GSaR8dtZGmgw019DNTt05FaZ/ODAUZ2I26 IsiXpcezt6v5pS5DKSuFhqWVYe4SckL3l9c5kdqk+6FPSy5g9mn5fPqA4zgRtsgo5+SN zA3esAwIb9GCsAh+LfhgWiB3P6NBys5LYbmIBMWZu2SQjnQ0/DiT/wRn4EZpUunk72oJ FNQxv8lPDNqAcj3ewHoE5Nnp2trFtE++MAR2uwxvLdvt8DHDnnGooeT/gQg/EZ1DgDn4 5XOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=aoSDN2qGfxPVg2ZtR3RCnNgdpjv9RD90HMCgzYD+Sdc=; b=RoGuTVXL0iaKmXzPTlP7qRARlpPPAQR9dumNmLcYFVYymv9fs9nnjVGTFKOwDh95Tk JCiYZ25vguHy3c4E9kRQJ/AH1tW27C0V4KJ4Ww0tStkpefsn9n7gRNf8u4reUVidMoQy OJxWh6pCmPT6PUzaTT4wSYubXoN0n17NrIrw28IaLa6RP7ntEanIEEILs/6ZwMjBpzNz ahpZQvZLxjDqxP4RXV7zlFwz+GbsiGBwcFi772UDbemMcogN3i7+Uid1FjT4J/aYJy/s S/7147YtBantNOFaG8UDVfxTdxV5gpulcidJagaleTPKbDEuTko6rGUEiHOg729yWoWY YIqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Po8NCp49; dkim=neutral (no key) header.i=@suse.cz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id tz6-20020a170907c78600b007307bde1f23si402044ejc.716.2022.09.19.23.35.48; Mon, 19 Sep 2022 23:36:18 -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=@suse.cz header.s=susede2_rsa header.b=Po8NCp49; dkim=neutral (no key) header.i=@suse.cz; 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 S230302AbiITF67 (ORCPT + 99 others); Tue, 20 Sep 2022 01:58:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230337AbiITF6m (ORCPT ); Tue, 20 Sep 2022 01:58:42 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4638710D3; Mon, 19 Sep 2022 22:58:40 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id EAF761F8B3; Tue, 20 Sep 2022 05:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1663653518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=aoSDN2qGfxPVg2ZtR3RCnNgdpjv9RD90HMCgzYD+Sdc=; b=Po8NCp49RQfswaj8iJPHpYEeGN3ux5P7zORk+jRAYHoFdrcbnyd1V+xAbqOAwlbhrQoJ/L I6mPDkipEo4RAMXPWGCkjIYG+Ganzuv326koJUQzUt3Ls2ZFNPHOf+AUIbQHuYTz/PSCYD hrMJIb0ZlYjzJTs2Qecl6gycz1kvsgY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1663653518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=aoSDN2qGfxPVg2ZtR3RCnNgdpjv9RD90HMCgzYD+Sdc=; b=mOfSpbRC7QJQRNnnlxjF8oFHbxL5BlQ1RotQ1mo9UNhc19yh3HFQXwAHwQcX0+VKQa6aJC QfiVM+QygdFBcSAA== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id AC6BA2C141; Tue, 20 Sep 2022 05:58:38 +0000 (UTC) From: Jiri Slaby To: mturquette@baylibre.com Cc: linux-kernel@vger.kernel.org, Andi Kleen , Stephen Boyd , linux-clk@vger.kernel.org, Martin Liska , Jiri Slaby Subject: [PATCH -resend v2] clk: pistachio: Fix initconst confusion Date: Tue, 20 Sep 2022 07:58:38 +0200 Message-Id: <20220920055838.22637-1-jslaby@suse.cz> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no 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 From: Andi Kleen A variable pointing to const isn't const itself. It has to contain "const" keyword after "*" too. So to keep it in __initconst (and not mark properly as __initdata), add the "const" keyword exactly there. Note we need to update struct pistachio_mux too. On the other hand, the clk core already counts with "const char *const" already. [js] more explanatory commit message. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Cc: Martin Liska Signed-off-by: Andi Kleen Signed-off-by: Jiri Slaby --- Notes: [v2] as suggested by Stephen, instead of switching to __initdata, make it real const drivers/clk/pistachio/clk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/pistachio/clk.h b/drivers/clk/pistachio/clk.h index f9c31e3a0e47..2f4ffbd98282 100644 --- a/drivers/clk/pistachio/clk.h +++ b/drivers/clk/pistachio/clk.h @@ -31,10 +31,10 @@ struct pistachio_mux { unsigned int shift; unsigned int num_parents; const char *name; - const char **parents; + const char *const *parents; }; -#define PNAME(x) static const char *x[] __initconst +#define PNAME(x) static const char *const x[] __initconst #define MUX(_id, _name, _pnames, _reg, _shift) \ { \ -- 2.37.3