[PATCH net-next] net: arp: Fix the coding style issue regarding spaces in arp_state_to_flags()

qiu.yutan@zte.com.cn posted 1 patch 1 week, 6 days ago
net/ipv4/arp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH net-next] net: arp: Fix the coding style issue regarding spaces in arp_state_to_flags()
Posted by qiu.yutan@zte.com.cn 1 week, 6 days ago
From: Qiu Yutan <qiu.yutan@zte.com.cn>

According to the kernel's coding style, the binary operator & should
have a space on each side.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Qiu Yutan <qiu.yutan@zte.com.cn>
---
 net/ipv4/arp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 601b98185cf5..18174459a9a9 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1155,9 +1155,9 @@ static int arp_req_set(struct net *net, struct arpreq *r)

 static unsigned int arp_state_to_flags(struct neighbour *neigh)
 {
-	if (neigh->nud_state&NUD_PERMANENT)
+	if (neigh->nud_state & NUD_PERMANENT)
 		return ATF_PERM | ATF_COM;
-	else if (neigh->nud_state&NUD_VALID)
+	else if (neigh->nud_state & NUD_VALID)
 		return ATF_COM;
 	else
 		return 0;
-- 
2.25.1
Re: [PATCH net-next] net: arp: Fix the coding style issue regarding spaces in arp_state_to_flags()
Posted by Jakub Kicinski 1 week, 4 days ago
On Tue, 12 May 2026 14:39:31 +0800 (CST) qiu.yutan@zte.com.cn wrote:
> According to the kernel's coding style, the binary operator & should
> have a space on each side.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")

Quoting documentation:

  Clean-up patches
  ~~~~~~~~~~~~~~~~
  
  Netdev discourages patches which perform simple clean-ups, which are not in
  the context of other work. For example:
  
  * Addressing ``checkpatch.pl``, and other trivial coding style warnings
  * Addressing :ref:`Local variable ordering<rcs>` issues
  * Conversions to device-managed APIs (``devm_`` helpers)
  
  This is because it is felt that the churn that such changes produce comes
  at a greater cost than the value of such clean-ups.
  
  Conversely, spelling and grammar fixes are not discouraged.
  
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#clean-up-patches
-- 
pw-bot: reject