Thread (79 messages) 79 messages, 6 authors, 2024-07-08

Re: [PATCH net-next v13 14/15] net: stmmac: dwmac-loongson: Add Loongson GNET support

From: Serge Semin <hidden>
Date: 2024-07-05 10:40:13

Hi Huacai

On Wed, Jul 03, 2024 at 09:19:59AM +0800, Huacai Chen wrote:
On Tue, Jul 2, 2024 at 9:43 PM Serge Semin [off-list ref] wrote:
quoted
...
On Wed, May 29, 2024 at 06:21:09PM +0800, Yanteng Si wrote:
quoted
...
...
quoted
+#define DWMAC_CORE_LS2K2000          0x10    /* Loongson custom IP */
Note it's perfectly fine to have a device named after the SoC it's
equipped to. For example see the compatible strings defined for the
vendor-specific versions of the DW *MAC IP-cores:
Documentation/devicetree/bindings/net/snps,dwmac.yaml

But if you aren't comfortable with such naming we can change the
macro to something like:
#define DWMAC_CORE_LOONGSON_MULTI_CH    0x10
Maybe DWMAC_CORE_LOONGSON_MULTICHAN or DWMAC_CORE_LOONGSON_MULTI_CHAN
is a little better?
Well, I don't have a strong opinion about that in this case.
Personally I prefer to have the shortest and still readable version.
It decreases the probability of the lines splitting in case of the
long-line statements or highly indented code. From that perspective
something like DWMAC_CORE_LS_MULTI_CH would be even better. But seeing
the driver currently don't have such cases, we can use any of those
name. But it's better to be of such length so the code lines the name
is utilized in wouldn't exceed +80 chars.

-Serge(y)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help