Re: selftests/filesystem: clang warning null passed to a callee that requires a non-null argument [-Wnonnull]

2025-06-11 Thread Dan Carpenter
On Wed, Jun 11, 2025 at 10:50:52AM -0700, Nathan Chancellor wrote: > On Wed, Jun 11, 2025 at 07:47:39PM +0300, Dan Carpenter wrote: > > This seems like a Clang bug, right? The test for _Nullable is reversed > > or something? > > My copy of unistd.h has > > /* Ex

Re: selftests/filesystem: clang warning null passed to a callee that requires a non-null argument [-Wnonnull]

2025-06-11 Thread Dan Carpenter
This seems like a Clang bug, right? The test for _Nullable is reversed or something? regards, dan carpenter On Thu, Jun 05, 2025 at 05:41:01PM +0530, Naresh Kamboju wrote: > Regressions found on arm, arm64 and x86_64 building warnings with clang-20 > and clang-nightly started from Linu

Re: [PATCH bpf-next 1/2] bpf: Add bpf_task_cwd_from_pid() kfunc

2025-06-01 Thread Dan Carpenter
: gcc-12 (Debian 12.2.0-14) 12.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202505300432.nzc50gou-...@intel.com

[PATCH next] tools/testing: Check correct variable in open_procmap()

2025-05-28 Thread Dan Carpenter
Check if "procmap_out->fd" is negative instead of "procmap_out" (which is a pointer). Fixes: bd23f293a0d5 ("tools/testing: add PROCMAP_QUERY helper functions in mm self tests") Signed-off-by: Dan Carpenter --- tools/testing/selftests/mm/vm_util.c | 2 +-

Re: [PATCH v3 3/3] rpmsg: ctrl: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-23 Thread Dan Carpenter
://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org

Re: [PATCH] rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send()

2025-05-07 Thread Dan Carpenter
On Thu, May 08, 2025 at 09:48:34AM +0300, Dan Carpenter wrote: > On Thu, May 08, 2025 at 08:46:04AM +0200, Greg Kroah-Hartman wrote: > > On Thu, May 08, 2025 at 09:40:26AM +0300, Dan Carpenter wrote: > > > Hi Greg, > > > > > > I'm sorry I forgot to add the

Re: [PATCH] rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send()

2025-05-07 Thread Dan Carpenter
On Thu, May 08, 2025 at 08:46:04AM +0200, Greg Kroah-Hartman wrote: > On Thu, May 08, 2025 at 09:40:26AM +0300, Dan Carpenter wrote: > > Hi Greg, > > > > I'm sorry I forgot to add the: > > > > Cc: sta...@vger.kernel.org > > > > to this patch.

Re: [PATCH] rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send()

2025-05-07 Thread Dan Carpenter
Hi Greg, I'm sorry I forgot to add the: Cc: sta...@vger.kernel.org to this patch. Could we backport it to stable, please? regards, dan carpenter On Wed, Apr 23, 2025 at 08:22:05PM +0300, Dan Carpenter wrote: > The "ret" variable isn't initialized if we don't en

Re: [PATCH 6.1 000/167] 6.1.136-rc1 review

2025-04-30 Thread Dan Carpenter
All the clang-nightly issues seem like bugs in clang. I would say only the build error on S390 is a kernel issue. regards, dan carpenter On Wed, Apr 30, 2025 at 04:09:18PM +0530, Naresh Kamboju wrote: > On Tue, 29 Apr 2025 at 23:31, Greg Kroah-Hartman > wrote: > > > > This i

Re: [PATCH] rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send()

2025-04-25 Thread Dan Carpenter
On Fri, Apr 25, 2025 at 11:36:24AM +0530, Naresh Kamboju wrote: > On Wed, 23 Apr 2025 at 22:52, Dan Carpenter wrote: > > > > The "ret" variable isn't initialized if we don't enter the loop. For > > example, if "channel->state" is not SMD_CH

[PATCH] rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send()

2025-04-23 Thread Dan Carpenter
The "ret" variable isn't initialized if we don't enter the loop. For example, if "channel->state" is not SMD_CHANNEL_OPENED. Fixes: 33e3820dda88 ("rpmsg: smd: Use spinlock in tx path") Signed-off-by: Dan Carpenter --- Naresh, could you test this patc

[PATCH] remoteproc: sysmon: Update qcom_add_sysmon_subdev() comment

2025-04-05 Thread Dan Carpenter
The comment says the qcom_add_sysmon_subdev() returns NULL on error but it actually returns error pointers. Signed-off-by: Dan Carpenter --- drivers/remoteproc/qcom_sysmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc

[PATCH] remoteproc: qcom_wcnss_iris: Add missing put_device() on error in probe

2025-04-04 Thread Dan Carpenter
The device_del() call matches with the device_add() but we also need to call put_device() to trigger the qcom_iris_release(). Fixes: 1fcef985c8bd ("remoteproc: qcom: wcnss: Fix race with iris probe") Signed-off-by: Dan Carpenter --- This patch is based on static analysis and has not b

[PATCH] KVM: selftests: Fix a couple "prio" signedness bugs

2025-03-24 Thread Dan Carpenter
reemption tests in vgic_irq") Signed-off-by: Dan Carpenter --- --- tools/testing/selftests/kvm/arm64/vgic_irq.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/arm64/vgic_irq.c b/tools/testing/selftests/kvm/arm64/vgic_irq.c index f4ac28

Re: [PATCH 1/4] selftests: ntsync: fix the wrong condition in wake_all

2025-03-15 Thread Dan Carpenter
On Fri, Mar 14, 2025 at 05:13:50PM -0500, Elizabeth Figura wrote: > On Friday, 14 March 2025 05:14:30 CDT Su Hui wrote: > > On 2025/3/14 17:21, Dan Carpenter wrote: > > > On Fri, Mar 14, 2025 at 03:14:51PM +0800, Su Hui wrote: > > >> When 'manual=false' a

Re: [PATCH 1/4] selftests: ntsync: fix the wrong condition in wake_all

2025-03-14 Thread Dan Carpenter
EXPECT_EQ(0, objs[3]); > + EXPECT_LE(0, objs[3]); It's kind of weird how these macros put the constant on the left. It returns an "fd" on success. So this look reasonable. It probably won't return the zero fd so we could probably check EXPECT_LT()? regards, dan carpenter

[PATCH v2 net] ipvs: prevent integer overflow in do_ip_vs_get_ctl()

2025-03-10 Thread Dan Carpenter
ixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Dan Carpenter --- v2: fix %lu vs %zu in the printk(). It breaks the build on 32bit systems. Remove the CC stable. net/netfilter/ipvs/ip_vs_ctl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/

[PATCH net] ipvs: prevent integer overflow in do_ip_vs_get_ctl()

2025-03-07 Thread Dan Carpenter
ype size_t to fix this integer overflow bug. Cc: sta...@vger.kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Dan Carpenter --- net/netfilter/ipvs/ip_vs_ctl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/

Re: [PATCH] ww_mutex: convert self-test to KUnit

2025-02-12 Thread Dan Carpenter
ntation/smatch.rst Run smatch/smatch_scripts/kchecker kernel/locking/ww_mutex_kunit.c regards, dan carpenter

[PATCH] fs/dax: Remove unnecessary check in dax_break_layout_final()

2025-02-12 Thread Dan Carpenter
The "page" pointer is always NULL at this point. Adding a check is a bit confusing. Delete it. Signed-off-by: Dan Carpenter --- fs/dax.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 9e4940a0b286..21a743996f90 100644 --- a/fs/dax.

Re: [PATCH] ww_mutex: convert self-test to KUnit

2025-02-12 Thread Dan Carpenter
-project ab51eccf88f5321e7c60591c5546b254b6afab99) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202502121806

Re: kvm: nVHE hyp panic at: __kvm_nvhe_kvm_hyp_handle_sysre

2025-02-12 Thread Dan Carpenter
s/linaro/projects/anders/tests/2steTT4f2J8ZJjc3jNJFMuow9Cb Click on "Logs: html" for the dmesg. regards, dan carpenter > > diff --git a/arch/arm64/kvm/hyp/include/hyp/switch.h > b/arch/arm64/kvm/hyp/include/hyp/switch.h > index f838a45665f26..cb57420a07de2 100644 > ---

Re: kvm: nVHE hyp panic at: __kvm_nvhe_kvm_hyp_handle_sysre

2025-02-12 Thread Dan Carpenter
I do not buy this. RK3399 only has ARMv8.0 cores, which by definition > do not have VHE. > The links to the dmesg are at the bottom of the email. It does seem to be a RK3399 with ARMv8.0 cores though as you say... https://lkft.validation.linaro.org/scheduler/job/8117232#L1395 We'll test the patch. regards, dan carpenter

Re: arch/x86/include/asm/current.h:49:9: error: call to undeclared function '__typeof_unqual__'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

2024-12-18 Thread Dan Carpenter
ypeof__(exp) > #endif > > Can you please investigate what happens here for your build? This is the bindgen program for generating Rust bindings. Tuxmake is using bindgen 0.66.1 and I was able to reproduce the failures with that version inside a container. I have bindgen 0.70.1 installed on my system and that seems to parse __typeof_unqual__ okay. I don't know how bindgen works. Maybe the Rust developers can comment? regards, dan carpenter

Re: [PATCH v3 0/3] PCI: endpoint: fix bug for 2 APIs and simplify 1 API

2024-12-12 Thread Dan Carpenter
onfig FS. Is there a kself test for configfs or did you create your own test? regards, dan carpenter

[PATCH v2 net] ipvs: Fix clamp() order in ip_vs_conn_init()

2024-12-11 Thread Dan Carpenter
ted-by: David Laight Fixes: 4f325e26277b ("ipvs: dynamically limit the connection hash table") Signed-off-by: Dan Carpenter Tested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski --- v2: In the commit message, I said max() but it should have been min(). I added a note that th

Re: [PATCH net] ipvs: Fix clamp() order in ip_vs_conn_init()

2024-12-11 Thread Dan Carpenter
On Wed, Dec 11, 2024 at 02:27:06PM +, David Laight wrote: > From: Dan Carpenter > > Sent: 11 December 2024 13:17 > > > > We recently added some build time asserts to detect incorrect calls to > > clamp and it detected this bug which breaks the build. The va

[PATCH net] ipvs: Fix clamp() order in ip_vs_conn_init()

2024-12-11 Thread Dan Carpenter
-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/all/ca+g9fyst34ukgfkxus63h6uvpyi5grzkezt9mrlfabm3f6k...@mail.gmail.com/ Fixes: 4f325e26277b ("ipvs: dynamically limit the connection hash table") Signed-off-by: Dan Carpenter --- I've been trying to add stable CC&#x

Re: [PATCH v2 1/4] vdpa/octeon_ep: enable support for multiple interrupts per device

2024-11-21 Thread Dan Carpenter
> - Use devm_kcalloc to allocate irq array. > - IRQ is never zero. Adjusted code accordingly. > Thanks. That takes care of all the issues that I saw so I'm okay with this now, but I'm not a domain expert. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 1/4] vdpa/octeon_ep: enable support for multiple interrupts per device

2024-11-20 Thread Dan Carpenter
-oct_hw->vqs->msix_name, oct_hw); > - if (ret) { > - dev_err(&pdev->dev, "Failed to register interrupt handler\n"); > - goto free_irq_vec; > + memset(oct_hw->irqs, -1, sizeof(oct_hw->irqs)); This work

Re: [PATCH 2/4] vdpa/octeon_ep: handle device config change events

2024-11-19 Thread Dan Carpenter
kely() and likey() hurts readability. It adds noise. You should do it if it makes a difference on a benchmark but that seems unlikely here. regards, dan carpenter > + oct_hw->config_cb.callback(oct_hw->config_cb.private); > + } > + > return IRQ_HANDLED; > } > > -- > 2.25.1 >

Re: LKFT CI: improving Networking selftests results when validating stable kernels

2024-11-15 Thread Dan Carpenter
e skip tests were because they lead to hangs. We're going to look at those again to see if they're still an issue. And we're also going to try enable the other tests you mentioned. regards, dan carpenter

Re: LKFT CI: improving Networking selftests results when validating stable kernels

2024-11-13 Thread Dan Carpenter
mething that Greg and Shuah need to decide on. You would still need some way to automatically detect that kselftest is running on an old kernel and disable the networking checks. Otherwise when random people on the internet try to run selftests they would run into issues. regards, dan carpenter

[PATCH] kunit: skb: add gfp to kernel doc for kunit_zalloc_skb()

2024-11-11 Thread Dan Carpenter
Kuan-Wei Chiu pointed out that the kernel doc for kunit_zalloc_skb() needs to include the @gfp information. Add it. Reported-by: Kuan-Wei Chiu Closes: https://lore.kernel.org/all/Zy+VIXDPuU613fFd@visitorckw-System-Product-Name/ Signed-off-by: Dan Carpenter --- include/kunit/skbuff.h | 3

Re: [PATCH v3 5/9] vhost: Add kthread support in function vhost_worker_queue()

2024-11-07 Thread Dan Carpenter
On Thu, Nov 07, 2024 at 01:38:56PM +0300, Dan Carpenter wrote: > Hi Cindy, > > kernel test robot noticed the following build warnings: > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/

Re: [PATCH v3 6/9] vhost: Add kthread support in function vhost_worker_destroy()

2024-11-07 Thread Dan Carpenter
following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202411071945.exiehgox-...@intel.com/ New smatch warnings: drivers/vhost/vhost.c:721 vhost_worker_destroy() error: we previously assumed 'worker' could be null (see line 721)

Re: [PATCH v3 5/9] vhost: Add kthread support in function vhost_worker_queue()

2024-11-07 Thread Dan Carpenter
tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202411071251.tqlg8k6c-...@intel.com/ New smatch warnings: drivers/vhost/vhost.c:241 vhost_worker_queue() error: we previously assumed 'worker' could be null (see line 241) Old smatc

[PATCH] kunit: skb: use "gfp" variable instead of hardcoding GFP_KERNEL

2024-11-04 Thread Dan Carpenter
The intent here was clearly to use the gfp variable flags instead of hardcoding GFP_KERNEL. All the callers pass GFP_KERNEL as the gfp flags so this doesn't affect runtime. Fixes: b3231d353a51 ("kunit: add a convenience allocation wrapper for SKBs") Signed-off-by: Dan Carpente

[PATCH next] rcu: Unlock correctly in rcu_dump_cpu_stacks()

2024-10-25 Thread Dan Carpenter
The unlock needs to be outside the } close curly braces for this if statement. Otherwise it leads to a deadlock. Fixes: 744e87210b1a ("rcu: Finer-grained grace-period-end checks in rcu_dump_cpu_stacks()") Signed-off-by: Dan Carpenter --- kernel/rcu/tree_stall.h | 2 +- 1 file

[PATCH] rtla/osnoise: prevent NULL dereference in error handling

2024-08-09 Thread Dan Carpenter
If the "tool->data" allocation fails then there is no need to call osnoise_free_top() and, in fact, doing so will lead to a NULL dereference. Fixes: 1eceb2fc2ca5 ("rtla/osnoise: Add osnoise top mode") Signed-off-by: Dan Carpenter --- tools/tracing/rtla/src/osnoise_top.c |

Re: tracing: user events UAF crash report

2024-07-19 Thread Dan Carpenter
Similar argumentation for taking the mutex around cleanup_ei(). It sets > the 'is_freed' member which others expect only to be set -- or at least > to have a stable value -- when the mutex is hold. As 'ei' was exposed to > its parent before, it may have escaped to other u

[PATCH] vdpa/octeon_ep: Fix error code in octep_process_mbox()

2024-07-12 Thread Dan Carpenter
Return -EINVAL for invalid signatures. Don't return success. Fixes: 8b6c724cdab8 ("virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices") Signed-off-by: Dan Carpenter --- Nag mode: When we add a new driver, then could we use the patch prefix for the driver not for the subsys

Re: [PATCH v3] init: staging: Fix missing warning/taint on builtin code

2024-07-08 Thread Dan Carpenter
Thanks! Acked-by: Dan Carpenter regards, dan carpenter

Re: [PATCH v2] init: staging: Fix missing warning/taint on builtin code

2024-07-05 Thread Dan Carpenter
; + ", the quality is unknown, you have been warned.\n", I wasn't going to say anything but since you're resending anyway, please, don't break the line like this so it starts with a comma. The comma can go on the line before. But if it couldn't then we would move the whole word "directory," to the next line. regards, dan carpenter

Re: [PATCH] staging: Fix missing warning/taint on builtin code

2024-07-02 Thread Dan Carpenter
ectory before the quote. > + "the quality is unknown, you have been warned.\n", > + code_type, code_id); > + > + add_taint(TAINT_CRAP, LOCKDEP_STILL_OK); > +} > +EXPORT_SYMBOL(staging_taint); regards, dan carpenter

[PATCH] tracing: Fix NULL vs IS_ERR() check in enable_instances()

2024-06-20 Thread Dan Carpenter
The trace_array_create_systems() function returns error pointers, not NULL. Fix the check to match. Fixes: e645535a954a ("tracing: Add option to use memmapped memory for trace boot instance") Signed-off-by: Dan Carpenter --- kernel/trace/trace.c | 2 +- 1 file changed, 1 inser

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-23 Thread Dan Carpenter
over all the patched function that changed with the help > of this interface. > --- Always run your patches through checkpatch. So this patch is so that testers can see if a function has been called? Can you not get the same information from gcov or ftrace? There are style issues with the patch, but it's not so important until the design is agreed on. regards, dan carpenter

Re: [PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-15 Thread Dan Carpenter
On Sun, May 12, 2024 at 12:01:55PM -0400, Michael S. Tsirkin wrote: > On Fri, May 10, 2024 at 03:50:45PM +0300, Dan Carpenter wrote: > > The virtnet_send_command_reply() function returns true on success or > > false on failure. The "ok" variable is true/false depending o

[PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-10 Thread Dan Carpenter
s zero on success or negative error codes on failure. Fixes: 941168f8b40e ("virtio_net: support device stats") Signed-off-by: Dan Carpenter --- drivers/net/virtio_net.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_

Re: [PATCH v2 2/6] iio: light: stk3310: Implement vdd supply and power it off during suspend

2024-04-24 Thread Dan Carpenter
| Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202404251021.4oper3os-...@intel.com/ smatch warnings: drivers/iio/light/stk3310.c:615 stk3310_probe() error: uninitialized symbol 'ret'. vim +/ret +615 drivers/iio/light/stk3310.c 9046d80dce04c6 Uwe Kleine-König 2022-

Re: [PATCH 0/3] Documentation/smatch: RST conversion and fixes

2024-04-02 Thread Dan Carpenter
ned-off-by: Javier Carrasco Thanks! Applied. (Will push probably later this week). regards, dan carpenter

Re: [PATCH v2 net] ice: Fix freeing uninitialized pointers

2024-03-24 Thread Dan Carpenter
* Did you extend detection support in the source code analysis tool “Smatch” > for a questionable implementation detail? Yes. Smatch detects this as an uninitialized variable. regards, dan carpenter

[PATCH v3] vduse: Fix off by one in vduse_dev_mmap()

2024-02-28 Thread Dan Carpenter
ecd1346b0 ("vduse: Add file operation for mmap") Signed-off-by: Dan Carpenter --- v2: add array_index_nospec() v3: I accidentally corrupted v2. Try again. drivers/vdpa/vdpa_user/vduse_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_user/

Re: [PATCH v2] vduse: Fix off by one in vduse_dev_mmap()

2024-02-28 Thread Dan Carpenter
On Wed, Feb 28, 2024 at 12:53:28PM -0500, Stefan Hajnoczi wrote: > On Wed, 28 Feb 2024 at 12:44, Dan Carpenter wrote: > > > > The dev->vqs[] array has "dev->vq_num" elements. It's allocated in > > vduse_dev_init_vqs(). Thus, this > comparison ne

[PATCH v2] vduse: Fix off by one in vduse_dev_mmap()

2024-02-28 Thread Dan Carpenter
ecd1346b0 ("vduse: Add file operation for mmap") Signed-off-by: Dan Carpenter --- v2: add array_index_nospec(). drivers/vdpa/vdpa_user/vduse_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_d

Re: [PATCH] vduse: Fix off by one in vduse_dev_mmap()

2024-02-28 Thread Dan Carpenter
On Tue, Feb 27, 2024 at 10:48:49AM -0500, Michael S. Tsirkin wrote: > On Tue, Feb 27, 2024 at 06:21:46PM +0300, Dan Carpenter wrote: > > The dev->vqs[] array has "dev->vq_num" elements. It's allocated in > > vduse_dev_init_vqs(). Thus, this > comparison

[PATCH] vduse: Fix off by one in vduse_dev_mmap()

2024-02-27 Thread Dan Carpenter
The dev->vqs[] array has "dev->vq_num" elements. It's allocated in vduse_dev_init_vqs(). Thus, this > comparison needs to be >= to avoid reading one element beyond the end of the array. Fixes: 316ecd1346b0 ("vduse: Add file operation for mmap") Signed-off

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-19 Thread Dan Carpenter
ert` command comes from ancient times and it just sets people up for failure... :/ regards, dan carpenter

Re: [PATCH] ipvs: add a stateless type of service and a stateless Maglev hashing scheduler

2023-12-06 Thread Dan Carpenter
patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202312070849.i9gwwsh0-...@intel.com/ New smatch warnings: net/netfilter/ipvs/ip_vs_core.c:545

Re: [PATCH v5] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-27 Thread Dan Carpenter
On Fri, Oct 27, 2023 at 03:00:00PM +0300, Dan Carpenter wrote: > 607c543f939d8c kernel/module.c Andrii Nakryiko 2020-11-20 2579 #ifdef > CONFIG_DEBUG_INFO_BTF_MODULES > 607c543f939d8c kernel/module.c Andrii Nakryiko 2020-11-20 2580 > /* .BTF is not SHF_ALLOC

Re: [PATCH v5] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-27 Thread Dan Carpenter
patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202310271751.28pkvu4k-...@intel.com/ smatch warnings: kernel/module/main.c:2608 do_init_module() warn: possible memory leak of 'freeinit' vim

Re: [PATCH] tracing/eprobe: drop unneeded breaks

2023-10-12 Thread Dan Carpenter
arning because the > 'break' never be executed. (maybe it is just a flow-control word, > so it may not need to be warned, but a bit storange.) I don't think GCC warns about unreachable code, but yeah, in Smatch unreachable break statements do not trigger a warning. People like to add extra break statements to switch statements. regards, dan carpenter

Re: [PATCH] staging: rtl8723bs: os_dep: remove multiple return

2021-04-20 Thread Dan Carpenter
's weird that your previous patch made rtw_suspend_common() return zero unconditionally. But now we're modifying the only caller to not check the return. Just make rtw_suspend_common() void and change this to: rtw_suspend_common(padapter); return 0; regards, dan carpenter

Re: [RFC v1 PATCH 1/3] drivers: soc: add support for soc_device_match returning -EPROBE_DEFER

2021-04-20 Thread Dan Carpenter
true; > > return soc_dev; > > > > out3: > > @@ -246,6 +248,9 @@ const struct soc_device_attribute *soc_device_match( > > if (!matches) > > return NULL; > > > > + if (!soc_dev_attr_init_done && !early_soc_dev_attr) > > if (!soc_bus_type.p && !early_soc_dev_attr) There is one place checking this already. We could wrap it in a helper function: static bool device_init_done(void) { return soc_bus_type.p ? true : false; } regards, dan carpenter

Re: [PATCH] staging: rtl8723bs: os_dep: remove multiple return

2021-04-20 Thread Dan Carpenter
t to set the error code bugs. regards, dan carpenter

Re: [PATCH] media: atomisp: silence "dubious: !x | !y" warning

2021-04-20 Thread Dan Carpenter
se. But I've occasionally asked people if they were trying to do a fast path optimization but it's always just a typo. regards, dan carpenter

Re: [PATCH v2] fs/btrfs: Fix uninitialized variable

2021-04-20 Thread Dan Carpenter
hift); break; It took me a while to spot these break statements. > + default: > + zone = 0; > + break; This break needs to be indented one more tab. > } > > ASSERT(zone <= U32_MAX); regards, dan carpenter

[PATCH] mtd: rawnand: silence static checker warning in nand_setup_interface()

2021-04-20 Thread Dan Carpenter
a "ret = 0;" assignment to make the intent more clear and to silence the static checker warning. It doesn't affect the compiled code because GCC optimises the assignment away. Signed-off-by: Dan Carpenter --- drivers/mtd/nand/raw/nand_base.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH] platform/surface: aggregator: fix a bit test

2021-04-20 Thread Dan Carpenter
The "funcs" variable is a u64. If "func" is more than 31 then the BIT() shift will wrap instead of testing the high bits. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Reported-by: kernel test robot Signed-off-by: Dan Carpenter

Re: [PATCH] mtd: rawnand: fix an error code in nand_setup_interface()

2021-04-17 Thread Dan Carpenter
On Fri, Apr 16, 2021 at 05:00:40PM +0200, Miquel Raynal wrote: > Hi Dan, > > Dan Carpenter wrote on Wed, 14 Apr 2021 > 08:56:33 +0300: > > > We should return an error code if the timing mode is not acknowledged > > by the NAND chip. > > This truly is quest

Re: [Outreachy kernel] [PATCH v2] staging: media: atomisp: pci: Change line break to avoid an open parenthesis at the end of the line

2021-04-16 Thread Dan Carpenter
On Fri, Apr 16, 2021 at 11:37:28AM +0300, Sakari Ailus wrote: > Hi Dan, > > On Fri, Apr 16, 2021 at 08:49:41AM +0300, Dan Carpenter wrote: > > On Fri, Apr 16, 2021 at 12:21:58AM +0300, Sakari Ailus wrote: > > > On Thu, Apr 15, 2021 at 08:59:41PM +0100, Matthew Wilcox wrote

Re: [Outreachy kernel] [PATCH v2] staging: media: atomisp: pci: Change line break to avoid an open parenthesis at the end of the line

2021-04-15 Thread Dan Carpenter
file. I was pretty sure that was policy but it's another thing that goes back decades so I don't have a reference. It shouldn't be about breaking up long lines. > > My personal preference would be to wrap at the opening parenthesis and > indent by just a tab, but I know many people who disagree with that... If you're running into the 80 character limit, then it's fine to use two tabs. I think we have been rejecting patches that push align the parameters but push past the 80 character limit. Using one tab is confusing because it makes the decalarations line up with the code. regards, dan carpenter

Re: [kbuild] drivers/gpu/drm/msm/adreno/a3xx_gpu.c:600 a3xx_gpu_init() error: passing non negative 1 to ERR_PTR

2021-04-15 Thread Dan Carpenter
gt; > caller will Oops. > > > > > > Btw, this patch removed the assignments: > > > > > > gpu->icc_path = of_icc_get(dev, "gfx-mem"); > > > gpu->ocmem_icc_path = of_icc_get(dev, "ocmem"); > > > > > > So I think "gpu->icc_path" and "gpu->ocmem_icc_path" are always > > > NULL/unused and they should be removed. > > > > > Agree. Will share a fix. > > Thanks, Dan. > > gpu->ocmem_icc_path/icc_path is used on older devices.. it sounds like > we broke some older devices and no one has noticed yet? This is error paths and dead code. Probably no one is affected in real life. regards, dan carpenter

Re: [PATCH] clk: uniphier: Fix potential infinite loop

2021-04-15 Thread Dan Carpenter
in the kernel. When we do need to count about 2 million then we're probably not going to stop counting at 4 million, we're going to go to 10 million or higher so size_t is more appropriate than u32. Btw, if you have a loop that does: for (i = 0; i < UINT_MAX; i++) { that loop works exactly the same if "i" is an int or if it's a u32 because of type promotion. So you have to look really hard to find a place where changing a loop iterator from int to u32 fixes bug in real life. regards, dan carpenter

Re: [PATCH][next] net: stmmac: replace redundant comparison with true

2021-04-15 Thread Dan Carpenter
On Thu, Apr 15, 2021 at 09:37:57AM +0100, Colin King wrote: > From: Colin Ian King > > The comparison of the u32 variable queue with <= zero is always true > since an unsigned can never be negative. Replace the conditional > check with the boolean true to simplify the code. The while loop > will

[kbuild] Re: [PATCH 13/15] usb: dwc2: Add exit hibernation mode before removing drive

2021-04-15 Thread Dan Carpenter
-randconfig-m021-20210415 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/usb/dwc2/platform.c:324 dwc2_driver_remove() error: potentially

Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

2021-04-14 Thread Dan Carpenter
I screwed up my last email and dropped Lee and Arnd from the To: headers. Resending. On Thu, Apr 15, 2021 at 08:20:16AM +0300, Dan Carpenter wrote: > On Wed, Apr 14, 2021 at 07:11:09PM +0100, Lee Jones wrote: > > --- > > drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12

Re: [PATCH v2] staging: media: atomisp: pci: Format comments according to coding-style in file atomisp_cmd.c

2021-04-14 Thread Dan Carpenter
return IRQ_HANDLED; > } > > -/* > - * utils for buffer allocation/free > - */ > - > +/* utils for buffer allocation/free */ What? This one seems actively wrong. > int atomisp_get_frame_pgnr(struct atomisp_device *isp, > const struct ia_css_frame *frame, u32 *p_pgnr) > { etc. regards, dan carpenter

Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

2021-04-14 Thread Dan Carpenter
On Thu, Apr 15, 2021 at 08:20:16AM +0300, Dan Carpenter wrote: > On Wed, Apr 14, 2021 at 07:11:09PM +0100, Lee Jones wrote: > > --- > > drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > >

Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

2021-04-14 Thread Dan Carpenter
rtw_wx_get_scan: ssid =%s\n", pnetwork->network.ssid.ssid)); > RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, > ("rtw_wx_get_scan: wpa_len =%d rsn_len =%d\n", wpa_len, rsn_len)); regards, dan carpenter

Re: [Outreachy kernel] [PATCH v2] staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-14 Thread Dan Carpenter
T_HANDLER. This > > change has not unwanted side effects because the code in rtw_cmd.c checks > > if the function pointer is valid before using it. > > > > Reported-by: Julia Lawall > > Suggested-by: Dan Carpenter > > Signed-off-by: Fabio M. De Francesco > >

Re: [Outreachy kernel] Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c

2021-04-14 Thread Dan Carpenter
On Wed, Apr 14, 2021 at 04:39:20PM +0200, Julia Lawall wrote: > > > On Wed, 14 Apr 2021, Dan Carpenter wrote: > > > On Wed, Apr 14, 2021 at 11:06:02AM -0300, Aline Santana Cordeiro wrote: > > > Correct identation in block of conditional sta

Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c

2021-04-14 Thread Dan Carpenter
for list_for_each() one liners. list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs, list) { v4l2_device_unregister_subdev(sd); } regards, dan carpenter

Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-14 Thread Dan Carpenter
acro to make use of dummy_function(). > > Reported-by: Julia Lawall > Suggested-by: Dan Carpenter > Signed-off-by: Fabio M. De Francesco > --- > drivers/staging/rtl8723bs/core/rtw_cmd.c | 4 +++- > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c| 9 - >

Re: [PATCH] objtool: prevent memory leak in error paths

2021-04-14 Thread Dan Carpenter
Coverity: ("Prevent memory leak") > Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()") > Signed-off-by: Muhammad Usama Anjum > --- > Only build has been tested. > Just ignore leaks from the tools/ directory. These things run and then exit and all t

Re: [Outreachy kernel] [PATCH] :staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-14 Thread Dan Carpenter
On Wed, Apr 14, 2021 at 09:59:36AM +0200, Fabio M. De Francesco wrote: > Fine. I'm about to submit a patch. > > Is there any formal means to acknowledge (in the patch) your contribution > to the resolution of this problem? It doesn't matter. Suggested-by. regards, dan carpenter

Re: [PATCH v2 4/5] staging: rtl8192e: rectified spelling mistake and replace memcmp with ether_oui_equal

2021-04-14 Thread Dan Carpenter
/linux/etherdevice.h > @@ -87,6 +87,11 @@ static inline bool is_link_local_ether_addr(const u8 *addr) > #endif > } > > +static inline bool ether_oui_equal(const u8 *addr, const u8 *oui) > +{ > +return addr[0] == oui[0] && addr[1] == oui[1] && addr[2] == oui[2]; > +} The indenting is messed up on this. regards, dan carpenter

Re: [Outreachy kernel] [PATCH] :staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-14 Thread Dan Carpenter
On Wed, Apr 14, 2021 at 09:40:36AM +0200, Fabio Aiuto wrote: > On Wed, Apr 14, 2021 at 08:21:50AM +0300, Dan Carpenter wrote: > > On Tue, Apr 13, 2021 at 10:08:32PM +0200, Fabio M. De Francesco wrote: > > > On Tuesday, April 13, 2021 9:48:44 PM CEST Matthew Wilcox wrote: >

[PATCH] usb: typec: silence a static checker warning

2021-04-14 Thread Dan Carpenter
tent more clear. Signed-off-by: Dan Carpenter --- drivers/usb/typec/port-mapper.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/port-mapper.c b/drivers/usb/typec/port-mapper.c index fae736eb0601..9b0991bdf391 100644 --- a/drivers/usb/typec/port-mapper.c ++

Re: [Outreachy kernel] [PATCH] :staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-14 Thread Dan Carpenter
On Wed, Apr 14, 2021 at 08:33:48AM +0200, Fabio M. De Francesco wrote: > On Wednesday, April 14, 2021 7:21:50 AM CEST Dan Carpenter wrote: > > On Tue, Apr 13, 2021 at 10:08:32PM +0200, Fabio M. De Francesco wrote: > > > On Tuesday, April 13, 2021 9:48:44 PM CEST Matthew Wilcox

[PATCH] mtd: rawnand: fix an error code in nand_setup_interface()

2021-04-13 Thread Dan Carpenter
We should return an error code if the timing mode is not acknowledged by the NAND chip. Fixes: 415ae78ffb5d ("mtd: rawnand: check ONFI timings have been acked by the chip") Signed-off-by: Dan Carpenter --- >From static analysis. Not tested. drivers/mtd/nand/raw/nand_base.c

Re: [PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-13 Thread Dan Carpenter
-20210406 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2069 axienet_probe() warn: passing a

Re: [Outreachy kernel] [PATCH] :staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-13 Thread Dan Carpenter
anywhere else than the > > > macro. 2) You have explained that the macro add its symbol to a slot > > > in an array that would shift all the subsequent elements down if that > > > macro is not used exactly in the line where it is. > > > 3) Dan Carpenter said that

Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: hal: Remove four set but not used variables

2021-04-13 Thread Dan Carpenter
T_LIFE_TIME_OVER(pdata)) { Now we have two blank lines in a row. Please delete one. regards, dan carpenter

Re: [syzbot] WARNING in unsafe_follow_pfn

2021-04-13 Thread Dan Carpenter
x27;s a kernel bug reachable from user-space, then I think this > > code should be removed entirely, not just on all testing systems. Or > > otherwise if we are not removing it for some reason, then it needs to > > be fixed. > > Legacy embedded systems apparently require it. Are legacy embedded systems ever going to update their kernel? It might be better to just remove it. (I don't really have any details outside of your email so I don't know). regards, dan carpenter

Re: [Outreachy kernel] [PATCH] :staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-13 Thread Dan Carpenter
> > > > > It's a bit convoluted with regard to my experience. Probably I don't > > > understand it fully, but it seems to me to not having effects to the > > > code where I removed its use within core/rtw_cmd.c. > > > > > > What am I missing? > > > > It seems that the function is being put into an array. Probably someone > > expects to find it there. Probably you have shifted all of the functions > > that come afterwards back one slot so that they are all in the wrong > > places. > > > > julia > > > Thanks for your explanation. Obviously this implies that the function > cannot be removed, unless one fill the slot that is deleted by to not > calling this macro at the right moment. > > I also suppose that providing a function pointer with a NULL value wouldn't > work either. It would work. That array is full of NULL function pointers. regards, dan carpenter

Re: [PATCH v3 4/4] staging: media: intel-ipu3: remove space before tabs

2021-04-13 Thread Dan Carpenter
l part Just remove the spaces, don't remove the tab. It's looks silly now. regards, dan carpenter

Re: [PATCH 18/19] staging: rtl8723bs: split long lines

2021-04-13 Thread Dan Carpenter
mepriv, WIFI_ADHOC_MASTER_STATE)) The last line is indented one space character too much. It should be: if ((check_fwstate(pmlmepriv, _FW_LINKED) && pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) regards, dan carpenter

Re: [PATCH 12/19] staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites

2021-04-13 Thread Dan Carpenter
if (extra_arg == psta->aid) { for (j = 0; j < 16; j++) preorder_ctrl = &psta->recvreorder_ctrl[j]; } regards, dan carpenter

Re: [PATCH 3/4] staging: rtl8712: remove space after cast

2021-04-13 Thread Dan Carpenter
This patch has already been applied, which is fine, but really all these casts are totally pointless and should be removed. regards, dan carpenter

  1   2   3   4   5   6   7   8   9   10   >