Re: [PATCH net-next v4 2/2] dsa: lan9303: Migrate to PHYLINK

From: Vladimir Oltean
Date: Fri Dec 09 2022 - 13:07:41 EST


On Fri, Dec 09, 2022 at 06:00:47PM +0000, Jerry.Ray@xxxxxxxxxxxxx wrote:
> > As a reader, I find my intelligence insulted by self-evident comments such as this.
> >
> > Especially in contrast with the writes below to the MII_BMCR of the
> > Virtual PHY, which would certainly deserve a bit more of an explanation,
> > yet there is none there.
> >
>
> I struggle with the lack of comments I see in the kernel codebase. While
> experts can look at the source code and understand it, I find I spend a
> good deal of time chasing down macros - following data structures - and
> reverse engineering an understanding of the purpose of something that could
> have been explained in the maintained source. In-line comments target the
> unfamiliar reader as there are a lot of us out here and far too few experts.
> But I do see your point and I'll try to do a better job on this.

I do see that maybe my observation about the rest of this driver's code
lacking comments might have been unfair to you since it's not you who
added that uncommented code. But still, let's try to add comments where
those add value, and there are plenty of other places in this driver
which sorely need that. I still maintain that "if (!dsa_is_cpu_port()) return"
doesn't need a repeat in words of what that set of instructions does.
Maybe why, or something that isn't completely obvious from actually
reading what's already in the code.