[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a202e0d0-4ece-4697-89b3-28bd9e3d07b1@lunn.ch>
Date: Tue, 4 Nov 2025 16:46:50 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Parthiban Veerasooran <parthiban.veerasooran@...rochip.com>
Cc: piergiorgio.beruto@...il.com, hkallweit1@...il.com,
linux@...linux.org.uk, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net: phy: phy-c45: add OATC14 10BASE-T1S
PHY cable diagnostic support
> +/* Bus Short/Open Status:
> + * 0 0 - no fault; everything is ok. (Default)
> + * 0 1 - detected as an open or missing termination(s)
> + * 1 0 - detected as a short or extra termination(s)
> + * 1 1 - fault but fault type not detectable. More details can be available by
> + * vender specific register if supported.
> + */
> +enum oatc14_hdd_status {
> + OATC14_HDD_STATUS_CABLE_OK,
> + OATC14_HDD_STATUS_OPEN,
> + OATC14_HDD_STATUS_SHORT,
> + OATC14_HDD_STATUS_NOT_DETECTABLE,
You frequently see the first enum has an = 0 at the end. I don't know
what the C standard allows the compiler to do, in terms of assigning
values to these enums, but it won't work if it uses 42, 43, 44, 45.
etc.
Otherwise, this looks O.K.
Andrew
Powered by blists - more mailing lists