Re: [PATCH v1 2/2] i2c: spacemit: add support for SpacemiT K1 SoC

Wolfram Sang
2024-10-15T09:22:04Z

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

> > +static inline u32 spacemit_i2c_read_reg(struct spacemit_i2c_dev *i2c, int reg)
> > +{
> > + return readl(i2c->base + reg);
>
> So basically short and obvious code like this:
>
> readl(i2c->base + reg);
>
> you replace with:
>
> spacemit_i2c_read_reg(i2c, reg)
>
> how is this helpful?

I always have the same question when I see this. However, I don't blame
Troy. We have quite some occurances of this in the kernel, so I wouldn't
be surprised if people think this is a kernel-style-pattern :/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]