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