Re: [PATCH net-next 13/14] devlink: add by-instance dump infra

Jiri Pirko
2023-01-07T09:23:58Z

Fri, Jan 06, 2023 at 10:12:14PM CET, kuba@kernel.org wrote:
>On Fri, 6 Jan 2023 09:56:36 +0100 Jiri Pirko wrote:
>>> Oh, just the "it" at the end? Sorry, I don't see the point.
>>
>> The point is simple. Ops is a struct of callback by name X. If someone
>> implements this ops struct, it is nice to assign the callbacks functions
>> of name y_X so it is obvious from the first sight, what the function
>> is related to.
>>
>> I'm not sure what's wrong about having this sort of consistency. I
>> believe that you as a maintainer should rather enforce it than to be
>> against it. Am I missing something?
>
>IMO you have a tendency to form names by concatenating adjacent
>information rather than reflecting on what matters to the reader.
>I believe the low readability of the devlink code is sufficient
>evidence to disagree with that direction.

Hmm.
1) What is wrong of having:
.dumpit = devlink_instance_iter_dumpit
instead of
.dumpit = devlink_instance_iter_dump
?
How exactly that decreases readability?

2) Why exactly you find devlink code hard to read?