Re: [PATCH v2 2/6] platform/x86: dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800

Joe Perches
2024-01-06T19:55:02Z

On Sat, 2024-01-06 at 18:24 +0200, Andy Shevchenko wrote:
> + Cc people from tags of 72921427d46b ("string.h: Add str_has_prefix() helper
> function"). See below why.
> > + if (!strstarts(adap->name, "SMBus I801 adapter"))
> > + return 0;
>
> Bah, we have str_has_prefix() and this, much older one...
> Steven? Others? I mean we can do something about this duplication, right?

coccinelle?

@@
expression a, b;
@@

- strstarts(a, b)
+ str_has_prefix(a, b)