[PATCH] [media] b2c2: 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/media/common/b2c2/flexcop-hw-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/common/b2c2/flexcop-hw-filter.c b/drivers/media/common/b2c2/flexcop-hw-filter.c

[PATCH] [media] s5k5baf: 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/media/i2c/s5k5baf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c index ec6f22efe19a..6e702b57c37d 100644 --- a/drivers/

[PATCH] [media] si4713: 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/media/radio/si4713/si4713.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 6afa7c3464ab..fcb4030b9

[PATCH] misc: altera-stapl: 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/misc/altera-stapl/altera-jtag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/altera-stapl/altera-jtag.c b/drivers/misc/altera-stapl/altera-jtag.c index 27e8e0c

[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] platform/x86: thinkpad_acpi: 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/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 36d9594bca7f..5bbb37

[PATCH] scsi: aic7xxx: 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/scsi/aic7xxx/aic79xx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 98b02e7d38bb..ce8604d73

[PATCH] scsi: qla2xxx: 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/scsi/qla2xxx/qla_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index ed9b10f8537d..86d249551b2d 100644 --- a

[PATCH] [SCSI] sym53c8xx: 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/scsi/sym53c8xx_2/sym_glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index d9a045f9858c..f3b33

[PATCH] USB: 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/usb/host/u132-hcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c index 995bc52d2d22..eb96e1e15b71 100644 --- a/dr

[PATCH] locks: 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 --- fs/fcntl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 05b36b28f2e8..96a65758c498 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -526,7 +526,7 @@ SYSCALL_DEF

[PATCH] gfs2: 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 --- fs/gfs2/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index d7562981b3a0..493020393ceb 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h @@ -162,7 +

[PATCH] omapfb: fbcon: 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/video/fbdev/omap2/omapfb/dss/dispc-compat.c | 2 +- drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/omap2

[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] MAINTAINERS add D: tag for subsystem commit prefix

2020-11-27 Thread trix
From: Tom Rix From RFC MAINTAINERS tag for cleanup robot https://lkml.org/lkml/2020/11/21/190 The prefix used by subsystems in their commit log is arbitrary. To elimitate the time and effort to manually find a reasonable prefix, store the preferred prefix in the MAINTAINERS file. Populate with

[PATCH] ALSA: 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/sound/hda_codec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h index 73827b7d17e0..2e8d51937acd 100644 --- a/include/sound/

[PATCH] scsi: 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/scsi/scsi_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/scsi/scsi_driver.h b/include/scsi/scsi_driver.h index 6dffa8555a39..f6221c006aa7 100644 --- a/include/scs

[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] locking/selftest: 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 --- lib/locking-selftest.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index a899b3f0e2e5..69b4a1160094 100644 --- a/lib/locking-

[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] keys: 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 --- include/linux/key.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/key.h b/include/linux/key.h index 0f2e24f13c2b..1b0837c975b9 100644 --- a/include/linux/key.h +++ b/in

[PATCH] jffs2: 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 --- fs/jffs2/nodelist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h index 8ff4d1a1e774..2e98fa277dab 100644 --- a/fs/jffs2/nodelist.h +++ b/fs

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

[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 1/1] selinux: fix double free

2020-06-10 Thread trix
From: Tom Rix Clang's static analysis tool reports these double free memory errors. security/selinux/ss/services.c:2987:4: warning: Attempt to free released memory [unix.Malloc] kfree(bnames[i]); ^~~~ security/selinux/ss/services.c:299

[PATCH 0/1] selinux: fix double free

2020-06-10 Thread trix
From: Tom Rix Repo: linux-next Tag: next-20200609 Running clang scan-view over linux-next uncovers many problem only a few are memory related, this one looked like the most serious. Tom Rix (1): selinux: fix double free security/selinux/ss/services.c | 4 1 file changed, 4 insertions(+

[PATCH v2 1/1] selinux: fix double free

2020-06-10 Thread trix
From: Tom Rix Clang's static analysis tool reports these double free memory errors. security/selinux/ss/services.c:2987:4: warning: Attempt to free released memory [unix.Malloc] kfree(bnames[i]); ^~~~ security/selinux/ss/services.c:299

[PATCH v2 0/1] selinux: fix double free

2020-06-10 Thread trix
From: Tom Rix repo: linux-next tag: next-20200610 Running clang scan-view over linux-next uncovers many problem only a few are memory related, this one looked like the most serious. Changes from v1 Fix call to kfree - kfree(names); + kfree(*names); Tom Rix (1):

[PATCH] selinux: fix another double free

2020-06-11 Thread trix
From: Tom Rix Clang static analysis reports this double free error security/selinux/ss/conditional.c:139:2: warning: Attempt to free released memory [unix.Malloc] kfree(node->expr.nodes); ^~~ When cond_read_node fails, it calls cond_node_destroy which frees

[PATCH v2 1/1] selftests: fpga: dfl: A test for afu interrupt support

2020-06-11 Thread trix
From: Tom Rix Check that the ioctl DFL_FPGA_PORT_ERR_GET_IRQ_NUM returns an expected result. Tested on vf device 0xbcc1 Sample run with # make -C tools/testing/selftests TARGETS=drivers/fpga run_tests ... # selftests: drivers/fpga: afu_intr # # Pass 0 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0

[PATCH v2 0/1] selftests: fpga: dfl: A test for afu interrupt support

2020-06-11 Thread trix
From: Tom Rix repo: linux-next tag: next-20200611 Start applying selftests to drivers/fpga. While testing out this upcoming change on linux-fpga 'Add interrupt support to FPGA DFL drivers' I did not see any existing fpga tests. So I added one. Change from v1 Use ksft_* functions for reporting

[PATCH v2 0/1] selinux: fix another double free

2020-06-11 Thread trix
From: Tom Rix repo: linux-next tag: next-20200611 Change from v1 Convert goto's to returns Remove extra 'the' in the commit log Add note on commit this is fixing in the commit log Tom Rix (1): selinux: fix another double free security/selinux/ss/conditional.c | 11 +++ 1 file chang

[PATCH v2 1/1] selinux: fix another double free

2020-06-11 Thread trix
From: Tom Rix Clang static analysis reports this double free error security/selinux/ss/conditional.c:139:2: warning: Attempt to free released memory [unix.Malloc] kfree(node->expr.nodes); ^~~ When cond_read_node fails, it calls cond_node_destroy which frees

[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

[PATCH] mm: initialize return of vm_insert_pages

2020-07-03 Thread trix
From: Tom Rix clang static analysis reports a garbage return In file included from mm/memory.c:84: mm/memory.c:1612:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return err; ^~ The setting of err depends on a loop executing.

[PATCH v2] mm: initialize return of vm_insert_pages

2020-07-03 Thread trix
From: Tom Rix clang static analysis reports a garbage return In file included from mm/memory.c:84: mm/memory.c:1612:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return err; ^~ The setting of err depends on a loop executing.

[RFC 1/1] fpga: dfl: RFC PCI config

2020-06-30 Thread trix
From: Tom Rix Create some top level configs the map to dfl pci cards. Autoselect the parts of fpga that are needed to run these cards as well as the other subsystem configs to the card's subdevices. Signed-off-by: Tom Rix --- Documentation/fpga/dfl.rst | 33 +

[RFC 0/1] fpga: dfl: RFC PCI config

2020-06-30 Thread trix
From: Tom Rix This configury shows where I would like the dfl pci cards to go by introducing future cards as well as the current pac 10 card. The goal is to fully configure the card in the drivers/fpga area of the config. Collecting configury of the fpga/ parts as well as the subdevices scatter

[RFC v2] fpga: dfl: RFC PCI config

2020-06-30 Thread trix
From: Tom Rix Create some top level configs the map to dfl pci cards. Autoselect the parts of fpga that are needed to run these cards as well as the defining the other subsystem dependencies. Signed-off-by: Tom Rix --- v1 change subsystem selects to depends Documentation/fpga/dfl.rst | 30 +

[PATCH] btrfs : fix memory leak in add_block_entry

2020-07-07 Thread trix
From: Tom Rix clang static analysis flags this error fs/btrfs/ref-verify.c:290:3: warning: Potential leak of memory pointed to by 're' [unix.Malloc] kfree(be); ^ The problem is in this block of code if (root_objectid) {

[PATCH] USB: c67x00: fix use after free in c67x00_giveback_urb

2020-07-08 Thread trix
From: Tom Rix clang static analysis flags this error c67x00-sched.c:489:55: warning: Use of memory after it is freed [unix.Malloc] usb_hcd_giveback_urb(c67x00_hcd_to_hcd(c67x00), urb, urbp->status); ^~~~ Problem happens

[PATCH] nfs: Fix memory leak of export_path

2020-06-12 Thread trix
From: Tom Rix The try_location function is called within a loop by nfs_follow_referral. try_location calls nfs4_pathname_string to created the export_path. nfs4_pathname_string allocates the memory. export_path is stored in the nfs_fs_context/fs_context structure similarly as hostname and source.

[PATCH] crypto: qat: fix double free in qat_uclo_create_batch_init_list

2020-07-13 Thread trix
From: Tom Rix clang static analysis flags this error qat_uclo.c:297:3: warning: Attempt to free released memory [unix.Malloc] kfree(*init_tab_base); ^ When input *init_tab_base is null, the function allocates memory for the head of the list.

[PATCH] reiserfs : fix improper free in reiserfs_get_block

2020-07-14 Thread trix
From: Tom Rix clang static analysis flags this error inode.c:1083:5: warning: Argument to kfree() is the address of the local variable 'unf_single', which is not memory allocated by malloc() [unix.Malloc] kfree(un); ^ As

[PATCH] scsi: qla2xxx: initialize value

2020-10-05 Thread trix
From: Tom Rix clang static analysis reports this problem: qla_nx2.c:694:3: warning: 6th function call argument is an uninitialized value ql_log(ql_log_fatal, vha, 0xb090, ^ In qla8044_poll_reg(), when reading the reg fails, the error is reported

[PATCH] media: ov7670: do not aggregate returns

2020-10-06 Thread trix
From: Tom Rix Adding muliple status together loses individual failures. Check each status separately. Clean up some other returns for consistency. Fixed several coding style problems by running the file through checkpatch.pl --fix-inplace Signed-off-by: Tom Rix --- drivers/media/i2c/ov7670.c

[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] drm/gma500: fix double free of gma_connector

2020-10-03 Thread trix
From: Tom Rix clang static analysis reports this problem: cdv_intel_dp.c:2101:2: warning: Attempt to free released memory kfree(gma_connector); ^~~~ In cdv_intel_dp_init() when the call to cdv_intel_edp_panel_vdd_off() fails, the handler calls cdv_intel_dp_destro

[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] apparmor: fix error check

2020-10-04 Thread trix
From: Tom Rix clang static analysis reports this representative problem: label.c:1463:16: warning: Assigned value is garbage or undefined label->hname = name; ^ In aa_update_label_name(), this the problem block of code if (aa_label_acntsxprint(&name, .

[PATCH] drm/i915/display: fix uninitialized variable

2020-08-25 Thread trix
From: Tom Rix clang static analysis flags this error intel_combo_phy.c:268:7: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage ret &= check_phy_reg(... ~~~ ^ ret has no initial values,

[PATCH] misc: rtsx: improve status check

2020-08-26 Thread trix
From: Tom Rix clang static analysis flags this error rtsx_usb.c:505:10: warning: The left operand of '&' is a garbage value if (val & cd_mask[card]) ~~~ ^ val is set when rtsx_usb_get_card_status() is successful. The problem is how it checks its callers returns.

[PATCH] rcutorture: remove unneeded check

2020-10-09 Thread trix
From: Tom Rix clang static analysis reports this problem: rcutorture.c:1999:2: warning: Called function pointer is null (null dereference) cur_ops->sync(); /* Later readers see above write. */ ^~~ This is a false positive triggered by an earlier, later ignored NULL

[PATCH] nfsd: remove unneeded break

2020-10-11 Thread trix
From: Tom Rix Because every path through nfs4_find_file()'s switch does an explicit return, the break is not needed. Signed-off-by: Tom Rix --- fs/nfsd/nfs4state.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index c09a2a4281ec..741f64672d96 1006

[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", ^

[PATCH 1/1] fpga: dfl: Fix dead store

2020-06-06 Thread trix
From: Tom Rix Using clang's scan-build/view this issue was flagged in fpga-mgr.c drivers/fpga/fpga-mgr.c:585:3: warning: Value stored to 'ret' is never read [deadcode.DeadStores] ret = id; A similar issue was flagged in fpga-bridge. So remove the unused stores. Signed-off

[PATCH 0/1] fpga: dfl: Fix dead store

2020-06-06 Thread trix
From: Tom Rix Repo linux-next Tag next-20200605 A couple of fixes for dead stores found by clang's sa tool scan-build Tom Rix (1): Fix dead store drivers/fpga/fpga-bridge.c | 6 ++ drivers/fpga/fpga-mgr.c| 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) -- 2.26.0

[PATCH v2 1/2] fpga: Fix dead store fpga-mgr.c

2020-06-08 Thread trix
From: Tom Rix Using clang's scan-build/view this issue was flagged in fpga-mgr.c drivers/fpga/fpga-mgr.c:585:3: warning: Value stored to 'ret' is never read [deadcode.DeadStores] ret = id; Signed-off-by: Tom Rix --- drivers/fpga/fpga-mgr.c | 4 +--- 1 file changed, 1 inse

[PATCH v2 0/2] fpga: Fix dead store

2020-06-08 Thread trix
From: Tom Rix repo: linux-next tag: next-20200608 A couple of fixes for dead stores found by clang's sa tool scan-build Main changes from v1: Split single patch into two patch Tom Rix (2): fpga: Fix dead store fpga-mgr.c fpga: Fix dead store in fpga-bridge.c drivers/fpga/fpga-bridge.c |

[PATCH v2 2/2] fpga: Fix dead store in fpga-bridge.c

2020-06-08 Thread trix
From: Tom Rix Using clang's scan-build/view this issue was flagged a dead store issue in fpga-bridge.c warning: Value stored to 'ret' is never read [deadcode.DeadStores] ret = id; Signed-off-by: Tom Rix --- drivers/fpga/fpga-bridge.c | 6 ++ 1 file changed, 2 insertions(

[PATCH] drm/nouveau: remove redundant check

2020-08-27 Thread trix
From: Tom Rix clang static analysis flags this problem hw.c:271:12: warning: The left operand of '>=' is a garbage value if (pv.M1 >= pll_lim.vco1.min_m ... ~ ^ This is mostly not a problem because an early check in nouveau_hw_fix_bad_vpll() if (nvbios_pll_parse(bios,

[PATCH] media: ov7670: check status of ov7670_read

2020-08-28 Thread trix
From: Tom Rix clang static analysis flags this representative problem drivers/media/i2c/ov7670.c:1463:9: warning: Assigned value is garbage or undefined *value = gain; ^ gain is set by a successful call to ov7670_read() So check that ov7670_read() is successful.

[PATCH] media: tc358743: cleanup tc358743_cec_isr

2020-09-02 Thread trix
From: Tom Rix tc358743_cec_isr is misnammed, it is not the main isr. So rename it to be consistent with its siblings, tc358743_cec_handler. It also does not check if its input parameter 'handled' is is non NULL like its siblings, so add a check. Fixes: a0ec8d1dc42e ("media: tc358743: add CEC su

[PATCH v2] soundwire: fix double free of dangling pointer

2020-09-02 Thread trix
From: Tom Rix clang static analysis flags this problem stream.c:844:9: warning: Use of memory after it is freed kfree(bus->defer_msg.msg->buf); ^~~ This happens in an error handler cleaning up memory allocated for elements in a list. list_for

[PATCH] media: em28xx: fix function pointer check

2020-09-03 Thread trix
From: Tom Rix clang static analyzer reports this problem em28xx-core.c:1162:4: warning: Called function pointer is null (null dereference) ops->suspend(dev->dev_next); ^~~ This is the problem block if (ops->suspend) ops->suspend

[PATCH v2] usb: storage: initialize variable

2020-08-24 Thread trix
From: Tom Rix clang static analysis reports this representative problem transport.c:495:15: warning: Assigned value is garbage or undefined length_left -= partial; ^ ~~~ partial is set only when usb_stor_bulk_transfer_sglist() is successful. So set partial on e

[PATCH] i2c: amd_mp2: handle num is 0 input for i2c_amd_xfer

2020-09-04 Thread trix
From: Tom Rix clang static analyzer reports this problem i2c-amd-mp2-plat.c:174:9: warning: Branch condition evaluates to a garbage value return err ? err : num; ^~~ err is not initialized, it depends on the being set in the transfer loop which will not happen if num is

[PATCH] soundwire: stream: fix an invalid free

2020-09-05 Thread trix
From: Tom Rix clang static analyzer reports this problem stream.c:872:2: warning: Argument to kfree() is a constant address (18446744073709551092), which is not memory allocated by malloc() kfree(stream); ^ In sdw_shutdown_stream() the stream to free is set by a

[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] EDAC: sb_edac: simplify switch statement

2020-09-07 Thread trix
From: Tom Rix clang static analyzer reports this problem sb_edac.c:959:2: warning: Undefined or garbage value returned to caller return type; ^~~ This is a false positive. However by initializing the type to DEV_UNKNOWN the 3 case can be removed from the switch, savin

[PATCH] soundwire: fix error handling

2020-08-29 Thread trix
From: Tom Rix clang static analysis flags this problem stream.c:844:9: warning: Use of memory after it is freed kfree(bus->defer_msg.msg->buf); ^~~ This happens in an error handler cleaning up memory allocated for elements in a list. list_for

[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] media: tc358743: initialize variable

2020-08-30 Thread trix
From: Tom Rix clang static analysis flags this error tc358743.c:1468:9: warning: Branch condition evaluates to a garbage value return handled ? IRQ_HANDLED : IRQ_NONE; ^~~ handled should be initialized to false. Fixes: d747b806abf4 ("[media] tc358743: add direct int

[PATCH] usb: gadget: net2272: assert for a valid dma request

2020-08-30 Thread trix
From: Tom Rix clang static analysis flags this representive problem net2272.c:1541:8: warning: Dereference of null pointer if ((req->req.length % ep->ep.maxpacket != 0) || ^~~ This is mostly not a problem. In net2272_handle_dma(), even though every path through the rout

[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] MAINTAINERS: Add Tom Rix as fpga reviewer

2020-08-04 Thread trix
From: Tom Rix I take care of fpga kernel and userspace for Red Hat and would like help out more with the mainline kernel. Signed-off-by: Tom Rix --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ce2737b1feb5..6fdb01776413 100644 --- a/MAINTAI

[PATCH] tracing: fix double free

2020-09-07 Thread trix
From: Tom Rix clang static analyzer reports this problem trace_events_hist.c:3824:3: warning: Attempt to free released memory kfree(hist_data->attrs->var_defs.name[i]); In parse_var_defs() if there is a problem allocating var_defs.expr, the earlier var_defs.name is freed. This free is dup

[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] checkpatch: add a fixer for missing newline at eof

2020-10-14 Thread trix
From: Tom Rix Remove the trailing error message from the fixed lines Signed-off-by: Tom Rix --- scripts/checkpatch.pl | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fab38b493cef..7d3db096bc44 100755 --- a/scripts/c

[PATCH] drm/amdgpu: add missing newline at eof

2020-10-14 Thread trix
From: Tom Rix Representative checkpatch.pl warning WARNING: adding a line without newline at end of file 30: FILE: drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.h:30: +#endif Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_1_sh_mask.h | 2 +- drivers/gpu/drm/amd/pm

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] tv: 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/media/dvb-frontends/drx39xyj/drxj.c | 7 --- drivers/media/dvb-frontends/drxd_hard.c | 1 - drivers/media/dvb-frontends/nxt200x.c | 16 drivers/media/dvb-fronte

[PATCH] drm: remove unneeded break

2020-10-19 Thread trix
From: Tom Rix A break is not needed if it is preceded by a return or break Signed-off-by: Tom Rix --- drivers/gpu/drm/mgag200/mgag200_mode.c | 5 - drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c | 3 --- drivers/gpu/drm/no

[PATCH] sound: remove unneeded break

2020-10-19 Thread trix
From: Tom Rix A break is not needed if it is preceded by a return, goto or break Signed-off-by: Tom Rix --- sound/pci/rme32.c | 1 - sound/pci/rme9652/hdspm.c | 8 sound/pci/rme9652/rme9652.c | 7 --- sound/soc/codecs/wcd-clsh-v2.c| 1 - sound/soc

[PATCH] vme: 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/vme/bridges/vme_tsi148.c | 7 --- drivers/vme/vme.c| 9 - 2 files changed, 16 deletions(-) diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridg

[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] iio: 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/iio/adc/meson_saradc.c | 2 -- drivers/iio/imu/bmi160/bmi160_core.c | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c in

[PATCH] security: 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 --- security/integrity/ima/ima_appraise.c | 1 - security/keys/trusted-keys/trusted_tpm1.c | 1 - security/safesetid/lsm.c | 3 --- 3 files changed, 5 deletions(-) diff --git a/securi

[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] fs: ocfs2 remove unneeded break

2020-10-19 Thread trix
From: Tom Rix A break is not needed if it is preceded by a goto Signed-off-by: Tom Rix --- fs/ocfs2/cluster/tcp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 79a231719460..3bd8119bed5e 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocf

<    1   2   3   4   >