[no subject]

2020-10-24 Thread JOE
We currently have openings for real estate investments, project
financing, early startup ventures, existing ventures, credit/loan
facilities, and JV equity participation. To learn more about us
and what we do, email us today for more concrete information.

Joe Orte.
INVESTMENT MANAGER
DCE Group



Re: [PATCH] rtlwifi/*/dm.c: Use const in swing_table declarations

2020-06-28 Thread joe

On 2020-06-28 19:09, Pkshih wrote:

On Sun, 2020-06-28 at 03:17 -0700, Joe Perches wrote:

Use 'rtlwifi:' as subject title prefix is enough, likes
  rtlwifi: Use const in swing_table declarations


We disagree.

I like knowing what content is changed via patch subject lines
as there are 3 rtlwifi drivers being changed by this one patch.

But your choice, you can change it if you choose.


Reduce data usage about 1KB by using const.

[]

Please remove below type casting: 

@@ -1872,10 +1872,10 @@ static void 
rtl8821ae_get_delta_swing_table(struct

ieee80211_hw *hw,
*up_b = rtl8821ae_delta_swing_table_idx_5gb_p[2];
*down_b = rtl8821ae_delta_swing_table_idx_5gb_n[2];
} else {
-   *up_a = (u8 *)rtl8818e_delta_swing_table_idx_24gb_p;
-   *down_a = (u8 *)rtl8818e_delta_swing_table_idx_24gb_n;
-   *up_b = (u8 *)rtl8818e_delta_swing_table_idx_24gb_p;
-   *down_b = (u8 *)rtl8818e_delta_swing_table_idx_24gb_n;
+   *up_a = rtl8818e_delta_swing_table_idx_24gb_p;
+   *down_a = rtl8818e_delta_swing_table_idx_24gb_n;
+   *up_b = rtl8818e_delta_swing_table_idx_24gb_p;
+   *down_b = rtl8818e_delta_swing_table_idx_24gb_n;


The compiler is quiet about this so I believe this to be
an unrelated change and whitespace correction.

Of course you could modify it if you choose.

btw: There's an unnecessary return at the 2nd instance
 of this cast removal too.

cheers, Joe


[PATCH] [3/2many] MAINTAINERS - 3C359 NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 0d7f856..19d0c9e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -97,6 +97,7 @@ L:netdev@vger.kernel.org
 L: [EMAIL PROTECTED]
 W: http://www.linuxtr.net
 S: Maintained
+F: drivers/net/tokenring/3c359*
 
 3C505 NETWORK DRIVER
 P: Philip Blundell
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [3/2many] MAINTAINERS - 3C359 NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 0d7f856..f74f7d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -94,9 +94,9 @@ F: Files and directories with wildcard patterns.
 P: Mike Phillips
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
-L: [EMAIL PROTECTED]
 W: http://www.linuxtr.net
 S: Maintained
+F: drivers/net/tokenring/3c359*
 
 3C505 NETWORK DRIVER
 P: Philip Blundell
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [4/2many] MAINTAINERS - 3C505 NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index f74f7d5..3fbc13a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -103,6 +103,7 @@ P:  Philip Blundell
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/3c505*
 
 3CR990 NETWORK DRIVER
 P: David Dillow
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [5/2many] MAINTAINERS - 3CR990 NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 3fbc13a..30f8ef5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -110,6 +110,7 @@ P:  David Dillow
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/typhoon*
 
 3W- ATA-RAID CONTROLLER DRIVER
 P: Adam Radford
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [12/2many] MAINTAINERS - 8169 10/100/1000 GIGABIT ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index ac5ba41..2fc85df 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -160,6 +160,7 @@ P:  Francois Romieu
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/r8169.c
 
 8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
 L: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [13/2many] MAINTAINERS - 8390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.]

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 2fc85df..f365b2e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -172,6 +172,8 @@ P:  Paul Gortmaker
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/*8390*
+F: drivers/net/ax88796.c
 
 9P FILE SYSTEM
 P: Eric Van Hensbergen
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [70/2many] MAINTAINERS - ARPD SUPPORT

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 90c1b81..ac2226b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -697,6 +697,7 @@ ARPD SUPPORT
 P: Jonathan Layes
 L: netdev@vger.kernel.org
 S: Maintained
+F: net/ipv4/arp.c
 
 ASUS ACPI EXTRAS DRIVER
 P: Corentin Chary
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [112/2many] MAINTAINERS - BROADCOM B44 10/100 ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index a21ccf1..9be0816 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1097,6 +1097,7 @@ P:Gary Zambrano
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Supported
+F: drivers/net/b44.*
 
 BROADCOM BNX2 GIGABIT ETHERNET DRIVER
 P: Michael Chan
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [114/2many] MAINTAINERS - BROADCOM TG3 GIGABIT ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 976e6d0..0ee8069 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -,6 +,7 @@ P:Michael Chan
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Supported
+F: drivers/net/tg3.*
 
 BSG (block layer generic sg v4 driver)
 P: FUJITA Tomonori
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [113/2many] MAINTAINERS - BROADCOM BNX2 GIGABIT ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 9be0816..976e6d0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1104,6 +1104,7 @@ P:Michael Chan
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Supported
+F: drivers/net/bnx2*
 
 BROADCOM TG3 GIGABIT ETHERNET DRIVER
 P: Michael Chan
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [125/2many] MAINTAINERS - CIRRUS LOGIC EP93XX ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index e5853e8..8b28143 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1216,6 +1216,7 @@ P:Lennert Buytenhek
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/arm/ep93xx_eth.c
 
 CIRRUS LOGIC GENERIC FBDEV DRIVER
 P: Jeff Garzik
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [157/2many] MAINTAINERS - DAVICOM FAST ETHERNET (DMFE) NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index bd0fa0e..60bda8d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1534,6 +1534,8 @@ P:Tobias Ringstrom
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: Documentation/networking/dmfe.txt
+F: drivers/net/tulip/dmfe.c
 
 DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
 P: Shannon Nelson
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [164/2many] MAINTAINERS - DSCC4 DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 48a734c..3d75c15 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1600,6 +1600,7 @@ P:Francois Romieu
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/wan/dscc4.c
 
 DVB SUBSYSTEM AND DRIVERS
 P: LinuxTV.org Project
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [184/2many] MAINTAINERS - ETHEREXPRESS-16 NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 6fe987d..27eb5be 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1774,6 +1774,7 @@ P:Philip Blundell
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/eexpress.*
 
 ETHERNET BRIDGE
 P: Stephen Hemminger
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [193/2many] MAINTAINERS - FREESCALE SOC FS_ENET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index e06f478..2ef0ec4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1859,6 +1859,8 @@ M:[EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/fs_enet/
+F: include/linus/fs_enet_pd.h
 
 FREESCALE HIGHSPEED USB DEVICE DRIVER
 P: Li Yang
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [195/2many] MAINTAINERS - FREESCALE QUICC ENGINE UCC ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 944316a..35f1636 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1876,6 +1876,7 @@ M:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 L: [EMAIL PROTECTED]
 S: Maintained
+F: drivers/net/ucc_geth*
 
 FILE LOCKING (flock() and fcntl()/lockf())
 P: Matthew Wilcox
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [200/2many] MAINTAINERS - FRAME RELAY DLCI/FRAD (Sangoma drivers too)

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 1e7e562..a6a9366 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1921,6 +1921,8 @@ P:Mike McLagan
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/wan/dlci.c
+F: drivers/net/wan/sdla.c
 
 FREEVXFS FILESYSTEM
 P: Christoph Hellwig
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [255/2many] MAINTAINERS - INTEL IXP2000 ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index dccbaba..d5e1d3f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2423,6 +2423,7 @@ P:Lennert Buytenhek
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/ixp2000/
 
 INTEL PRO/100 ETHERNET SUPPORT
 P: John Ronciak
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [265/2many] MAINTAINERS - IPX NETWORK LAYER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index c1a9131..b97c776 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2533,6 +2533,9 @@ P:Arnaldo Carvalho de Melo
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: include/linux/ipx.h
+F: include/net/ipx.h
+F: net/ipx/
 
 IRDA SUBSYSTEM
 P: Samuel Ortiz
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [308/2many] MAINTAINERS - MACVLAN DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 07fb80f..b4d6651 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2966,6 +2966,8 @@ P:Patrick McHardy
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/macvlan.c
+F: include/linux/if_macvlan.h
 
 MARVELL YUKON / SYSKONNECT DRIVER
 P: Mirko Lindner
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [310/2many] MAINTAINERS - MARVELL MV643XX ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 68b22f3..ce9418a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2990,6 +2990,8 @@ P:Manish Lachwani
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Odd Fixes for 2.4; Maintained for 2.6.
+F: drivers/net/mv643xx_eth.*
+F: include/linux/mv643xx.h
 
 MATROX FRAMEBUFFER DRIVER
 P: Petr Vandrovec
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [335/2many] MAINTAINERS - NETLABEL

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index bc571b8..d05ffcd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3213,6 +3213,9 @@ M:[EMAIL PROTECTED]
 W: http://netlabel.sf.net
 L: netdev@vger.kernel.org
 S: Supported
+F: Documentation/netlabel
+F: include/net/netlabel.h
+F: net/netlabel/
 
 NETROM NETWORK LAYER
 P: Ralf Baechle
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [339/2many] MAINTAINERS - NETWORKING [GENERAL]

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index b67dda3..1ddb242 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3251,6 +3251,8 @@ M:netdev@vger.kernel.org
 L: netdev@vger.kernel.org
 W: http://linux-net.osdl.org/
 S: Maintained
+F: net/
+F: include/net/
 
 NETWORKING [IPv4/IPv6]
 P: David S. Miller
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [338/2many] MAINTAINERS - NETWORK DEVICE DRIVERS

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index d9e9813..b67dda3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3243,6 +3243,7 @@ M:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 T: git kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
 S: Maintained
+F: drivers/net/
 
 NETWORKING [GENERAL]
 P: Networking Team
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [342/2many] MAINTAINERS - NETXEN (1/10) GbE SUPPORT

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index fd59b3d..dbfdb75 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3289,6 +3289,7 @@ M:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 W: http://www.netxen.com
 S: Supported
+F: drivers/net/netxen/
 
 IPVS
 P: Wensong Zhang
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [343/2many] MAINTAINERS - IPVS

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index dbfdb75..a8fb231 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3300,6 +3300,8 @@ P:Julian Anastasov
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: Documentation/networking/ipvs-sysctl.txt
+F: net/ipv4/ipvs
 
 NFS CLIENT
 P: Trond Myklebust
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [353/2many] MAINTAINERS - OLYMPIC NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index ab954f1..d2c6850 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3404,6 +3404,8 @@ L:netdev@vger.kernel.org
 L: [EMAIL PROTECTED]
 W: http://www.linuxtr.net
 S: Maintained
+F: Documentation/networking/olympic.txt
+F: drivers/net/tokenring/olympic.*
 
 OMNIKEY CARDMAN 4000 DRIVER
 P: Harald Welte
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [345/2many] MAINTAINERS - NI5010 NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 1f81c05..35afb38 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3322,6 +3322,7 @@ P:Andreas Mohr
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/ni5010.*
 
 NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER
 P: YOKOTA Hiroshi
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [361/2many] MAINTAINERS - PA SEMI ETHERNET DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index f374fa8..c488769 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3470,6 +3470,7 @@ P:Olof Johansson
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/pasemi_mac.*
 
 PA SEMI SMBUS DRIVER
 P: Olof Johansson
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [374/2many] MAINTAINERS - PCNET32 NETWORK DRIVER

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index f6b84d2..7f5b7c2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3599,6 +3599,7 @@ P:Don Fry
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/pcnet32.c
 
 PER-TASK DELAY ACCOUNTING
 P: Shailabh Nagar
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [340/2many] MAINTAINERS - NETWORKING [IPv4/IPv6]

2007-08-12 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 1ddb242..91cdf28 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3270,6 +3270,9 @@ M:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 T: git kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git
 S: Maintained
+F: net/ipv4/
+F: net/ipv6/
+F: include/net/ip*
 
 NETWORKING [WIRELESS]
 P: John W. Linville
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [391/2many] MAINTAINERS - PS3 NETWORK SUPPORT

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 19f2a5f..4fe48a0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3738,6 +3738,7 @@ M:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 L: [EMAIL PROTECTED]
 S: Supported
+F: drivers/net/ps3_gelic_net.*
 
 PS3 PLATFORM SUPPORT
 P: Geoff Levand
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [381/2many] MAINTAINERS - POWERPC 4xx EMAC DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 0d30368..f526cf5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3659,6 +3659,7 @@ W:http://kernel.ebshome.net/emac/
 L: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/ibm_emac/
 
 PNP SUPPORT
 P: Adam Belay
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [350/2many] MAINTAINERS - NETERION (S2IO) Xframe 10GbE DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 6e78725..9e9775a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3373,6 +3373,8 @@ M:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
 S: Supported
+F: Documentation/networking/s2io.txt
+F: drivers/net/s2io*
 
 OPENCORES I2C BUS DRIVER
 P: Peter Korsgaard
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [432/2many] MAINTAINERS - SIS 190 ETHERNET DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 71be2f5..38f1b0d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4119,6 +4119,7 @@ P:Francois Romieu
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/sis190.c
 
 SIS 5513 IDE CONTROLLER DRIVER
 P: Lionel Bouton
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [445/2many] MAINTAINERS - SONIC NETWORK DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index e9e7a00..6175c77 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4233,6 +4233,7 @@ P:Thomas Bogendoerfer
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/sonic.*
 
 SONY VAIO CONTROL DEVICE DRIVER
 P: Mattia Dongili
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [434/2many] MAINTAINERS - SIS 900/7016 FAST ETHERNET DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 228e077..b74e343 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4135,6 +4135,7 @@ M:[EMAIL PROTECTED]
 W: http://www.brownhat.org/sis900.html
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/sis900.*
 
 SIS 96X I2C/SMBUS DRIVER
 P: Mark M. Hoffman
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [455/2many] MAINTAINERS - SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index a40c7ed..cb9f9da 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4348,6 +4348,8 @@ P:Stephen Hemminger
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: drivers/net/skge.*
+F: drivers/net/sky2.*
 
 SOEKRIS NET48XX LED SUPPORT
 P: Chris Boot
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [459/2many] MAINTAINERS - SPIDERNET NETWORK DRIVER for CELL

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index b616562..fa8fb1c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4377,6 +4377,9 @@ P:Linas Vepstas
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Supported
+F: Documentation/networking/spider_net.txt
+F: arch/powerpc/platforms/cell/spider-pic.c
+F: drivers/net/spider_net*
 
 SRM (Alpha) environment access
 P: Jan-Benedict Glaw
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [478/2many] MAINTAINERS - TOKEN-RING NETWORK DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index fda287c..b5dc1ac 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4539,6 +4539,8 @@ L:netdev@vger.kernel.org
 L: [EMAIL PROTECTED]
 W: http://www.linuxtr.net
 S: Maintained
+F: drivers/net/tokenring/
+F: net/802/tr.c
 
 TOSHIBA ACPI EXTRAS DRIVER
 P: John Belmonte
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [469/2many] MAINTAINERS - TC CLASSIFIER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index f00640b..fc0589f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4457,6 +4457,9 @@ P:Jamal Hadi Salim
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: include/linux/pkt_cls.h
+F: include/net/pkt_cls.h
+F: net/sched/
 
 TCP LOW PRIORITY MODULE
 P: Wong Hoi Sing, Edison
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [492/2many] MAINTAINERS - USB DAVICOM DM9601 DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 8f496de..b7498bf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4662,6 +4662,7 @@ M:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 W: http://www.linux-usb.org/usbnet
 S: Maintained
+F: drivers/net/usb/dm9601.c
 
 USB EHCI DRIVER
 P: David Brownell
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [504/2many] MAINTAINERS - USB PEGASUS DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index d822865..fc87fa7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4764,6 +4764,7 @@ L:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 W: http://pegasus2.sourceforge.net/
 S: Maintained
+F: drivers/net/usb/pegasus.*
 
 USB PRINTER DRIVER (usblp)
 P: Pete Zaitcev
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [506/2many] MAINTAINERS - USB RTL8150 DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 02bb359..25df49f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4781,6 +4781,7 @@ L:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 W: http://pegasus2.sourceforge.net/
 S: Maintained
+F: drivers/net/usb/rtl8150.c
 
 USB SE401 DRIVER
 P: Jeroen Vreeken
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [520/2many] MAINTAINERS - USB USBNET DRIVER FRAMEWORK

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index c670797..4dba8ee 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4916,6 +4916,7 @@ M:[EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 W: http://www.linux-usb.org/usbnet
 S: Maintained
+F: drivers/net/usb/usbnet.*
 
 USB W996[87]CF DRIVER
 P: Luca Risolia
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [530/2many] MAINTAINERS - VIA VELOCITY NETWORK DRIVER

2007-08-13 Thread joe
Add file pattern to MAINTAINER entry

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

diff --git a/MAINTAINERS b/MAINTAINERS
index 392d697..be3d826 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5002,6 +5002,7 @@ P:Francois Romieu
 M: [EMAIL PROTECTED]
 L: netdev@vger.kernel.org
 S: Maintained
+F: /drivers/net/via-velocity.*
 
 UCLINUX (AND M68KNOMMU)
 P: Greg Ungerer
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [2.6 patch] fix ipvs compilation

2006-01-05 Thread Joe
On 1/5/06, Adrian Bunk <[EMAIL PROTECTED]> wrote:
> I don't know which change broke it, but I'm getting the following
> compile error in Linus' tree:
>
> <--  snip  -->
>
> ...
>   CC  net/ipv4/ipvs/ip_vs_sched.o
> net/ipv4/ipvs/ip_vs_sched.c: In function 'ip_vs_sched_getbyname':
> net/ipv4/ipvs/ip_vs_sched.c:110: warning: implicit declaration of function 
> 'local_bh_disable'
> net/ipv4/ipvs/ip_vs_sched.c:124: warning: implicit declaration of function 
> 'local_bh_enable'
> ...
>   CC  net/ipv4/ipvs/ip_vs_est.o
> net/ipv4/ipvs/ip_vs_est.c: In function 'ip_vs_new_estimator':
> net/ipv4/ipvs/ip_vs_est.c:147: warning: implicit declaration of function 
> 'local_bh_disable'
> net/ipv4/ipvs/ip_vs_est.c:156: warning: implicit declaration of function 
> 'local_bh_enable'
> ...
>   LD  .tmp_vmlinux1
> net/built-in.o: In function 
> `ip_vs_sched_getbyname':ip_vs_sched.c:(.text+0x99cfa): undefined reference to 
> `local_bh_disable'
> net/built-in.o: In function `register_ip_vs_scheduler': undefined reference 
> to `local_bh_disable'
> net/built-in.o: In function `unregister_ip_vs_scheduler': undefined reference 
> to `local_bh_disable'
> net/built-in.o: In function `ip_vs_new_estimator': undefined reference to 
> `local_bh_disable'
> net/built-in.o: In function `ip_vs_kill_estimator': undefined reference to 
> `local_bh_disable'
> net/built-in.o: more undefined references to `local_bh_disable' follow
> make: *** [.tmp_vmlinux1] Error 1
>
> <--  snip  -->
>
>
> This patch fixes them by #include'ing linux/interrupt.h.
>
>
> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
>
> --- linux-git/net/ipv4/ipvs/ip_vs_sched.c.old   2006-01-05 14:56:44.0 
> +0100
> +++ linux-git/net/ipv4/ipvs/ip_vs_sched.c   2006-01-05 14:56:59.0 
> +0100
> @@ -22,6 +22,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>
> --- linux-git/net/ipv4/ipvs/ip_vs_est.c.old 2006-01-05 14:57:15.0 
> +0100
> +++ linux-git/net/ipv4/ipvs/ip_vs_est.c 2006-01-05 14:57:27.0 +0100
> @@ -18,6 +18,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>
>

Thats not all either,  ./net/ipv4/netfilter/ipt_helper.c has the same
error and the same fix.

Here's the patch for this one.  Sorry for the dupe.. i sent the last
as html by accident.

--- linux/net/ipv4/netfilter/ipt_helper.c.old2006-01-05
19:38:32.498991515 -0500
+++ linux/net/ipv4/netfilter/ipt_helper.c2006-01-05 19:40:30.047057859 -0500
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE)
 #include 
 #include 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [net-next 01/13] iavf: Use printf instead of gnu_printf for iavf_debug_d

2019-05-31 Thread Joe Perches
On Fri, 2019-05-31 at 01:15 -0700, Jeff Kirsher wrote:
> From: Nathan Chancellor 
> We can convert from gnu_printf to printf without any side effects
[]
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_osdep.h 
> b/drivers/net/ethernet/intel/iavf/iavf_osdep.h
[]
> @@ -46,7 +46,7 @@ struct iavf_virt_mem {
>  
>  #define iavf_debug(h, m, s, ...)  iavf_debug_d(h, m, s, ##__VA_ARGS__)
>  extern void iavf_debug_d(void *hw, u32 mask, char *fmt_str, ...)
> - __attribute__ ((format(gnu_printf, 3, 4)));
> + __printf(3, 4);

This declaration and function likely have several defects:

void *hw should likely be struct iavf_hw *hw
char *fmt_str should likely be const char *

And the definition of the function should
probably have the output at KERN_DEBUG and not
KERN_INFO.  As well it should probably use %pV
instead of a local automatic buffer.

Perhaps a macro like:

#define iavf_debug_d(hw, mask, fmt, ...)\
do {\
if ((mask) & (hw)->debug_mask)  \
pr_debug(fmt, ##__VA_ARGS__);   \
} while (0)

would be better as it could allow dynamic debug
for every use.




Re: [PATCH] rtlwifi: remove redundant assignment to variable k

2019-05-31 Thread Joe Perches
On Fri, 2019-05-31 at 12:29 -0500, Larry Finger wrote:
> On 5/31/19 9:14 AM, Colin King wrote:
> > From: Colin Ian King 
> > 
> > The assignment of 0 to variable k is never read once we break out of
> > the loop, so the assignment is redundant and can be removed.
> > 
> > Addresses-Coverity: ("Unused value")
> > Signed-off-by: Colin Ian King 
> > ---
> >   drivers/net/wireless/realtek/rtlwifi/efuse.c | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/realtek/rtlwifi/efuse.c 
> > b/drivers/net/wireless/realtek/rtlwifi/efuse.c
> > index e68340dfd980..83e5318ca04f 100644
> > --- a/drivers/net/wireless/realtek/rtlwifi/efuse.c
> > +++ b/drivers/net/wireless/realtek/rtlwifi/efuse.c
> > @@ -117,10 +117,8 @@ u8 efuse_read_1byte(struct ieee80211_hw *hw, u16 
> > address)
> >  rtlpriv->cfg->
> >  maps[EFUSE_CTRL] + 3);
> > k++;
> > -   if (k == 1000) {
> > -   k = 0;
> > +   if (k == 1000)
> > break;
> > -   }
> > }
> > data = rtl_read_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL]);
> > return data;
> 
> Colin,
> 
> Your patch is not wrong, but it fails to address a basic deficiency of this 
> code 
> snippet - when an error is detected, there is no attempt to either fix the 
> problem or report it upstream. As the data returned will be garbage if this 
> condition happens, we might as well replace the "break" with "return 0xFF", 
> as 
> well as deleting the "k = 0" line. Most of the callers of efuse_read_1byte() 
> ignore the returned result when bits 0 and 4 are set, thus returning all 8 
> bits 
> is not a bad fixup.
> 
> My suspicion is that this test is in the code merely to prevent an potential 
> unterminated "while" loop, and that this condition is extremely unlikely to 
> happen.
> 
> Larry

The function is also overly verbose with many
unnecessary rtlpriv->cfg->maps dereferences.

I'd've written it more like:
---
 drivers/net/wireless/realtek/rtlwifi/efuse.c | 57 +++-
 1 file changed, 22 insertions(+), 35 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/efuse.c 
b/drivers/net/wireless/realtek/rtlwifi/efuse.c
index e68340dfd980..db253f45e87d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/efuse.c
+++ b/drivers/net/wireless/realtek/rtlwifi/efuse.c
@@ -87,46 +87,33 @@ void efuse_initialize(struct ieee80211_hw *hw)
 u8 efuse_read_1byte(struct ieee80211_hw *hw, u16 address)
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
-   u8 data;
u8 bytetemp;
u8 temp;
-   u32 k = 0;
-   const u32 efuse_len =
-   rtlpriv->cfg->maps[EFUSE_REAL_CONTENT_SIZE];
-
-   if (address < efuse_len) {
-   temp = address & 0xFF;
-   rtl_write_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL] + 1,
-  temp);
-   bytetemp = rtl_read_byte(rtlpriv,
-rtlpriv->cfg->maps[EFUSE_CTRL] + 2);
-   temp = ((address >> 8) & 0x03) | (bytetemp & 0xFC);
-   rtl_write_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL] + 2,
-  temp);
-
-   bytetemp = rtl_read_byte(rtlpriv,
-rtlpriv->cfg->maps[EFUSE_CTRL] + 3);
-   temp = bytetemp & 0x7F;
-   rtl_write_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL] + 3,
-  temp);
+   int k = 0;
+   u32 *maps = rtlpriv->cfg->maps;
+   const u32 efuse_len = maps[EFUSE_REAL_CONTENT_SIZE];
 
-   bytetemp = rtl_read_byte(rtlpriv,
-rtlpriv->cfg->maps[EFUSE_CTRL] + 3);
-   while (!(bytetemp & 0x80)) {
-   bytetemp = rtl_read_byte(rtlpriv,
-rtlpriv->cfg->
-maps[EFUSE_CTRL] + 3);
-   k++;
-   if (k == 1000) {
-   k = 0;
-   break;
-   }
-   }
-   data = rtl_read_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL]);
-   return data;
-   } else
+   if (address >= efuse_len)
return 0xFF;
 
+   temp = address & 0xFF;
+   rtl_write_byte(rtlpriv, maps[EFUSE_CTRL] + 1, temp);
+   bytetemp = rtl_read_byte(rtlpriv, maps[EFUSE_CTRL] + 2);
+   temp = ((address >> 8) & 0x03) | (bytetemp & 0xFC);
+   rtl_write_byte(rtlpriv, maps[EFUSE_CTRL] + 2, temp);
+
+   bytetemp = rtl_read_byte(rtlpriv, maps[EFUSE_CTRL] + 3);
+   temp = bytetemp & 0x7F;
+   rtl_write_byte(rtlpriv, maps[EFUSE_CTRL] + 3, temp);
+
+   bytetemp = rtl_read_byte(rtlpriv

Re: [PATCH RFC iproute2-next v4] tc: add support for action act_ctinfo

2019-06-05 Thread Joe Perches
On Mon, 2019-06-03 at 14:50 +0100, Kevin Darbyshire-Bryant wrote:
> ctinfo is an action restoring data stored in conntrack marks to various
> fields.  At present it has two independent modes of operation,
> restoration of DSCP into IPv4/v6 diffserv and restoration of conntrack
> marks into packet skb marks.
[]
> v2 - fix whitespace issue in pkt_cls
>  fix most warnings from checkpatch - some lines still over 80 chars
>  due to long TLV names.
> v3 - fix some dangling else warnings.
>  refactor stats printing to please checkpatch.
>  send zone TLV even if default '0' zone.
>  now checkpatch clean even though I think some of the formatting
>  is horrible :-)

Strict 80 column limits with long identifiers are just silly.

I don't know how strictly enforced the iproute2 80 column limit
actually is, but I suggest ignoring that limit where appropriate.

e.g.:

> diff --git a/tc/m_ctinfo.c b/tc/m_ctinfo.c
[]
> +static int print_ctinfo(struct action_util *au, FILE *f, struct rtattr *arg)
> +{
[]
> + if (tb[TCA_CTINFO_PARMS_DSCP_MASK]) {
> + if (RTA_PAYLOAD(tb[TCA_CTINFO_PARMS_DSCP_MASK]) >=
> + sizeof(__u32))

I think code like this should just be single line.

> + if (tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]) {
> + if (RTA_PAYLOAD(tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]) >=
> + sizeof(__u32))
> + dscpstatemask = rta_getattr_u32(
> + tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]);

here too, etc...




Re: [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list

2019-08-01 Thread Joe Perches
On Thu, 2019-08-01 at 17:03 +0800, Hangbin Liu wrote:
> When setting lots of multicast list on ibmveth, e.g. add 3000 membership on a
> multicast group, the following error message flushes our log file
> 
> 8507[  901.478251] ibmveth 3003 env3: h_multicast_ctrl rc=4 when 
> adding an entry to the filter table
> ...
> 1718386 [ 5636.808658] ibmveth 3003 env3: h_multicast_ctrl rc=4 when 
> adding an entry to the filter table
> 
> We got 1.5 million lines of messages in 1.3h. Let's replace netdev_err() by
> net_err_ratelimited() to avoid this issue. I don't use netdev_err_once() in
> case h_multicast_ctrl() return different lpar_rc types.
> 
> Signed-off-by: Hangbin Liu 
> ---
>  drivers/net/ethernet/ibm/ibmveth.c | 8 +---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/ibm/ibmveth.c 
> b/drivers/net/ethernet/ibm/ibmveth.c
> index d654c234aaf7..3b9406a4ca92 100644
> --- a/drivers/net/ethernet/ibm/ibmveth.c
> +++ b/drivers/net/ethernet/ibm/ibmveth.c
> @@ -1446,9 +1446,11 @@ static void ibmveth_set_multicast_list(struct 
> net_device *netdev)
>  IbmVethMcastAddFilter,
>  mcast_addr);
>   if (lpar_rc != H_SUCCESS) {
> - netdev_err(netdev, "h_multicast_ctrl rc=%ld "
> -"when adding an entry to the filter "
> -"table\n", lpar_rc);
> + net_err_ratelimited("%s %s%s: h_multicast_ctrl 
> rc=%ld when adding an entry to the filter table\n",
> + ibmveth_driver_name,
> + netdev_name(netdev),
> + netdev_reg_state(netdev),
> + lpar_rc);

Perhaps add the netdev__ratelimited variants and use that instead

Somthing like:

---
 include/linux/netdevice.h | 54 +++
 1 file changed, 54 insertions(+)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 88292953aa6f..37116019e14f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4737,6 +4737,60 @@ do { 
\
 #define netdev_info_once(dev, fmt, ...) \
netdev_level_once(KERN_INFO, dev, fmt, ##__VA_ARGS__)
 
+#define netdev_level_ratelimited(netdev_level, dev, fmt, ...)  \
+do {   \
+   static DEFINE_RATELIMIT_STATE(_rs,  \
+ DEFAULT_RATELIMIT_INTERVAL,   \
+ DEFAULT_RATELIMIT_BURST); \
+   if (__ratelimit(&_rs))  \
+   netdev_level(dev, fmt, ##__VA_ARGS__);  \
+} while (0)
+
+#define netdev_emerg_ratelimited(dev, fmt, ...)
\
+   netdev_level_ratelimited(netdev_emerg, dev, fmt, ##__VA_ARGS__)
+#define netdev_alert_ratelimited(dev, fmt, ...)
\
+   netdev_level_ratelimited(netdev_alert, dev, fmt, ##__VA_ARGS__)
+#define netdev_crit_ratelimited(dev, fmt, ...) \
+   netdev_level_ratelimited(netdev_crit, dev, fmt, ##__VA_ARGS__)
+#define netdev_err_ratelimited(dev, fmt, ...)  \
+   netdev_level_ratelimited(netdev_err, dev, fmt, ##__VA_ARGS__)
+#define netdev_warn_ratelimited(dev, fmt, ...) \
+   netdev_level_ratelimited(netdev_warn, dev, fmt, ##__VA_ARGS__)
+#define netdev_notice_ratelimited(dev, fmt, ...)   \
+   netdev_level_ratelimited(netdev_notice, dev, fmt, ##__VA_ARGS__)
+#define netdev_info_ratelimited(dev, fmt, ...) \
+   netdev_level_ratelimited(netdev_info, dev, fmt, ##__VA_ARGS__)
+
+#if defined(CONFIG_DYNAMIC_DEBUG)
+/* descriptor check is first to prevent flooding with "callbacks suppressed" */
+#define netdev_dbg_ratelimited(dev, fmt, ...)  \
+do {   \
+   static DEFINE_RATELIMIT_STATE(_rs,  \
+ DEFAULT_RATELIMIT_INTERVAL,   \
+ DEFAULT_RATELIMIT_BURST); \
+   DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
+   if (DYNAMIC_DEBUG_BRANCH(descriptor) && \
+   __ratelimit(&_rs))  \
+   __dynamic_netdev_dbg(&descriptor, dev, fmt, \
+##__VA_ARGS__);\
+} while (0)
+#elif defined(DEBUG)
+#define netdev_dbg_

Re: [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list

2019-08-01 Thread Joe Perches
On Thu, 2019-08-01 at 22:10 +0800, Hangbin Liu wrote:
> On Thu, Aug 01, 2019 at 03:28:43AM -0700, Joe Perches wrote:
> > Perhaps add the netdev__ratelimited variants and use that instead
> > 
> > Somthing like:
> 
> Yes, that looks better. Do you mind if I take your code and add your
> Signed-off-by info?

Well, if you test and verify all the paths,
(I did not and just wrote that without testing),
you could add something like "Suggested-by:".

cheers, Joe

> Thanks
> Hangbin
> > ---
> >  include/linux/netdevice.h | 54 
> > +++
> >  1 file changed, 54 insertions(+)
> > 
> > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> > index 88292953aa6f..37116019e14f 100644
> > --- a/include/linux/netdevice.h
> > +++ b/include/linux/netdevice.h
> > @@ -4737,6 +4737,60 @@ do { 
> > \
> >  #define netdev_info_once(dev, fmt, ...) \
> > netdev_level_once(KERN_INFO, dev, fmt, ##__VA_ARGS__)
> >  
> > +#define netdev_level_ratelimited(netdev_level, dev, fmt, ...)  
> > \
> > +do {   
> > \
> > +   static DEFINE_RATELIMIT_STATE(_rs,  \
> > + DEFAULT_RATELIMIT_INTERVAL,   \
> > + DEFAULT_RATELIMIT_BURST); \
> > +   if (__ratelimit(&_rs))  \
> > +   netdev_level(dev, fmt, ##__VA_ARGS__);  \
> > +} while (0)
> > +
> > +#define netdev_emerg_ratelimited(dev, fmt, ...)
> > \
> > +   netdev_level_ratelimited(netdev_emerg, dev, fmt, ##__VA_ARGS__)
> > +#define netdev_alert_ratelimited(dev, fmt, ...)
> > \
> > +   netdev_level_ratelimited(netdev_alert, dev, fmt, ##__VA_ARGS__)
> > +#define netdev_crit_ratelimited(dev, fmt, ...) 
> > \
> > +   netdev_level_ratelimited(netdev_crit, dev, fmt, ##__VA_ARGS__)
> > +#define netdev_err_ratelimited(dev, fmt, ...)  
> > \
> > +   netdev_level_ratelimited(netdev_err, dev, fmt, ##__VA_ARGS__)
> > +#define netdev_warn_ratelimited(dev, fmt, ...) 
> > \
> > +   netdev_level_ratelimited(netdev_warn, dev, fmt, ##__VA_ARGS__)
> > +#define netdev_notice_ratelimited(dev, fmt, ...)   \
> > +   netdev_level_ratelimited(netdev_notice, dev, fmt, ##__VA_ARGS__)
> > +#define netdev_info_ratelimited(dev, fmt, ...) 
> > \
> > +   netdev_level_ratelimited(netdev_info, dev, fmt, ##__VA_ARGS__)
> > +
> > +#if defined(CONFIG_DYNAMIC_DEBUG)
> > +/* descriptor check is first to prevent flooding with "callbacks 
> > suppressed" */
> > +#define netdev_dbg_ratelimited(dev, fmt, ...)  
> > \
> > +do {   
> > \
> > +   static DEFINE_RATELIMIT_STATE(_rs,  \
> > + DEFAULT_RATELIMIT_INTERVAL,   \
> > + DEFAULT_RATELIMIT_BURST); \
> > +   DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
> > +   if (DYNAMIC_DEBUG_BRANCH(descriptor) && \
> > +   __ratelimit(&_rs))  \
> > +   __dynamic_netdev_dbg(&descriptor, dev, fmt, \
> > +##__VA_ARGS__);\
> > +} while (0)
> > +#elif defined(DEBUG)
> > +#define netdev_dbg_ratelimited(dev, fmt, ...)  
> > \
> > +do {   
> > \
> > +   static DEFINE_RATELIMIT_STATE(_rs,  \
> > + DEFAULT_RATELIMIT_INTERVAL,   \
> > + DEFAULT_RATELIMIT_BURST); \
> > +   if (__ratelimit(&_rs))  \
> > +   netdev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
> > +} while (0)
> > +#else
> > +#define netdev_dbg_ratelimited(dev, fmt, ...)  
> > \
> > +do {   
> > \
> > +   if (0)  \
> > +   netdev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
> > +} while (0)
> > +#endif
> > +
> >  #define MODULE_ALIAS_NETDEV(device) \
> > MODULE_ALIAS("netdev-" device)
> >  
> > 
> > 



Re: [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list

2019-08-01 Thread Joe Perches
On Thu, 2019-08-01 at 12:51 -0400, David Miller wrote:
> From: Hangbin Liu 
> Date: Thu,  1 Aug 2019 17:03:47 +0800
> 
> > When setting lots of multicast list on ibmveth, e.g. add 3000 membership on 
> > a
> > multicast group, the following error message flushes our log file
> > 
> > 8507[  901.478251] ibmveth 3003 env3: h_multicast_ctrl rc=4 when 
> > adding an entry to the filter table
> > ...
> > 1718386 [ 5636.808658] ibmveth 3003 env3: h_multicast_ctrl rc=4 when 
> > adding an entry to the filter table
> > 
> > We got 1.5 million lines of messages in 1.3h. Let's replace netdev_err() by
> > net_err_ratelimited() to avoid this issue. I don't use netdev_err_once() in
> > case h_multicast_ctrl() return different lpar_rc types.
> > 
> > Signed-off-by: Hangbin Liu 
> 
> Let's work on fixing what causes this problem, or adding a retry
> mechanism, rather than making the message less painful.
> 
> What is worse is that these failures are not in any way communicated
> back up the callchain to show that the operation didn't complete
> sucessfully.
> 
> This is a real mess in behavior and error handling, don't make it
> worse please.

That looks as though it could be quite a chore.

$ git grep -P '\bndo_set_rx_mode\s*=' | wc -l
326




Re: [PATCH net] ibmveth: Convert multicast list size for little-endian systems

2019-08-12 Thread Joe Perches
On Mon, 2019-08-12 at 12:43 -0500, Thomas Falcon wrote:
> The ibm,mac-address-filters property defines the maximum number of
> addresses the hypervisor's multicast filter list can support. It is
> encoded as a big-endian integer in the OF device tree, but the virtual
> ethernet driver does not convert it for use by little-endian systems.
> As a result, the driver is not behaving as it should on affected systems
> when a large number of multicast addresses are assigned to the device.
> 
> Reported-by: Hangbin Liu 
> Signed-off-by: Thomas Falcon 
> ---
>  drivers/net/ethernet/ibm/ibmveth.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/ibm/ibmveth.c 
> b/drivers/net/ethernet/ibm/ibmveth.c
> index d654c23..b50a6cf 100644
> --- a/drivers/net/ethernet/ibm/ibmveth.c
> +++ b/drivers/net/ethernet/ibm/ibmveth.c
> @@ -1645,7 +1645,7 @@ static int ibmveth_probe(struct vio_dev *dev, const 
> struct vio_device_id *id)
>  
>   adapter->vdev = dev;
>   adapter->netdev = netdev;
> - adapter->mcastFilterSize = *mcastFilterSize_p;
> + adapter->mcastFilterSize = be32_to_cpu(*mcastFilterSize_p);
>   adapter->pool_config = 0;
>  
>   netif_napi_add(netdev, &adapter->napi, ibmveth_poll, 16);

Perhaps to keep sparse happy too: (untested)
---
 drivers/net/ethernet/ibm/ibmveth.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmveth.c 
b/drivers/net/ethernet/ibm/ibmveth.c
index d654c234aaf7..90539d7ce565 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1605,7 +1605,7 @@ static int ibmveth_probe(struct vio_dev *dev, const 
struct vio_device_id *id)
struct net_device *netdev;
struct ibmveth_adapter *adapter;
unsigned char *mac_addr_p;
-   unsigned int *mcastFilterSize_p;
+   __be32 *mcastFilterSize_p;
long ret;
unsigned long ret_attr;
 
@@ -1627,7 +1627,7 @@ static int ibmveth_probe(struct vio_dev *dev, const 
struct vio_device_id *id)
return -EINVAL;
}
 
-   mcastFilterSize_p = (unsigned int *)vio_get_attribute(dev,
+   mcastFilterSize_p = (__be32 *)vio_get_attribute(dev,
VETH_MCAST_FILTER_SIZE, NULL);
if (!mcastFilterSize_p) {
dev_err(&dev->dev, "Can't find VETH_MCAST_FILTER_SIZE "
@@ -1645,7 +1645,7 @@ static int ibmveth_probe(struct vio_dev *dev, const 
struct vio_device_id *id)
 
adapter->vdev = dev;
adapter->netdev = netdev;
-   adapter->mcastFilterSize = *mcastFilterSize_p;
+   adapter->mcastFilterSize = be32_to_cpu(*mcastFilterSize_p);
adapter->pool_config = 0;
 
netif_napi_add(netdev, &adapter->napi, ibmveth_poll, 16);




Re: [Intel-wired-lan] [net-next] net: iavf: Use the ARRAY_SIZE macro for aq_to_posix

2021-01-14 Thread Joe Perches
On Thu, 2021-01-14 at 09:57 +, Jankowski, Konrad0 wrote:
> > -Original Message-
> > From: Intel-wired-lan  On Behalf Of Wei 
> > Xu
[]
> > Use the ARRAY_SIZE macro to calculate the size of an array.
> > This code was detected with the help of Coccinelle.
[]
> > diff --git a/drivers/net/ethernet/intel/iavf/iavf_adminq.h
[]
> > @@ -120,7 +120,7 @@ static inline int iavf_aq_rc_to_posix(int aq_ret, int 
> > aq_rc)
> >     if (aq_ret == IAVF_ERR_ADMIN_QUEUE_TIMEOUT)
> >     return -EAGAIN;
> > 
> > -   if (!((u32)aq_rc < (sizeof(aq_to_posix) / sizeof((aq_to_posix)[0]
> > +   if (!((u32)aq_rc < ARRAY_SIZE(aq_to_posix)))
> >     return -ERANGE;
> > 
> >     return aq_to_posix[aq_rc];
> 
> Tested-by: Konrad Jankowski 

I think several things are poor here.

This function shouldn't really be a static inline as it would just bloat
whatever uses it and should just be a typical function in a utility .c file.

And it doesn't seem this function is used at all so it should be deleted.

aq_to_posix should be static const.

And if it's really necessary, I think it would be simpler to read using code
without the cast and negation.

if (aq_rc < 0 || aq_rc >= ARRAY_SIZE(aq_to_posix))
return -ERANGE;





Re: [PATCH] arcnet: fix macro name when DEBUG is defined

2021-01-17 Thread Joe Perches
On Sun, 2021-01-17 at 10:15 -0800, t...@redhat.com wrote:
> From: Tom Rix 
> 
> When DEBUG is defined this error occurs
> 
> drivers/net/arcnet/com20020_cs.c:70:15: error: ‘com20020_REG_W_ADDR_HI’
>   undeclared (first use in this function);
>   did you mean ‘COM20020_REG_W_ADDR_HI’?
>    ioaddr, com20020_REG_W_ADDR_HI);
>    ^~
> 
> From reviewing the context, the suggestion is what is meant.
> 
> Fixes: 0fec65130b9f ("arcnet: com20020: Use arcnet_ routines")

Nice find thanks, especially seeing as how this hasn't been tested or
compiled in 5+ years...

commit 0fec65130b9f11a73d74f47025491f97f82ba070
Author: Joe Perches 
        Date:   Tue May 5 10:06:06 2015 -0700

Acked-by: Joe Perches 

> Signed-off-by: Tom Rix 
> ---
>  drivers/net/arcnet/com20020_cs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/arcnet/com20020_cs.c 
> b/drivers/net/arcnet/com20020_cs.c
> index cf607ffcf358..81223f6bebcc 100644
> --- a/drivers/net/arcnet/com20020_cs.c
> +++ b/drivers/net/arcnet/com20020_cs.c
> @@ -67,7 +67,7 @@ static void regdump(struct net_device *dev)
>   /* set up the address register */
>   count = 0;
>   arcnet_outb((count >> 8) | RDDATAflag | AUTOINCflag,
> - ioaddr, com20020_REG_W_ADDR_HI);
> + ioaddr, COM20020_REG_W_ADDR_HI);
>   arcnet_outb(count & 0xff, ioaddr, COM20020_REG_W_ADDR_LO);
>  
> 
>   for (count = 0; count < 256 + 32; count++) {




Re: [PATCH 0/3] dwarves,libbpf: Add support to use optional extended section index table

2021-01-19 Thread Joe Lawrence
On Tue, Jan 19, 2021 at 11:12:17PM +0100, Jiri Olsa wrote:
> hi,
> kpatch guys hit an issue with pahole over their vmlinux, which
> contains many (over 10) sections, pahole crashes.
> 

FWIW this is probably only going to be problem when building the kernel
with -f[function|data]-sections and tipping over 65536 sections.  We
only use these option to determine code deltas, but other users
(FG-ASLR, LTO?) may need to actually build runtime code.

> With so many sections, ELF is using extended section index table,
> which is used to hold values for some of the indexes and extra
> code is needed to retrieve them.
> 
> This patchset adds the support for pahole to properly read string
> table index and symbol's section index, which are used in btf_encoder.
> 
> This patchset also adds support for libbpf to properly parse .BTF
> section on such object.
> 
> This patchset based on previously posted fix [1].
> 

Hi Jiri,

Thanks for posting a potential fix, here's what I saw when running it:

1-Installed your scratch build:

% rpm -q --whatprovides $(which pahole)
dwarves-1.19-2.el8.x86_64


2-From the kernel build:

  LD  vmlinux.o
  MODPOST vmlinux.o
  BTF .btf.vmlinux.bin.o
scripts/link-vmlinux.sh: line 127: 1851330 Segmentation fault  (core 
dumped) LLVM_OBJCOPY=${OBJCOPY} ${PAHOLE} -J ${1}
objcopy: --change-section-vma .BTF=0x never used
objcopy: --change-section-lma .BTF=0x never used
objcopy: error: the input file '.btf.vmlinux.bin' is empty
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF
make: *** [Makefile:1050: vmlinux] Error 1


3-coredump backtrace:
...
Core was generated by `pahole -J .tmp_vmlinux.btf'.
...
(gdb) bt
#0  0x7fc0e81e31c0 in __memcpy_ssse3 () from /lib64/libc.so.6
#1  0x7fc0e8b6700a in memcpy (__len=306248, __src=, 
__dest=0x7fc0e91a0010) at /usr/include/bits/string_fortified.h:34
#2  get_vmlinux_addrs (btfe=, pcount=, 
paddrs=, fl=)
at /usr/src/debug/dwarves-1.19-2.el8.x86_64/btf_encoder.c:167
#3  setup_functions (fl=, btfe=) at 
/usr/src/debug/dwarves-1.19-2.el8.x86_64/btf_encoder.c:251
#4  collect_symbols (collect_percpu_vars=, btfe=)
at /usr/src/debug/dwarves-1.19-2.el8.x86_64/btf_encoder.c:645
#5  cu__encode_btf (cu=, verbose=0, force=false, 
skip_encoding_vars=)
at /usr/src/debug/dwarves-1.19-2.el8.x86_64/btf_encoder.c:694
#6  0x55eb2e4b6cc5 in pahole_stealer (cu=0x55eb2ecbb920, 
conf_load=)
at /usr/src/debug/dwarves-1.19-2.el8.x86_64/pahole.c:2402
#7  0x7fc0e8b6d2db in finalize_cu_immediately (conf=0x55eb2e6bc0e0 
, dcu=0x7ffd88fda9d0, cu=0x55eb2ecbb920, 
cus=0x55eb2ecbb5d0) at 
/usr/src/debug/dwarves-1.19-2.el8.x86_64/dwarf_loader.c:2477
#8  cus__load_module (cus=cus@entry=0x55eb2ecbb5d0, conf=0x55eb2e6bc0e0 
, mod=mod@entry=0x55eb2ecbb5f0, dw=0x55eb2ecbe6a0, 
elf=elf@entry=0x7fc0ad941010, filename=0x7ffd8905b98d ".tmp_vmlinux.btf")
at /usr/src/debug/dwarves-1.19-2.el8.x86_64/dwarf_loader.c:2477
#9  0x7fc0e8b6d5c5 in cus__process_dwflmod (dwflmod=0x55eb2ecbb5f0, 
userdata=, name=, 
base=, arg=0x7ffd8905ab00) at 
/usr/src/debug/dwarves-1.19-2.el8.x86_64/dwarf_loader.c:2522
#10 0x7fc0e88f9c71 in dwfl_getmodules () from /lib64/libdw.so.1
#11 0x7fc0e8b69cdc in cus__process_file (filename=, fd=5, 
conf=0x55eb2e6bc0e0 , cus=0x55eb2ecbb5d0)
at /usr/src/debug/dwarves-1.19-2.el8.x86_64/dwarf_loader.c:2575
#12 dwarf__load_file (cus=0x55eb2ecbb5d0, conf=0x55eb2e6bc0e0 , 
filename=)
at /usr/src/debug/dwarves-1.19-2.el8.x86_64/dwarf_loader.c:2592
#13 0x7fc0e8b5cb82 in cus__load_file (cus=cus@entry=0x55eb2ecbb5d0, 
conf=conf@entry=0x55eb2e6bc0e0 , 
filename=0x7ffd8905b98d ".tmp_vmlinux.btf") at 
/usr/src/debug/dwarves-1.19-2.el8.x86_64/dwarves.c:1963
#14 0x7fc0e8b5ce29 in cus__load_files (cus=0x55eb2ecbb5d0, 
conf=0x55eb2e6bc0e0 , filenames=0x7ffd8905aea8)
at /usr/src/debug/dwarves-1.19-2.el8.x86_64/dwarves.c:2324
#15 0x55eb2e4b371e in main (argc=3, argv=0x7ffd8905ae98) at 
/usr/src/debug/dwarves-1.19-2.el8.x86_64/pahole.c:2760


I uploaded a gzipped core file here:
http://people.redhat.com/~jolawren/coredump.gz

If it's easier to get you setup on a repro system, let me know and I can
do that.

Thanks,

-- Joe



[PATCH] checkpatch: Add kmalloc_array_node to unnecessary OOM message check

2021-01-22 Thread Joe Perches
commit 5799b255c491 ("include/linux/slab.h: add kmalloc_array_node() and
kcalloc_node()") was added in 2017.  Update the unnecessary OOM message
test to include it.

Signed-off-by: Joe Perches 
Reported-by: Jakub Kicinski 
---

Maybe not worth fixing, but no real effort to fix either.

 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4f8494527139..8dbf1986a8de 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -487,7 +487,7 @@ our $logFunctions = qr{(?x:
 
 our $allocFunctions = qr{(?x:
(?:(?:devm_)?
-   (?:kv|k|v)[czm]alloc(?:_node|_array)? |
+   (?:kv|k|v)[czm]alloc(?:_array)?(?:_node)? |
kstrdup(?:_const)? |
kmemdup(?:_nul)?) |
(?:\w+)?alloc_skb(?:_ip_align)? |



Re: [PATCH wireless -next] cw1200: txrx: convert comma to semicolon

2020-12-10 Thread Joe Perches
On Thu, 2020-12-10 at 18:50 +, Kalle Valo wrote:
> Zheng Yongjun  wrote:
> 
> > Replace a comma between expression statements by a semicolon.
> > 
> > Signed-off-by: Zheng Yongjun 
> 
> Patch applied to wireless-drivers-next.git, thanks.
> 
> c42d492c672a cw1200: txrx: convert comma to semicolon
> 

There's are several of these in drivers/net/wireless:

Using a cocci script posted by Julia:
---
diff -u -p a/mediatek/mt76/mt7915/mcu.c b/mediatek/mt76/mt7915/mcu.c
--- a/mediatek/mt76/mt7915/mcu.c
+++ b/mediatek/mt76/mt7915/mcu.c
@@ -1148,7 +1148,7 @@ mt7915_mcu_sta_ba_tlv(struct sk_buff *sk
tlv = mt7915_mcu_add_tlv(skb, STA_REC_BA, sizeof(*ba));
 
ba = (struct sta_rec_ba *)tlv;
-   ba->ba_type = tx ? MT_BA_TYPE_ORIGINATOR : MT_BA_TYPE_RECIPIENT,
+   ba->ba_type = tx ? MT_BA_TYPE_ORIGINATOR : MT_BA_TYPE_RECIPIENT;
ba->winsize = cpu_to_le16(params->buf_size);
ba->ssn = cpu_to_le16(params->ssn);
ba->ba_en = enable << params->tid;
@@ -1676,7 +1676,7 @@ mt7915_mcu_wtbl_ht_tlv(struct sk_buff *s
tlv = mt7915_mcu_add_nested_tlv(skb, WTBL_VHT, sizeof(*vht),
wtbl_tlv, sta_wtbl);
vht = (struct wtbl_vht *)tlv;
-   vht->ldpc = sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC,
+   vht->ldpc = sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC;
vht->vht = true;
 
af = 
FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK,
@@ -2858,7 +2858,7 @@ int mt7915_mcu_init(struct mt7915_dev *d
};
int ret;
 
-   dev->mt76.mcu_ops = &mt7915_mcu_ops,
+   dev->mt76.mcu_ops = &mt7915_mcu_ops;
 
ret = mt7915_driver_own(dev);
if (ret)
diff -u -p a/mediatek/mt76/mt7615/usb_mcu.c b/mediatek/mt76/mt7615/usb_mcu.c
--- a/mediatek/mt76/mt7615/usb_mcu.c
+++ b/mediatek/mt76/mt7615/usb_mcu.c
@@ -61,7 +61,7 @@ int mt7663u_mcu_init(struct mt7615_dev *
};
int ret;
 
-   dev->mt76.mcu_ops = &mt7663u_mcu_ops,
+   dev->mt76.mcu_ops = &mt7663u_mcu_ops;
 
/* usb does not support runtime-pm */
clear_bit(MT76_STATE_PM, &dev->mphy.state);
diff -u -p a/mediatek/mt76/mt7615/mcu.c b/mediatek/mt76/mt7615/mcu.c
--- a/mediatek/mt76/mt7615/mcu.c
+++ b/mediatek/mt76/mt7615/mcu.c
@@ -982,7 +982,7 @@ mt7615_mcu_sta_ba_tlv(struct sk_buff *sk
tlv = mt7615_mcu_add_tlv(skb, STA_REC_BA, sizeof(*ba));
 
ba = (struct sta_rec_ba *)tlv;
-   ba->ba_type = tx ? MT_BA_TYPE_ORIGINATOR : MT_BA_TYPE_RECIPIENT,
+   ba->ba_type = tx ? MT_BA_TYPE_ORIGINATOR : MT_BA_TYPE_RECIPIENT;
ba->winsize = cpu_to_le16(params->buf_size);
ba->ssn = cpu_to_le16(params->ssn);
ba->ba_en = enable << params->tid;
@@ -2472,7 +2472,7 @@ int mt7615_mcu_init(struct mt7615_dev *d
};
int ret;
 
-   dev->mt76.mcu_ops = &mt7615_mcu_ops,
+   dev->mt76.mcu_ops = &mt7615_mcu_ops;
 
ret = mt7615_mcu_drv_pmctrl(dev);
if (ret)
diff -u -p a/mediatek/mt76/mt7615/sdio_mcu.c b/mediatek/mt76/mt7615/sdio_mcu.c
--- a/mediatek/mt76/mt7615/sdio_mcu.c
+++ b/mediatek/mt76/mt7615/sdio_mcu.c
@@ -139,7 +139,7 @@ int mt7663s_mcu_init(struct mt7615_dev *
if (ret)
return ret;
 
-   dev->mt76.mcu_ops = &mt7663s_mcu_ops,
+   dev->mt76.mcu_ops = &mt7663s_mcu_ops;
 
ret = mt76_get_field(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY);
if (ret) {
diff -u -p a/st/cw1200/txrx.c b/st/cw1200/txrx.c
--- a/st/cw1200/txrx.c
+++ b/st/cw1200/txrx.c
@@ -650,7 +650,7 @@ cw1200_tx_h_rate_policy(struct cw1200_co
wsm->flags |= t->txpriv.rate_id << 4;
 
t->rate = cw1200_get_tx_rate(priv,
-   &t->tx_info->control.rates[0]),
+   &t->tx_info->control.rates[0]);
wsm->max_tx_rate = t->rate->hw_value;
if (t->rate->flags & IEEE80211_TX_RC_MCS) {
if (cw1200_ht_greenfield(&priv->ht_info))
diff -u -p a/intersil/prism54/islpci_dev.c b/intersil/prism54/islpci_dev.c
--- a/intersil/prism54/islpci_dev.c
+++ b/intersil/prism54/islpci_dev.c
@@ -121,7 +121,7 @@ isl_upload_firmware(islpci_private *priv
while (_fw_len > 0) {
/* use non-swapping writel() */
__raw_writel(*fw_ptr, dev_fw_ptr);
-   fw_ptr++, dev_fw_ptr++;
+   fw_ptr++; dev_fw_ptr++;
_fw_len -= 4;
}
 
diff -u -p a/intel/iwlwifi/mvm/debugfs.c b/intel/iwlwifi/mvm/debugfs.c
--- a/intel/iwlwifi/mvm/debugfs.c
+++ b/intel/iwlwifi/mvm/debugfs.c
@@ -1949,7 +1949,7 @@ static ssize_t iwl_dbgfs_mem_write(struc
return -EFAULT;
}
 
-   hcmd.flags = CMD_WANT_SKB | CMD_SEND_IN_RFKILL,
+   hcmd.flags = CMD_WANT_SKB | CMD_SEND_IN_RFKILL;
hcmd.data[0] = (void *)cmd;
hcmd.len[0] = cmd_size;
 
diff -u -p a/ralink/rt2x00/rt2800lib

Re: [PATCH] net/mlx4: Use true,false for bool variable

2020-12-11 Thread Joe Perches
On Fri, 2020-12-11 at 11:05 +0100, Vasyl Gomonovych wrote:
> Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable
> Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable
[]
> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c 
> b/drivers/net/ethernet/mellanox/mlx4/main.c
[]
> @@ -4462,7 +4462,7 @@ static int __init mlx4_verify_params(void)
>   pr_warn("mlx4_core: log_num_vlan - obsolete module param, using 
> %d\n",
>   MLX4_LOG_NUM_VLANS);
>  
> 
> - if (use_prio != 0)
> + if (use_prio != false)
>   pr_warn("mlx4_core: use_prio - obsolete module param, 
> ignored\n");

Generally, assuming use_prio is bool, this would be written

if (use_prio)
pr_warn("etc...")




Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-12-13 Thread Joe Perches
On Sun, 2020-12-13 at 11:21 -0800, Tom Rix wrote:
> On 12/2/20 2:34 PM, Nick Desaulniers wrote:
> > On Tue, Nov 10, 2020 at 2:04 PM Joe Perches  wrote:
> > > On Tue, 2020-11-10 at 14:00 -0800, Nick Desaulniers wrote:
> > > 
> > > > Yeah, we could go through and remove %h and %hh to solve this, too, 
> > > > right?
> > > Yup.
> > > 
> > > I think one of the checkpatch improvement mentees is adding
> > > some suggestion and I hope an automated fix mechanism for that.
> > > 
> > > https://lore.kernel.org/lkml/5e3265c241602bb54286fbaae9222070daa4768e.ca...@perches.com/
> > + Tom, who's been looking at leveraging clang-tidy to automate such
> > treewide mechanical changes.
> > ex. https://reviews.llvm.org/D91789
> > 
> > See also commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging
> > use of unnecessary %h[xudi] and %hh[xudi]") for a concise summary of
> > related context.
> 
> I have posted the fixer here
> 
> https://reviews.llvm.org/D93182
> 
> It catches about 200 problems in 100 files, I'll be posting these soon.

Thanks, but see below:
 
> clang-tidy-fix's big difference over checkpatch is using the __printf(x,y) 
> attribute to find the log functions.
> 
> I will be doing a follow-on to add the missing __printf or __scanf's and 
> rerunning the fixer.

scanf should not be tested because the %h use is required there.




Re: [PATCH v2] net/mlx4: Use true,false for bool variable

2020-12-14 Thread Joe Perches
On Mon, 2020-12-14 at 11:03 -0800, Jakub Kicinski wrote:
> On Mon, 14 Dec 2020 13:16:08 +0200 Leon Romanovsky wrote:
> > On Mon, Dec 14, 2020 at 11:30:08AM +0100, Vasyl Gomonovych wrote:
> > > It is fix for semantic patch warning available in
> > > scripts/coccinelle/misc/boolinit.cocci
> > > Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable
> > > Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable
> > > 
> > > Signed-off-by: Vasyl Gomonovych 
> > > ---
> > >  - Add coccicheck script name
> > >  - Simplify if condition
> > > ---
> > >  drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +-
> > >  drivers/net/ethernet/mellanox/mlx4/main.c  | 2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)  
> > 
> > Please refrain from sending new version of patches as reply-to to
> > previous variants. It makes to appear previous patches out-of-order
> > while viewing in threaded mode.
> 
> Yes, please! I'm glad I'm not the only one who feels this way! :)

I'm the other way.

I prefer revisions to single patches (as opposed to large patch series)
in the same thread.

There is no other easy way for changes to a patch to be tracked AFAIK.

Most email clients use both In-Reply-To: and References: headers as
the mechanism to thread replies.

Keeping the latest messages at the bottom of a thread works well
to see revision sequences.




Re: [PATCH v2] net/mlx4: Use true,false for bool variable

2020-12-14 Thread Joe Perches
On Tue, 2020-12-15 at 07:18 +0200, Leon Romanovsky wrote:
> On Mon, Dec 14, 2020 at 11:15:01AM -0800, Joe Perches wrote:
> > I prefer revisions to single patches (as opposed to large patch series)
> > in the same thread.
> 
> It depends which side you are in that game. From the reviewer point of
> view, such submission breaks flow very badly. It unfolds the already
> reviewed thread, messes with the order and many more little annoying
> things.

This is where I disagree with you.  I am a reviewer here.

Not having context to be able to inspect vN -> vN+1 is made
more difficult not having the original patch available and
having to search history for it.

Almost no one adds URL links to older submissions below the ---.

Were that a standard mechanism below the --- line, then it would
be OK.



Re: [PATCH] atm: horizon: remove h from printk format specifier

2020-12-15 Thread Joe Perches
On Tue, 2020-12-15 at 06:24 -0800, t...@redhat.com wrote:
> From: Tom Rix 
> 
> See Documentation/core-api/printk-formats.rst.
> h should no longer be used in the format specifier for printk.
> 
> Signed-off-by: Tom Rix 
> ---
>  drivers/atm/horizon.c | 6 +++---

Chas?

Madge has been out of business for a couple decades now.

I doubt anyone does but does anyone actually use this driver or
even have working hardware?

If not, how about just deleting this driver altogether instead?

from horizon.h:

/*
  Madge Horizon ATM Adapter driver.
  Copyright (C) 1995-1999  Madge Networks Ltd.

*/

/*
  IMPORTANT NOTE: Madge Networks no longer makes the adapters
  supported by this driver and makes no commitment to maintain it.
*/


> diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
[]
> @@ -1609,7 +1609,7 @@ static int hrz_send (struct atm_vcc * atm_vcc, struct 
> sk_buff * skb) {
>  if (*s++ == 'D') {
>   for (i = 0; i < 4; ++i)
>   d = (d << 4) | hex_to_bin(*s++);
> -  PRINTK (KERN_INFO, "debug bitmap is now %hx", debug = d);
> +  PRINTK (KERN_INFO, "debug bitmap is now %x", debug = d);

An IMO ugly assignment in a printk too.




Re: [PATCH net] MAINTAINERS: remove names from mailing list maintainers

2020-12-19 Thread Joe Perches

On 2020-12-19 10:55, Jakub Kicinski wrote:

When searching for inactive maintainers it's useful to filter
out mailing list addresses. Such "maintainers" will obviously
never feature in a "From:" line of an email or a review tag.

Since "L:" entries only provide the address of a mailing list
without a fancy name extend this pattern to "M:" entries.



As these are not actual people I suggest using
R: entries and not removing the more descriptive names.


Re: [PATCH net] MAINTAINERS: remove names from mailing list maintainers

2020-12-23 Thread Joe Perches
On Wed, 2020-12-23 at 02:50 +, patchwork-bot+netdev...@kernel.org
wrote:
> Hello:
> 
> This patch was applied to netdev/net.git (refs/heads/master):
> 
> On Sat, 19 Dec 2020 10:55:38 -0800 you wrote:
> > When searching for inactive maintainers it's useful to filter
> > out mailing list addresses. Such "maintainers" will obviously
> > never feature in a "From:" line of an email or a review tag.
> > 
> > Since "L:" entries only provide the address of a mailing list
> > without a fancy name extend this pattern to "M:" entries.
> > 
> > [...]
> 
> Here is the summary with links:
>   - [net] MAINTAINERS: remove names from mailing list maintainers
> https://git.kernel.org/netdev/net/c/8b0f64b113d6
> 
> You are awesome, thank you!

I still think this is not a good patch nor mechanism to
show what is generally used as exploders rather than
individuals.

Effectively only individuals can submit patches and so
can be M: Maintainers.

I believe these entries should really use R: Reviewer
entries and keep the descriptive naming content.

The descriptive naming does add value and this patch
loses that value.





Re: [PATCH] [v9] wireless: Initial driver submission for pureLiFi STA devices

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 10:39 +0530, Srinivasan Raju wrote:
> This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC
> and LiFi-XL USB devices.

The below is a trivial readability possible enhancement and should not
hinder this patch being applied.

> diff --git a/drivers/net/wireless/purelifi/dbgfs.c 
> b/drivers/net/wireless/purelifi/dbgfs.c
[]
> +ssize_t purelifi_store_frequency(struct device *dev,
> +  struct device_attribute *attr,
> +  const char *buf,
> +  size_t len)
> +{
> + int i, r, row, col, predivider, feedback_divider, output_div_0;
> + int output_div_1, output_div_2, clkout3_phase;
> + char values[6][4] = {{0}, {0} };
> + char usr_input[8] = {0};
> + bool valid = false;
> + int rv = 0;
> +
> + row = 0; col = 0;
> + for (i = 0; i < min(len, sizeof(values)); i++) {
> + values[row][col] = buf[i];
> + col++;
> + if (buf[i] == 0x20) {
> + row++;
> + col = 0;
> + } else if (buf[i] == 0x0A) {
> + if (row == 5 && col > 0) {
> + rv = sscanf((char *)&values[0][0],
> + "%d", &predivider);

Aren't the casts to (char *) redundant ?

> + if (rv != 1)
> + valid = false;
> + rv = sscanf((char *)&values[1][0],
> + "%d", &feedback_divider);
> + if (rv != 1)
> + valid = false;
> + rv = sscanf((char *)&values[2][0],
> + "%d", &output_div_0);
> + if (rv != 1)
> + valid = false;
> + rv = sscanf((char *)&values[3][0],
> + "%d", &output_div_1);
> + if (rv != 1)
> + valid = false;
> + rv = sscanf((char *)&values[4][0],
> + "%d", &output_div_2);
> + if (rv != 1)
> + valid = false;
> + rv = sscanf((char *)&values[5][0],
> + "%d", &clkout3_phase);
> + if (rv != 1)
> + valid = false;
> + valid = true;

trivia: this might be more intelligible with an array and a loop

int *index[] = {
&predivider,
&feedback_divider,
&output_div_0,
&output_div_1,
&output_div_2,
&clkout3_phase
};

valid = true;
i = 0;
while (valid && i < ARRAY_SIZE(index)) {
if (sscanf(&values[i][0], "%d", index[i]) != 1)
valid = false;
i++;
}

> +
> + break;
> + }
> + }
> + }
> +
> + if (valid) {
> + usr_input[0] = (char)predivider;
> + usr_input[1] = (char)feedback_divider;
> + usr_input[2] = (char)output_div_0;
> + usr_input[3] = (char)output_div_1;
> + usr_input[4] = (char)output_div_2;
> + usr_input[5] = (char)clkout3_phase;
> +
> + dev_info(dev, "options IP_DIV: %d VCO_MULT: %d OP_DIV_PHY: %d",
> +  usr_input[0], usr_input[1], usr_input[2]);
> + dev_info(dev, "OP_DIV_CPU: %d OP_DIV_USB: %d CLK3_PH: %d\n",
> +  usr_input[3], usr_input[4], usr_input[5]);
> +
> + r = usb_write_req((const u8 *)&usr_input[0],
> +   sizeof(usr_input), USB_REQ_SET_FREQ);
> + if (r < 0)
> + dev_err(dev, "SET_FREQ failed (%d)\n", r);
> + } else {
> + dev_err(dev, "Your options are invalid\n");
> + }
> +
> + return len;
> +}





Re: [PATCH AUTOSEL 5.9 22/33] vhost scsi: add lun parser helper

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 10:49 -0500, Sasha Levin wrote:
> On Fri, Dec 04, 2020 at 09:27:28AM +0100, Paolo Bonzini wrote:
> > On 01/12/20 00:59, Sasha Levin wrote:
> > > 
> > > It's quite easy to NAK a patch too, just reply saying "no" and it'll be
> > > dropped (just like this patch was dropped right after your first reply)
> > > so the burden on maintainers is minimal.
> > 
> > The maintainers are _already_ marking patches with "Cc: stable".  That 
> 
> They're not, though. Some forget, some subsystems don't mark anything,
> some don't mark it as it's not stable material when it lands in their
> tree but then it turns out to be one if it sits there for too long.
> 
> > (plus backports) is where the burden on maintainers should start and 
> > end.  I don't see the need to second guess them.
> 
> This is similar to describing our CI infrastructure as "second
> guessing": why are we second guessing authors and maintainers who are
> obviously doing the right thing by testing their patches and reporting
> issues to them?
> 
> Are you saying that you have always gotten stable tags right? never
> missed a stable tag where one should go?

I think this simply adds to the burden of being a maintainer
without all that much value.

I think the primary value here would be getting people to upgrade to
current versions rather than backporting to nominally stable and
relatively actively changed old versions.

This is very much related to this thread about trivial patches
and maintainer burdening:

https://lore.kernel.org/lkml/1c7d7fde126bc0acf825766de64bf2f9b888f216.ca...@hansenpartnership.com/




Re: [PATCH 1/7] net: 8021q: remove unneeded MODULE_VERSION() usage

2020-12-05 Thread Joe Perches
On Fri, 2020-12-04 at 16:09 -0800, Jakub Kicinski wrote:
> On Wed,  2 Dec 2020 13:49:53 +0100 Enrico Weigelt, metux IT consult
> wrote:
> > Remove MODULE_VERSION(), as it isn't needed at all: the only version
> > making sense is the kernel version.
> > 
> > Signed-off-by: Enrico Weigelt, metux IT consult 
> 
> Thanks for the patches. Please drop the "metux IT consult" from the
> addresses. The from space is supposed to be for your name.

If you _really_ want this superfluous 'metux IT consult' content in your
signature, and I don't think you should, use parentheses around it.

Enrico Weigelt (metux IT consult) 

Using a comma makes copy/paste into an email client think it's two addresses.





Re: [PATCH] net/core: use xx_zalloc instead xx_alloc and memset

2020-11-18 Thread Joe Perches
On Wed, 2020-11-18 at 16:15 +0800, Tian Tao wrote:
> use kmem_cache_zalloc instead kmem_cache_alloc and memset.
[]
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
[]
> @@ -313,12 +313,10 @@ struct sk_buff *__build_skb(void *data, unsigned int 
> frag_size)
>  {
>   struct sk_buff *skb;
>  
> - skb = kmem_cache_alloc(skbuff_head_cache, GFP_ATOMIC);
> + skb = kmem_cache_zalloc(skbuff_head_cache, GFP_ATOMIC);
>   if (unlikely(!skb))
>   return NULL;
>  
> - memset(skb, 0, offsetof(struct sk_buff, tail));
> -
>   return __build_skb_around(skb, data, frag_size);
>  }
>  
> 
> @@ -6170,12 +6168,10 @@ static void *skb_ext_get_ptr(struct skb_ext *ext, 
> enum skb_ext_id id)
>   */
>  struct skb_ext *__skb_ext_alloc(gfp_t flags)
>  {
> - struct skb_ext *new = kmem_cache_alloc(skbuff_ext_cache, flags);
> + struct skb_ext *new = kmem_cache_zalloc(skbuff_ext_cache, flags);
>  
> - if (new) {
> - memset(new->offset, 0, sizeof(new->offset));
> + if (new)
>   refcount_set(&new->refcnt, 1);
> - }
>  
>   return new;
>  }

I think it'd be nicer to use the same form for both of these functions.
This could be:

struct skb_ext *__skb_ext_alloc(gfp_t flags)
{
struct skb_ext *new;

new = kmem_cache_zalloc(skbbuff_ext_cache, flags);
if (unlikely(!new))
return NULL;

refcount_set(&new->refcnt, 1);

return new;
}




Re: XDP maintainer match (Was [PATCH v2 0/2] hwmon: (max127) Add Maxim MAX127 hardware monitoring)

2020-11-19 Thread Joe Perches
On Thu, 2020-11-19 at 17:35 +0100, Jesper Dangaard Brouer wrote:
> On Thu, 19 Nov 2020 07:46:34 -0800 Jakub Kicinski  wrote:

> I think it is a good idea to change the keyword (K:), but I'm not sure
> this catch what we want, maybe it does.  The pattern match are meant to
> catch drivers containing XDP related bits.
> 
> Previously Joe Perches  suggested this pattern match,
> which I don't fully understand... could you explain Joe?
> 
>   (?:\b|_)xdp(?:\b|_)

This regex matches only:

xdp
xdp_
_xdp_
_xdp

> For the filename (N:) regex match, I'm considering if we should remove
> it and list more files explicitly.  I think normal glob * pattern
> works, which should be sufficient.

Lists are generally more specific than regex globs.




Re: [PATCH net-next] MAINTAINERS: Update XDP and AF_XDP entries

2020-11-19 Thread Joe Perches
On Thu, 2020-11-19 at 21:50 +0100, Jesper Dangaard Brouer wrote:
> On Thu, 19 Nov 2020 10:02:10 -0800
> Jakub Kicinski  wrote:
> 
> > On Thu, 19 Nov 2020 18:26:40 +0100 Jesper Dangaard Brouer wrote:
> > > Getting too many false positive matches with current use
> > > of the content regex K: and file regex N: patterns.
> > > 
> > > This patch drops file match N: and makes K: more restricted.
> > > Some more normal F: file wildcards are added.
> > > 
> > > Notice that AF_XDP forgot to some F: files that is also
> > > updated in this patch.
> > > 
> > > Suggested-by: Jakub Kicinski 
> > > Signed-off-by: Jesper Dangaard Brouer   
> > 
> > Ah! Sorry, I missed that you sent this before replying to Joe.
> > 
> > Would you mind respining with his regex?
> 
> Sure, I just send it... with your adjusted '(\b|_)xdp(\b|_)' regex, as
> it seems to do the same thing (and it works with egrep).

The regexes in MAINTAINERS are perl not egrep and using (\b|_)
creates unnecessary capture groups.

It _really_ should be (?:\b|_)xdp(?:\b|_)

 




Re: [PATCH v2] mdio_bus: suppress err message for reset gpio EPROBE_DEFER

2020-11-19 Thread Joe Perches
On Thu, 2020-11-19 at 21:21 -0800, Jakub Kicinski wrote:
> We do have our own comment style rule in networking since the beginning
> of time, and reverse xmas tree, so it's not completely crazy.

reverse xmas tree is completely crazy.

But I posted a patch to checkpatch to suggest it for net/
and drivers/net/ once

https://lkml.org/lkml/2016/11/4/54




Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Joe Perches
On Fri, 2020-11-20 at 12:21 -0600, Gustavo A. R. Silva wrote:
> Hi all,
> 
> This series aims to fix almost all remaining fall-through warnings in
> order to enable -Wimplicit-fallthrough for Clang.
> 
> In preparation to enable -Wimplicit-fallthrough for Clang, explicitly
> add multiple break/goto/return/fallthrough statements instead of just
> letting the code fall through to the next case.
> 
> Notice that in order to enable -Wimplicit-fallthrough for Clang, this
> change[1] is meant to be reverted at some point. So, this patch helps
> to move in that direction.

This was a bit hard to parse for a second or three.

Thanks Gustavo.

How was this change done?




Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-21 Thread Joe Perches
On Sat, 2020-11-21 at 08:50 -0800, t...@redhat.com wrote:
> A difficult part of automating commits is composing the subsystem
> preamble in the commit log.  For the ongoing effort of a fixer producing
> one or two fixes a release the use of 'treewide:' does not seem appropriate.
> 
> It would be better if the normal prefix was used.  Unfortunately normal is
> not consistent across the tree.
> 
> So I am looking for comments for adding a new tag to the MAINTAINERS file
> 
>   D: Commit subsystem prefix
> 
> ex/ for FPGA DFL DRIVERS
> 
>   D: fpga: dfl:

I'm all for it.  Good luck with the effort.  It's not completely trivial.

>From a decade ago:

https://lore.kernel.org/lkml/1289919077.28741.50.camel@Joe-Laptop/

(and that thread started with extra semicolon patches too)

> Continuing with cleaning up clang's -Wextra-semi-stmt

> diff --git a/Makefile b/Makefile
[]
> @@ -1567,20 +1567,21 @@ help:
>    echo  ''
>   @echo  'Static analysers:'
>   @echo  '  checkstack  - Generate a list of stack hogs'
>   @echo  '  versioncheck- Sanity check on version.h usage'
>   @echo  '  includecheck- Check for duplicate included header files'
>   @echo  '  export_report   - List the usages of all exported symbols'
>   @echo  '  headerdep   - Detect inclusion cycles in headers'
>   @echo  '  coccicheck  - Check with Coccinelle'
>   @echo  '  clang-analyzer  - Check with clang static analyzer'
>   @echo  '  clang-tidy  - Check with clang-tidy'
> + @echo  '  clang-tidy-fix  - Check and fix with clang-tidy'

A pity the ordering of the code below isn't the same as the above.

> -PHONY += clang-tidy clang-analyzer
> +PHONY += clang-tidy-fix clang-tidy clang-analyzer
[]
> -clang-tidy clang-analyzer: $(extmod-prefix)compile_commands.json
> +clang-tidy-fix clang-tidy clang-analyzer: 
> $(extmod-prefix)compile_commands.json
>   $(call cmd,clang_tools)
>  else
> -clang-tidy clang-analyzer:
> +clang-tidy-fix clang-tidy clang-analyzer:

[]

> diff --git a/scripts/clang-tools/run-clang-tools.py 
> b/scripts/clang-tools/run-clang-tools.py
[]
> @@ -22,43 +22,57 @@ def parse_arguments():
[]
>  parser.add_argument("type",
> -choices=["clang-tidy", "clang-analyzer"],
> +choices=["clang-tidy-fix", "clang-tidy", 
> "clang-analyzer"],

etc...



Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-21 Thread Joe Perches
On Sat, 2020-11-21 at 09:18 -0800, James Bottomley wrote:
> On Sat, 2020-11-21 at 08:50 -0800, t...@redhat.com wrote:
> > A difficult part of automating commits is composing the subsystem
> > preamble in the commit log.  For the ongoing effort of a fixer
> > producing one or two fixes a release the use of 'treewide:' does
> > not seem appropriate.
> > 
> > It would be better if the normal prefix was used.  Unfortunately
> > normal is not consistent across the tree.
> > 
> > D: Commit subsystem prefix
> > 
> > ex/ for FPGA DFL DRIVERS
> > 
> > D: fpga: dfl:
> 
> I've got to bet this is going to cause more issues than it solves. 
> SCSI uses scsi: : for drivers but not every driver has a
> MAINTAINERS entry.  We use either scsi: or scsi: core: for mid layer
> things, but we're not consistent.  Block uses blk-: for all
> of it's stuff but almost no s have a MAINTAINERS entry.  So
> the next thing you're going to cause is an explosion of suggested
> MAINTAINERs entries.

As well as some changes require simultaneous changes across
multiple subsystems.

> Has anyone actually complained about treewide:?

It depends on what you mean by treewide:

If a treewide: patch is applied by some "higher level" maintainer,
then generally, no.

If the treewide patch is also cc'd to many individual maintainers,
then yes, many many times.

Mostly because patches cause what is in their view churn or that
changes are not specific to their subsystem grounds.

The treewide patch is sometimes dropped, sometimes broken up and
generally not completely applied.

What would be useful in many cases like this is for a pre and post
application of the treewide patch to be compiled and the object
code verified for lack of any logic change.

Unfortunately, gcc does not guarantee deterministic compilation so
this isn't feasible with at least gcc.  Does clang guarantee this?

I'm not sure it's possible:
https://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html




Re: [PATCH 072/141] can: peak_usb: Fix fall-through warnings for Clang

2020-11-21 Thread Joe Perches
On Sat, 2020-11-21 at 14:17 +0100, Marc Kleine-Budde wrote:
> On 11/20/20 7:34 PM, Gustavo A. R. Silva wrote:
> > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
> > by explicitly adding a break statement instead of letting the code fall
> > through to the next case.
> > 
> > Link: https://github.com/KSPP/linux/issues/115
> > Signed-off-by: Gustavo A. R. Silva 
[]
> > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> > b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
[]
> > @@ -299,6 +299,8 @@ static void peak_usb_write_bulk_callback(struct urb 
> > *urb)
> >     if (net_ratelimit())
> >     netdev_err(netdev, "Tx urb aborted (%d)\n",
> >    urb->status);
> > +   break;
> > +
> >     case -EPROTO:
> >     case -ENOENT:
> >     case -ECONNRESET:
> > 
> 
> What about moving the default to the end if the case, which is more common 
> anyways:
> 
> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
[]
> @@ -295,16 +295,16 @@ static void peak_usb_write_bulk_callback(struct urb 
> *urb)
> netif_trans_update(netdev);
> break;
>  
> 
> -   default:
> -   if (net_ratelimit())
> -   netdev_err(netdev, "Tx urb aborted (%d)\n",
> -  urb->status);
> case -EPROTO:
> case -ENOENT:
> case -ECONNRESET:
> case -ESHUTDOWN:
> -
> break;
> +
> +   default:
> +   if (net_ratelimit())
> +   netdev_err(netdev, "Tx urb aborted (%d)\n",
> +  urb->status);

That's fine and is more generally used style but this
default: case should IMO also end with a break;

+   break;

> }




Re: [PATCH 072/141] can: peak_usb: Fix fall-through warnings for Clang

2020-11-21 Thread Joe Perches
On Sun, 2020-11-22 at 00:04 +0100, Marc Kleine-Budde wrote:
> On 11/21/20 8:50 PM, Joe Perches wrote:
> > > What about moving the default to the end if the case, which is more 
> > > common anyways:
> > > 
> > > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> > > b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
> > []
> > > @@ -295,16 +295,16 @@ static void peak_usb_write_bulk_callback(struct urb 
> > > *urb)
> > > netif_trans_update(netdev);
> > > break;
> > >  
> > > 
> > > -   default:
> > > -   if (net_ratelimit())
> > > -   netdev_err(netdev, "Tx urb aborted (%d)\n",
> > > -  urb->status);
> > > case -EPROTO:
> > > case -ENOENT:
> > > case -ECONNRESET:
> > > case -ESHUTDOWN:
> > > -
> > > break;
> > > +
> > > +   default:
> > > +   if (net_ratelimit())
> > > +   netdev_err(netdev, "Tx urb aborted (%d)\n",
> > > +  urb->status);
> > 
> > That's fine and is more generally used style but this
> > default: case should IMO also end with a break;
> > 
> > +   break;
> 
> I don't mind.
> 
> process/coding-style.rst is not totally clear about the break after the 
> default,
> if this is the lase one the switch statement.

deprecated.rst has:

All switch/case blocks must end in one of:

* break;
* fallthrough;
* continue;
* goto ;
* return [expression];

I suppose that could be moved into coding-style along with
maybe a change to "all switch/case/default blocks"



Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-22 Thread Joe Perches
On Sun, 2020-11-22 at 08:33 -0800, Tom Rix wrote:
> On 11/21/20 9:10 AM, Joe Perches wrote:
> > On Sat, 2020-11-21 at 08:50 -0800, t...@redhat.com wrote:
> > > A difficult part of automating commits is composing the subsystem
> > > preamble in the commit log.  For the ongoing effort of a fixer producing
> > > one or two fixes a release the use of 'treewide:' does not seem 
> > > appropriate.
> > > 
> > > It would be better if the normal prefix was used.  Unfortunately normal is
> > > not consistent across the tree.
> > > 
> > > So I am looking for comments for adding a new tag to the MAINTAINERS file
> > > 
> > >   D: Commit subsystem prefix
> > > 
> > > ex/ for FPGA DFL DRIVERS
> > > 
> > >   D: fpga: dfl:
> > I'm all for it.  Good luck with the effort.  It's not completely trivial.
> > 
> > From a decade ago:
> > 
> > https://lore.kernel.org/lkml/1289919077.28741.50.camel@Joe-Laptop/
> > 
> > (and that thread started with extra semicolon patches too)
> 
> Reading the history, how about this.
> 
> get_maintainer.pl outputs a single prefix, if multiple files have the
> same prefix it works, if they don't its an error.
> 
> Another script 'commit_one_file.sh' does the call to get_mainainter.pl
> to get the prefix and be called by run-clang-tools.py to get the fixer
> specific message.

It's not whether the script used is get_maintainer or any other script,
the question is really if the MAINTAINERS file is the appropriate place
to store per-subsystem patch specific prefixes.

It is.

Then the question should be how are the forms described and what is the
inheritance priority.  My preference would be to have a default of
inherit the parent base and add basename(subsystem dirname).

Commit history seems to have standardized on using colons as the separator
between the commit prefix and the subject.

A good mechanism to explore how various subsystems have uses prefixes in
the past might be something like:

$ git log --no-merges --pretty='%s' -  | \
  perl -n -e 'print substr($_, 0, rindex($_, ":") + 1) . "\n";' | \
  sort | uniq -c | sort -rn

Using 1 for commit_count and drivers/scsi for subsystem_path, the
top 40 entries are below:

About 1% don't have a colon, and there is no real consistency even
within individual drivers below scsi.  For instance, qla2xxx:

 1  814 scsi: qla2xxx:
 2  691 scsi: lpfc:
 3  389 scsi: hisi_sas:
 4  354 scsi: ufs:
 5  339 scsi:
 6  291 qla2xxx:
 7  256 scsi: megaraid_sas:
 8  249 scsi: mpt3sas:
 9  200 hpsa:
10  190 scsi: aacraid:
11  174 lpfc:
12  153 scsi: qedf:
13  144 scsi: smartpqi:
14  139 scsi: cxlflash:
15  122 scsi: core:
16  110 [SCSI] qla2xxx:
17  108 ncr5380:
18   98 scsi: hpsa:
19   97 
20   89 treewide:
21   88 mpt3sas:
22   86 scsi: libfc:
23   85 scsi: qedi:
24   84 scsi: be2iscsi:
25   81 [SCSI] qla4xxx:
26   81 hisi_sas:
27   81 block:
28   75 megaraid_sas:
29   71 scsi: sd:
30   69 [SCSI] hpsa:
31   68 cxlflash:
32   65 scsi: libsas:
33   65 scsi: fnic:
34   61 scsi: scsi_debug:
35   60 scsi: arcmsr:
36   57 be2iscsi:
37   53 atp870u:
38   51 scsi: bfa:
39   50 scsi: storvsc:
40   48 sd:




Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-22 Thread Joe Perches
On Sun, 2020-11-22 at 08:49 -0800, James Bottomley wrote:
> We can enforce sysfs_emit going forwards
> using tools like checkpatch

It's not really possible for checkpatch to find or warn about
sysfs uses of sprintf. checkpatch is really just a trivial
line-by-line parser and it has no concept of code intent.

It just can't warn on every use of the sprintf family.
There are just too many perfectly valid uses.

> but there's no benefit and a lot of harm to
> be done by trying to churn the entire tree

Single uses of sprintf for sysfs is not really any problem.

But likely there are still several possible overrun sprintf/snprintf
paths in sysfs.  Some of them are very obscure and unlikely to be
found by a robot as the logic for sysfs buf uses can be fairly twisty.

But provably correct conversions IMO _should_ be done and IMO churn
considerations should generally have less importance.





Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-22 Thread Joe Perches
On Sun, 2020-11-22 at 10:21 -0800, James Bottomley wrote:
> Please tell me
> our reward for all this effort isn't a single missing error print.

There were quite literally dozens of logical defects found
by the fallthrough additions.  Very few were logging only.





Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-22 Thread Joe Perches
On Sun, 2020-11-22 at 11:12 -0800, James Bottomley wrote:
> On Sun, 2020-11-22 at 10:25 -0800, Joe Perches wrote:
> > On Sun, 2020-11-22 at 10:21 -0800, James Bottomley wrote:
> > > Please tell me our reward for all this effort isn't a single
> > > missing error print.
> > 
> > There were quite literally dozens of logical defects found
> > by the fallthrough additions.  Very few were logging only.
> 
> So can you give us the best examples (or indeed all of them if someone
> is keeping score)?  hopefully this isn't a US election situation ...

Gustavo?  Are you running for congress now?

https://lwn.net/Articles/794944/




Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-22 Thread Joe Perches
On Mon, 2020-11-23 at 09:33 +1100, Finn Thain wrote:
> On Sun, 22 Nov 2020, Joe Perches wrote:

> > But provably correct conversions IMO _should_ be done and IMO churn 
> > considerations should generally have less importance.
[]
> Moreover, the patch review workload for skilled humans is being generated 
> by the automation, which is completely backwards: the machine is supposed 
> to be helping.

Which is why the provably correct matters.

coccinelle transforms can be, but are not necessarily, provably correct.

The _show transforms done via the sysfs_emit_dev.cocci script are correct
as in commit aa838896d87a ("drivers core: Use sysfs_emit and sysfs_emit_at
for show(device *...) functions")

Worthwhile?  A different question, but I think yes as it reduces the
overall question space of the existing other sprintf overrun possibilities.




Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-23 Thread Joe Perches
On Mon, 2020-11-23 at 07:58 -0800, James Bottomley wrote:
> We're also complaining about the inability to recruit maintainers:
> 
> https://www.theregister.com/2020/06/30/hard_to_find_linux_maintainers_says_torvalds/
> 
> And burn out:
> 
> http://antirez.com/news/129

https://www.wired.com/story/open-source-coders-few-tired/

> What I'm actually trying to articulate is a way of measuring value of
> the patch vs cost ... it has nothing really to do with who foots the
> actual bill.

It's unclear how to measure value in consistency.

But one way that costs can be reduced is by automation and _not_
involving maintainers when the patch itself is provably correct.

> One thesis I'm actually starting to formulate is that this continual
> devaluing of maintainers is why we have so much difficulty keeping and
> recruiting them.

The linux kernel has something like 1500 different maintainers listed
in the MAINTAINERS file.  That's not a trivial number.

$ git grep '^M:' MAINTAINERS | sort | uniq -c | wc -l
1543
$ git grep '^M:' MAINTAINERS| cut -f1 -d'<' | sort | uniq -c | wc -l
1446

I think the question you are asking is about trust and how it
effects development.

And back to that wired story, the actual number of what you might
be considering to be maintainers is likely less than 10% of the
listed numbers above.




Re: [PATCH net-next 15/17] rxrpc: Organise connection security to use a union

2020-11-23 Thread Joe Perches
On Mon, 2020-11-23 at 20:11 +, David Howells wrote:
> Organise the security information in the rxrpc_connection struct to use a
> union to allow for different data for different security classes.

Is there a known future purpose to this?

> diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h

> @@ -448,9 +448,15 @@ struct rxrpc_connection {
>   struct list_headproc_link;  /* link in procfs list */
>   struct list_headlink;   /* link in master connection 
> list */
>   struct sk_buff_head rx_queue;   /* received conn-level packets 
> */
> +
>   const struct rxrpc_security *security;  /* applied security module */
> - struct crypto_sync_skcipher *cipher;/* encryption handle */
> - struct rxrpc_crypt  csum_iv;/* packet checksum base */
> + union {
> + struct {
> + struct crypto_sync_skcipher *cipher;/* encryption 
> handle */
> + struct rxrpc_crypt csum_iv; /* packet checksum base 
> */
> + u32 nonce;  /* response re-use preventer */
> + } rxkad;
> + };

It seems no other follow-on patch in the series uses this nameless union.



Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-23 Thread Joe Perches
On Tue, 2020-11-24 at 11:58 +1100, Finn Thain wrote:
> it's not for me to prove that such patches don't affect code 
> generation. That's for the patch author and (unfortunately) for reviewers.

Ideally, that proof would be provided by the compilation system itself
and not patch authors nor reviewers nor maintainers.

Unfortunately gcc does not guarantee repeatability or deterministic output.
To my knowledge, neither does clang.




Re: Subject: [RFC] clang tooling cleanups

2020-11-09 Thread Joe Perches
On Tue, 2020-10-27 at 09:42 -0700, t...@redhat.com wrote:
> This rfc will describe
> An upcoming treewide cleanup.
> How clang tooling was used to programatically do the clean up.
> Solicit opinions on how to generally use clang tooling.
> 
> The clang warning -Wextra-semi-stmt produces about 10k warnings.
> Reviewing these, a subset of semicolon after a switch looks safe to
> fix all the time.  An example problem
> 
> void foo(int a) {
>  switch(a) {
>  case 1:
>  ...
>  }; <--- extra semicolon
> }
> 
> Treewide, there are about 100 problems in 50 files for x86_64 allyesconfig.
> These fixes will be the upcoming cleanup.

coccinelle already does some of these.

For instance: scripts/coccinelle/misc/semicolon.cocci

Perhaps some tool coordination can be done here as
coccinelle/checkpatch/clang/Lindent call all be used
to do some facet or another of these cleanup issues.





Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-11-10 Thread Joe Perches
On Tue, 2020-11-10 at 14:00 -0800, Nick Desaulniers wrote:

> Yeah, we could go through and remove %h and %hh to solve this, too, right?

Yup.

I think one of the checkpatch improvement mentees is adding
some suggestion and I hope an automated fix mechanism for that.

https://lore.kernel.org/lkml/5e3265c241602bb54286fbaae9222070daa4768e.ca...@perches.com/




Re: [PATCH] [v7] wireless: Initial driver submission for pureLiFi STA devices

2020-11-16 Thread Joe Perches
On Mon, 2020-11-16 at 14:52 +0530, Srinivasan Raju wrote:
> This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC
> and LiFi-XL USB devices.
> 
> This driver implementation has been based on the zd1211rw driver.
> 
> Driver is based on 802.11 softMAC Architecture and uses
> native 802.11 for configuration and management.
> 
> The driver is compiled and tested in ARM, x86 architectures and
> compiled in powerpc architecture.
> 
> Signed-off-by: Srinivasan Raju 

trivial notes and some style and content defects:
(I stopped reading after awhile)

Commonly this changelog would go below the --- separator line.

> 
> Changes v6->v7:
> - Magic numbers removed and used IEEE80211 macors
> - usb.c is split into two files firmware.c and dbgfs.c
> - Other code style and timer function fixes (mod_timer)
> Changes v5->v6:
> - Code style fix patch from Joe Perches
> Changes v4->v5:
> - Code refactoring for clarity and redundnacy removal
> - Fix warnings from kernel test robot
> Changes v3->v4:
> - Code refactoring based on kernel code guidelines
> - Remove multi level macors and use kernel debug macros
> Changes v2->v3:
> - Code style fixes kconfig fix
> Changes v1->v2:
> - v1 was submitted to staging, v2 submitted to wireless-next
> - Code style fixes and copyright statement fix
> ---
>  MAINTAINERS  |5 +

[]

> diff --git a/MAINTAINERS b/MAINTAINERS
[]
> @@ -14108,6 +14108,11 @@ T:   git git://linuxtv.org/media_tree.git
[]
> +PUREILIFI USB DRIVER
> +M:   Srinivasan Raju 
> +S:   Maintained

If you are employed there and are paid to maintain this code the
more common S: marking is "Supported"

> diff --git a/drivers/net/wireless/purelifi/Kconfig 
> b/drivers/net/wireless/purelifi/Kconfig
[]
> +++ b/drivers/net/wireless/purelifi/Kconfig
> @@ -0,0 +1,27 @@
> +# SPDX-License-Identifier: GPL-2.0

For clarity, I think it'd be nicer to use GPL-2.0-only here and elsewhere.

> diff --git a/drivers/net/wireless/purelifi/chip.c 
> b/drivers/net/wireless/purelifi/chip.c
[]
> +int purelifi_set_beacon_interval(struct purelifi_chip *chip, u16 interval,
> +  u8 dtim_period, int type)
> +{
> + if (!interval || (chip->beacon_set &&
> +   chip->beacon_interval == interval)) {
> + return 0;
> + }

It's ddd that checkpatch isn't complaining about single statement uses
with braces.  I would write this like the below, but there isn't really
anything wrong with what you did either.

if (!interval ||
(chip->beacon_set && chip->beacon_interval == interval))
return 0;

> +void purelifi_chip_disable_rxtx(struct purelifi_chip *chip)
> +{
> + u8 value;
> +
> + value = 0;

why not make this:

static const u8 value = 0;

> + usb_write_req((const u8 *)&value, sizeof(value), USB_REQ_RXTX_WR);

so this is doesn't need a cast

usb_write_req(&value, sizeof(value), USB_REQ_RXTX_WR);

> +int purelifi_chip_set_rate(struct purelifi_chip *chip, u8 rate)
> +{
> + int r;
> +
> + if (!chip)
> + return -EINVAL;
> +
> + r = usb_write_req((const u8 *)&rate, sizeof(rate), USB_REQ_RATE_WR);

why is the cast needed here?

> +static inline void purelifi_mc_add_addr(struct purelifi_mc_hash *hash,
> + u8 *addr
> + )

Odd close parenthesis location

> diff --git a/drivers/net/wireless/purelifi/dbgfs.c 
> b/drivers/net/wireless/purelifi/dbgfs.c
[]
> +ssize_t purelifi_store_frequency(struct device *dev,
> +  struct device_attribute *attr,
> +  const char *buf,
> +  size_t len)
> +{
[]
> + if (valid) {
> + usr_input[0] = (char)predivider;
> + usr_input[1] = (char)feedback_divider;
> + usr_input[2] = (char)output_div_0;
> + usr_input[3] = (char)output_div_1;
> + usr_input[4] = (char)output_div_2;
> + usr_input[5] = (char)clkout3_phase;
> +
> + dev_err(dev, "options IP_DIV: %d VCO_MULT: %d OP_DIV_PHY: %d",
> + usr_input[0], usr_input[1], usr_input[2]);
> + dev_err(dev, "OP_DIV_CPU: %d OP_DIV_USB: %d CLK3_PH: %d\n",
> + usr_input[3], usr_input[4], usr_input[5]);

why is this dev_err?  It's not an error.
Shouldn't this be dev_notice or dev_info?

> +ssize_t purelifi_show_sysfs(struct device *dev,
> + struct device_attribute *attr,
> + char *buf)
> +{
> +  

Re: [PATCH][next] mwifiex: Fix fall-through warnings for Clang

2020-11-17 Thread Joe Perches
On Tue, 2020-11-17 at 10:09 -0600, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
> warnings by explicitly adding multiple break statements instead of
> letting the code fall through to the next case.

Thanks Gustavo.

I think this is better style than the gcc allowed
undescribed fallthrough to break;

gcc developers disagree though:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432




Re: [PATCH] amd-xgbe: remove h from printk format specifier

2020-12-23 Thread Joe Perches
On Wed, 2020-12-23 at 11:43 -0800, t...@redhat.com wrote:
> From: Tom Rix 
> 
> This change fixes the checkpatch warning described in this commit
> commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of 
> unnecessary %h[xudi] and %hh[xudi]")
> 
> Standard integer promotion is already done and %hx and %hhx is useless
> so do not encourage the use of %hh[xudi] or %h[xudi].

Why only xgbe-ethtool?

Perhaps your script only converts direct uses of functions
marked with __printf and not any uses of the same functions
via macros.

$ git grep -P '%[\w\d\.]*h\w' drivers/net/ethernet/amd/xgbe/
drivers/net/ethernet/amd/xgbe/xgbe-dcb.c: "TC%u: 
tx_bw=%hhu, rx_bw=%hhu, tsa=%hhu\n", i,
drivers/net/ethernet/amd/xgbe/xgbe-dcb.c:   netif_dbg(pdata, drv, 
netdev, "PRIO%u: TC=%hhu\n", i,
drivers/net/ethernet/amd/xgbe/xgbe-dcb.c: 
"unsupported TSA algorithm (%hhu)\n",
drivers/net/ethernet/amd/xgbe/xgbe-dcb.c: "cap=%hhu, en=%#hhx, 
mbc=%hhu, delay=%hhu\n",
drivers/net/ethernet/amd/xgbe/xgbe-dev.c:   netif_dbg(pdata, drv, 
pdata->netdev, "VXLAN tunnel id set to %hx\n",
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c:   netdev_err(netdev, 
"invalid phy address %hhu\n",
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c:   netdev_err(netdev, 
"unsupported autoneg %hhu\n",
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c:   
netdev_err(netdev, "unsupported duplex %hhu\n",

> 
> Signed-off-by: Tom Rix 
> ---
>  drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c 
> b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
> index 61f39a0e04f9..3c18f26bf2a5 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
> @@ -339,14 +339,14 @@ static int xgbe_set_link_ksettings(struct net_device 
> *netdev,
>   speed = cmd->base.speed;
>  
> 
>   if (cmd->base.phy_address != pdata->phy.address) {
> - netdev_err(netdev, "invalid phy address %hhu\n",
> + netdev_err(netdev, "invalid phy address %u\n",
>  cmd->base.phy_address);
>   return -EINVAL;
>   }
>  
> 
>   if ((cmd->base.autoneg != AUTONEG_ENABLE) &&
>   (cmd->base.autoneg != AUTONEG_DISABLE)) {
> - netdev_err(netdev, "unsupported autoneg %hhu\n",
> + netdev_err(netdev, "unsupported autoneg %u\n",
>  cmd->base.autoneg);
>   return -EINVAL;
>   }
> @@ -358,7 +358,7 @@ static int xgbe_set_link_ksettings(struct net_device 
> *netdev,
>   }
>  
> 
>   if (cmd->base.duplex != DUPLEX_FULL) {
> - netdev_err(netdev, "unsupported duplex %hhu\n",
> + netdev_err(netdev, "unsupported duplex %u\n",
>  cmd->base.duplex);
>   return -EINVAL;
>   }




Re: [PATCH] amd-xgbe: remove h from printk format specifier

2020-12-23 Thread Joe Perches
On Wed, 2020-12-23 at 12:33 -0800, Tom Rix wrote:
> On 12/23/20 12:14 PM, Joe Perches wrote:
> > On Wed, 2020-12-23 at 11:43 -0800, t...@redhat.com wrote:
> > > From: Tom Rix 
> > > 
> > > This change fixes the checkpatch warning described in this commit
> > > commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of 
> > > unnecessary %h[xudi] and %hh[xudi]")
> > > 
> > > Standard integer promotion is already done and %hx and %hhx is useless
> > > so do not encourage the use of %hh[xudi] or %h[xudi].
> > Why only xgbe-ethtool?
> > 
> > Perhaps your script only converts direct uses of functions
> > marked with __printf and not any uses of the same functions
> > via macros.
> 
> The fixer may have issues.

Perhaps until the fixer is fixed, it'd be more
complete coverage to use checkpatch like:

$ git ls-files  | \
  xargs ./scripts/checkpatch.pl -f --fix-inplace --types=unnecessary_modifier

e.g.:

$ git ls-files drivers/net/ethernet/amd/xgbe | \
  xargs ./scripts/checkpatch.pl -f --fix-inplace --types=unnecessary_modifier

$ git diff -U0 drivers/net/ethernet/amd/xgbe/
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c 
b/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c
index 895d35639129..dcd2a181d43a 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c
@@ -155 +155 @@ static int xgbe_dcb_ieee_setets(struct net_device *netdev,
- "TC%u: tx_bw=%hhu, rx_bw=%hhu, tsa=%hhu\n", i,
+ "TC%u: tx_bw=%u, rx_bw=%u, tsa=%u\n", i,
@@ -158 +158 @@ static int xgbe_dcb_ieee_setets(struct net_device *netdev,
-   netif_dbg(pdata, drv, netdev, "PRIO%u: TC=%hhu\n", i,
+   netif_dbg(pdata, drv, netdev, "PRIO%u: TC=%u\n", i,
@@ -233 +233 @@ static int xgbe_dcb_ieee_setpfc(struct net_device *netdev,
- "cap=%hhu, en=%#hhx, mbc=%hhu, delay=%hhu\n",
+ "cap=%u, en=%#x, mbc=%u, delay=%u\n",
@@ -267 +267 @@ static u8 xgbe_dcb_setdcbx(struct net_device *netdev, u8 dcbx)
-   netif_dbg(pdata, drv, netdev, "DCBX=%#hhx\n", dcbx);
+   netif_dbg(pdata, drv, netdev, "DCBX=%#x\n", dcbx);
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c 
b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
index d5fd49dd25f3..ff0cd94bb91a 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
@@ -488 +488 @@ static void xgbe_set_vxlan_id(struct xgbe_prv_data *pdata)
-   netif_dbg(pdata, drv, pdata->netdev, "VXLAN tunnel id set to %hx\n",
+   netif_dbg(pdata, drv, pdata->netdev, "VXLAN tunnel id set to %x\n",
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c 
b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 2709a2db5657..0ae16bc87833 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -2781 +2781 @@ void xgbe_print_pkt(struct net_device *netdev, struct sk_buff 
*skb, bool tx_rx)
-   netdev_dbg(netdev, "Protocol: %#06hx\n", ntohs(eth->h_proto));
+   netdev_dbg(netdev, "Protocol: %#06x\n", ntohs(eth->h_proto));
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c 
b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
index 61f39a0e04f9..3c18f26bf2a5 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
@@ -342 +342 @@ static int xgbe_set_link_ksettings(struct net_device *netdev,
-   netdev_err(netdev, "invalid phy address %hhu\n",
+   netdev_err(netdev, "invalid phy address %u\n",
@@ -349 +349 @@ static int xgbe_set_link_ksettings(struct net_device *netdev,
-   netdev_err(netdev, "unsupported autoneg %hhu\n",
+   netdev_err(netdev, "unsupported autoneg %u\n",
@@ -361 +361 @@ static int xgbe_set_link_ksettings(struct net_device *netdev,
-   netdev_err(netdev, "unsupported duplex %hhu\n",
+   netdev_err(netdev, "unsupported duplex %u\n",




Re: [PATCH] nfp: remove h from printk format specifier

2020-12-24 Thread Joe Perches
On Thu, 2020-12-24 at 14:14 -0800, Tom Rix wrote:
> On 12/24/20 12:21 PM, Simon Horman wrote:
> > On Wed, Dec 23, 2020 at 12:20:53PM -0800, t...@redhat.com wrote:
> > > From: Tom Rix 
> > > 
> > > This change fixes the checkpatch warning described in this commit
> > > commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of 
> > > unnecessary %h[xudi] and %hh[xudi]")
> > > 
> > > Standard integer promotion is already done and %hx and %hhx is useless
> > > so do not encourage the use of %hh[xudi] or %h[xudi].
> > > 
> > > Signed-off-by: Tom Rix 
> > Hi Tom,
> > 
> > This patch looks appropriate for net-next, which is currently closed.
> > 
> > The changes look fine, but I'm curious to know if its intentionally that
> > the following was left alone in 
> > ethernet/netronome/nfp/nfp_net_ethtool.c:nfp_net_get_nspinfo()
> > 
> > snprintf(version, ETHTOOL_FWVERS_LEN, "%hu.%hu"
> 
> I am limiting changes to logging functions, what is roughly in checkpatch.
> 
> I can add this snprintf in if you want.

I'm a bit confused here Tom.

I thought your clang-tidy script was looking for anything marked with
__printf() that is using %h[idux] or %hh[idux].

Wouldn't snprintf qualify for this already?

include/linux/kernel.h-extern __printf(3, 4)
include/linux/kernel.h:int snprintf(char *buf, size_t size, const char *fmt, 
...);

Kernel code doesn't use a signed char or short with %hx or %hu very often
but in case you didn't already know, any signed char/short emitted with
anything like %hx or %hu needs to be left alone as sign extension occurs so:

signed char foo = -1;
printk("%hx", foo);

emits  but

printk("%x", foo);

emits 

An example:

$ gcc -x c -
#include 
#include 

int main(int argc, char **argv)
{
signed short i = -1;
printf("hx: %hx\n", i);
printf("x:  %x\n", i);
printf("hu: %hu\n", i);
printf("u:  %u\n", i);
return 0;
}

$ ./a.out
hx: 
x:  
hu: 65535
u:  4294967295

$




Re: [PATCH] nfp: remove h from printk format specifier

2020-12-25 Thread Joe Perches
On Fri, 2020-12-25 at 06:56 -0800, Tom Rix wrote:
> On 12/24/20 2:39 PM, Joe Perches wrote:
[]
> > Kernel code doesn't use a signed char or short with %hx or %hu very often
> > but in case you didn't already know, any signed char/short emitted with
> > anything like %hx or %hu needs to be left alone as sign extension occurs so:
> 
> Yes, this would also effect checkpatch.

Of course but checkpatch is stupid and doesn't know types
so it just assumes that the type argument is not signed.

In general, that's a reasonable but imperfect assumption.

coccinelle could probably do this properly as it's a much
better parser.  clang-tidy should be able to as well.




Re: [PATCH] nfp: remove h from printk format specifier

2020-12-25 Thread Joe Perches
On Fri, 2020-12-25 at 14:13 -0800, Tom Rix wrote:
> On 12/25/20 9:06 AM, Joe Perches wrote:
> > On Fri, 2020-12-25 at 06:56 -0800, Tom Rix wrote:
> > > On 12/24/20 2:39 PM, Joe Perches wrote:
> > []
> > > > Kernel code doesn't use a signed char or short with %hx or %hu very 
> > > > often
> > > > but in case you didn't already know, any signed char/short emitted with
> > > > anything like %hx or %hu needs to be left alone as sign extension 
> > > > occurs so:
> > > Yes, this would also effect checkpatch.
> > Of course but checkpatch is stupid and doesn't know types
> > so it just assumes that the type argument is not signed.
> > 
> > In general, that's a reasonable but imperfect assumption.
> > 
> > coccinelle could probably do this properly as it's a much
> > better parser.  clang-tidy should be able to as well.
> > 
> Ok.
> 
> But types not matching the format string is a larger problem.
> 
> Has there been an effort to clean these up ?

Not really no.  __printf already does a reasonable job for that.

The biggest issue for format type mismatches is the %p extensions.

__printf can only verify that the argument is a pointer, not
necessarily the 'right' type of pointed to object.

There are overflow possibilities like '"%*ph", len, pointer'
where pointer may not have len bytes available and, for instance,
mismatched uses of %pI4 and %pI6 where %pI4 expects a pointer to
4 bytes and %pI6 expects a pointer to 16 bytes.

Anyway it's not that easy a problem to analyze.



[PATCH] ethernet: Remove invalid trailers after %pI4

2020-12-26 Thread Joe Perches
Alphanumeric characters after vsprintf pointer extension %pI4 are
not valid and are not emitted.

Remove the invalid characters from the %pI4 uses.

Signed-off-by: Joe Perches 
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c  | 6 +++---
 drivers/net/ethernet/intel/i40e/i40e_main.c   | 4 ++--
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +-
 drivers/net/ethernet/qlogic/qed/qed_iwarp.c   | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c 
b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index 5e4429b14b8c..213cbdea3888 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -1232,7 +1232,7 @@ static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp,
 
rt = ip_route_output_key(dev_net(real_dst_dev), &flow);
if (IS_ERR(rt)) {
-   netdev_info(bp->dev, "no route to %pI4b\n", &flow.daddr);
+   netdev_info(bp->dev, "no route to %pI4\n", &flow.daddr);
return -EOPNOTSUPP;
}
 
@@ -1258,7 +1258,7 @@ static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp,
 #endif
} else if (dst_dev != real_dst_dev) {
netdev_info(bp->dev,
-   "dst_dev(%s) for %pI4b is not PF-if(%s)\n",
+   "dst_dev(%s) for %pI4 is not PF-if(%s)\n",
netdev_name(dst_dev), &flow.daddr,
netdev_name(real_dst_dev));
rc = -EOPNOTSUPP;
@@ -1267,7 +1267,7 @@ static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp,
 
nbr = dst_neigh_lookup(&rt->dst, &flow.daddr);
if (!nbr) {
-   netdev_info(bp->dev, "can't lookup neighbor for %pI4b\n",
+   netdev_info(bp->dev, "can't lookup neighbor for %pI4\n",
&flow.daddr);
rc = -EOPNOTSUPP;
goto put_rt;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c 
b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 1db482d310c2..eab6ce63b63d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7924,7 +7924,7 @@ static int i40e_parse_cls_flower(struct i40e_vsi *vsi,
if (match.mask->dst == cpu_to_be32(0x)) {
field_flags |= I40E_CLOUD_FIELD_IIP;
} else {
-   dev_err(&pf->pdev->dev, "Bad ip dst mask 
%pI4b\n",
+   dev_err(&pf->pdev->dev, "Bad ip dst mask 
%pI4\n",
&match.mask->dst);
return I40E_ERR_CONFIG;
}
@@ -7934,7 +7934,7 @@ static int i40e_parse_cls_flower(struct i40e_vsi *vsi,
if (match.mask->src == cpu_to_be32(0x)) {
field_flags |= I40E_CLOUD_FIELD_IIP;
} else {
-   dev_err(&pf->pdev->dev, "Bad ip src mask 
%pI4b\n",
+   dev_err(&pf->pdev->dev, "Bad ip src mask 
%pI4\n",
&match.mask->src);
return I40E_ERR_CONFIG;
}
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 41424ee909a0..6c711385aae9 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -2297,7 +2297,7 @@ static void mlxsw_sp_router_neigh_ent_ipv4_process(struct 
mlxsw_sp *mlxsw_sp,
if (!n)
return;
 
-   netdev_dbg(dev, "Updating neighbour with IP=%pI4h\n", &dip);
+   netdev_dbg(dev, "Updating neighbour with IP=%pI4\n", &dip);
neigh_event_send(n, NULL);
neigh_release(n);
 }
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c 
b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
index a99861124630..6756f7919deb 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
@@ -584,7 +584,7 @@ qed_iwarp_print_tcp_ramrod(struct qed_hwfn *p_hwfn,
 
if (p_tcp_ramrod->tcp.ip_version == TCP_IPV4) {
DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
-  "local_ip=%pI4h:%x, remote_ip=%pI4h:%x, vlan=%x\n",
+  "local_ip=%pI4:%x, remote_ip=%pI4:%x, vlan=%x\n",
   p_tcp_ramrod->tcp.local_ip,
   p_tcp_ramrod->tcp.local_port,
   p_

Re: [PATCH] ethernet: Remove invalid trailers after %pI4

2020-12-26 Thread Joe Perches
On Sat, 2020-12-26 at 09:10 -0800, Joe Perches wrote:
> Alphanumeric characters after vsprintf pointer extension %pI4 are
> not valid and are not emitted.
> 
> Remove the invalid characters from the %pI4 uses.

self-nak.  I believe I misunderstood the format specifier.




Re: [PATCH net-next] net/mlx5: Use kzalloc for allocating only one thing

2020-12-29 Thread Joe Perches
On Tue, 2020-12-29 at 21:53 +0800, Zheng Yongjun wrote:
> Use kzalloc rather than kcalloc(1,...)
[]
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c 
> b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
[]
> @@ -1782,7 +1782,7 @@ static int dr_action_create_modify_action(struct 
> mlx5dr_domain *dmn,
>   if (!chunk)
>   return -ENOMEM;
>  
> 
> - hw_actions = kcalloc(1, max_hw_actions * DR_MODIFY_ACTION_SIZE, 
> GFP_KERNEL);
> + hw_actions = kzalloc(max_hw_actions * DR_MODIFY_ACTION_SIZE, 
> GFP_KERNEL);

Perhaps instead:

hw_actions = kcalloc(max_hw_actions, DR_MODIFY_ACTION_SIZE, GFP_KERNEL);




  1   2   3   4   5   6   7   8   9   10   >