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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 303EECCA47F for ; Mon, 11 Jul 2022 20:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232199AbiGKUfm (ORCPT ); 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> 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