Re: [PATCH v2 1/1] iio: adc: qcom-spmi-adc5: Fix the channel name

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

 



On 2023-01-18 16:29:24, Andy Shevchenko wrote:
...
> The devm_kstrdup(fwnode_get_name()) is an open coded variant of the above.
> I don't think we need to open code and produce NIH even a single API. And
> no, there is no magic behind that. At least from the fwnode point of view.
> 
> You may very well say that > 1500 instances of "%pOF" is a magic...

Forgive me for not having a clear definition of "open coding" in mind
(showing a different way of implementing something, compared to the
"status quo" that I was not yet aware of?), nor knowing what NIH is
supposed to mean in this context.  We're in bike-shedding territory
anyway, guess I should just bookmark the page that details all the many
`%` format strings available.

...
> > I find the latter clearer as it doesn't require the reader to figure out
> > that name - name cancels itself out.  Alternatively we can write
> > strchrnul(name, '@')[0].
> 
> I don't like to have Pythonisms in the C code, really.
> 
> P.S. I guess this little patch already emptied my bandwidth, so I leave
> any further discussion to you and IIO maintainers. Thank you for the
> review!

Just soaking up kernel coding standards here :)

- Marijn



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux