Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3706169imw; Mon, 11 Jul 2022 14:07:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tBviCbbEGxNCsp5fFoxNp2pa70/U/h5YB5lpjvIUry0FgbP7Im8MbbfvRBl+q/AeoWvr69 X-Received: by 2002:a17:907:271a:b0:72b:4ef4:2d8e with SMTP id w26-20020a170907271a00b0072b4ef42d8emr8850569ejk.634.1657573651212; Mon, 11 Jul 2022 14:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657573651; cv=none; d=google.com; s=arc-20160816; b=ot+UWyAaROCacAIAvLWcDH+8hhaIhHuwt0/fScC1a+9F19he8xKaRgfHBgKy//5lTC FwBbedxjW3F8UvCJSrSRi/qXCNGie43qYf4yq5hiWbfNQpeBCeiuI1u/9TPe18/Nr22Y eBongoB5ZxW1aoeXxTVmtUpzwzY7rrji4shv/Yo31/Ru3K3YuKWXJQitltJoMLfLkfnK gOFH03ZvspP37vlmJaNYSy6Ix20wRhpcqrcu8J2nrOn3Z3/XymW04JEMXtKQKr+a+j/F E6bFmbEKHfhoy3GCXAr25+BxGYDkMayQB5lyfMlPEroVf0xPusBTeBnw29ucvGDPnbgC LRHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=RFJx0bSe0DDppERmsHFoHtQgnXnOyRKcpBTksnN9cH4=; b=cnfl4wKpV3r6RrcEhuXp4qlMK2w02bGYpIv/oPKLKVTlLb9QWDOZI5yRAVIMEGEzgq qP7+RZEL/R7/63VRo+Igdl+csaH+R45asR7hodPTbWtNl2V5nubJFOkvI0CLnrZdpOwE QLsO+Eea817MMRrUlo7FNf9KBhz2MEKaPdRaw/JJO0W0QDZzXgx1XMMWD43CEpRsDgrP XMXuEkzPJYgOy0May6CNpe/mrNH+WmMsiSo3XY08BuLBH99PdR5dlA9y+Y4Ocx9tuAfN BWsXsfaA3AHUqPz4iAwXIytoniNNdul1UqJuE36v2itrY8vTFhe2oAkoxJDHn0bC0j+H VZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oxj7bwuG; 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 o22-20020aa7d3d6000000b0043a72613b3asi11160182edr.204.2022.07.11.14.07.06; Mon, 11 Jul 2022 14:07:31 -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=oxj7bwuG; 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 S232289AbiGKUfm (ORCPT + 99 others); Mon, 11 Jul 2022 16:35:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232107AbiGKUf0 (ORCPT ); Mon, 11 Jul 2022 16:35:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 850BE80517; Mon, 11 Jul 2022 13:35:08 -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 0707D61662; Mon, 11 Jul 2022 20:35:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E464C34115; Mon, 11 Jul 2022 20:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657571701; bh=H3ZMMu+n8X0deD4cYrrflgTwCGdWr0F0+bwRd+0O5Z0=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=oxj7bwuGiZA6nllzA9QD7jkeglajNlfVZL0H0o7zi5LKxWZmyQGpwLOr40DPzAQk8 453qQrf4cvFrhnPu7+uojeHCTwZI7HC5uJ3hxZGzD1RGlZrk1E3UmGiOVYX5nisMef VFF2bq3sLJtiiZFwLU+viQLn4Ux8wev2eyHpAeReCZTHGr9S72rDTmYNK04vGub/iw RJxcqi5zSPZUsmyV1gKg/UZsbcOJy1J0F80ULQbLntPGRJhyVdZ56JDHHQwM2ogvU1 UqF/piISWhlp+qioz8MvkVjTI4STnnCxQfWmPes6/0JPbIhxRthBZ9/oCX1ZPQOWUU j7Y/+SZzXfJjg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220711174004.3047516-1-nathan@kernel.org> References: <20220711174004.3047516-1-nathan@kernel.org> Subject: Re: [PATCH v2] clk: qcom: gpucc-sm8350: Fix "initializer element is not constant" error From: Stephen Boyd Cc: Konrad Dybcio , Michael Turquette , Nick Desaulniers , Tom Rix , Robert Foss , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor , kernel test robot To: Andy Gross , Bjorn Andersson , Nathan Chancellor Date: Mon, 11 Jul 2022 13:34:59 -0700 User-Agent: alot/0.10 Message-Id: <20220711203501.4E464C34115@smtp.kernel.org> X-Spam-Status: No, score=-7.7 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 Quoting Nathan Chancellor (2022-07-11 10:40:05) > When building with clang or GCC older than 8, errors along the following > lines occur: >=20 > drivers/clk/qcom/gpucc-sm8350.c:111:2: error: initializer element is no= t a compile-time constant > gpu_cc_parent, > ^~~~~~~~~~~~~ > drivers/clk/qcom/gpucc-sm8350.c:126:2: error: initializer element is no= t a compile-time constant > gpu_cc_parent, > ^~~~~~~~~~~~~ > 2 errors generated. >=20 > The C standard allows an implementation to accept other forms of > constant expressions, which GCC 8+ has chosen to do, but it is not > required. Just inline the initializer to resolve the error. >=20 > Fixes: 160758b05ab1 ("clk: qcom: add support for SM8350 GPUCC") > Link: https://github.com/ClangBuiltLinux/linux/issues/1660 > Reported-by: kernel test robot > Signed-off-by: Nathan Chancellor > --- Reviewed-by: Stephen Boyd