[PATCH 4/5] hwrng: meson: use struct hw_random priv data

Heiner Kallweit hkallweit1 at gmail.com
Sun Feb 19 15:51:25 PST 2023


On 19.02.2023 19:26, Martin Blumenstingl wrote:
> Hi Heiner,
> 
> On Sat, Feb 18, 2023 at 9:59 PM Heiner Kallweit <hkallweit1 at gmail.com> wrote:
>> +       void __iomem *base = (__force void __iomem *)rng->priv;
> I find that "(void __force __iomem *)" is the more common order in
> other drivers. Which of these is correct is something I cannot tell
> though.
> 
I just looked at this one:
#define IOMEM_ERR_PTR(err) (__force void __iomem *)ERR_PTR(err)
But right, both orders exist.

> Also I would like to hear some other opinions because to me the code
> was easier to read before.
Right, if possible I'd like to avoid it too.
However it's the prerequisite for getting rid of struct meson_rng_data.
And this simplification outweighs this small drawback IMO.

> Your way is shorter and may save a few bytes (including alignment etc.) though.
> 
> 
> Best regards,
> Martin

Heiner




More information about the linux-arm-kernel mailing list