[PATCH 5/6] gpio: Add new gpio-macsmc driver for Apple Macs

Andy Shevchenko andy.shevchenko at gmail.com
Fri Sep 2 07:41:16 PDT 2022


On Fri, Sep 2, 2022 at 4:37 PM Martin Povišer <povik at cutebit.org> wrote:
> > On 2. 9. 2022, at 15:33, Andy Shevchenko <andy.shevchenko at gmail.com> wrote:
> > On Fri, Sep 2, 2022 at 2:12 PM Martin Povišer <povik at cutebit.org> wrote:

...

> >> you need to do
> >>
> >>  u32 key_be = cpu_to_be32(key);
> >>  printk(“%.4s = ...\n”, &key_be);
> >>
> >> in at least 9 places now, the number of which will probably grow.
> >> Just to make the case for *some* printk helper.
> >
> > Wouldn't this be one line
> >
> >  printk(“%.4s = ...\n”, &cpu_to_be32(key));
> >
> > ?
>
> That would compile? I thought that’s not valid C, taking an
> address of function’s return value.

Ah, you are right. My bad.

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list