diff mbox series

net: hisilicon: rename CACHE_LINE_MASK to avoid redefinition

Message ID 20210718203834.11297-1-rdunlap@infradead.org (mailing list archive)
State Accepted
Commit b16f3299ae1aa3c327e1fb742d0379ae4d6e86f2
Delegated to: Netdev Maintainers
Headers show
Series net: hisilicon: rename CACHE_LINE_MASK to avoid redefinition | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 2 maintainers not CCed: yisen.zhuang@huawei.com salil.mehta@huawei.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch warning WARNING: line length of 81 exceeds 80 columns
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Randy Dunlap July 18, 2021, 8:38 p.m. UTC
Building on ARCH=arc causes a "redefined" warning, so rename this
driver's CACHE_LINE_MASK to avoid the warning.

../drivers/net/ethernet/hisilicon/hip04_eth.c:134: warning: "CACHE_LINE_MASK" redefined
  134 | #define CACHE_LINE_MASK   0x3F
In file included from ../include/linux/cache.h:6,
                 from ../include/linux/printk.h:9,
                 from ../include/linux/kernel.h:19,
                 from ../include/linux/list.h:9,
                 from ../include/linux/module.h:12,
                 from ../drivers/net/ethernet/hisilicon/hip04_eth.c:7:
../arch/arc/include/asm/cache.h:17: note: this is the location of the previous definition
   17 | #define CACHE_LINE_MASK  (~(L1_CACHE_BYTES - 1))

Fixes: d413779cdd93 ("net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Jiangfeng Xiao <xiaojiangfeng@huawei.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/hisilicon/hip04_eth.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org July 19, 2021, 5:10 p.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Sun, 18 Jul 2021 13:38:34 -0700 you wrote:
> Building on ARCH=arc causes a "redefined" warning, so rename this
> driver's CACHE_LINE_MASK to avoid the warning.
> 
> ../drivers/net/ethernet/hisilicon/hip04_eth.c:134: warning: "CACHE_LINE_MASK" redefined
>   134 | #define CACHE_LINE_MASK   0x3F
> In file included from ../include/linux/cache.h:6,
>                  from ../include/linux/printk.h:9,
>                  from ../include/linux/kernel.h:19,
>                  from ../include/linux/list.h:9,
>                  from ../include/linux/module.h:12,
>                  from ../drivers/net/ethernet/hisilicon/hip04_eth.c:7:
> ../arch/arc/include/asm/cache.h:17: note: this is the location of the previous definition
>    17 | #define CACHE_LINE_MASK  (~(L1_CACHE_BYTES - 1))
> 
> [...]

Here is the summary with links:
  - net: hisilicon: rename CACHE_LINE_MASK to avoid redefinition
    https://git.kernel.org/netdev/net/c/b16f3299ae1a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

--- linux-next-20210716.orig/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ linux-next-20210716/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -131,7 +131,7 @@ 
 /* buf unit size is cache_line_size, which is 64, so the shift is 6 */
 #define PPE_BUF_SIZE_SHIFT		6
 #define PPE_TX_BUF_HOLD			BIT(31)
-#define CACHE_LINE_MASK			0x3F
+#define SOC_CACHE_LINE_MASK		0x3F
 #else
 #define PPE_CFG_QOS_VMID_GRP_SHIFT	8
 #define PPE_CFG_RX_CTRL_ALIGN_SHIFT	11
@@ -531,8 +531,8 @@  hip04_mac_start_xmit(struct sk_buff *skb
 #if defined(CONFIG_HI13X1_GMAC)
 	desc->cfg = (__force u32)cpu_to_be32(TX_CLEAR_WB | TX_FINISH_CACHE_INV
 		| TX_RELEASE_TO_PPE | priv->port << TX_POOL_SHIFT);
-	desc->data_offset = (__force u32)cpu_to_be32(phys & CACHE_LINE_MASK);
-	desc->send_addr =  (__force u32)cpu_to_be32(phys & ~CACHE_LINE_MASK);
+	desc->data_offset = (__force u32)cpu_to_be32(phys & SOC_CACHE_LINE_MASK);
+	desc->send_addr =  (__force u32)cpu_to_be32(phys & ~SOC_CACHE_LINE_MASK);
 #else
 	desc->cfg = (__force u32)cpu_to_be32(TX_CLEAR_WB | TX_FINISH_CACHE_INV);
 	desc->send_addr = (__force u32)cpu_to_be32(phys);