[PATCH 0/4] aspeed: Clean up local variable shadowing

Cédric Le Goater posted 4 patches 7 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230922155924.1172019-1-clg@kaod.org
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Andrew Jeffery <andrew@aj.id.au>, Joel Stanley <joel@jms.id.au>
hw/arm/aspeed_ast2600.c | 10 +++++-----
hw/i2c/aspeed_i2c.c     |  1 -
hw/misc/aspeed_i3c.c    |  6 +++---
hw/timer/aspeed_timer.c |  2 +-
4 files changed, 9 insertions(+), 10 deletions(-)
[PATCH 0/4] aspeed: Clean up local variable shadowing
Posted by Cédric Le Goater 7 months, 1 week ago
Hello,

Here are cleanups for local variable shadowing warnings in aspeed models.

Joel, Andrew,

Could you please double check patch 4 ? 

Thanks,

C. 

Cédric Le Goater (4):
  aspeed/i2c: Clean up local variable shadowing
  aspeed: Clean up local variable shadowing
  aspeed/i3c: Rename variable shadowing a local
  aspeed/timer: Clean up local variable shadowing

 hw/arm/aspeed_ast2600.c | 10 +++++-----
 hw/i2c/aspeed_i2c.c     |  1 -
 hw/misc/aspeed_i3c.c    |  6 +++---
 hw/timer/aspeed_timer.c |  2 +-
 4 files changed, 9 insertions(+), 10 deletions(-)

-- 
2.41.0


Re: [PATCH 0/4] aspeed: Clean up local variable shadowing
Posted by Markus Armbruster 7 months ago
Cédric Le Goater <clg@kaod.org> writes:

> Hello,
>
> Here are cleanups for local variable shadowing warnings in aspeed models.
>
> Joel, Andrew,
>
> Could you please double check patch 4 ? 
>
> Thanks,
>
> C. 

Queued, thanks!
Re: [PATCH 0/4] aspeed: Clean up local variable shadowing
Posted by Philippe Mathieu-Daudé 7 months, 1 week ago
On 22/9/23 17:59, Cédric Le Goater wrote:
> Hello,
> 
> Here are cleanups for local variable shadowing warnings in aspeed models.
> 
> Joel, Andrew,
> 
> Could you please double check patch 4 ?

Could Markus' MAKE_IDENTFIER() help there?

> 
> Thanks,
> 
> C.
> 
> Cédric Le Goater (4):
>    aspeed/i2c: Clean up local variable shadowing
>    aspeed: Clean up local variable shadowing
>    aspeed/i3c: Rename variable shadowing a local
>    aspeed/timer: Clean up local variable shadowing
> 
>   hw/arm/aspeed_ast2600.c | 10 +++++-----
>   hw/i2c/aspeed_i2c.c     |  1 -
>   hw/misc/aspeed_i3c.c    |  6 +++---
>   hw/timer/aspeed_timer.c |  2 +-
>   4 files changed, 9 insertions(+), 10 deletions(-)
> 


Re: [PATCH 0/4] aspeed: Clean up local variable shadowing
Posted by Cédric Le Goater 7 months, 1 week ago
On 9/22/23 20:20, Philippe Mathieu-Daudé wrote:
> On 22/9/23 17:59, Cédric Le Goater wrote:
>> Hello,
>>
>> Here are cleanups for local variable shadowing warnings in aspeed models.
>>
>> Joel, Andrew,
>>
>> Could you please double check patch 4 ?
> 
> Could Markus' MAKE_IDENTFIER() help there?

ah ! you typed too fast and I also read too fast, as :

   MARKUS_IDENTIFIER()

and I liked it :) but what is MAKE_IDENTIFIER  ? really, please explain.

Thanks,

C.


Re: [PATCH 0/4] aspeed: Clean up local variable shadowing
Posted by Markus Armbruster 7 months, 1 week ago
Cédric Le Goater <clg@kaod.org> writes:

> On 9/22/23 20:20, Philippe Mathieu-Daudé wrote:
>> On 22/9/23 17:59, Cédric Le Goater wrote:
>>> Hello,
>>>
>>> Here are cleanups for local variable shadowing warnings in aspeed models.
>>>
>>> Joel, Andrew,
>>>
>>> Could you please double check patch 4 ?
>> Could Markus' MAKE_IDENTFIER() help there?
>
> ah ! you typed too fast and I also read too fast, as :
>
>   MARKUS_IDENTIFIER()
>
> and I liked it :)

LOL

>                   but what is MAKE_IDENTIFIER  ? really, please explain.

Philippe is referring to

    [PATCH v3 7/7] qobject atomics osdep: Make a few macros more hygienic
    Message-ID: <20230921121312.1301864-8-armbru@redhat.com>

which tweaks MAX() to permit nesting without shadowing.  Your PATCH 4
may not be needed if you base on it.

MAKE_IDENTIFIER() is a helper macro introduced in that patch.

You can fetch the patch from https://repo.or.cz/qemu/armbru.git branch
shadow-next, along with collected other shadowing patches.

Questions?
Re: [PATCH 0/4] aspeed: Clean up local variable shadowing
Posted by Cédric Le Goater 7 months, 1 week ago
On 9/23/23 09:13, Markus Armbruster wrote:
> Cédric Le Goater <clg@kaod.org> writes:
> 
>> On 9/22/23 20:20, Philippe Mathieu-Daudé wrote:
>>> On 22/9/23 17:59, Cédric Le Goater wrote:
>>>> Hello,
>>>>
>>>> Here are cleanups for local variable shadowing warnings in aspeed models.
>>>>
>>>> Joel, Andrew,
>>>>
>>>> Could you please double check patch 4 ?
>>> Could Markus' MAKE_IDENTFIER() help there?
>>
>> ah ! you typed too fast and I also read too fast, as :
>>
>>    MARKUS_IDENTIFIER()
>>
>> and I liked it :)
> 
> LOL
> 
>>                    but what is MAKE_IDENTIFIER  ? really, please explain.
> 
> Philippe is referring to
> 
>      [PATCH v3 7/7] qobject atomics osdep: Make a few macros more hygienic
>      Message-ID: <20230921121312.1301864-8-armbru@redhat.com>
> 
> which tweaks MAX() to permit nesting without shadowing.  Your PATCH 4
> may not be needed if you base on it.

We don't need the nested MAX(). PATCH 4 is a cleanup which happens
to remove the shadowing. Let's keep it the way it is.

> MAKE_IDENTIFIER() is a helper macro introduced in that patch.
> 
> You can fetch the patch from https://repo.or.cz/qemu/armbru.git branch
> shadow-next, along with collected other shadowing patches.

OK.

Would you prefer maintainers to include the shadowing changes in a
potential PR they would send or would you rather take care of it in
a PR of your own ?

Thanks,

C.



Re: [PATCH 0/4] aspeed: Clean up local variable shadowing
Posted by Markus Armbruster 7 months, 1 week ago
Cédric Le Goater <clg@kaod.org> writes:

> On 9/23/23 09:13, Markus Armbruster wrote:
>> Cédric Le Goater <clg@kaod.org> writes:
>> 
>>> On 9/22/23 20:20, Philippe Mathieu-Daudé wrote:
>>>> On 22/9/23 17:59, Cédric Le Goater wrote:
>>>>> Hello,
>>>>>
>>>>> Here are cleanups for local variable shadowing warnings in aspeed models.
>>>>>
>>>>> Joel, Andrew,
>>>>>
>>>>> Could you please double check patch 4 ?
>>>> Could Markus' MAKE_IDENTFIER() help there?
>>>
>>> ah ! you typed too fast and I also read too fast, as :
>>>
>>>    MARKUS_IDENTIFIER()
>>>
>>> and I liked it :)
>>
>> LOL
>> 
>>>                    but what is MAKE_IDENTIFIER  ? really, please explain.
>>
>> Philippe is referring to
>>
>>      [PATCH v3 7/7] qobject atomics osdep: Make a few macros more hygienic
>>      Message-ID: <20230921121312.1301864-8-armbru@redhat.com>
>>
>> which tweaks MAX() to permit nesting without shadowing.  Your PATCH 4
>> may not be needed if you base on it.
>
> We don't need the nested MAX(). PATCH 4 is a cleanup which happens
> to remove the shadowing. Let's keep it the way it is.
>
>> MAKE_IDENTIFIER() is a helper macro introduced in that patch.
>> You can fetch the patch from https://repo.or.cz/qemu/armbru.git branch
>> shadow-next, along with collected other shadowing patches.
>
> OK.
>
> Would you prefer maintainers to include the shadowing changes in a
> potential PR they would send or would you rather take care of it in
> a PR of your own ?

I'm happy to collect patches and do pull requests.  I don't mind
maintainers merging patches for their subsystems; interference should be
minimal.

Thanks!