[PATCH] gianfar: remove definition of DEBUG

2021-01-13 Thread trix
From: Tom Rix Defining DEBUG should only be done in development. So remove DEBUG. Signed-off-by: Tom Rix --- drivers/net/ethernet/freescale/gianfar.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index d3

[PATCH] neighbor: remove definition of DEBUG

2021-01-14 Thread trix
From: Tom Rix Defining DEBUG should only be done in development. So remove DEBUG. Signed-off-by: Tom Rix --- net/core/neighbour.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 277ed854aef1..ff073581b5b1 100644 --- a/net/core/neighbour.c ++

[PATCH] net: ks8851: remove definition of DEBUG

2021-01-15 Thread trix
From: Tom Rix Defining DEBUG should only be done in development. So remove DEBUG. Signed-off-by: Tom Rix --- drivers/net/ethernet/micrel/ks8851_common.c | 2 -- drivers/net/ethernet/micrel/ks8851_par.c| 2 -- drivers/net/ethernet/micrel/ks8851_spi.c| 2 -- 3 files changed, 6 deletions(

[PATCH] net: phy: national: remove definition of DEBUG

2021-01-15 Thread trix
From: Tom Rix Defining DEBUG should only be done in development. So remove DEBUG. Signed-off-by: Tom Rix --- drivers/net/phy/national.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/phy/national.c b/drivers/net/phy/national.c index 5a8c8eb18582..46160baaafe3 100644 --- a/dri

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

2021-01-17 Thread trix
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 r

[PATCH] net: hns: fix variable used when DEBUG is defined

2021-01-17 Thread trix
From: Tom Rix When DEBUG is defined this error occurs drivers/net/ethernet/hisilicon/hns/hns_enet.c:1505:36: error: ‘struct net_device’ has no member named ‘ae_handle’; did you mean ‘rx_handler’? assert(skb->queue_mapping < ndev->ae_handle->q_num); ^

[PATCH] atm: ambassador: remove h from printk format specifier

2020-12-15 Thread trix
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/ambassador.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassa

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

2020-12-15 Thread trix
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 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c i

[PATCH v2] net: bna: remove trailing semicolon in macro definition

2020-12-02 Thread trix
From: Tom Rix The macro use will already have a semicolon. Clean up escaped newlines. Signed-off-by: Tom Rix --- v2: fix other macros, cleanup newlines --- drivers/net/ethernet/brocade/bna/bna_hw_defs.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/driv

[PATCH v2] bpf: remove trailing semicolon in macro definition

2020-12-02 Thread trix
From: Tom Rix The macro use will already have a semicolon. Clean up escaped newlines Signed-off-by: Tom Rix --- v2: more macros fixed, escaped newlines cleaned --- include/trace/events/xdp.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/trace/events/x

[RFC] MAINTAINERS tag for cleanup robot

2020-11-21 Thread trix
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 con

[PATCH] net: bna: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- drivers/net/ethernet/brocade/bna/bna_hw_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/brocade/bna/bna_hw_defs.h b/drivers/net/ethernet/brocade/bna/bna_hw

[PATCH] net: wan: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- drivers/net/wan/pci200syn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index d0062224b216..ba5cc0c53833 100644 --- a/drivers/

[PATCH] net: carl9170: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- drivers/net/wireless/ath/carl9170/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/carl9170/debug.c b/drivers/net/wireless/ath/carl9170/debug.c index 1

[PATCH] net: ath9k: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- drivers/net/wireless/ath/ath9k/common-debug.c | 2 +- drivers/net/wireless/ath/ath9k/dfs_debug.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/common

[PATCH] net: cisco: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- drivers/net/wireless/cisco/airo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c index 74acf9af2adb..ba62bb2995d9 10

[PATCH] net: iwlwifi: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- drivers/net/wireless/intel/iwlwifi/dvm/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/fw/api/coex.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlw

[PATCH] net: wl1251: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- drivers/net/wireless/ti/wl1251/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wl1251/debugfs.c b/drivers/net/wireless/ti/wl1251/debugfs.c index d48746e6

[PATCH] bpf: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- include/trace/events/xdp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h index cd24e8a59529..65ffedf8386f 100644 --- a/include

[PATCH] netfilter: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- include/net/netfilter/nf_tables_offload.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/netfilter/nf_tables_offload.h b/include/net/netfilter/nf_tables_offload.h index 1d34f

[PATCH] mac80211: remove trailing semicolon in macro definition

2020-11-28 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- net/mac80211/debugfs.c| 2 +- net/mac80211/debugfs_key.c| 2 +- net/mac80211/debugfs_netdev.c | 6 +++--- net/mac80211/debugfs_sta.c| 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) di

[PATCH] net: flow_offload: remove trailing semicolon in macro definition

2020-11-28 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- net/core/flow_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c index d4474c812b64..59ddfd3f3876 100644 --- a/net/core/flow_offloa

[PATCH] NFS: remove trailing semicolon in macro definition

2020-11-28 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- net/sunrpc/auth_gss/gss_generic_token.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/auth_gss/gss_generic_token.c b/net/sunrpc/auth_gss/gss_generic_token.c index fe97f310653

[PATCH] net: ena: remove h from printk format specifier

2020-12-23 Thread trix
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

[PATCH] igb: remove h from printk format specifier

2020-12-23 Thread trix
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

[PATCH] net/mlx5e: remove h from printk format specifier

2020-12-23 Thread trix
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

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

2020-12-23 Thread trix
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

[PATCH] nfp: remove h from printk format specifier

2020-12-23 Thread trix
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

[PATCH] qed: remove h from printk format specifier

2020-12-23 Thread trix
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

[PATCH] via-velocity: remove h from printk format specifier

2020-12-23 Thread trix
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

[PATCH] rxrpc: fix handling of an unsupported token type in rxrpc_read()

2020-12-29 Thread trix
From: Tom Rix clang static analysis reports this problem net/rxrpc/key.c:657:11: warning: Assigned value is garbage or undefined toksize = toksizes[tok++]; ^ ~~~ rxrpc_read() contains two loops. The first loop calculates the token sizes and s

[PATCH] wireless: remove unneeded break

2020-10-19 Thread trix
From: Tom Rix A break is not needed if it is preceded by a return or goto Signed-off-by: Tom Rix --- drivers/net/wireless/ath/ath10k/htt_rx.c | 1 - drivers/net/wireless/ath/ath6kl/testmode.c | 1 - drivers/net/wireless/ath/ath9k/hw.c | 1 - drivers/net/w

[PATCH] net: can: remove unneeded break

2020-10-19 Thread trix
From: Tom Rix A break is not needed if it is preceded by a return Signed-off-by: Tom Rix --- .../net/can/spi/mcp251xfd/mcp251xfd-core.c| 22 +-- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can

[PATCH] net: remove unneeded break

2020-10-19 Thread trix
From: Tom Rix A break is not needed if it is preceded by a return or goto Signed-off-by: Tom Rix --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 1 - drivers/net/ethernet/cisco/enic/enic_ethtool.c | 1 - drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 1 - drivers/net/wan/lmc/lmc_prot

[PATCH] bpf: remove unneeded break

2020-10-19 Thread trix
From: Tom Rix A break is not needed if it is preceded by a return Signed-off-by: Tom Rix --- kernel/bpf/syscall.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 1110ecd7d1f3..8f50c9c19f1b 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/s

[PATCH] nfc: remove unneeded break

2020-10-19 Thread trix
From: Tom Rix A break is not needed if it is preceded by a return Signed-off-by: Tom Rix --- drivers/nfc/st21nfca/core.c | 1 - drivers/nfc/trf7970a.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c index 2ce17932a073..6ca0d2f

[PATCH v2] wireless: remove unneeded break

2020-10-20 Thread trix
From: Tom Rix A break is not needed if it is preceded by a return Signed-off-by: Tom Rix --- v2: remove intersil/p54/eeprom.c --- drivers/net/wireless/ath/ath10k/htt_rx.c | 1 - drivers/net/wireless/ath/ath6kl/testmode.c | 1 - drivers/net/wireless/ath/ath9k/hw.c

Subject: [RFC] clang tooling cleanups

2020-10-27 Thread trix
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 s

[PATCH] net: dsa: mt7530: remove unneeded semicolon

2020-10-31 Thread trix
From: Tom Rix A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix --- drivers/net/dsa/mt7530.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index de7692b763d8..771f58f50d61 100644 --- a/drivers/ne

[PATCH] net/mlx4_core : remove unneeded semicolon

2020-11-01 Thread trix
From: Tom Rix A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/m

[PATCH] net: stmmac: dwmac-meson8b: remove unneeded semicolon

2020-11-01 Thread trix
From: Tom Rix A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix --- drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmic

[PATCH] net: core: remove unneeded semicolon

2020-11-01 Thread trix
From: Tom Rix A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 751e5264fd49..10f5d0c3d0d7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -

[PATCH] ethtool: remove unneeded semicolon

2020-11-01 Thread trix
From: Tom Rix A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix --- net/ethtool/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index ec2cd7aab5ad..771688e1b0da 100644 --- a/net/ethtool/ioctl.c +++ b

[PATCH] tipc: remove unneeded semicolon

2020-11-01 Thread trix
From: Tom Rix A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix --- net/tipc/link.c | 2 +- net/tipc/node.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index 06b880da2a8e..97b1c6bd45dc 100644 --- a/net/tipc/l

[PATCH] can: mcba_usb: remove h from printk format specifier

2021-01-24 Thread trix
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[xud

[PATCH] ipvlan: remove h from printk format specifier

2021-01-24 Thread trix
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[xud

[PATCH] net: phy: remove h from printk format specifier

2021-01-25 Thread trix
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[xud

[PATCH] ath10k: remove h from printk format specifier

2021-01-27 Thread trix
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[xud

[PATCH] ath11k: remove h from printk format specifier

2021-01-28 Thread trix
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[xud

[PATCH] iwlwifi: mvm: remove h from printk format specifier

2021-01-28 Thread trix
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[xud

[PATCH] rndis_wlan: tighten check of rndis_query_oid return

2020-08-11 Thread trix
From: Tom Rix clang static analysis reports this problem rndis_wlan.c:3147:25: warning: Assigned value is garbage or undefined wiphy->max_num_pmkids = le32_to_cpu(caps.num_pmkids); ^ The setting of caps happens h

[PATCH] net: dsa: b53: check for timeout

2020-08-21 Thread trix
From: Tom Rix clang static analysis reports this problem b53_common.c:1583:13: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage ent.port &= ~BIT(port); ^ ent is set by a successful call to b53

[PATCH] net: sched: skip an unnecessay check

2020-09-07 Thread trix
From: Tom Rix Reviewing the error handling in tcf_action_init_1() most of the early handling uses err_out: if (cookie) { kfree(cookie->data); kfree(cookie); } before cookie could ever be set. So skip the unnecessay check. Signed-off-by: Tom Rix

[PATCH] brcmfmac: initialize variable

2020-09-13 Thread trix
From: Tom Rix clang static analysis flags this problem sdio.c:3265:13: warning: Branch condition evaluates to a garbage value } else if (pending) { ^~~ brcmf_sdio_dcmd_resp_wait() only sets pending to true. So pending needs to be initialized to false. Fixes: 5b4

[PATCH] rtw88: fix fw_fifo_addr check

2020-10-11 Thread trix
From: Tom Rix The clang build reports this warning fw.c:1485:21: warning: address of array 'rtwdev->chip->fw_fifo_addr' will always evaluate to 'true' if (!rtwdev->chip->fw_fifo_addr) { fw_fifo_addr is an array in rtw_chip_info so it is always nonzero. A better check is if the first

[PATCH] ptp: ptp_clockmatrix: initialize variables

2020-10-11 Thread trix
From: Tom Rix Clang static analysis reports this representative problem ptp_clockmatrix.c:1852:2: warning: 5th function call argument is an uninitialized value snprintf(idtcm->version, sizeof(idtcm->version), "%u.%u.%u", ^

[RFC] treewide: cleanup unreachable breaks

2020-10-17 Thread trix
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 acks. clang has a number of useful, new warnings see https://clang.llv

[PATCH] ieee802154/adf7242: check status of adf7242_read_reg

2020-08-02 Thread trix
From: Tom Rix Clang static analysis reports this error adf7242.c:887:6: warning: Assigned value is garbage or undefined len = len_u8; ^ ~~ len_u8 is set in adf7242_read_reg(lp, 0, &len_u8); When this call fails, len_u8 is not set. So check the return code. Fixe

[PATCH] brcmfmac: check ndev pointer

2020-08-02 Thread trix
From: Tom Rix Clang static analysis reports this error brcmfmac/core.c:490:4: warning: Dereference of null pointer (*ifp)->ndev->stats.rx_errors++; ^~~ In this block of code if (ret || !(*ifp) || !(*ifp)->ndev) { if (ret != -E

[PATCH] ipvs: add prameter name to ip_vs_enqueue_expire_nodest_conns

2020-07-21 Thread trix
From: Tom Rix Compile error here In file included from net/netfilter/ipvs/ip_vs_conn.c:37: ip_vs.h: In function ‘ip_vs_enqueue_expire_nodest_conns’: ip_vs.h:1536:54: error: parameter name omitted So add parameter name Fixes: 04231e52d355 ("ipvs: queue delayed work to expire no destination con

[PATCH] bpf: BPF_SYSCALL depends INET

2020-07-23 Thread trix
From: Tom Rix A link error kernel/bpf/net_namespace.o: In function `bpf_netns_link_release': net_namespace.c: undefined reference to `bpf_sk_lookup_enabled' bpf_sk_lookup_enabled is defined with INET net_namespace is controlled by BPF_SYSCALL So add a depends on INET to BPF_SYSCALL Signed-off

[PATCH] net: cdc_ncm: USB_NET_CDC_NCM selects USB_NET_CDCETHER

2020-07-23 Thread trix
From: Tom Rix A link error ld: drivers/net/usb/cdc_ncm.o: undefined reference to `usbnet_cdc_update_filter' usbnet_cdc_update_filter is defined in cdc_ether.c Building of cdc_ether.o is controlled by USB_NET_CDCETHER Building of cdc_ncm.o is controlled by USB_NET_CDC_NCM So add a select USB

[PATCH] can: j1939: fix double free in j1939_netdev_start

2020-07-10 Thread trix
From: Tom Rix clang static analysis flags this error j1939/main.c:292:2: warning: Attempt to free released memory [unix.Malloc] kfree(priv); ^~~ The problem block of code is ret = j1939_can_rx_register(priv); if (ret < 0) goto out_priv_pu

[PATCH] net: openvswitch: pass NULL for unused parameters

2020-08-30 Thread trix
From: Tom Rix clang static analysis flags these problems flow_table.c:713:2: warning: The expression is an uninitialized value. The computed value will also be garbage (*n_mask_hit)++; ^~~ flow_table.c:748:5: warning: The expression is an uninitialized value. The

[PATCH v2] net: openvswitch: pass NULL for unused parameters

2020-08-30 Thread trix
From: Tom Rix clang static analysis flags these problems flow_table.c:713:2: warning: The expression is an uninitialized value. The computed value will also be garbage (*n_mask_hit)++; ^~~ flow_table.c:748:5: warning: The expression is an uninitialized value. The

[PATCH] mwifiex: remove function pointer check

2020-09-06 Thread trix
From: Tom Rix clang static analyzer reports this problem init.c:739:8: warning: Called function pointer is null (null dereference) ret = adapter->if_ops.check_fw_status( ... ^ In mwifiex_dnld_fw, there is an earlier check for check_fw_stat

[PATCH] ath11k: fix a double free and a memory leak

2020-09-06 Thread trix
From: Tom Rix clang static analyzer reports this problem mac.c:6204:2: warning: Attempt to free released memory kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); ^ The channels pointer is allocated in ath11k_mac_setup_channels_rat

[PATCH] net: mvneta: fix double free of txq->buf

2020-10-03 Thread trix
From: Tom Rix clang static analysis reports this problem: drivers/net/ethernet/marvell/mvneta.c:3465:2: warning: Attempt to free released memory kfree(txq->buf); ^~~ When mvneta_txq_sw_init() fails to alloc txq->tso_hdrs, it frees without poisoning txq->buf. The e

[PATCH] wireless: mwifiex: fix double free

2020-10-04 Thread trix
From: Tom Rix clang static analysis reports this problem: sdio.c:2403:3: warning: Attempt to free released memory kfree(card->mpa_rx.buf); ^~~ When mwifiex_init_sdio() fails in its first call to mwifiex_alloc_sdio_mpa_buffer, it falls back to calling it again

[PATCH] net: sky2: initialize return of gm_phy_read

2020-07-03 Thread trix
From: Tom Rix clang static analysis flags this garbage return drivers/net/ethernet/marvell/sky2.c:208:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return v; ^~~~ static inline u16 gm_phy_read( ... { u16 v; __gm_p