[PATCH] net/wireless/bcom: constify ieee80211_get_response_rate return

2021-04-18 Thread Joe Perches
It's not modified so make it const with the eventual goal of moving data to text for various static struct ieee80211_rate arrays. Signed-off-by: Joe Perches --- drivers/net/wireless/broadcom/b43/main.c | 2 +- drivers/net/wireless/broadcom/b43legacy/main.c | 2 +- include/net/cfg80

Re: [PATCH] brcmsmac: fix shift on 4 bit masked value

2021-04-18 Thread Joe Perches
On Sun, 2021-04-18 at 06:10 +, Kalle Valo wrote: > Colin King wrote: > > > From: Colin Ian King > > > > The calculation of offtune_val seems incorrect, the u16 value in > > pi->tx_rx_cal_radio_saveregs[2] is being masked with 0xf0 and then > > shifted 8 places right so that always ends up a

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

2021-04-17 Thread Joe Perches
On Sat, 2021-04-17 at 14:30 -0400, Jes Sorensen wrote: > On 4/17/21 1:52 PM, Kalle Valo wrote: > > "Gustavo A. R. Silva" wrote: > > > > > In preparation to enable -Wimplicit-fallthrough for Clang, fix > > > multiple warnings by replacing /* fall through */ comments with > > > the new pseudo-keywo

Re: [PATCH][next] mlxsw: spectrum_router: remove redundant initialization of variable force

2021-04-09 Thread Joe Perches
On Mon, 2021-03-29 at 09:04 +0300, Dan Carpenter wrote: > On Sat, Mar 27, 2021 at 10:33:34PM +, Colin King wrote: > > From: Colin Ian King > > > > The variable force is being initialized with a value that is > > never read and it is being updated later with a new value. The > > initialization

Re: [PATCH] Bluetooth: af_bluetooth: checkpatch: fix indentation and alignment

2021-01-27 Thread Joe Perches
On Thu, 2021-01-28 at 00:05 +0900, Tomoyuki Matsushita wrote: > Signed-off-by: Tomoyuki Matsushita checkpatch is pretty stupid so whatever it recommends needs to be looked at carefully by a human and fixed appropriately. > diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c

Re: [PATCH v3] rtlwifi: Simplify bool comparison

2021-01-26 Thread Joe Perches
On Tue, 2021-01-26 at 16:31 +0800, Jiapeng Zhong wrote: > Fix the following coccicheck warning: > ./drivers/net/wireless/realtek/rtlwifi/ps.c:798:7-21: WARNING: > Comparison to bool > ./drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:3848:7-17: > WARNING: Comparison of 0/1 to bool variable []

Re: [PATCH net-next 07/15] bnxt_en: log firmware debug notifications

2021-01-26 Thread Joe Perches
On Mon, 2021-01-25 at 02:08 -0500, Michael Chan wrote: > From: Edwin Peer > > Firmware is capable of generating asynchronous debug notifications. > The event data is opaque to the driver and is simply logged. Debug > notifications can be enabled by turning on hardware status messages > using the

Re: [PATCH mlx5-next v4 1/4] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-01-26 Thread Joe Perches
On Tue, 2021-01-26 at 10:48 +0200, Leon Romanovsky wrote: > On Tue, Jan 26, 2021 at 12:20:11AM -0800, Joe Perches wrote: > > On Tue, 2021-01-26 at 08:01 +0200, Leon Romanovsky wrote: > > > On Mon, Jan 25, 2021 at 01:52:29PM -0800, Jakub Kicinski wrote: > > > > On S

Re: [PATCH mlx5-next v4 1/4] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-01-26 Thread Joe Perches
On Tue, 2021-01-26 at 08:01 +0200, Leon Romanovsky wrote: > On Mon, Jan 25, 2021 at 01:52:29PM -0800, Jakub Kicinski wrote: > > On Sun, 24 Jan 2021 15:11:16 +0200 Leon Romanovsky wrote: > > > +static int pci_enable_vfs_overlay(struct pci_dev *dev) { return 0; } > > > +static void pci_disable_vfs_ov

[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.

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

2021-01-17 Thread Joe Perches
w 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 +- >

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/

Re: [PATCH net 6/9] MAINTAINERS: mtk-eth: remove Felix

2021-01-11 Thread Joe Perches
On Mon, 2021-01-11 at 09:41 -0800, Jakub Kicinski wrote: > On Sun, 10 Jan 2021 21:45:46 -0800 Joe Perches wrote: > > On Sun, 2021-01-10 at 21:27 -0800, Jakub Kicinski wrote: > > > Drop Felix from Mediatek Ethernet driver maintainers. > > > We haven't seen any t

Re: [PATCH net 6/9] MAINTAINERS: mtk-eth: remove Felix

2021-01-10 Thread Joe Perches
On Sun, 2021-01-10 at 21:27 -0800, Jakub Kicinski wrote: > Drop Felix from Mediatek Ethernet driver maintainers. > We haven't seen any tags since the initial submission. [] > diff --git a/MAINTAINERS b/MAINTAINERS [] > @@ -11165,7 +11165,6 @@ F:Documentation/devicetree/bindings/dma/mtk-* >  F:

Re: [PATCH 05/10] dma: tx49 removal

2021-01-06 Thread Joe Perches
On Tue, 2021-01-05 at 15:02 +0100, Thomas Bogendoerfer wrote: > Signed-off-by: Thomas Bogendoerfer [] > diff --git a/drivers/dma/txx9dmac.h b/drivers/dma/txx9dmac.h [] > @@ -26,11 +26,6 @@ >   * DMA channel. >   */ >   > > -#ifdef CONFIG_MACH_TX49XX > -static inline bool txx9_dma_have_SMPCHN(void

Re: [PATCH] drivers: net: wireless: realtek: Fix the word association defautly de-faulty

2021-01-06 Thread Joe Perches
On Wed, 2021-01-06 at 18:48 +0530, Bhaskar Chowdhury wrote: > Good point Randy, there were several driver file witch have "defautly" in it > and I tried to correct that.Only that spell made it a "de-faulty" as dic > suggested . But I think it should be "by default" as you said. What tool suggested

Re: [PATCH] drivers: net: wireless: realtek: Fix the word association defautly de-faulty

2021-01-05 Thread Joe Perches
On Tue, 2021-01-05 at 17:11 +0530, Bhaskar Chowdhury wrote: > On 22:24 Tue 05 Jan 2021, Julian Calaby wrote: > > Hi Bhaskar, [] > > and your change is just making this comment worse. > really??? Not sure about it. I agree with Julian. I'm fairly sure it's worse. The change you suggest doesn't par

Re: [PATCH] liquidio: fix: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

2020-12-29 Thread Joe Perches
On Wed, 2020-12-30 at 14:41 +0800, YANG LI wrote: > For safety, modify '%u' to '%d' to keep the type consistent. There is no additional safety here. The for loop ensures that i is positive as num_ioq_vector is also int and so i can not be negative as it's incremented from 0. > diff --git a/drive

Re: [PATCH] liquidio: style: Identical condition and return expression 'retval', return value is always 0.

2020-12-29 Thread Joe Perches
On Wed, 2020-12-30 at 14:07 +0800, YANG LI wrote: > The warning was because of the following line in function > liquidio_set_fec(): > > retval = wait_for_sc_completion_timeout(oct, sc, 0); > if (retval) > return (-EIO); I presume abaci is a robot Perhaps also the robot could look for c

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_mo

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.

[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

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

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 l

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: pr

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 >

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

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 addresse

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 withou

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 busine

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

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 e

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 a

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

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 semicolo

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 c

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

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/

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 reviewe

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-in

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/o

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 skill

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

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: [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 c

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 th

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_

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. > > >

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

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 be

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

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 d

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 fil

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

2020-11-19 Thread Joe Perches
gt; 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 filen

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; >  

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 sty

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

2020-11-16 Thread Joe Perches
mmonly 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: > - C

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/5

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 w

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

2020-11-08 Thread Joe Perches
On Sun, 2020-11-08 at 08:34 +0100, Lukas Bulwahn wrote: > On Sat, 7 Nov 2020, Joe Perches wrote: > > On Fri, 2020-11-06 at 23:55 -0800, Nick Desaulniers wrote: > > > Clang is more aggressive about -Wformat warnings when the format flag > > > specifies a type smaller

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-07 Thread Joe Perches
On Sat, 2020-11-07 at 20:54 +0800, Alex Shi wrote: > 在 2020/11/7 上午12:39, Florian Fainelli 写道: > > > It is good to remember that there are multiple readers of source > > > files. There is the compiler which generates code from it, and there > > > is the human trying to understand what is going on,

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

2020-11-07 Thread Joe Perches
On Fri, 2020-11-06 at 23:55 -0800, Nick Desaulniers wrote: > Clang is more aggressive about -Wformat warnings when the format flag > specifies a type smaller than the parameter. Fixes 8 instances of: > > warning: format specifies type 'unsigned short' but the argument has > type 'int' [-Wformat]

Re: [PATCH] libbpf: Remove unnecessary conversion to bool

2020-11-06 Thread Joe Perches
On Fri, 2020-11-06 at 13:32 -0800, Andrii Nakryiko wrote: > On Thu, Nov 5, 2020 at 11:12 PM wrote: > > Fix following warning from coccinelle: > > ./tools/lib/bpf/libbpf.c:1478:43-48: WARNING: conversion to bool not needed > > here [] > > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-06 Thread Joe Perches
On Fri, 2020-11-06 at 16:28 +0800, Alex Shi wrote: > > 在 2020/11/6 下午2:36, Joe Perches 写道: > > On Fri, 2020-11-06 at 13:37 +0800, Alex Shi wrote: > > > There are some macros unused, they causes much gcc warnings. Let's > > > remove them to tame gcc. > > &

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-05 Thread Joe Perches
On Fri, 2020-11-06 at 13:37 +0800, Alex Shi wrote: > There are some macros unused, they causes much gcc warnings. Let's > remove them to tame gcc. I believe these to be essentially poor warnings. Aren't these warnings generated only when adding W=2 to the make command line? Perhaps it's better

Re: [PATCH] cxgb4: Fix the -Wmisleading-indentation warning

2020-11-05 Thread Joe Perches
On Wed, 2020-11-04 at 13:24 +0800, xiakaixu1...@gmail.com wrote: > From: Kaixu Xia > > Fix the gcc warning: > > drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:2673:9: warning: this > 'for' clause does not guard... [-Wmisleading-indentation] >  2673 | for (i = 0; i < n; ++i) \ true,

Re: [PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-02 Thread Joe Perches
On Mon, 2020-11-02 at 16:20 +0100, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Andy brought to my attention the fact that users allocating an array of > equally sized elements should check if the size multiplication doesn't > overflow. This is why we have helpers like kmalloc_array

Re: [PATCH 3/8] vhost: vringh: use krealloc_array()

2020-10-27 Thread Joe Perches
On Tue, 2020-10-27 at 17:58 +0100, Bartosz Golaszewski wrote: > On Tue, Oct 27, 2020 at 5:50 PM Joe Perches wrote: > > > > On Tue, 2020-10-27 at 11:28 -0400, Michael S. Tsirkin wrote: > > > On Tue, Oct 27, 2020 at 01:17:20PM +0100, Bartosz Golaszewski wrote: > >

Re: [PATCH 3/8] vhost: vringh: use krealloc_array()

2020-10-27 Thread Joe Perches
On Tue, 2020-10-27 at 11:28 -0400, Michael S. Tsirkin wrote: > On Tue, Oct 27, 2020 at 01:17:20PM +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Use the helper that checks for overflows internally instead of manually > > calculating the size of the new array. > > > > Sig

Re: [PATCH -next] neigh: remove the extra slash

2020-10-24 Thread Joe Perches
On Fri, 2020-10-23 at 13:16 +0300, Vasily Averin wrote: > On 10/23/20 1:01 PM, Zhang Qilong wrote: > > The normal path has only one slash. > > it is not normal path > this string is used to calculate number of symbols in "net/%s/neigh/%s" used > below Then probably better would be to add +1 rath

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-20 Thread Joe Perches
On Mon, 2020-10-19 at 12:42 -0700, Nick Desaulniers wrote: > On Sat, Oct 17, 2020 at 10:43 PM Greg KH wrote: > > On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > This is a upcoming change to clean up a new warning treewide. > > > I am wondering if

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

2020-10-19 Thread Joe Perches
On Mon, 2020-10-19 at 16:40 +, Srinivasan Raju wrote: > > Overall, there are many magic numbers without comments, this makes it hard > > to > > understand the code. Using defines with proper naming helps and for 802.11 > > stuff > > can use ieee80211_*/IEEE80211_* should be used. > > Thanks

Re: [PATCH] wireless: remove unneeded break

2020-10-19 Thread Joe Perches
On Mon, 2020-10-19 at 10:54 -0500, Gustavo A. R. Silva wrote: > On 10/19/20 10:21, Joe Perches wrote: > > On Mon, 2020-10-19 at 17:14 +0200, Christian Lamparter wrote: > > > On 19/10/2020 17:05, t...@redhat.com wrote: > > > > From: Tom Rix > > > > >

Re: [PATCH] wireless: remove unneeded break

2020-10-19 Thread Joe Perches
On Mon, 2020-10-19 at 17:14 +0200, Christian Lamparter wrote: > On 19/10/2020 17:05, t...@redhat.com wrote: > > From: Tom Rix > > > > A break is not needed if it is preceded by a return or goto > > > > Signed-off-by: Tom Rix > > diff --git a/drivers/net/wireless/intersil/p54/eeprom.c > > b/dri

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

2020-10-18 Thread Joe Perches
On Mon, 2020-10-19 at 08:47 +0530, Srinivasan Raju wrote: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices. Mostly trivial comments: > diff --git a/drivers/net/wireless/purelifi/chip.c > b/drivers/net/wireless/purelifi/chip.c [] > +int purelifi_chip_set_ra

Re: [Ocfs2-devel] [RFC] treewide: cleanup unreachable breaks

2020-10-18 Thread Joe Perches
On Sun, 2020-10-18 at 19:59 +0100, Matthew Wilcox wrote: > On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote: > > clang has a number of useful, new warnings see > > https://urldefense.com/v3/__https://clang.llvm.org/docs/DiagnosticsReference.html__;!!GqivPVa7Brio!Krxz78O3RKcB9JBMVo_F9

Re: [Cocci] [RFC] treewide: cleanup unreachable breaks

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 20:21 +0200, Julia Lawall wrote: > On Sat, 17 Oct 2020, Joe Perches wrote: > > On Sat, 2020-10-17 at 09:09 -0700, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > This is a upcoming change to clean up a new warning treewide. > &g

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 09:09 -0700, t...@redhat.com wrote: > From: Tom Rix > > This is a upcoming change to clean up a new warning treewide. > I am wondering if the change could be one mega patch (see below) or > normal patch per file about 100 patches or somewhere half way by collecting > early a

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

2020-10-16 Thread Joe Perches
On Fri, 2020-10-16 at 12:04 +0530, Srinivasan Raju wrote: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices. Suggested neatening patch on top of this: o Use include "usb.h" instead of direct extern o Prefix purelifi to speed and send_packet_from_data_queue f

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

2020-10-15 Thread Joe Perches
On Wed, 2020-10-14 at 11:49 +0530, Srinivasan Raju wrote: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices. trivia: netdev_ might be better than dev_. > diff --git a/drivers/net/wireless/purelifi/chip.c > b/drivers/net/wireless/purelifi/chip.c [] > +int pu

iwlwifi: spaces in procfs filenames ?

2020-10-13 Thread Joe Perches
commit 64fa3aff89785b5a924ce3934f6595c35b4dffee Author: Sharon Dvir Date: Wed Aug 17 15:35:09 2016 +0300 iwlwifi: pcie: give a meaningful name to interrupt request perhaps unintentionally for file: drivers/net/wireless/intel/iwlwifi/pcie/internal.h in function static inline const char *qu

Re: [PATCH AUTOSEL 5.8 18/24] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 15:02 -0400, Sasha Levin wrote: > From: Anant Thazhemadam > > [ Upstream commit f45a4248ea4cc13ed50618ff066849f9587226b2 ] > > When get_registers() fails in set_ethernet_addr(),the uninitialized > value of node_id gets copied over as the address. > So, check the return valu

Re: [PATCH v2] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-11 Thread Joe Perches
On Sun, 2020-10-11 at 22:31 +0300, Petko Manolov wrote: > On 20-10-11 11:33:00, Joe Perches wrote: > > On Sun, 2020-10-11 at 10:59 -0700, Jakub Kicinski wrote: > > > On Sun, 11 Oct 2020 23:00:30 +0530 Anant Thazhemadam wrote: > > > > In set_ethernet_addr(), if

Re: [PATCH v2] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-11 Thread Joe Perches
On Sun, 2020-10-11 at 10:59 -0700, Jakub Kicinski wrote: > On Sun, 11 Oct 2020 23:00:30 +0530 Anant Thazhemadam wrote: > > In set_ethernet_addr(), if get_registers() succeeds, the ethernet address > > that was read must be copied over. Otherwise, a random ethernet address > > must be assigned. > >

Re: [PATCH] rtlwifi: rtl8192se: remove duplicated legacy_httxpowerdiff

2020-10-05 Thread Joe Perches
On Tue, 2020-10-06 at 11:59 +0800, Chris Chiu wrote: > From: Chris Chiu > > The legacy_httxpowerdiff in rtl8192se is pretty much the same as > the legacy_ht_txpowerdiff for other chips. Use the same name to > keep the consistency. > > Signed-off-by: Chris Chiu > --- > drivers/net/wireless/real

Re: [PATCH v3] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails

2020-10-03 Thread Joe Perches
On Sun, 2020-10-04 at 02:49 +0530, Anant Thazhemadam wrote: > When get_registers() fails, in set_ethernet_addr(),the uninitialized > value of node_id gets copied as the address. This can be considered as > set_ethernet_addr() itself failing. [] > diff --git a/drivers/net/usb/rtl8150.c b/drivers/net

Re: [Linux-kernel-mentees][PATCH v2] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-10-03 Thread Joe Perches
On Thu, 2020-10-01 at 13:02 +0530, Anant Thazhemadam wrote: > When get_registers() fails (which happens when usb_control_msg() fails) > in set_ethernet_addr(), the uninitialized value of node_id gets copied > as the address. unrelated trivia: > diff --git a/drivers/net/usb/rtl8150.c b/drivers/net

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

2020-09-28 Thread Joe Perches
On Mon, 2020-09-28 at 15:49 +0530, Srinivasan Raju wrote: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices, which provide lightweight, highspeed secure and > fully networked wireless communications via light. trivial notes: > diff --git a/drivers/net/wirele

Re: [patch 00/35] net: in_interrupt() cleanup and fixes

2020-09-27 Thread Joe Perches
On Sun, 2020-09-27 at 21:48 +0200, Thomas Gleixner wrote: > Folks, > > in the discussion about preempt count consistency accross kernel > configurations: > > https://lore.kernel.org/r/20200914204209.256266...@linutronix.de/ > > Linus clearly requested that code in drivers and libraries which

[PATCH] rtlwifi: Use ffs in _phy_calculate_bit_shift

2020-09-18 Thread Joe Perches
Remove the loop and use the generic ffs instead. Signed-off-by: Joe Perches --- Just saw one by happenstance, might as well fix them all. drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 18 ++ .../net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c | 8

Re: [PATCH net-next v5 1/6] lib8390: Fix coding style issues and remove version printing

2020-09-14 Thread Joe Perches
On Mon, 2020-09-14 at 23:01 +0200, Armin Wolf wrote: > Fix various checkpatch warnings. > > Remove version printing so modules including lib8390 do not > have to provide a global version string for successful > compilation. This 8390 code is for a _really_ old driver. It doesn't seem likely these

Re: [PATCH net-next v5 2/6] lib8390: Replace pr_cont() with SMP-safe construct

2020-09-14 Thread Joe Perches
On Mon, 2020-09-14 at 23:01 +0200, Armin Wolf wrote: > Replace pr_cont() with SMP-safe construct. > > Signed-off-by: Armin Wolf > --- > drivers/net/ethernet/8390/lib8390.c | 31 +++-- > 1 file changed, 12 insertions(+), 19 deletions(-) > > diff --git a/drivers/net/ethern

Re: [PATCH net-next] octeontx2-af: Constify npc_kpu_profile_{action,cam}

2020-09-13 Thread Joe Perches
On Sat, 2020-09-12 at 00:00 +0200, Rikard Falkeborn wrote: > These are never modified, so constify them to allow the compiler to > place them in read-only memory. This moves about 25kB to read-only > memory as seen by the output of the size command. Nice. Did you find this by tool or inspection?

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Joe Perches
On Thu, 2020-09-10 at 15:21 +0100, Robin Murphy wrote: > On 2020-09-09 21:06, Joe Perches wrote: > > fallthrough to a separate case/default label break; isn't very readable. > > > > Convert pseudo-keyword fallthrough; statements to a simple break; when > > the n

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 19:36 -0300, Jason Gunthorpe wrote: > On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > > fallthrough to a separate case/default label break; isn't very readable. > > > > Convert pseudo-keyword fallthrough; statements to a simple brea

[trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Joe Perches
h] -n "fallthrough;(\s*(case\s+\w+|default)\s*:\s*){1,7}break;" * Miscellanea: o Move or coalesce a couple label blocks above a default: block. Signed-off-by: Joe Perches --- Compiled allyesconfig x86-64 only. A few files for other arches were not compiled. arch/arm/mach-

Re: [PATCH][next] mt7601u: Use fallthrough pseudo-keyword

2020-09-09 Thread Joe Perches
On Tue, 2020-09-01 at 12:36 -0500, Gustavo A. R. Silva wrote: > Replace the existing /* fall through */ comments and its variants with > the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary > fall-through markings when it is the case. [] > diff --git a/drivers/net/wireless/mediatek

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

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 02:33 -0700, Joe Perches wrote: > On Wed, 2020-09-09 at 16:51 +0800, Wei Xu wrote: > > 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/

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

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 16:51 +0800, Wei Xu wrote: > 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 > b/drivers/net/ethernet/intel/iavf/iavf_adminq.h [] > @@ -120,7 +120

Re: [PATCH net] net: phy: dp83867: Fix various styling and space issues

2020-09-03 Thread Joe Perches
On Thu, 2020-09-03 at 11:41 -0500, Dan Murphy wrote: > On 9/3/20 11:34 AM, Florian Fainelli wrote: > > On 9/3/2020 7:15 AM, Dan Murphy wrote: > > > Fix spacing issues reported for misaligned switch..case and extra new > > > lines. [] > > > diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp

  1   2   3   4   5   6   7   8   9   10   >