[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH7PR03MB739122A373964651D995EA5AE701A@PH7PR03MB7391.namprd03.prod.outlook.com>
Date: Thu, 27 Jul 2023 08:34:44 +0000
From: "Sahin, Okan" <Okan.Sahin@...log.com>
To: Nathan Chancellor <nathan@...nel.org>
CC: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
"zzzzTilki, zzzzIbrahim" <Ibrahim.Tilki@...log.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>
Subject: RE: [PATCH v3 2/2] regulator: max77857: Add ADI MAX77857/59/MAX77831
Regulator Support
>-----Original Message-----
>From: Nathan Chancellor <nathan@...nel.org>
>Sent: Wednesday, July 26, 2023 7:11 PM
>To: Sahin, Okan <Okan.Sahin@...log.com>
>Cc: Liam Girdwood <lgirdwood@...il.com>; Mark Brown <broonie@...nel.org>;
>Rob Herring <robh+dt@...nel.org>; Krzysztof Kozlowski
><krzysztof.kozlowski+dt@...aro.org>; Conor Dooley <conor+dt@...nel.org>;
>zzzzTilki, zzzzIbrahim <Ibrahim.Tilki@...log.com>; linux-kernel@...r.kernel.org;
>devicetree@...r.kernel.org; llvm@...ts.linux.dev
>Subject: Re: [PATCH v3 2/2] regulator: max77857: Add ADI MAX77857/59/MAX77831
>Regulator Support
>
>[External]
>
>Hi Okan,
>
>On Tue, Jul 18, 2023 at 08:55:02AM -0700, Nathan Chancellor wrote:
>
><snip>
>
>> > +static struct regulator_desc max77857_regulator_desc = {
>> > + .ops = &max77857_regulator_ops,
>> > + .name = "max77857",
>> > + .linear_ranges = max77857_lin_ranges,
>> > + .n_linear_ranges = ARRAY_SIZE(max77857_lin_ranges),
>> > + .vsel_mask = 0xFF,
>> > + .vsel_reg = MAX77857_REG_CONT2,
>> > + .ramp_delay_table = max77857_ramp_table[0],
>> > + .n_ramp_values = ARRAY_SIZE(max77857_ramp_table[0]),
>> > + .ramp_reg = MAX77857_REG_CONT3,
>> > + .ramp_mask = GENMASK(1, 0),
>> > + .ramp_delay = 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 = max77857_ramp_table[0][0],
>> ^~~~~~~~~~~~~~~~~~~
>> drivers/regulator/max77857-regulator.c:312:16: note: (near initialization 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 = 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__;!!A3Ni8CS0y2Y!7B
>eWxuzHgLzOprQA_madbvdR7hd0ZgmS73lUlDbgoxWUFWdDSIRXLnhyqLeRhu3uTaqpS
>kzZKwc5pHA$ ). Since the kernel supports older
>> compilers, this will have to be worked around somehow. Perhaps a define
>> 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 this
>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.
I sent patch v3 so should I send new patch as v4?
Regards,
Okan Sahin
Powered by blists - more mailing lists