Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1578563rwo; Wed, 2 Aug 2023 17:10:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCPPmRsl2OWglfweB6fkzP44ijk14ZhsnF+G/IGbycws7eJm+dBNo2aJBRfeVnC8yrmoS4 X-Received: by 2002:a05:6808:138c:b0:3a5:98b4:c139 with SMTP id c12-20020a056808138c00b003a598b4c139mr21066705oiw.20.1691021416293; Wed, 02 Aug 2023 17:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691021416; cv=none; d=google.com; s=arc-20160816; b=s0Ozd/WORCKJMFut4BMxflu8kJT0JzKiTSE1rIXvwMxjUayI9GxVF2LiA59c00VlT+ beGOk+9jfAIXSTzS7RKFPTZCpOsP/kK70bRMLD9lhHFslONtmTS5Y0T7OVc8pBiTlgXW lFVZD4f8m7mTfnoHQ3K2msQbvDMNgYN1+swPRG1RS120aF8LAjX6hZoavPFNLZCf+pv4 R0AExve2phM7McTo+1mB+cRP5pAteQ8huUdyIRH1Zo8cd9h+IHm9NJN9VVcm0qCURtql tU4f6Rfkrof9eItJRHc6aU7aXQ5QiMDSuJIV1qm9VlqXBH3NiTyniWhEqCOamqh7ZAR9 /bIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=aBVXuTo/8ehjYkvlx2DaLR/kSdWzLoO8wG7T6rpe/Qs=; fh=IkuhbWL92HRQ+GoK3RmdZiBd0eNWrDgPnsneRwScSRM=; b=S8x0GHs+Nob5WxcWpg8y+B1OsuZmDXspPyfwCnDh6MI1TqafDMh+1ih1af7ugSQfBW WXV1UnOf8fAFSrYcJ52Sim7apvY8KQgcH1N0HdYn9T5Rc1iSEkWW7iMQ5gyGH6pV2gJ+ J1RYO0VY4NgX5A+S2ianDuhethxP5X8rFDoX4mqODKCaApqx48OvPFWmEMcgXiaiuwFM YEFbh9LLGwAqi85vcivTduubsXTc963YPOYr8rL09h05BlXoRm6jFZHHbDls33yQO6X8 hBwfubTJ+U/xGbZolBkMdV6idsdItoMNqXUlUiYWckrG9gQR7UGa56MuqzNAyiL8c93r +70A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=F7S7MWxO; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j64-20020a638b43000000b0055bc30dbcd0si139699pge.742.2023.08.02.17.10.04; Wed, 02 Aug 2023 17:10:16 -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=@google.com header.s=20221208 header.b=F7S7MWxO; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbjHBWxI (ORCPT + 99 others); Wed, 2 Aug 2023 18:53:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230146AbjHBWxH (ORCPT ); Wed, 2 Aug 2023 18:53:07 -0400 Received: from mail-vk1-xa33.google.com (mail-vk1-xa33.google.com [IPv6:2607:f8b0:4864:20::a33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5879A9B for ; Wed, 2 Aug 2023 15:53:05 -0700 (PDT) Received: by mail-vk1-xa33.google.com with SMTP id 71dfb90a1353d-48642554ef1so110851e0c.3 for ; Wed, 02 Aug 2023 15:53:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691016784; x=1691621584; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aBVXuTo/8ehjYkvlx2DaLR/kSdWzLoO8wG7T6rpe/Qs=; b=F7S7MWxO/JdXWZiQ4M3wtX17sdcHm93BDLUWhYfvfW8gMDo2iTBP7drdmgPdAjphcv Hu8L2IgGXRzyLq5OE1Zk7KL9FjFVOpy3dej4E6xqDWm7BWA9ele+P/wtG/YwBB+0YjZ7 hsJx1pvn7b2vC3DlGijA9ENUyPlWNeEKl7+3DiSzlMbgOsuoVOlteNrLt8CnrH8r0Js2 thDEZX6/VOhWkNPuUlNPQk5hG1/jdJyOW5/rlav1zawY8uP9RcWtAQBJryvJ1rlXgsrx kUPJKArqZapID7d56d+V+OXUxUDFONu0tPu/zYblgrGJPGVYSMNTndrD98CP4G6qw1mc LxZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691016784; x=1691621584; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aBVXuTo/8ehjYkvlx2DaLR/kSdWzLoO8wG7T6rpe/Qs=; b=eptThFqfnvWJBxrCpivypvgtFmpuYbpEFsIuq2TkJrFBo5iGhDfbP62cVZ1fxUPleX regwZ1mLFE7lEmInn+3J/sghRqbehnDPvwmJXmXMJt4FAd4GOlZO1MZA/AgW01gf53YS aDKP2DVc46c0PLQ07Sqg5NwCKfBDKqr0lwGQhS9xnXaeiT6FKtsRCJX18ya2mKEKHHvb we+iKjrDu/XjsdEv1I+nX2ddSl7gnN3ggnJxv3aioQRg90VoORTzHKvcm28oPWdOWHln a1hJ3rmVPWk4syUxmzk0GykL/rnct+y0lUqfFpj5C4Gia7XJRoaCYatjnIoAHgTBIR5Y CJAw== X-Gm-Message-State: ABy/qLaafQ0TZ6BS8780KsNtS2Zu+k3C5GCOOJsPpoY3Yfpu1rpKgFIK W0OvmlorGp2EkZfXIJLBTik2Sk3cH9hEREc8Ebzaaw== X-Received: by 2002:a1f:e603:0:b0:486:556c:a0bb with SMTP id d3-20020a1fe603000000b00486556ca0bbmr6152826vkh.9.1691016783127; Wed, 02 Aug 2023 15:53:03 -0700 (PDT) MIME-Version: 1.0 References: <20230717050736.10075-1-okan.sahin@analog.com> <20230717050736.10075-3-okan.sahin@analog.com> <20230718155502.GA3542993@dev-arch.thelio-3990X> <20230726161033.GA1102409@dev-arch.thelio-3990X> <20230727145143.GB2013261@dev-arch.thelio-3990X> In-Reply-To: <20230727145143.GB2013261@dev-arch.thelio-3990X> From: Nick Desaulniers Date: Wed, 2 Aug 2023 15:52:52 -0700 Message-ID: Subject: Re: [PATCH v3 2/2] regulator: max77857: Add ADI MAX77857/59/MAX77831 Regulator Support To: Nathan Chancellor , "Sahin, Okan" Cc: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "zzzzTilki, zzzzIbrahim" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "llvm@lists.linux.dev" , linux@leemhuis.info Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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 Hi Okan, Have you sent a follow up fix? The build should not remain broken for so long. Otherwise I think Broonie should drop your patch. On Thu, Jul 27, 2023 at 7:51=E2=80=AFAM Nathan Chancellor wrote: > > On Thu, Jul 27, 2023 at 08:34:44AM +0000, Sahin, Okan wrote: > > >On Tue, Jul 18, 2023 at 08:55:02AM -0700, Nathan Chancellor wrote: > > > > > > > > > > > >> > +static struct regulator_desc max77857_regulator_desc =3D { > > >> > + .ops =3D &max77857_regulator_ops, > > >> > + .name =3D "max77857", > > >> > + .linear_ranges =3D max77857_lin_ranges, > > >> > + .n_linear_ranges =3D ARRAY_SIZE(max77857_lin_ranges), > > >> > + .vsel_mask =3D 0xFF, > > >> > + .vsel_reg =3D MAX77857_REG_CONT2, > > >> > + .ramp_delay_table =3D max77857_ramp_table[0], > > >> > + .n_ramp_values =3D ARRAY_SIZE(max77857_ramp_table[0]), > > >> > + .ramp_reg =3D MAX77857_REG_CONT3, > > >> > + .ramp_mask =3D GENMASK(1, 0), > > >> > + .ramp_delay =3D max77857_ramp_table[0][0], > > >> > > >> This breaks the build with GCC 5.x through 7.x: > > >> > > >> drivers/regulator/max77857-regulator.c:312:16: error: initializer = element is not > > >constant > > >> .ramp_delay =3D max77857_ramp_table[0][0], > > >> ^~~~~~~~~~~~~~~~~~~ > > >> drivers/regulator/max77857-regulator.c:312:16: note: (near initial= ization for > > >'max77857_regulator_desc.ramp_delay') > > >> > > >> and clang: > > >> > > >> drivers/regulator/max77857-regulator.c:312:16: error: initializer = element is not a > > >compile-time constant > > >> 312 | .ramp_delay =3D max77857_ramp_table[0][0], > > >> | ^~~~~~~~~~~~~~~~~~~~~~~~~ > > >> 1 error generated. > > >> > > >> This relies on a GCC 8.x+ change that accepts more things as > > >> compile-time constants, which is being worked on in clang > > >> > > >(https://urldefense.com/v3/__https://reviews.llvm.org/D76096__;!!A3Ni8= CS0y2Y!7B > > >eWxuzHgLzOprQA_madbvdR7hd0ZgmS73lUlDbgoxWUFWdDSIRXLnhyqLeRhu3uTaqpS > > >kzZKwc5pHA$ ). Since the kernel supports older > > >> compilers, this will have to be worked around somehow. Perhaps a def= ine > > >> that can be used in both places? > > > > > >Was there any update on this? I do not mind sending a patch for this > > >myself if I have some sort of guidance on how you would prefer for thi= s > > >to be fixed, should you be too busy to look into it. > > > > > >Cheers, > > >Nathan > > > > Hi Nathan, > > > > I thought that I should fix this issue after merging main branch that's= why I did not send patch. > > That is an understandable position but no, this issue should be fixed > before this change makes its way to Linus, not after. > > > I sent patch v3 so should I send new patch as v4? > > No, you should checkout Mark's branch that contains your patch and send > a new patch on top of it just fixing this issue, like the other two > patches that have already touched this driver: > > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git/log= /?h=3Dfor-6.6 > > https://git.kernel.org/broonie/regulator/c/2920e08bef609c8b59f9996fd6852a= 7b97119d75 > https://git.kernel.org/broonie/regulator/c/541e75954cadde0355ce7bebed5675= 625b2943a8 > > There are GCC 7.x and earlier toolchains at > https://kernel.org/pub/tools/crosstool/ and LLVM toolchains at > https://kernel.org/pub/tools/llvm/ should need to reproduce and verify > the fix. > > Cheers, > Nathan > --=20 Thanks, ~Nick Desaulniers