Re: [PATCH v5 10/13] ARM: sun9i: smp: Move structures

From: Chen-Yu Tsai
Date: Tue Apr 03 2018 - 04:51:56 EST


On Tue, Apr 3, 2018 at 4:47 PM, Maxime Ripard <maxime.ripard@xxxxxxxxxxx> wrote:
> On Tue, Apr 03, 2018 at 08:18:33AM +0200, MylÃne Josserand wrote:
>> To prepare the support for sun8i-a83t, move some structures
>> at the beginning of the file.
>>
>> Signed-off-by: MylÃne Josserand <mylene.josserand@xxxxxxxxxxx>
>
> I'm not quite sure what would be the benefit from that, if it's was
> working before, then it would probably work in your case as welle, right?

You should only need to move struct sunxi_mc_smp_data, since you are reading
the is_sun9i field. I suppose you could also get away with adding a global
variable just for that, and not have to store an index or pointer. Then none
of this code movement would be necessary. It would be slightly harder to
understand, but it's still contained within this file, and it has a clear
purpose, so I would call that acceptable.

ChenYu