Thread (43 messages) 43 messages, 7 authors, 2023-08-03

Re: [PATCH v2 05/10] net: stmmac: dwmac1000: Add Loongson register definitions

From: Andrew Lunn <andrew@lunn.ch>
Date: 2023-07-28 08:44:49
Also in: loongarch

On Fri, Jul 28, 2023 at 09:45:42AM +0800, Feiyang Chen wrote:
On Thu, Jul 27, 2023 at 5:13 PM Andrew Lunn [off-list ref] wrote:
quoted
quoted
 /* GMAC HW ADDR regs */
-#define GMAC_ADDR_HIGH(reg)  ((reg > 15) ? 0x00000800 + (reg - 16) * 8 : \
+#define GMAC_ADDR_HIGH(reg, x)       ((reg > 15) ? 0x00000800 + (reg - 16) * 8 * (x) : \
                               0x00000040 + (reg * 8))
please give x a more descriptive name.
Hi, Andrew,

The x is now related to the dwmac_is_loongson flag. I'll try to use
another method.
Rather than 'dwmac_is_longson', make it represent a feature of the
MAC.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help