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
ss 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_net.c index 218

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-11-18 592

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

Re: [bug report] tracing/probes: Support $argN in return probe (kprobe and fprobe)

2024-03-19 Thread Dan Carpenter
On Tue, Mar 19, 2024 at 10:10:00AM -0400, Steven Rostedt wrote: > On Tue, 19 Mar 2024 10:19:09 +0300 > Dan Carpenter wrote: > > > Hello Masami Hiramatsu (Google), > > > > Commit 25f00e40ce79 ("tracing/probes: Support $argN in return probe > > (kprobe and

[bug report] tracing/probes: Support $argN in return probe (kprobe and fprobe)

2024-03-19 Thread Dan Carpenter
break; 862 } 863 } 864 end: 865 return; 866 } regards, dan carpenter

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

2024-02-28 Thread Dan Carpenter
46b0 ("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/vduse

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 needs t

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

2024-02-28 Thread Dan Carpenter
46b0 ("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_dev.c

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 needs

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

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

[bug report] eventfs: Read ei->entries before ei->children in eventfs_iterate()

2024-01-10 Thread Dan Carpenter
/* Subtract the skipped entries above */ 784 c -= min((unsigned int)c, (unsigned int)ei->nr_entries); 785 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 +/freeinit

[PATCH] tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir()

2023-10-20 Thread Dan Carpenter
The eventfs_create_dir() function returns error pointers, it never returns NULL. Update the check to reflect that. Fixes: 5790b1fb3d67 ("eventfs: Remove eventfs_file and just use eventfs_inode") Signed-off-by: Dan Carpenter --- kernel/trace/trace_events.c | 2 +- 1 file changed, 1

[bug report] eventfs: Remove eventfs_file and just use eventfs_inode

2023-10-20 Thread Dan Carpenter
l: --> 782 kfree(ei->d_children); ^^ Crash 783 kfree(ei); 784 tracefs_failed_creating(dentry); 785 return ERR_PTR(-ENOMEM); 786 } regards, dan carpenter

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

2023-10-12 Thread Dan Carpenter
ause 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
eird 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
tr_init_done = 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
orgot to set the error code bugs. regards, dan carpenter

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

2021-04-20 Thread Dan Carpenter
ccasionally 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
t = 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 --git a/driver

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

[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
et_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
LME_EXT_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
t_for_each() one liners. list_for_each_entry_safe(sd, next, >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
ity: ("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 the me

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
erdevice.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
. 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 +++ b/drivers/usb

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 Ma

[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

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 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
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
== psta->aid) { for (j = 0; j < 16; j++) preorder_ctrl = >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

[PATCH] Drivers: hv: vmbus: Use after free in __vmbus_open()

2021-04-13 Thread Dan Carpenter
bus: Fix rescind handling issues") Signed-off-by: Dan Carpenter --- >From static analysis. Untested etc. There is almost certainly a good reason to add it to the list before checking "newchannel->rescind" but I don't know the code well enough to know what the reason is.

Re: [PATCH] Staging: rtl8192u: ieee80211: fixed a trailing statements coding style issue.

2021-04-09 Thread Dan Carpenter
stop)) { No. The || go on the end, the way the original code had it. I've no idea what you were trying to fix. Maybe the \ characters? regards, dan carpenter

[PATCH] HSI: core: fix resource leaks in hsi_add_client_from_dt()

2021-04-09 Thread Dan Carpenter
If some of the allocations fail between the dev_set_name() and the device_register() then the name will not be freed. Fix this by moving dev_set_name() directly in front of the call to device_register(). Fixes: a2aa24734d9d ("HSI: Add common DT binding for HSI client devices") Signed-o

[PATCH] node: fix device cleanups in error handling code

2021-04-09 Thread Dan Carpenter
correctly. Fixes: acc02a109b04 ("node: Add memory-side caching attributes") Signed-off-by: Dan Carpenter --- drivers/base/node.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index f4

Re: [PATCH 02/10] staging: rtl8723bs: remove commented out RT_TRACE logs in hal/ and os_dep/

2021-04-09 Thread Dan Carpenter
> if (idx_rate_sctn == 2) This won't compile. regards, dan carpenter

[kbuild] Re: [PATCH 1/1] of: unittest: overlay: ensure proper alignment of copied FDT

2021-04-09 Thread Dan Carpenter
) 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/of/overlay.c:1045 of_overlay_fdt_apply() warn: overwrite may leak 'new_fdt' vim +/new_fdt +1045 drivers

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

2021-04-09 Thread Dan Carpenter
) compiler: aarch64-linux-gcc (GCC) 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/gpu/drm/msm/adreno/a3xx_gpu.c:600 a3xx_gpu_init() error: passing non negative 1 to ERR_PTR drivers/gpu/drm/msm/adreno

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

2021-04-09 Thread Dan Carpenter
/kernel/git/davem/net-next.git cc0626c2aaed8e475efdd85fa374b497a7192e35 config: x86_64-randconfig-m001-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

[kbuild] drivers/vdpa/mlx5/core/mr.c:282 map_direct_mr() warn: missing error code 'err'

2021-04-09 Thread Dan Carpenter
) compiler: microblaze-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: drivers/vdpa/mlx5/core/mr.c:282 map_direct_mr() warn: missing error code 'err' Old smatch warnings: drivers/vdpa

Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-09 Thread Dan Carpenter
n {0} can generate a Sparse warning. Or depending on which bugs your version of GCC has it can affect whether struct holes are initialized. But mostly it's just the prefered style. regards, dan carpenter

[kbuild] Re: [PATCH 02/10] tty/sysrq: Fix issues of code indent should use tabs

2021-04-09 Thread Dan Carpenter
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/tty/sysrq.c:558 __sysrq_get_key_op() warn: curly braces intended? vim +558 drivers/tty/sysrq.c 23cbedf812ff7c drivers/tty/sysrq.c Emil

Re: [PATCH] RDMA/addr: potential uninitialized variable in ib_nl_process_good_ip_rsep()

2021-04-04 Thread Dan Carpenter
Could you send that and give me a reported-by? I'm going AFK for a week. regards, dan carpenter

Re: [PATCH v3 16/30] staging: rtl8723bs: tidy up some error handling in core/rtw_mlme.c

2021-04-03 Thread Dan Carpenter
the > idea was not posted in a public forum. That said, if we diligently credit our > idea reporters, they will, hopefully, be inspired to help us again in the > future. > > I wonder if in the case of this patch was needed this tag.. Yeah, it's fine. It's all on a public list so it's not a secret. regards, dan carpenter

Re: [PATCH 01/16] staging: rtl8723bs: remove RT_TRACE logs in core/rtw_xmit.c

2021-04-02 Thread Dan Carpenter
->securitypriv.sw_encrypt == true) || (psecuritypriv->hw_decrypted == false))) { + ((padapter->securitypriv.sw_encrypt) || (!psecuritypriv->hw_decrypted))) regards, dan carpenter

[PATCH] RDMA/addr: potential uninitialized variable in ib_nl_process_good_ip_rsep()

2021-04-02 Thread Dan Carpenter
The nla_len() is less than or equal to 16. If it's less than 16 then end of the "gid" buffer is uninitialized. Fixes: ae43f8286730 ("IB/core: Add IP to GID netlink offload") Signed-off-by: Dan Carpenter --- I just spotted this in review. I think it's a bug but I'm

Re: [PATCH 08/49] staging: rtl8723bs: remove RT_TRACE logs in core/rtw_cmd.c

2021-04-02 Thread Dan Carpenter
On Thu, Apr 01, 2021 at 11:51:15PM +0200, Fabio Aiuto wrote: > On Thu, Apr 01, 2021 at 05:32:36PM +0300, Dan Carpenter wrote: > > On Thu, Apr 01, 2021 at 03:55:37PM +0200, Fabio Aiuto wrote: > > > > > > Hi Dan, > > > > > > I have the following:

Re: [bug report] node: Add memory-side caching attributes

2021-04-01 Thread Dan Carpenter
On Thu, Apr 01, 2021 at 08:25:11AM -0300, Jason Gunthorpe wrote: > On Thu, Apr 01, 2021 at 12:00:39PM +0300, Dan Carpenter wrote: > > Hi Keith, > > > > I've been trying to figure out ways Smatch can check for device managed > > resources. Like adding rules that i

Re: [PATCH 08/49] staging: rtl8723bs: remove RT_TRACE logs in core/rtw_cmd.c

2021-04-01 Thread Dan Carpenter
d, > but I would like to be sure before sending another over 40 patches > long patchset. Don't send 40 patches. Just send 10 at a time until you get a better feel for which ones are going to get applied or not. :P It's not arbitrary, and I'm definitely not trying to NAK your patches. Once you learn the rules I hope that it's predictable and straight forward. regards, dan carpenter

Re: [PATCH] cifsd: use kfree to free memory allocated by kzalloc

2021-04-01 Thread Dan Carpenter
entry); > kfree(iface->name); > - ksmbd_free(iface); > + kfree(iface); We should just delete the ksmbd_free() function completely. I think that cifsd is being re-written though so it might not be worth it. regards, dan carpenter

Re: [PATCH -next v3] staging: greybus: camera: Switch to memdup_user_nul()

2021-04-01 Thread Dan Carpenter
On Thu, Apr 01, 2021 at 06:36:45PM +0800, Yang Yingliang wrote: > Use memdup_user_nul() helper instead of open-coding to > simplify the code. > > Reported-by: Hulk Robot > Signed-off-by: Yang Yingliang Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 08/49] staging: rtl8723bs: remove RT_TRACE logs in core/rtw_cmd.c

2021-04-01 Thread Dan Carpenter
're going to have to redo them and I will be reviewing the v2 set later anyway. So just look it over yourself and check for any similar issues. regards, dan carpenter

[bug report] node: Add memory-side caching attributes

2021-04-01 Thread Dan Carpenter
return; 282 free_name: 283 kfree_const(dev->kobj.name); 284 free_dev: 285 kfree(dev); ^^^^^^ 286 } regards, dan carpenter

Re: [PATCH -next] i2c: gpio: use DEFINE_SPINLOCK() for spinlock

2021-04-01 Thread Dan Carpenter
On Thu, Apr 01, 2021 at 11:38:30AM +0800, chenlifu wrote: > Kindly pinging ... > > Best Regards, > Chen Lifu > > 在 2021/3/27 17:52, Chen Lifu 写道: It's to early to start asking for a response. Please wait at least two weeks. (Probably four weeks if the merge window was op

Re: [PATCH -next v2] staging: greybus: camera: Switch to memdup_user_nul()

2021-04-01 Thread Dan Carpenter
On Thu, Apr 01, 2021 at 10:43:32AM +0300, Dan Carpenter wrote: > On Thu, Apr 01, 2021 at 11:17:52AM +0800, Yang Yingliang wrote: > > Use memdup_user_nul() helper instead of open-coding to > > simplify the code. > > > > Reported-by: Hulk Robot > &

Re: [PATCH -next v2] staging: greybus: camera: Switch to memdup_user_nul()

2021-04-01 Thread Dan Carpenter
kbuf, buf, len)) { > - ret = -EFAULT; > - goto done; > - } > - > - kbuf[len] = '\0'; > + kbuf = memdup_user_nul(buf, len); > + if (IS_ERR(kbuf)) > + return PTR_ERR(kbuf);; ^^ There is an extra semi-colon here. Checkpatch actually catches this sort of typo. regards, dan carpenter

Re: [PATCH] fix NULL pointer deference crash

2021-03-31 Thread Dan Carpenter
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 New smatch warnings: drivers/video/fbdev/core/fbcon.c:1336 fbcon_cursor() warn: variable dereferenced before check 'ops' (see

Re: [PATCH -next] staging: greybus: camera: Switch to memdup_user_nul()

2021-03-31 Thread Dan Carpenter
return -ENOMEM; return PTR_ERR(kbuf); > > - if (copy_from_user(kbuf, buf, len)) { > - ret = -EFAULT; > - goto done; > - } > - > - kbuf[len] = '\0'; > Please delete this blank line so there aren't two blank lines in a row. > ret = op->execute(gcam, kbuf, len); regards, dan carpenter

Re: [PATCH 01/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_xmit.c

2021-03-31 Thread Dan Carpenter
all these RT_TRACE() messages, then we will apply that. It's unfortunate that you have to re-write the first patch in a 40 patch series. :/ regards, dan carpenter

Re: [PATCH] media: em28xx: fix memory leak

2021-03-31 Thread Dan Carpenter
sb/em28xx/em28xx-dvb.c > > @@ -2010,6 +2010,7 @@ static int em28xx_dvb_init(struct em28xx *dev) > > return result; > > > > out_free: > > + em28xx_uninit_usb_xfer(dev, EM28XX_DIGITAL_MODE); > > kfree(dvb); > > dev->dvb = NULL; > > goto ret; > > I'd received the following notice and waiting for the review: Please wait a minimum of two weeks before asking for updates. regards, dan carpenter

Re: [PATCH -next] staging: rtl8723bs: core: Remove unused variable 'res'

2021-03-31 Thread Dan Carpenter
I've been rejecting these patches until someone updates the callers to check the return. This patch just silences the warning but the code is still totally buggy. regards, dan carpenter

Re: [PATCH] io_uring: Initialize variable before use

2021-03-31 Thread Dan Carpenter
mp; MSG_WAITALL) && (msg.msg_flags & (MSG_TRUNC | MSG_CTRUNC ^ ^ The first part of the condition is true so the second part is not used. 4671 req_set_fail_links(req); 4672 __io_req_complete(req, issue_flags, ret, cflags); 4673 return 0; 4674 } regards, dan carpenter

Re: [PATCH v2 1/2] kunit: add a KUnit test for SLUB debugging functionality

2021-03-30 Thread Dan Carpenter
-20210330 (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: mm/slub.c:744 object_err() warn: should this be a bitwise op? mm/slub.c:759 slab_err() warn

Re: [syzbot] WARNING in unsafe_follow_pfn

2021-03-30 Thread Dan Carpenter
s users are going to be seeing this as well. According to the commit message for 69bacee7f9ad ("mm: Add unsafe_follow_pfn") "Unfortunately there's some users where this is not fixable (like v4l userptr of iomem mappings)". It sort of seems crazy to dump this giant splat and then

[tip:irq/core 2/2] kernel/irq/irq_sim.c:246 devm_irq_domain_create_sim() warn: passing zero to 'ERR_PTR'

2021-03-30 Thread Dan Carpenter
) 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: kernel/irq/irq_sim.c:246 devm_irq_domain_create_sim() warn: passing zero to 'ERR_PTR' vim +/ERR_PTR +246 kernel/irq

Re: [PATCH][next] mm/vmalloc: Fix read of pointer area after it has been free'd

2021-03-30 Thread Dan Carpenter
r. If the maintainer is going to rebase then they're going to have to think about Fixes tags a bit. Normally rebased trees fold fixes so it's not an issue. Otherwise it would be easy to write a script to correct the Fixes tags during a rebase. In other words, my view is that everyone should just use the same Fixes tag format everywhere. regards, dan carpenter

[kbuild] drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c:1370:4: warning: Variable 'num_of_active_display' is modified but its new value is never used. [unreadVariable]

2021-03-29 Thread Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a5e13c6df0e41702d2b2c77c8ad41677ebb065b3 commit: 75145aab7a0d865b361de687b201e8c4b76425eb drm/amdgpu/swsmu: clean up a bunch of stale interfaces compiler: alpha-linux-gcc (GCC) 9.3.0 If you fix the issue,

Re: [PATCH 2/4] rtc: abx80x: Enable SQW output

2021-03-29 Thread Dan Carpenter
: 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/rtc/rtc-abx80x.c:561 sqw_set() error: uninitialized symbol 'retval'. vim +/retval +561 drivers/rtc/rtc-abx80x.c

[PATCH 2/2] thunderbolt: Fix off by one in tb_port_find_retimer()

2021-03-29 Thread Dan Carpenter
This array uses 1-based indexing so it corrupts memory one element beyond of the array. Fix it by making the array one element larger. Fixes: dacb12877d92 ("thunderbolt: Add support for on-board retimers") Signed-off-by: Dan Carpenter --- drivers/thunderbolt/retimer.c | 2 +- 1 file

[PATCH 1/2] thunderbolt: Fix a leak in tb_retimer_add()

2021-03-29 Thread Dan Carpenter
imers") Signed-off-by: Dan Carpenter --- This is from a new static checker warning. Not tested. With new warnings it's also possible that I have misunderstood something fundamental so review carefully etc. drivers/thunderbolt/retimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

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

2021-03-29 Thread Dan Carpenter
ruct mlxsw_sp > *mlxsw_sp, > { > u16 bucket_index = info->nh_res_bucket->bucket_index; > struct netlink_ext_ack *extack = info->extack; > - bool force = info->nh_res_bucket->force; > + bool force; > char ratr_pl_new[MLXSW_REG_RATR_LEN]; >

Re: [PATCH] bpf: remove redundant assignment of variable id

2021-03-28 Thread Dan Carpenter
ing us to do that but it's never going to happen... :P I do this for networking but it's a massive pain in the butt and I get it wrong 20% of the time. regards, dan carpenter

  1   2   3   4   5   6   7   8   9   10   >