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
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
++
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(
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
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
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);
^
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
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
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
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
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
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
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/
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
@@ -
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
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
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
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
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
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
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
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
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
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
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
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
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
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",
^
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
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
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
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
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
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
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
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
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
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
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
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
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
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
70 matches
Mail list logo