Re: [PATCH 2/2] usb: gadget: s3c: Fix the error handling path in 's3c2410_udc_probe()'

2021-02-21 Thread Dan Carpenter
kernel/git/next/linux-next.git/commit/drivers/usb/gadget/s3c2410_udc.c?id=3fc154b6b8134b98bb94d60cad9a46ec1ffbe372 > the commit ID looks correct to me. Maybe something should be tweaked somewhere > before applying, but I don't know what! Same thing. The hash is 3fc154b6b8134b98bb94d60cad9a46ec1ffbe372 regards, dan carpenter

Re: [PATCH 1/2] usb: gadget: s3c: Fix incorrect resources releasing

2021-02-21 Thread Dan Carpenter
On Sun, Feb 21, 2021 at 08:41:17AM +0100, Christophe JAILLET wrote: > Since commit fe0f8e5c9ba8 ("usb: gadget: s3c: use platform resources"), This the wrong hash. It should be 188db4435ac6 from the URL you posted below. regards, dan carpenter

Re: [PATCH] staging: wimax/i2400m: fix byte-order issue

2021-02-21 Thread Dan Carpenter
On Sat, Feb 20, 2021 at 05:56:47PM +0530, karthik alapati wrote: > fix sparse byte-order warnings by converting host byte-order > types to le32 types > > Signed-off-by: karthik alapati This is a v2 patch... regards, dan carpenter

Re: [PATCH] staging: wimax: fix sparse incorrect type issue

2021-02-21 Thread Dan Carpenter
any patch which doesn't also fix the buffer overflows when we pass: result = p80211req_dorequest(wlandev, msgbuf); How do we know that "msgbuf" is large enough? regards, dan carpenter

Re: [PATCH v3] staging: rtl8723bs: fix code style comparison warning

2021-02-21 Thread Dan Carpenter
t; --- Looks okay to me. Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH v2] staging: rtl8723bs: fix code style comparison warning

2021-02-19 Thread Dan Carpenter
2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > regards, dan carpenter

Re: [PATCH] staging: vt6656: fixed a CamelCase coding style issue.

2021-02-19 Thread Dan Carpenter
wrap around even make sense? I hope that if you review the code a bit I think you will find that the wrap around is impossible? Just fix the two callers and delete this macro. regards, dan carpenter

Re: [PATCH v2] staging: android: Fix const keyword style issue in ashmem.c

2021-02-19 Thread Dan Carpenter
ested Heh. Nope. This breaks the build. regards, dan carpenter

Re: [PATCH] staging: fwserial: Fix alignment of function parameters

2021-02-19 Thread Dan Carpenter
!test_bit(IN_TX, &port->flags), 10); [tab x6][space x7]!test_bit(IN_TX, &port->flags) regards, dan carpenter

[PATCH] cxl/mem: return -EFAULT if copy_to_user() fails

2021-02-19 Thread Dan Carpenter
The copy_to_user() function returns the number of bytes remaining to be copied, but we want to return -EFAULT if the copy doesn't complete. Fixes: b754ffbbc0ee ("cxl/mem: Add basic IOCTL interface") Signed-off-by: Dan Carpenter --- drivers/cxl/mem.c | 5 - 1 file changed, 4 i

Re: [PATCH v2] staging: fwserial: match alignment with open parenthesis

2021-02-19 Thread Dan Carpenter
On Fri, Feb 19, 2021 at 12:03:18PM +0300, Nikolay Kyx wrote: > This patch fixes the following checkpatch.pl check: > > CHECK: Alignment should match open parenthesis > > in file fwserial.c > > Additionally some style warnings remain valid here and could be fixed by > another patch. > Don't put

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-19 Thread Dan Carpenter
d idea, but this is part of the user space API so it's not possible. The best we can do is adding some more comments so people know why we are doing the scary casts. regards, dan carpenter

Re: [PATCH] mhi_bus: core: Wait for ready state after reset

2021-02-19 Thread Dan Carpenter
(attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 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/bus/mhi/core/pm.c:501 mhi_pm_disable_transition() error: uninitialized symbol 'cur_

Re: [PATCH] use explicit host byte-order types in comparison

2021-02-19 Thread Dan Carpenter
On Fri, Feb 19, 2021 at 05:51:59AM +0530, karthik alapati wrote: > convert le32 types to host byte-order types before > comparison > Already fixed. Please work against staging-next or linux-next. regards, dan carpenter

Re: [PATCH] staging: rtl8723bs: make if-statement checkpatch.pl conform

2021-02-18 Thread Dan Carpenter
7;re saying. > > thank you mr. dan carpenter You're welcome. (These sorts of comments do go below the --- cut off line so that's fine.) regards, dan carpenter

Re: [PATCH] Staging: rtl8723bs: code-style fix

2021-02-18 Thread Dan Carpenter
mplete and it has to go above the Signed-off-by line. regards, dan carpenter

Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Dan Carpenter
No problem. These days I have fibre to my house, but I still remember trying to clone the kernel when I could only buy 20MB of data at a time. :P regards, dan carpenter

Re: [PATCH] staging: wlan-ng: Fix comments typos

2021-02-18 Thread Dan Carpenter
* the MSD state is set to HWPRESENT because we regards, dan carpenter

Re: [PATCH] fix comparisons - put constant on right side- eudyptula challenge 10

2021-02-18 Thread Dan Carpenter
ity_priv *psecpriv = &padapter->securitypriv; > > memset(pcur_dot11txpn, 0, 8); > - if (NULL == StaAddr) > + if (StaAddr == NULL) The prefered format for this is actually: if (!StaAddr) return; regards, dan carpenter

Re: [PATCH] fix comparisons - put constant on right side- eudyptula

2021-02-18 Thread Dan Carpenter
ing these sorts of patches. However, to > finish my 10th challenge I was tasked to do exactly that. So I ask you > kindly to pull this patch if possible. > > Thank you for your time, These patches are fine in staging. regards, dan carpenter

Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Dan Carpenter
connection midway every time) I live in Africa and used to have this problem before Africa got connected to fibre optic. Greg's suggestion of using `wget -c` to download a git bundle is a good one. However, in my experience `wget -c` is not 100% accurate on super flakey internet. Then if i

Re: [PATCH v4 14/16] rpmsg: char: introduce a RPMsg driver for the RPMsg char device

2021-02-18 Thread Dan Carpenter
-randconfig-m031-20210215 (attached as .config) compiler: riscv32-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/rpmsg/rpmsg_char.c:429 rpmsg_chrdev_probe() error: we previously

Re: [PATCH v4 11/16] rpmsg: virtio: register the rpmsg_ctrl device

2021-02-18 Thread Dan Carpenter
-randconfig-m001-20210215 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 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/rpmsg/virtio_rpmsg_bus.c:977 rpmsg_probe() error: uninitialized

Re: [PATCH] staging: wlan-ng: Fixed incorrect type warning in p80211netdev.c

2021-02-18 Thread Dan Carpenter
change the type of (struct p80211ioctl_req)->data from caddr_t to "void __user *data;". I haven't looked at this though, so double check. regards, dan carpenter

Re: [PATCH v1 13/18] media: hantro: Introduce G2/HEVC decoder

2021-02-18 Thread Dan Carpenter
On Wed, Feb 17, 2021 at 09:03:01AM +0100, Benjamin Gaignard wrote: > diff --git a/drivers/staging/media/hantro/hantro_drv.c > b/drivers/staging/media/hantro/hantro_drv.c > index e1443c394f62..d171fb80876a 100644 > --- a/drivers/staging/media/hantro/hantro_drv.c > +++ b/drivers/staging/media/hantro

Re: [PATCH v1 06/18] media: hantro: Make sure that ctx->codex_ops is set

2021-02-18 Thread Dan Carpenter
is NULL in Option 2: this can't be NULL, but we are planning to allow that. Option 3: I don't know if this can be NULL but do it for consistency As we review and packport patches we have to figure out why you are adding NULL checks so it really helps if you just tell us. regards, dan carpenter

Re: [PATCH v1 09/18] media: hantro: move hantro_needs_postproc function

2021-02-18 Thread Dan Carpenter
On Wed, Feb 17, 2021 at 09:02:57AM +0100, Benjamin Gaignard wrote: > hantro_needs_postproc function becoming to much complex to > stray inline in .h file move it to .c file. > Yeah. I do think this would make more sense folded in with patch 7. regards, dan carpenter

Re: [PATCH v1 07/18] media: hantro: Add a field to distinguish the hardware versions

2021-02-18 Thread Dan Carpenter
t->enc_offset; > vpu->dec_base = vpu->reg_bases[0] + vpu->variant->dec_offset; > + /* by default decoder is G1 */ > + vpu->core_hw_dec_rev = HANTRO_G1_REV; > This is a write only variable. :P Fold it in with the patch that uses it. regards, dan carpenter

Re: [PATCH v1 03/18] arm64: dts: imx8mq-evk: add reserve memory node for CMA region

2021-02-18 Thread Dan Carpenter
er a bit. But the main thing is that it means you didn't didn't violate any copyrights. regards, dan carpenter

Re: [PATCH v4 2/2] pinctrl: pinmux: Add pinmux-select debugfs file

2021-02-17 Thread Dan Carpenter
On Thu, Feb 11, 2021 at 07:35:33PM -0800, Drew Fustini wrote: > On Thu, Feb 11, 2021 at 10:39:38AM +0300, Dan Carpenter wrote: > > On Wed, Feb 10, 2021 at 11:24:23PM -0800, Joe Perches wrote: > > > On Thu, 2021-02-11 at 10:11 +0300, Dan Carpenter wrote: > > > > On W

[PATCH v2 bpf-next] bpf: fix a warning message in mark_ptr_not_null_reg()

2021-02-16 Thread Dan Carpenter
The WARN_ON() argument is a condition, not an error message. So this code will print a stack trace but will not print the warning message. Fix that and also change it to only WARN_ONCE(). Fixes: 4ddb74165ae5 ("bpf: Extract nullable reg type conversion into a helper function") Signed-o

[PATCH] iio: adis16400: Fix an error code in adis16400_initial_setup()

2021-02-16 Thread Dan Carpenter
d probe will fail. Fixes: 72a868b38bdd ("iio: imu: check sscanf return value") Signed-off-by: Dan Carpenter --- drivers/iio/imu/adis16400.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c index 54af2ed664f6

[PATCH] bpf: fix a warning message in mark_ptr_not_null_reg()

2021-02-16 Thread Dan Carpenter
The WARN_ON() argument is a condition, and it generates a stack trace but it doesn't print the warning. Fixes: 4ddb74165ae5 ("bpf: Extract nullable reg type conversion into a helper function") Signed-off-by: Dan Carpenter --- kernel/bpf/verifier.c | 2 +- 1 file changed, 1

[PATCH] cxl/mem: Fix an error code in cxl_mem_mbox_get()

2021-02-16 Thread Dan Carpenter
evice capabilities") Signed-off-by: Dan Carpenter --- drivers/cxl/mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c index 3bca8451348a..2ebc84e4d202 100644 --- a/drivers/cxl/mem.c +++ b/drivers/cxl/mem.c @@ -383,8 +383,8 @@

Re: [PATCH 0/6] staging: rtl8723bs: remove DBG_COUNTER

2021-02-16 Thread Dan Carpenter
Looks good. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH v3] usb: typec: tcpm: Export partner Source Capabilities

2021-02-15 Thread Dan Carpenter
(Debian 9.3.0-15) 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/typec/tcpm/tcpm.c:5770 tcpm_get_partner_src_caps() warn: variable dereferenced before check 'src_pdo' (see line

[PATCH] USB: gadget: Fix a configfs return code

2021-02-15 Thread Dan Carpenter
If the string is invalid, this should return -EINVAL instead of 0. Fixes: 73517cf49bd4 ("usb: gadget: add RNDIS configfs options for class/subclass/protocol") Signed-off-by: Dan Carpenter --- drivers/usb/gadget/function/u_ether_configfs.h | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH] mtd: rawnand: fsmc: Fix error code in fsmc_nand_probe()

2021-02-15 Thread Dan Carpenter
If dma_request_channel() fails then the probe fails and it should return a negative error code, but currently it returns success. fixes: 4774fb0a48aa ("mtd: nand/fsmc: Add DMA support") Signed-off-by: Dan Carpenter --- drivers/mtd/nand/raw/fsmc_nand.c | 2 ++ 1 file changed, 2

[PATCH net-next] octeontx2-pf: fix an off by one bug in otx2_get_fecparam()

2021-02-15 Thread Dan Carpenter
by itself. And I removed the FEC_MAX_INDEX define and used ARRAY_SIZE(fec) instead. Fixes: d0cf9503e908 ("octeontx2-pf: ethtool fec mode support") Signed-off-by: Dan Carpenter --- .../net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c| 9 + 1 file changed, 5 insertions(+),

drivers/infiniband/hw/qedr/verbs.c:1925 qedr_create_user_qp() error: we previously assumed 'ctx' could be null (see line 1900)

2021-02-15 Thread Dan Carpenter
onfig) compiler: gcc-9 (Debian 9.3.0-15) 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/infiniband/hw/qedr/verbs.c:1925 qedr_create_user_qp() error: we previously assumed 'ctx' could be null

Re: [PATCH] staging:wlan-ng: use memdup_user instead of kmalloc/copy_from_user

2021-02-15 Thread Dan Carpenter
} 585 } 586 kfree(msgbuf); 587 588 bail: 589 /* If allocate,copyfrom or copyto fails, return errno */ 590 return result; 591 } Smatch has a problem parsing this code because struct ifreq *ifr is a union and Smatch gets confused. :/ regards, dan carpenter

Re: [PATCH] staging: rtl8192e: fix typo in a function name

2021-02-15 Thread Dan Carpenter
like this: "There is a typo here where it says "qurey" but "query" was intended." regards, dan carpenter

Re: [PATCH v5 13/19] remoteproc: Properly deal with the resource table

2021-02-15 Thread Dan Carpenter
) compiler: ia64-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/remoteproc/remoteproc_core.c:2080 rproc_detach() error: double free of 'rproc->cached_table' vim

Re: [greybus-dev] [PATCH 1/1] staging: greybus: Added do - while in multi statement macro

2021-02-15 Thread Dan Carpenter
how two people stumbled upon the exact same thing at the > same time. Copy/paste ? > Those things are pretty common where people try to fix the first checkpatch warning they find. There was one time some years back when 5 people sent the same patch. regards, dan carpenter

Re: [PATCH v4 2/2] staging: rtl8723bs: remove obsolete commented out code

2021-02-12 Thread Dan Carpenter
On Thu, Feb 11, 2021 at 06:36:04PM +0530, karthik alapati wrote: > There is a bunch of messy, commented out code. Just delete it. > > Suggested-by: Dan Carpenter > Signed-off-by: karthik alapati Perfect, thanks. Greg already merged this as well so good job. regards, dan carepnter

Re: [PATCH v4 2/2] pinctrl: pinmux: Add pinmux-select debugfs file

2021-02-11 Thread Dan Carpenter
ing when you used devm_kfree() on kzalloc()ed memory, but I guess the warning is only the other way around. Smatch does complain about it as a leak because it was expecting a regular free. drivers/pinctrl/pinmux.c:330 pinmux_func_name_to_selector() warn: potential NULL parameter dereference 'fname' drivers/pinctrl/pinmux.c:764 pinmux_select() warn: possible memory leak of 'gname' drivers/pinctrl/pinmux.c:764 pinmux_select() warn: sscanf doesn't return error codes drivers/pinctrl/pinmux.c:764 pinmux_select() warn: returning success when sscanf failed And what about the success path? Shouldn't we free these on the success path as well? regards, dan carpenter

Re: possible deadlock in fs_reclaim_acquire (2)

2021-02-11 Thread Dan Carpenter
I have created a new Smatch warning when people pass GFP_NOFS to kvmalloc() and friends. We'll see if it finds anything tomorrow. (We could probably find the same information with grep, but I run Smatch every day so it prevents future bugs). regards, dan carpenter

Re: [PATCH][next] staging: rtl8723bs: Replace one-element array with flexible-array member in struct ndis_80211_var_ie

2021-02-11 Thread Dan Carpenter
le_array_member > [2] > https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays > > Link: https://github.com/KSPP/linux/issues/79 > Link: https://github.com/KSPP/linux/issues/109 > Build-tested-by: kernel test robot > Link: https://lore.kernel.org/lkml/602434b8.jc5doxj0bmhoxgil%25...@intel.com/ > Signed-off-by: Gustavo A. R. Silva Looks okay to me. I looked for potential issues with changing the sizeof the struct but couldn't find any. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH][next] media: i2c: imx334: Fix a read of the uninitialized variable ret

2021-02-11 Thread Dan Carpenter
IS_ERR_VALUE(imx334->reset_gpio)); IS_ERR_VALUE() isn't right. It would always print 1 here. It should just be PTR_ERR(). IS_ERR_VALUE() is like IS_ERR() but for when you're storing memory addresses in an unsigned long variable. get_unmapped_area(), for example, returns unsigned longs. regards, dan carpenter

Re: [PATCH] staging: rtl8723bs: remove obsolete commented out code

2021-02-11 Thread Dan Carpenter
r, true, true, channel, Bandwidth, > Offset40, Offset80, channel); > > - /* DBG_871X("<==%s()\n", __func__); */ Please delete the blank lines as well. regards, dan carpenter

Re: [PATCH] staging: rtl8723bs: remove obsolete commented out code

2021-02-10 Thread Dan Carpenter
sy, commented out code. Just delete it." > Suggested-by: Dan Carpenter > Signed-off-by: karthik alapati > --- > .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 44 --- > 1 file changed, 9 insertions(+), 35 deletions(-) > > diff --git a/drivers/stagi

Re: [PATCH] staging: rtl8723bs: remove obsolete commented out code

2021-02-10 Thread Dan Carpenter
atches. Just be patient and I will get to it. regards, dan carpenter

Re: [PATCH v4 2/2] pinctrl: pinmux: Add pinmux-select debugfs file

2021-02-10 Thread Dan Carpenter
On Wed, Feb 10, 2021 at 11:24:23PM -0800, Joe Perches wrote: > On Thu, 2021-02-11 at 10:11 +0300, Dan Carpenter wrote: > > On Wed, Feb 10, 2021 at 02:28:54PM -0800, Drew Fustini wrote: > > > + ret = strncpy_from_user(buf, user_buf, PINMUX_MAX_NAME * 2); &

Re: [PATCH v4] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Dan Carpenter
On Thu, Feb 11, 2021 at 11:08:19AM +0530, Amey Narkhede wrote: > Stack allocated buffers cannot be used for DMA > on all architectures so allocate hci_packet buffer > using kmalloc. > > Signed-off-by: Amey Narkhede Looks good. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH v4 2/2] pinctrl: pinmux: Add pinmux-select debugfs file

2021-02-10 Thread Dan Carpenter
me; } I'm going to write a Smatch check for this today. > + } > + > + fsel = pinmux_func_name_to_selector(pctldev, fname); > + if (fsel < 0) { > + dev_err(pctldev->dev, "invalid function %s in map table\n", > fname); > + ret = -EINVAL; ret = fsel; > + goto free_gname; > + } > + regards, dan carpenter

Re: [PATCH v2 2/2] pinctrl: pinmux: Add pinmux-select debugfs file

2021-02-10 Thread Dan Carpenter
On Wed, Feb 10, 2021 at 11:04:28AM -0800, Drew Fustini wrote: > On Wed, Feb 10, 2021 at 09:20:44PM +0300, Dan Carpenter wrote: > > Hi Drew, > > > > url: > > https://github.com/0day-ci/linux/commits/Drew-Fustini/pinctrl-pinmux-Add-pinmux-select-debugfs-file/202

Re: [PATCH] staging: rtl8723bs: cleanup macros within include/rtw_debug.h

2021-02-10 Thread Dan Carpenter
tempting. Do that in the next patch. The actuall rules are slightly more complicated and nuanced than that, but if you just fix one type at a time then that's okay. One thing is that your patches should not introduce new checkpatch warnings. So if you have two statements in an if statement and you delete one, then that means you have to delete he curly braces as well. regards, dan carpenter

Re: [PATCH v2 2/2] pinctrl: pinmux: Add pinmux-select debugfs file

2021-02-10 Thread Dan Carpenter
On Wed, Feb 10, 2021 at 07:39:16PM +0100, Geert Uytterhoeven wrote: > Hi Dan, > > On Wed, Feb 10, 2021 at 7:21 PM Dan Carpenter > wrote: > > 99b2f99aa41aa7 Drew Fustini 2021-02-09 694buf = > > devm_kzalloc(pctldev->dev, PINMUX_MAX_NAME * 2, GFP_KERNEL); >

Re: [PATCH] staging: rtl8723bs: cleanup macros within include/rtw_debug.h

2021-02-10 Thread Dan Carpenter
have functions to dump hex data. I can't remember what they are... One patch for this. > #endif /* defined(_dbgdump) */ > #endif /* DEBUG_RTL871X */ > > #ifdef CONFIG_DBG_COUNTER > -#define DBG_COUNTER(counter) counter++ > +#define DBG_COUNTER(counter) ((counter)++) Heh... I think these counters are write only variables. Double check and then just delete everything to do with CONFIG_DBG_COUNTER. (In a separate patch). regards, dan carpenter

Re: [PATCH v2 2/2] pinctrl: pinmux: Add pinmux-select debugfs file

2021-02-10 Thread Dan Carpenter
(Debian 9.3.0-15) 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/pinctrl/pinmux.c:762 pinmux_select() error: uninitialized symbol 'gname'. vim +/gname +762 drivers/pinctr

Re: [PATCH v3] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Dan Carpenter
> > > > + hci = kmalloc(5, GFP_KERNEL); > > > > Why "5" and not: > > hci = kmalloc(sizeof(*hci), GFP_KERNEL); 5 is correct and sizeof(*hci) is 4. The hci struct ends in a zero element array. You could do: hci = kmalloc(struct_size(hci, data, 1), GFP_KERNEL); I'm not sure it's more readable. But you still will have to resend because the patch passes "&hci" to usb_bulk_msg() instead of "hci" so it will corrupt memory. I always encourage people to write the patch and then sit on it over night and send it the next day. regards, dan carpenter

Re: [PATCH] staging: ralink-gdma: Fix checkpatch.pl CHECK

2021-02-10 Thread Dan Carpenter
nction_name(paramenters) Either option will let you grep for the names of the functions: egrep "^[a-zA-Z]" dir/file.c | grep '(' regards, dan carpenter

Re: [PATCH] staging: rtl8723bs: fix function comments to follow kernel-doc

2021-02-10 Thread Dan Carpenter
On Wed, Feb 10, 2021 at 02:38:28PM +0530, karthek wrote: > On Wed, Feb 10, 2021, 2:31 PM Dan Carpenter > wrote: > > > On Wed, Feb 10, 2021 at 02:28:31PM +0530, karthek wrote: > > > On Wed, Feb 10, 2021 at 1:37 PM Dan Carpenter > > wrote: > > &

[PATCH] module: potential uninitialized return in module_kallsyms_on_each_symbol()

2021-02-10 Thread Dan Carpenter
bol") Signed-off-by: Dan Carpenter --- kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index 95186c9d81ea..9bd3c821d029 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -4447,7 +4447,7 @@ int module_kallsyms_on_ea

Re: [PATCH] staging: rtl8723bs: fix block comments alignment

2021-02-10 Thread Dan Carpenter
{ > u32 i; There is a proper kernel-doc style that function comments are supposed to use. https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html ./scripts/kernel-doc -v -none drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c regards, dan carpenter

Re: [PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Dan Carpenter
nter. > > > > thanks, > > > > greg k-h > Thanks. I'll send v3. I assume now we don't need kzalloc anymore as we > initialize > the hci_packet so kmalloc(sizeof(struct hci_packet),..) will do. We only initialize the first five bytes, but it also seems as if we only use the first five bytes which raises the question of why we are allocating 16 bytes. regards, dan carpenter

Re: [PATCH] staging: rtl8723bs: fix function comments to follow kernel-doc

2021-02-10 Thread Dan Carpenter
On Wed, Feb 10, 2021 at 02:28:31PM +0530, karthek wrote: > On Wed, Feb 10, 2021 at 1:37 PM Dan Carpenter > wrote: > > > @@ -789,7 +759,7 @@ static void phy_PostSetBwMode8723B(struct adapter > > > *Adapter) > > > > > > PHY_S

Re: [PATCH] staging: rtl8723bs: fix function comments to follow kernel-doc

2021-02-10 Thread Dan Carpenter
RegAddr,The target address to be > modified > -*u32 BitMask The target bit position in the > target address > -*to be modified > -*u32

drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848)

2021-02-09 Thread Dan Carpenter
-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/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be n

Re: [PATCH] staging: gdm724x: Fix DMA from stack

2021-02-09 Thread Dan Carpenter
> + return -ENOMEM; > + > ret = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 2), buf, 5, > &actual, 1000); You need to add a kfree() as well. regards, dan carpenter

Re: [PATCH][next] iommu/mediatek: Fix unsigned domid comparison with less than zero

2021-02-09 Thread Dan Carpenter
va_region_nr' in > 'struct mtk_iommu_plat_data'. iova_region_nr is either 1 or 5 so unsigned doesn't matter. I once almost introduced a bug where the iterator was supposed to be size_t. I fixed a bug by making it signed but I ended up introducing a new bug. But generally that's pretty rare. The more common case is that making iterators unsigned introduces bugs. It's better to default to "int i;" and if more complicated types are required that should stand out. "size_t pg_idx;" or whatever. regards, dan carpenter

drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c:106 dpu_rm_init() warn: passing zero to 'PTR_ERR'

2021-02-09 Thread Dan Carpenter
: 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 New smatch warnings: drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c:106 dpu_rm_init() warn: passing zero to 'PTR_ERR' Old smatch warnings: drivers/g

Re: [PATCH] staging: fix ignoring return value warning

2021-02-09 Thread Dan Carpenter
On Tue, Feb 09, 2021 at 09:18:02AM +0800, Youling Tang wrote: > Hi, Dan > > > On 02/09/2021 03:02 AM, Dan Carpenter wrote: > > On Mon, Feb 08, 2021 at 04:06:18PM +0100, Sascha Hauer wrote: > > > Hi Dan, > > > > > > On Mon, Feb 08, 2021 at 04:45:17

Re: [PATCH] staging: fix ignoring return value warning

2021-02-08 Thread Dan Carpenter
On Mon, Feb 08, 2021 at 04:06:18PM +0100, Sascha Hauer wrote: > Hi Dan, > > On Mon, Feb 08, 2021 at 04:45:17PM +0300, Dan Carpenter wrote: > > On Sun, Feb 07, 2021 at 05:23:28PM +0800, Youling Tang wrote: > > > Fix the below ignoring return value warning for device_res

Re: [PATCH 1/3] bus: fsl-mc: Fix test for end of loop

2021-02-08 Thread Dan Carpenter
On Mon, Feb 08, 2021 at 07:09:47PM +0200, Ioana Ciornei wrote: > From: Dan Carpenter > > The "desc" pointer can't possibly be NULL here. If we can't find the > correct "desc" then tt points to the last element of the > fsl_mc_accept

Re: [PATCH] bus: fsl-mc: Fix test for end of loop

2021-02-08 Thread Dan Carpenter
On Mon, Feb 08, 2021 at 02:18:04PM +, Ioana Ciornei wrote: > On Mon, Feb 01, 2021 at 03:28:54PM +0300, Dan Carpenter wrote: > > The "desc" pointer can't possibly be NULL here. If we can't find the > > correct "desc" then tt points to the last el

Re: [PATCH] HID: logitech-dj: fix unintentional integer overflow on left shift

2021-02-08 Thread Dan Carpenter
27;t be undefined. > - if (djdev->reports_supported & (1 << i)) { > + if (djdev->reports_supported & BIT_ULL(i)) { > reportbuffer[0] = i; > if (hid_input_report(djdev->hdev, >HID_INPUT_REPORT, regards, dan carpenter

Re: [PATCH] staging: fix ignoring return value warning

2021-02-08 Thread Dan Carpenter
e think silencing warnings is good, but it's actually bad. The warning is there to show us a potential bug. If we silence the warning without fixing the bug, then we it's like when your mom tells you to clean up the room and you instead just switch off the light. It doesn't fix the problem, it only makes it harder to find. regards, dan carpenter

drivers/power/reset/at91-reset.c:260 at91_reset_probe() warn: 'reset->rstc_base' not released on lines: 244.

2021-02-08 Thread Dan Carpenter
(attached as .config) compiler: arm-linux-gnueabi-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/power/reset/at91-reset.c:260 at91_reset_probe() warn: 'reset->rstc_base' no

Re: [PATCH 1/3] kunit: add kunit.filter_glob cmdline option to filter suites

2021-02-08 Thread Dan Carpenter
On Thu, Feb 04, 2021 at 09:30:43AM -0800, Daniel Latypov wrote: > On Wed, Feb 3, 2021 at 11:13 PM Dan Carpenter > wrote: > > > > Hi Daniel, > > > > url: > > https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-support-running-subsets

[PATCH] iommu/mediatek: Fix error code in probe()

2021-02-05 Thread Dan Carpenter
This error path is supposed to return -EINVAL. It used to return directly but we added some clean up and accidentally removed the error code. Also I fixed a typo in the error message. Fixes: c0b57581b73b ("iommu/mediatek: Add power-domain operation") Signed-off-by: Dan Carpenter --

Re: [PATCH RESEND] mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq()

2021-02-04 Thread Dan Carpenter
On Thu, Feb 04, 2021 at 10:37:24AM +, Lee Jones wrote: > On Fri, 29 Jan 2021, Dan Carpenter wrote: > > > The "req" struct is always added to the "wm831x->auxadc_pending" list, > > but it's only removed from the list on the success path. If a fai

[rcu:willy-maple 175/202] mm/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm'.

2021-02-03 Thread Dan Carpenter
-20210202 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 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/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm'.

Re: [PATCH 1/3] kunit: add kunit.filter_glob cmdline option to filter suites

2021-02-03 Thread Dan Carpenter
you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: lib/kunit/executor.c:110 kunit_run_all_tests() error: double free of 'suite_set.start' vim +110 lib/kunit/executor.c 8c0d884986ba22 Brendan Higgins

[rcu:willy-maple 164/202] fs/proc/task_mmu.c:941 show_smaps_rollup() error: uninitialized symbol 'vma_start'.

2021-02-03 Thread Dan Carpenter
-20210202 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 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: fs/proc/task_mmu.c:941 show_smaps_rollup() error: uninitialized symbol 'vma_start&#

[rcu:willy-maple 137/202] mm/mmap.c:1895 mmap_region() error: uninitialized symbol 'next'.

2021-02-03 Thread Dan Carpenter
(attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 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/mmap.c:1895 mmap_region() error: uninitialized symbol 'next'. vim +/next +1895

Re: [PATCH] misc: bcm-vk: Fix a couple error codes in probe()

2021-02-03 Thread Dan Carpenter
On Wed, Feb 03, 2021 at 11:15:35AM -0800, Scott Branden wrote: > Thanks Dan, > > On 2021-02-03 6:42 a.m., Dan Carpenter wrote: > > These errors should return negative error codes instead of returning > > success. > Do you have a script running to report such issues or just

[PATCH] misc: bcm-vk: Fix a couple error codes in probe()

2021-02-03 Thread Dan Carpenter
These errors should return negative error codes instead of returning success. Fixes: 064ffc7c3939 ("misc: bcm-vk: add autoload support") Fixes: 522f692686a7 ("misc: bcm-vk: add Broadcom VK driver") Signed-off-by: Dan Carpenter --- drivers/misc/bcm-vk/bcm_vk_dev.c | 4 +++

[rcu:willy-maple 134/202] mm/mmap.c:2919 do_brk_munmap() error: we previously assumed 'vma->anon_vma' could be null (see line 2884)

2021-02-03 Thread Dan Carpenter
-randconfig-m001-20210202 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 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/mmap.c:2919 do_brk_munmap() error: we previously assumed 'vma->

Re: [PATCH][next] usb: cdnsp: Fix spelling mistake "delagete" -> "delegate"

2021-02-03 Thread Dan Carpenter
t cdnsp_device *pdev, > { > int ret; > > - trace_cdnsp_ep0_request("delagete"); > + trace_cdnsp_ep0_request("delegate"); > This printk is useless and should just be deleted. Use ftrace instead. regards, dan carpenter

Re: [PATCH 4.4 24/28] can: dev: prevent potential information leak in can_fill_info()

2021-02-02 Thread Dan Carpenter
On Tue, Feb 02, 2021 at 10:05:39PM +0300, Dan Carpenter wrote: > On Tue, Feb 02, 2021 at 07:53:17PM +0100, Pavel Machek wrote: > > Hi! > > > > > From: Dan Carpenter > > > > > > [ Upstream commit b552766c872f5b0d90323b24e4c9e8fa67486dd5 ] > > &g

Re: [PATCH 4.4 24/28] can: dev: prevent potential information leak in can_fill_info()

2021-02-02 Thread Dan Carpenter
On Tue, Feb 02, 2021 at 07:53:17PM +0100, Pavel Machek wrote: > Hi! > > > From: Dan Carpenter > > > > [ Upstream commit b552766c872f5b0d90323b24e4c9e8fa67486dd5 ] > > > > The "bec" struct isn't necessarily always initialized. For example, th

Re: [PATCH] ceph: Fix an Oops in error handling

2021-02-02 Thread Dan Carpenter
On Tue, Feb 02, 2021 at 07:37:57AM -0500, Jeff Layton wrote: > On Tue, 2021-02-02 at 08:47 +0300, Dan Carpenter wrote: > > The "req" pointer is an error pointer and not NULL so this check needs > > to be fixed. > > > > Fixes: 1cf7fdf52d5a ("cep

Re: [PATCH] ceph: fix an oops in error handling in ceph_netfs_issue_op

2021-02-02 Thread Dan Carpenter
; Also, drop the unneeded NULL check before calling > ceph_osdc_put_request. > > Fixes: 1cf7fdf52d5a ("ceph: convert readpage to fscache read helper") > Reported-by: Dan Carpenter > Suggested-by: Ilya Dryomov > Signed-off-by: Jeff Layton Looks good. Acked-by: Dan Carpenter regards, dan carpenter

[PATCH v2] ocfs2: Fix a use after free on error

2021-02-02 Thread Dan Carpenter
The error handling in this function frees "reg" but it is still on the "o2hb_all_regions" list so it will lead to a use after freew. Joseph Qi points out that we need to clear the bit in the "o2hb_region_bitmap" as well Fixes: 1cf257f51191 ("ocfs2: fix memory

Re: KASAN: slab-out-of-bounds Read in add_adv_patterns_monitor

2021-02-02 Thread Dan Carpenter
ed process because the cmd cannot complete. Sometimes it's hard to know what the affect of a bug is, but since you're working in the subsystem then you probably have a better guess than the rest of us so even a guess is useful. regards, dan carpenter

Re: KASAN: slab-out-of-bounds Read in add_adv_patterns_monitor

2021-02-01 Thread Dan Carpenter
u > > BT_DBG("request for %s", hdev->name); > > - if (len <= sizeof(*cp) || cp->pattern_count == 0) { > + if (len <= sizeof(*cp) || cp->pattern_count == 0 || > + len < sizeof(*cp) + cp->pattern_count * > + sizeof(struct mgmt_adv_pattern)) { > err = mgmt_cmd_status(sk, hdev->id, > MGMT_OP_ADD_ADV_PATTERNS_MONITOR, > MGMT_STATUS_INVALID_PARAMS); > I think this was already fixed on Jan 22 commit b4a221ea8a1f ("Bluetooth: advmon offload MSFT add rssi support"). expected_size += cp->pattern_count * sizeof(struct mgmt_adv_pattern); if (len != expected_size) { Now someone needs to backport it to stable. regards, dan carpenter

Re: [PATCH v3 06/11] iio: core: merge buffer/ & scan_elements/ attributes

2021-02-01 Thread Dan Carpenter
.config) compiler: arc-elf-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/iio/industrialio-buffer.c:1413 __iio_buffer_alloc_sysfs_and_mask() error: uninitialized symbol 'ret&#

[PATCH] ceph: Fix an Oops in error handling

2021-02-01 Thread Dan Carpenter
The "req" pointer is an error pointer and not NULL so this check needs to be fixed. Fixes: 1cf7fdf52d5a ("ceph: convert readpage to fscache read helper") Signed-off-by: Dan Carpenter --- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/c

[PATCH] bus: fsl-mc: Fix test for end of loop

2021-02-01 Thread Dan Carpenter
fsl-mc: add fsl-mc userspace support") Signed-off-by: Dan Carpenter --- drivers/bus/fsl-mc/fsl-mc-uapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-uapi.c b/drivers/bus/fsl-mc/fsl-mc-uapi.c index eeb988c9f4bb..bdcd9d983a78 100644 --- a/drivers

<    1   2   3   4   5   6   7   8   9   10   >