RE: [PATCH] pinctrl: sh-pfc: Split R-Car H3 support in two independent drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert-san,

> From: Geert Uytterhoeven, Sent: Thursday, December 26, 2019 11:34 PM
<snip>
> > > Suggestions for simplifying sh_pfc_quirk_match(), or for alternative
> > > solutions are welcome!
> >
> > I wondered if using weak attribute on both info variables could
> > simplify sh_pfc_quirk_match(), but such a code [1] doesn't seem better
> > than using #ifdef. Also, using weak attributes waste data size
> > if R8A77950=n and R8A77951=y for instance.
> 
> Thanks for the great suggestion!
> 
> The trick is to add __weak to the existing extern declarations in sh_pfc.h,
> instead of adding weak empty structs.
> When the structs don't exist, their addresses just become zero.

I'm happy my suggestion is useful!
# I didn't know the trick though :)

> So I came up with the following (whitespace-damaged) patch, which I intend
> to fold into the original, if no one objects.

The v2 patch [1] is better than v1!

[1]
https://patchwork.kernel.org/patch/11312733/

Best regards,
Yoshihiro Shimoda





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux