Re: [PATCH][next] drm/panel: fix null pointer dereference on pointer mode

2020-09-18 Thread Colin Ian King
On 18/09/2020 17:22, Guido Günther wrote: > Hi, > On Fri, Sep 18, 2020 at 04:51:36PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently a null pointer check on pointer mode is passing mode to >> function drm_mode_vrefresh and this causes a null pointe

Re: [PATCH] scsi: arcmsr: Remove the superfluous break

2020-09-18 Thread Colin Ian King
On 18/09/2020 19:00, Dan Carpenter wrote: > Smatch just ignores these because they're often done deliberately. > > regards, > dan carpenter > And I ignore fixing them when coverity reports them because life is too short. Colin

Re: [PATCH 1/3] stress-shm-sysv: exercise shmat with invalid flags

2020-09-22 Thread Colin Ian King
I believe these patches should have gone directly to me and not various other folk. Colin On 22/09/2020 08:27, Piyush Goyal wrote: > Exercise shmat syscall with invalid flags resulting in more kernel > coverage. > > Signed-off-by: Piyush Goyal > --- > stress-shm-sysv.c | 14 ++ > 1

Re: [PATCH v2] PCI: brcmstb: fix a missing if statement on a return error check

2020-09-22 Thread Colin Ian King
On 22/09/2020 13:43, Jim Quinlan wrote: > On Tue, Sep 22, 2020 at 7:49 AM Markus Elfring wrote: >> >>> The error return ret is not being check with an if statement and >> >> Wording alternative: >> The return value from a call of the function “brcm_phy_start” was not >> checked and >> >> >>> V2:

Re: [PATCH] media: rc: fix check on dev->min_timeout for LIRC_GET_MIN_TIMEOUT ioctl

2020-09-15 Thread Colin Ian King
On 15/09/2020 18:12, Sean Young wrote: > On Tue, Sep 15, 2020 at 04:36:08PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently the LIRC_GET_MIN_TIMEOUT is checking for a null dev->max_timeout >> and then accessing dev->min_timeout, hence we may

Re: [PATCH] x86/apic: fix integer overflow on 10 bit right shift of cpu_khz

2019-06-19 Thread Colin Ian King
On 19/06/2019 19:13, Colin King wrote: > From: Colin Ian King > > The right shift of unsigned int cpu_khz will overflow for large values > of cpu_khz, so cast it to a long long before shifting it to avoid > overvlow. For example, this can happen when cpu_khz is 4194305 (just >

re: RDMA: Clean destroy CQ in drivers do not return errors

2019-06-14 Thread Colin Ian King
Hi, Static analysis with Coverity reported an issue with the following commit: commit a52c8e2469c30cf7ac453d624aed9c168b23d1af Author: Leon Romanovsky Date: Tue May 28 14:37:28 2019 +0300 RDMA: Clean destroy CQ in drivers do not return errors In function bnxt_re_destroy_cq() contains the

Re: [PATCH] staging: rtl8723bs: remove redundant assignment to rtStatus

2019-06-17 Thread Colin Ian King
On 17/06/2019 13:47, Colin King wrote: > From: Colin Ian King > > Variable rtStatus is initialized with a value that is never read > and later it is reassigned a new value. Hence the initialization > is redundant and can be removed. > > Addresses-Coverity: ("Unus

re: security/loadpin: Allow to exclude specific file types

2019-05-31 Thread Colin Ian King
Hi, Static analysis with Coverity on linux-next has found a potential issue with the following commit: commit 1633a4f04cc171fc638deb5c95af96032d3c591b Author: Ke Wu Date: Thu May 30 12:22:08 2019 -0700 security/loadpin: Allow to exclude specific file types 209for (j = 0;

Re: security/loadpin: Allow to exclude specific file types

2019-05-31 Thread Colin Ian King
On 31/05/2019 15:44, Kees Cook wrote: > On Fri, May 31, 2019 at 11:46:29AM +0100, Colin Ian King wrote: >> Hi, >> >> Static analysis with Coverity on linux-next has found a potential issue >> with the following commit: >> >> commit 1633a4f04cc171fc638deb5c95a

Re: [PATCH][next] bpf: remove redundant assignment to err

2019-06-03 Thread Colin Ian King
On 03/06/2019 18:21, Jakub Kicinski wrote: > On Mon, 3 Jun 2019 18:02:47 +0100, Colin King wrote: >> From: Colin Ian King >> >> The variable err is assigned with the value -EINVAL that is never >> read and it is re-assigned a new value later on. The assignment is >

Re: [PATCH][next] bpf: remove redundant assignment to err

2019-06-03 Thread Colin Ian King
On 03/06/2019 18:49, Jakub Kicinski wrote: > On Mon, 3 Jun 2019 18:39:16 +0100, Colin Ian King wrote: >> On 03/06/2019 18:21, Jakub Kicinski wrote: >>> On Mon, 3 Jun 2019 18:02:47 +0100, Colin King wrote: >>>> From: Colin Ian King >>>> >>>&g

Re: [PATCH] scsi: qedf: replace memset/memcpy with safer strscpy

2019-04-12 Thread Colin Ian King
chwork.kernel.org/patch/10874565/ > > On 2019/4/12 17:05, Colin King wrote: >> From: Colin Ian King >> >> Currently the qedf_dbg_* family of functions can overrun the end >> of the source string if it is less than the destination buffer >> length because of t

re: mlxsw: spectrum: Adjust headroom buffers for 8x ports

2020-06-17 Thread Colin Ian King
Hi Static analysis with Coverity has detected an issue that relies on the machine endianness to work. The commit in question is: commit 60833d54d56c21e7538296eb2e00e104768fd047 Author: Ido Schimmel Date: Tue Jun 16 10:14:58 2020 +0300 mlxsw: spectrum: Adjust headroom buffers for 8x ports

Re: [PATCH] drm/i915/display: fix missing null check on allocated dsb object

2020-06-16 Thread Colin Ian King
On 16/06/2020 12:54, Dan Carpenter wrote: > On Tue, Jun 16, 2020 at 12:42:21PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently there is no null check for a failed memory allocation >> on the dsb object and without this a null pointer dereference >

Re: [PATCH][next] mtd: rawnand: qcom: fix incorrect masking operator, used & instead of |

2020-06-16 Thread Colin Ian King
On 16/06/2020 13:57, Miquel Raynal wrote: > Hi Colin, > > Colin King wrote on Tue, 16 Jun 2020 > 12:51:25 +0100: > >> From: Colin Ian King >> >> Currently the expression (nand_ctrl | BAM_MODE_EN) is always true no >> matter the value of nand_ctrl becau

re: rtw88: pci: define a mask for TX/RX BD indexes

2020-06-24 Thread Colin Ian King
Hi, static analysis with Coverity has detected a out of range write issue on the assigment rx_ring->buf[i] = skb in rtw_pci_init_rx_ring. The commit in question is: commit a5697a65ecd109ce7f8e3661b89a5dffae73b512 Author: Yan-Hsuan Chuang Date: Thu Mar 12 16:08:51 2020 +0800 rtw88: pci: de

Re: [PATCH][next] USB: EHCI: ehci-mv: fix less than zero comparison of an unsigned int

2020-05-16 Thread Colin Ian King
On 16/05/2020 07:30, Greg Kroah-Hartman wrote: > On Fri, May 15, 2020 at 01:21:21PM -0400, Alan Stern wrote: >> On Fri, May 15, 2020 at 05:54:53PM +0100, Colin King wrote: >>> From: Colin Ian King >>> >>> The comparison of hcd->irq to less than zero fo

Re: [PATCH] usb: gadget: pch_udc: don't update td->next after it has been released to the pool

2017-03-28 Thread Colin Ian King
On 28/03/17 13:51, Felipe Balbi wrote: > > Hi, > > Colin King writes: >> From: Colin Ian King >> >> Writing to td->next should be avoided after td has been freed using >> dma_pool_free. The intent was to nullify the next pointer, but this >> is pote

Re: [PATCH] ASoC: Intel: Skylake: fix dereference before NULL check on ebus

2017-04-19 Thread Colin Ian King
On 19/04/17 14:32, Dan Carpenter wrote: > On Wed, Apr 19, 2017 at 01:16:13PM +0100, Colin King wrote: >> From: Colin Ian King >> >> ebus is being NULL checked however it is being dereferenced >> earlier on the assignment bus = ebus_to_hbus(ebus). Fix this >> by m

Re: [PATCH] jffs2: fix spelling mistake: "requestied" -> "requested"

2017-04-19 Thread Colin Ian King
On 19/04/17 19:38, Brian Norris wrote: > On Wed, Apr 19, 2017 at 11:36:34AM -0700, Brian Norris wrote: >> s/an nonexistent/a nonexisten/ > > Ha, and of course a typo in my correction :) But at least I didn't make > that mistake in the real commit. Easily done :-/ > > Brian > Thanks Brian

re: mtip32xx: add a status field to struct mtip_cmd

2017-04-21 Thread Colin Ian King
Hi, CoverityScan found an issue with the following part of the patch: - if (likely(!reserv)) - blk_mq_complete_request(rq, -ENODEV); - else if (test_bit(MTIP_PF_IC_ACTIVE_BIT, &dd->port->flags)) { + if (likely(!reserv)) { + cmd->status = -ENODEV; +

Re: [PATCH] wlcore: fix spelling mistake in wl1271_warning 'iligal' -> 'illegal'

2017-04-03 Thread Colin Ian King
On 03/04/17 10:20, Joe Perches wrote: > On Mon, 2017-04-03 at 10:15 +0100, Colin King wrote: >> From: Colin Ian King >> >> trivial fix to spelling mistake in wl1271_warning error message >> >> Signed-off-by: Colin Ian King >> --- >> drivers/net/w

Re: [PATCH] mm/migrate: check for null vma before dereferencing it

2017-04-11 Thread Colin Ian King
On 11/04/17 22:26, Andrew Morton wrote: > On Tue, 11 Apr 2017 13:51:02 +0100 Colin King > wrote: > >> From: Colin Ian King >> >> check if vma is null before dereferencing it, this avoiding any >> potential null pointer dereferences on vma via the is_vm_huget

Re: [PATCH] net/mlx4: fix spelling mistake: "enforcment" -> "enforcement"

2017-06-27 Thread Colin Ian King
On 27/06/17 11:33, Tariq Toukan wrote: > > > On 27/06/2017 1:02 PM, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to spelling mistake in mlx4_dbg debug message >> >> Signed-off-by: Colin Ian King >> --- >> drivers/net/etherne

Re: [PATCH] perf jit: fix typo: "incalid" -> "invalid"

2017-06-27 Thread Colin Ian King
On 27/06/17 15:54, Arnaldo Carvalho de Melo wrote: > Em Tue, Jun 27, 2017 at 01:49:17PM +0100, Colin King escreveu: >> From: Colin Ian King >> >> Trivial fix to typo in mlx4_dbg warnx warning message > > Was this coccinele'd or otherwise automated? Would be nice

NACK: [PATCH] [media] rainshadow-cec: ensure exit_loop is initialized

2017-05-19 Thread Colin Ian King
On 19/05/17 18:39, Colin King wrote: > From: Colin Ian King > > exit_loop is not being initialized, so it contains garbage. Ensure it is > initialized to false. > > Detected by CoverityScan, CID#1436409 ("Uninitialzed scalar variable") > > Fixes: ea6a69defd33

NAK: [PATCH] scsi: snic: fix a couple of spelling mistakes/typos

2017-06-30 Thread Colin Ian King
Incorrect commit message, I'll resend. On 30/06/17 14:54, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistakes/typos: > > "Allodating" -> "Allocating" > "incative" -> "inactive" > >

Re: [PATCH] char/mwave: make some arrays static const to make object code smaller

2017-07-10 Thread Colin Ian King
On 10/07/17 16:28, Arnd Bergmann wrote: > On Mon, Jul 10, 2017 at 5:08 PM, Colin King wrote: >> From: Colin Ian King >> >> Don't populate arrays on the stack but make them static. Makes >> the object code smaller. Also remove temporary variables that >> ha

Re: [PATCH] iio:adc:at91-sama5d2: make array startup_lookup static

2017-07-10 Thread Colin Ian King
On 10/07/17 21:59, Jonathan Cameron wrote: > On Mon, 10 Jul 2017 17:56:16 +0100 > Colin King wrote: > >> From: Colin Ian King >> >> Don't populate array startup_lookup on the stack but instead make >> it static. Makes the object code smaller. Also add

Re: [PATCH] staging: fbtft: make const array gamma_par_mask static

2017-07-11 Thread Colin Ian King
On 11/07/17 18:30, Greg Kroah-Hartman wrote: > On Tue, Jul 11, 2017 at 06:20:02PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Don't populate array gamma_par_mask on the stack but instead make it >> static. Makes the object code smaller by 148

Re: [PATCH] mfd: rtsx: make arrays depth and cd_mask static const

2017-07-17 Thread Colin Ian King
On 17/07/17 11:46, Lee Jones wrote: > Please start the commit subject description with an uppercase char. > >> From: Colin Ian King > > This is odd. How are you sending this patch Colin? git send-patch. Hrm. I'll check it out for next time. Colin > >> Don&

Re: [PATCH][next] spi: loopback-test: make several module parameters static

2017-07-18 Thread Colin Ian King
On 18/07/17 14:09, Mark Brown wrote: > On Tue, Jul 18, 2017 at 01:42:32PM +0100, Colin King wrote: >> From: Colin Ian King > > It would be very helpful if you could ensure your commit author and > e-mail From: line up so that git doesn't make your patches look lik

Re: [PATCH] rtc: sun6i: ensure clk_data is kfree'd on error

2017-07-19 Thread Colin Ian King
On 19/07/17 18:32, Alexandre Belloni wrote: > Hi, > > On 19/07/2017 at 17:57:02 +0100, Colin King wrote: >> From: Colin Ian King >> >> There are two error return paths that do not kfree clk_data and >> we end up with a memory leak. Fix these with a kfree erro

Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static

2017-07-20 Thread Colin Ian King
On 20/07/17 12:01, Wolf Entwicklungen wrote: > Declare rf69_set_dc_cut_off_frequency_intern as static since it > is used internaly only > > Fixes: 874bcba65f9a ("staging: pi433: New driver") > Signed-off-by: Marcus Wolf > > diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c

Re: [PATCH] Make functions rf69_set_bandwidth_intern and rf69_set_dc_cut_off_frequency_intern static

2017-07-20 Thread Colin Ian King
Oops, should have been marked as [V2] in the subject line On 20/07/17 23:33, Colin King wrote: > From: Colin Ian King > > The functions rf69_set_bandwidth_intern and also > rf69_set_dc_cut_off_frequency_intern is local to the source and > do not need to be in global scope, so

NACK: [PATCH] rtc: tx4939: avoid unintended sign extension on a 24 bit shift

2018-02-15 Thread Colin Ian King
On 15/02/18 18:59, Colin King wrote: > From: Colin Ian King > > The shifting of buf[5] by 24 bits to the left will be promoted to > a 32 bit signed int and then sign-extended to an unsigned long. If > the top bit of buf[5] is set then all then all the upper bits sec > end up

NAK: [PATCH] CIFS: SMBD: fix spelling mistake: "faield" -> "failed"

2018-02-09 Thread Colin Ian King
On 09/02/18 11:59, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in log_rdma_mr message text. > > Signed-off-by: Colin Ian King > --- > fs/cifs/smbdirect.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a

Re: [PATCH] libnvdimm: remove redundant assignment to pointer 'dev'

2018-02-05 Thread Colin Ian King
On 05/02/18 18:44, Dan Williams wrote: > On Mon, Feb 5, 2018 at 10:20 AM, Ross Zwisler > wrote: >> On Mon, Feb 05, 2018 at 02:08:52PM +, Colin King wrote: >>> From: Colin Ian King >>> >>> Pointer dev is being assigned a value that is never read, it

Re: [PATCH][V2] rtc: tx4939: avoid unintended sign extension on a 24 bit shift

2018-02-16 Thread Colin Ian King
On 16/02/18 15:24, Alexandre Belloni wrote: > On 15/02/2018 at 21:44:53 +0100, Alexandre Belloni wrote: >> On 15/02/2018 at 19:36:14 +, Colin King wrote: >>> From: Colin Ian King >>> >>> The shifting of buf[5] by 24 bits to the left will be promoted to &

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-16 Thread Colin Ian King
On 16/02/18 16:51, Andy Shevchenko wrote: > On Thu, Feb 15, 2018 at 9:42 PM, Colin King wrote: >> From: Colin Ian King >> >> The checks to see if key->dst.s6_addr and key->src.s6_addr are null >> pointers are redundant because these are constant size arrays a

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-18 Thread Colin Ian King
On 18/02/18 16:31, Joe Perches wrote: > On Sun, 2018-02-18 at 16:58 +0200, Andy Shevchenko wrote: >> On Fri, Feb 16, 2018 at 6:53 PM, Colin Ian King >> wrote: >>> On 16/02/18 16:51, Andy Shevchenko wrote: >>>> On Thu, Feb 15, 2018

Re: [PATCH] mei: remove dev_err message on an unsupported ioctl

2018-02-27 Thread Colin Ian King
On 27/02/18 17:26, Winkler, Tomas wrote: >> >> From: Colin Ian King >> >> Currently the driver spams the kernel log on unsupported ioctls which is >> unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this anyway. >> I suspect this was originally for deb

Re: [PATCH][next] wcn36xx: remove redundant assignment to msg_body.min_ch_time

2017-12-29 Thread Colin Ian King
On 29/12/17 07:44, Loic Poulain wrote: > Hi Colin, Bjorn, > > On 26 December 2017 at 21:13, Bjorn Andersson > wrote: >> On Tue 19 Dec 09:04 PST 2017, Colin King wrote: >> >>> From: Colin Ian King >>> >>> msg_body.min_ch_time is being assign

Re: [PATCH] ALSA: synth: emux: remove redundant test for r <= 13

2017-11-17 Thread Colin Ian King
On 17/11/17 11:06, Takashi Iwai wrote: > On Tue, 14 Nov 2017 18:26:53 +0100, > Colin King wrote: >> >> From: Colin Ian King >> >> The calculation r = (3 - ((rate >> 6) & 3)) * 3 results in r being >> 0, 3, 6 or 9 and so the check (13 > r) is alw

Re: [PATCH] mei: fix incorrect logical operator in if statement

2017-12-20 Thread Colin Ian King
On 20/12/17 08:58, Winkler, Tomas wrote: > >> From: Colin Ian King >> >> The current expression using the || operator is always true because >> dev->dev_state cannot be equal to two different values at the same time. >> Fix this by replacing the || with &am

Re: [PATCH] scripts/spelling.txt: add more spelling mistakes to spelling.txt

2017-12-18 Thread Colin Ian King
On 18/12/17 17:49, Joe Perches wrote: > On Mon, 2017-12-18 at 14:19 +, Colin King wrote: >> From: Colin Ian King > > Hey Colin. > >> Here are some of the more spelling mistakes and typos that I've found >> while fixing up spelling mistakes in kernel error

Re: [PATCH][mtd-next] mtd: nand: remove redundant check of len

2017-12-13 Thread Colin Ian King
On 13/12/17 20:24, Boris Brezillon wrote: > On Wed, 13 Dec 2017 20:17:43 + > Colin King wrote: > >> From: Colin Ian King >> >> The check of len being zero is redundant as it has already been >> sanity checked for this value at the start of the function. H

Re: [PATCH][mtd-next] mtd: nand: remove redundant check of len

2017-12-13 Thread Colin Ian King
On 13/12/17 20:38, Boris Brezillon wrote: > On Wed, 13 Dec 2017 20:30:04 + > Colin Ian King wrote: > >> On 13/12/17 20:24, Boris Brezillon wrote: >>> On Wed, 13 Dec 2017 20:17:43 + >>> Colin King wrote: >>> >>>> From: Colin Ian Ki

Re: [PATCH] mtd: nand: fix memory leak on ep on error exit returns

2017-12-13 Thread Colin Ian King
On 13/12/17 21:02, Boris Brezillon wrote: > Hi Colin, > > On Wed, 13 Dec 2017 20:49:09 + > Colin King wrote: > >> From: Colin Ian King >> >> There are two error return paths that are not kfree'ing ep that >> lead to memory leaks. Fix this by e

Re: [PATCH] drm/vmwgfx: remove DRM_ERROR message, stops log spamming

2017-09-12 Thread Colin Ian King
On 12/09/17 18:42, Thomas Hellstrom wrote: > Hi, Colin, > > On 09/12/2017 07:35 PM, Colin King wrote: >> From: Colin Ian King >> >> mmap'ing the device multiple times will spam the kernel log with the >> DRM_ERROR message about illegal mmap'ing the

Re: [PATCH][next][V2] bpf: test_maps: fix typo "conenct" -> "connect"

2017-08-30 Thread Colin Ian King
On 30/08/17 14:46, Daniel Borkmann wrote: > On 08/30/2017 01:47 PM, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to typo in printf error message >> >> Signed-off-by: Colin Ian King > > For net-next; looks like there is also one in "fai

Re: [PATCH][next] net: hinic: fix comparison of a uint16_t type with -1

2017-08-24 Thread Colin Ian King
On 24/08/17 09:48, Aviad Krawczyk wrote: > On 8/23/2017 6:39 PM, Colin King wrote: >> From: Colin Ian King >> >> The comparison of hw_ioctxt.rx_buf_sz_idx == -1 is always false because >> rx_buf_sz_idx is a uint16_t. Fix this by explicitly casting -1 to uint16_t. >

Re: [PATCH] x86/platform/intel-mid: make several arrays static, makes code smaller

2017-08-25 Thread Colin Ian King
On 25/08/17 18:53, Andy Shevchenko wrote: > On Fri, 2017-08-25 at 19:51 +0200, Lukas Wunner wrote: >> On Fri, Aug 25, 2017 at 05:32:06PM +0100, Colin King wrote: >>> --- a/arch/x86/platform/intel-mid/pwr.c >>> +++ b/arch/x86/platform/intel-mid/pwr.c >>> @@ -444,7 +444,7 @@ static int mid_set_initia

Re: [PATCH] fix null pointer dereferences with a null driver_adapter

2017-09-08 Thread Colin Ian King
On 08/09/17 14:52, Colin King wrote: > From: Colin Ian King > > The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null > pointer deference on a null driver_adapter. Fix this by assigning > driver_adapter earlier to halmac_adapter->driver_adapter before the

Re: [PATCH][V2] RDMA/nes: do not leak uninitialized resp.reserved to userspace Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-05 Thread Colin Ian King
On 05/09/17 15:40, Chien Tin Tung wrote: > On Mon, Sep 04, 2017 at 02:37:05PM +0100, Colin King wrote: >> From: Colin Ian King >> >> resp.reserved has not been initialized and so the copy_to_user (via >> ib_copy_to_udata) is copying uninitialized data from the stack bac

Re: linux-next: build warning after merge of the tpmdd tree

2017-09-07 Thread Colin Ian King
Thanks for reporting that Stephen, I've sent a fix to address this issue. Colin On 07/09/17 03:31, Stephen Rothwell wrote: > Hi Jarkko, > > After merging the tpmdd tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > drivers/char/tpm/tpm_tis_core.c: In function 'pro

NACK: [PATCH] tpm_tis: unconstify array cmd_getticks

2017-09-07 Thread Colin Ian King
On 07/09/17 09:42, Colin King wrote: > From: Colin Ian King > > Remove const from cmd_getticks, fixes build warnings: > > drivers/char/tpm/tpm_tis_core.c:469:31: warning: passing argument 2 of > 'tpm_tis_send_data' discards 'const' qualifier from pointer

Re: [PATCH] mlx5: ensure 0 is returned when vport is zero

2017-08-18 Thread Colin Ian King
On 18/08/17 16:25, Colin King wrote: > From: Colin Ian King > > Currently, if vport is zero then then an uninialized return status > in err is returned. Since the only return status at the end of the > function esw_add_uc_addr is zero for the current set of return paths > w

Re: [PATCH] nfsd: avoid out of bounds read on array nfsd4_layout_ops

2017-05-09 Thread Colin Ian King
On 09/05/17 22:03, J . Bruce Fields wrote: > On Tue, May 09, 2017 at 05:04:14PM +0300, Dan Carpenter wrote: >> On Tue, May 09, 2017 at 02:31:21PM +0100, Colin King wrote: >>> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c >>> index 1dbf62190bee..c453a1998e00 100644 >>> --- a/fs/nfsd/nfs4proc.

Re: [PATCH] dm ioctl: make dm_open and dm_release release

2017-05-10 Thread Colin Ian King
On 10/05/17 10:18, Colin King wrote: > From: Colin Ian King > > Making dm_open and dm_release static fixes the sparse warnings: > > warning: symbol 'dm_open' was not declared. Should it be static? > warning: symbol 'dm_release' was not declared. Should i

Re: [PATCH][spi-next] spi: stm32: fix range limit checks on div

2017-06-22 Thread Colin Ian King
41 PM, Colin King wrote: >> From: Colin Ian King >> >> Currently the check for range limits on div is incorrect and will >> never return -EINVAL. Fix this by replacing && with || >> >> Detected by CoverityScan, CID#1446580 ("Structurally dead code")

Re: [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier

2017-06-23 Thread Colin Ian King
On 23/06/17 18:51, Brian Norris wrote: > On Fri, Jun 23, 2017 at 12:02:34PM +0200, Rafał Miłecki wrote: >> On 2017-06-23 11:00, Colin King wrote: >>> From: Colin Ian King >>> >>> Use %zx instead of %X for size_t variable offset, fixes build warning: >>&

Re: [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier

2017-06-23 Thread Colin Ian King
On 23/06/17 19:15, Brian Norris wrote: > On Fri, Jun 23, 2017 at 07:03:11PM +0100, Colin Ian King wrote: >> On 23/06/17 18:51, Brian Norris wrote: >>> On Fri, Jun 23, 2017 at 12:02:34PM +0200, Rafał Miłecki wrote: >>>> On 2017-06-23 11:00, Colin King wro

Re: [PATCH] batman-adv: fix spelling mistake "ourselve" -> "ourself"

2017-06-26 Thread Colin Ian King
On 26/06/17 11:02, Sergei Shtylyov wrote: > On 6/26/2017 1:01 PM, Sergei Shtylyov wrote: > >>> From: Colin Ian King >>> >>> Trivial fix to spelling mistake in batadv_dbg debug message >>> >>> Signed-off-by: Colin Ian King >>> --- >

Re: [PATCH] scsi: lpfc: fix spelling mistake "entrys" -> "entries"

2017-06-01 Thread Colin Ian King
On 01/06/17 15:35, Dan Carpenter wrote: > On Fri, May 26, 2017 at 11:11:37AM +0100, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to spelling mistake in debugfs message >> > > Are you using a tool to find all these spelling mistakes? Yep, I'

re: phy: cpcap-usb: Add CPCAP PMIC USB support

2017-06-05 Thread Colin Ian King
Hi Tony, While running static analysis on linux-next, CoverityScan picked up a NULL pointer deference on ddata->pins when calling pinctrl_lookup_state: 466ddata->pins = devm_pinctrl_get(ddata->dev); 1. Condition IS_ERR(ddata->pins), taking true branch. 467if (IS_ERR(ddata->pi

Re: [PATCH][crypto-next] crypto: cavium: fix spelling mistake "Revsion" -> "Revision"

2017-06-13 Thread Colin Ian King
On 13/06/17 11:36, Joe Perches wrote: > On Tue, 2017-06-13 at 09:52 +0100, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to spelling mistake in seq_printf message > > Hey Colin. > > Fixing spelling typos is a good thing, but is it a > good th

Re: [PATCH][netdev-next] net: hns: make guid hns_dsaf_acpi_dsm_guid static

2017-06-13 Thread Colin Ian King
On 13/06/17 20:24, Andy Shevchenko wrote: > On Tue, Jun 13, 2017 at 8:56 PM, David Miller wrote: >> From: Colin King >> Date: Tue, 13 Jun 2017 14:03:21 +0100 >> >>> From: Colin Ian King >>> >>> The guid hns_dsaf_acpi_dsm_guid does not n

Re: [PATCH][V2] IB/rxe: fix typo: "algorithmi" -> "algorithm"

2017-04-28 Thread Colin Ian King
On 28/04/17 18:08, Doug Ledford wrote: > On Mon, 2017-04-24 at 10:44 -0700, Joe Perches wrote: >> On Mon, 2017-04-24 at 10:26 +0100, Colin King wrote: >>> >>> trivial fix to typo in pr_err message >> [] >>> >>> diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c >>> b/drivers/infiniband/sw/rxe/rxe_v

Re: [PATCH] drm/i915: remove redundant check on has_aliasing_ppgtt

2017-10-10 Thread Colin Ian King
On 10/10/17 15:35, Joonas Lahtinen wrote: > On Tue, 2017-10-10 at 14:47 +0100, Colin King wrote: >> From: Colin Ian King >> >> There is a previous check to on has_aliasing_ppgtt that returns >> 0 if it is false, so it is impossible for has_aliasing_ppgtt to >>

NACK: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin Ian King
On 10/10/17 18:55, Colin King wrote: > From: Colin Ian King > > The use of the | operator always leads to true on the expression > (rt->rt6i_flags | RTF_CACHE) which looks rather suspect to me. I > believe this is fixed by using & instead to just check the > RTF_CACHE en

Re: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin Ian King
On 10/10/17 19:23, Wei Wang wrote: > On Tue, Oct 10, 2017 at 11:10 AM, Martin KaFai Lau wrote: >> On Tue, Oct 10, 2017 at 05:55:27PM +, Colin King wrote: >>> From: Colin Ian King >>> >>> The use of the | operator always leads to true on the expression &g

Re: [PATCH] lib: zstd: make const array rtbTable static, reduces object code size

2017-09-22 Thread Colin Ian King
On 22/09/17 20:14, Nick Terrell wrote: > On 9/22/17, 8:00 AM, "linux-kernel-ow...@vger.kernel.org on behalf of Colin > King" colin.k...@canonical.com> wrote: >> From: Colin Ian King >> >> Don't populate const array rtbTable on the stack, instead make it

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Colin Ian King
On 22/09/17 22:39, Arnd Bergmann wrote: > On Fri, Sep 22, 2017 at 9:17 PM, Arnd Bergmann wrote: >> On Fri, Sep 22, 2017 at 7:21 PM, Joe Perches wrote: >>> On Fri, 2017-09-22 at 09:48 +0200, Arnd Bergmann wrote: >>>> On Fri, Sep 22, 2017 at 1:11 AM, Colin Ian King &

Re: [Devel] [PATCH 15/18] acpi: use ARRAY_SIZE

2017-10-03 Thread Colin Ian King
On 03/10/17 12:39, Rafael J. Wysocki wrote: > On Tuesday, October 3, 2017 3:16:22 AM CEST Jérémy Lefaure wrote: >> On Mon, 02 Oct 2017 14:27:52 +0200 >> "Rafael J. Wysocki" wrote: >> >>> ACPICA is soewhat special code, though and I'm not taking or ACKing patches >>> for it directly as a rule. >>>

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-21 Thread Colin Ian King
On 22/09/17 00:09, Christophe JAILLET wrote: > Le 22/09/2017 à 00:19, Colin King a écrit : >> From: Colin Ian King >> >> Don't populate the read-only arrays dec32table and dec64table on the >> stack, instead make them both static const. Makes the object code >

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Colin Ian King
On 22/09/17 11:03, Joe Perches wrote: > On Fri, 2017-09-22 at 09:23 +0200, Julia Lawall wrote: >> >> On Thu, 21 Sep 2017, Colin King wrote: >> >>> From: Colin Ian King >>> >>> Don't populate const array ac_to_fifo on the stack in an inlined &g

Re: [PATCH] e1000: avoid null pointer dereference on invalid stat type

2017-09-22 Thread Colin Ian King
On 22/09/17 12:50, Dan Carpenter wrote: > On Thu, Sep 21, 2017 at 11:01:58PM +0100, Colin King wrote: >> @@ -1837,12 +1838,13 @@ static void e1000_get_ethtool_stats(struct >> net_device *netdev, >> p = (char *)adapter + stat->stat_offset; >> break; >>

Re: [PATCH] video: fbdev: radeon: make const array post_divs static, reduces object code size

2017-10-12 Thread Colin Ian King
On 12/10/17 17:17, Bartlomiej Zolnierkiewicz wrote: > > [ added dri-devel ML to cc: ] > > On Tuesday, September 19, 2017 10:32:01 PM Colin King wrote: >> From: Colin Ian King >> >> Don't populate the read-only const array post_divs on the stack, >> nst

Re: [PATCH] IB/rxe: check for allocation failure on elem

2017-10-09 Thread Colin Ian King
On 09/10/17 14:16, Doug Ledford wrote: > On Tue, 2017-09-12 at 17:48 +0300, Leon Romanovsky wrote: >> On Sat, Sep 09, 2017 at 03:56:07PM +0300, Leon Romanovsky wrote: >>> On Fri, Sep 08, 2017 at 03:37:45PM +0100, Colin King wrote: >>>> From: Colin Ian King >>

Re: [PATCH] net: phy: marvell: make two functions static

2017-06-02 Thread Colin Ian King
On 02/06/17 15:00, Andrew Lunn wrote: > On Fri, Jun 02, 2017 at 12:14:24PM +0100, Colin King wrote: >> From: Colin Ian King >> >> functions m88e1510_get_temp_critical and m88e1510_get_temp_alarm can be >> made static as they not need to be in global scope. >

Re: [PATCH] net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value

2017-06-03 Thread Colin Ian King
On 03/06/17 16:55, Andy Shevchenko wrote: > On Fri, Jun 2, 2017 at 5:58 PM, Colin King wrote: >> The current comparison of entry < 0 will never be true since entry is an >> unsigned integer. Cast entry to an int to ensure -ve error return values >> from the call to jumbo_frm are correctly being ca

Re: [PATCH] IB/core: fix memory leak on ah on error return path

2017-08-08 Thread Colin Ian King
On 08/08/17 11:20, Johannes Thumshirn wrote: > Shouldn't the subject start with "IB/hns:" given it's touching > drivers/infiniband/hw/hns/hns_roce_ah.c? I was using the same subject start as the patch that introduced the memory leak and touched the same portion of code. I can resend if necessary.

NACK: [PATCH] rtlwifi: btcoex: make function btc8723b2ant_dac_swing static

2017-08-12 Thread Colin Ian King
On 12/08/17 23:00, Colin King wrote: > From: Colin Ian King > > The function btc8723b2ant_dac_swing is local to the source and > does not need to be in global scope, so make it static. > > Cleans up sparse warning: > symbol 'btc8723b2ant_dac_swing' was no

Re: [PATCH] netfilter: fix indent on in statements

2017-08-15 Thread Colin Ian King
On 15/08/17 10:45, Sergei Shtylyov wrote: > Hello! > > On 8/15/2017 9:50 AM, Colin King wrote: > >> From: Colin Ian King >> >> The returns on some if statements are not indented correctly, > >s/in/if/ in the subject? Doh, fix resent. > >>

Re: [PATCH] thunderbolt: fix incorrect value assigned to req->response_type

2017-08-15 Thread Colin Ian King
On 15/08/17 16:22, Dan Carpenter wrote: > On Tue, Aug 15, 2017 at 05:38:34PM +0300, Mika Westerberg wrote: >> On Tue, Aug 15, 2017 at 03:31:33PM +0100, Colin King wrote: >>> From: Colin Ian King >>> >>> req->response_type is being assigned the sizeof TB_C

Re: [PATCH] staging: pi433: fix missing break in switch statement.

2017-11-10 Thread Colin Ian King
> Thanks, > > Marcus > > > Am 09.11.2017 um 19:19 schrieb Colin King: >> From: Colin Ian King >> >> The PI433_IOC_WR_RX_CFG case is missing a break and will fall through >> to the default case and errorenously return -EINVAL. Fix this by >>

Re: [PATCH] of: overlay: fix memory leak of ovcs on error exit path

2017-11-30 Thread Colin Ian King
On 30/11/17 12:14, Frank Rowand wrote: > On 11/29/17 14:17, Colin King wrote: >> From: Colin Ian King >> >> Currently if the call to of_resolve_phandles fails then then ovcs >> is not kfree'd on the error exit path. Rather than try and make >> the clean up

Re: [PATCH] of: overlay: fix memory leak of ovcs on error exit path

2017-11-30 Thread Colin Ian King
On 30/11/17 12:50, Dan Carpenter wrote: > On Thu, Nov 30, 2017 at 07:14:45AM -0500, Frank Rowand wrote: >> On 11/29/17 14:17, Colin King wrote: >>> From: Colin Ian King >>> >>> Currently if the call to of_resolve_phandles fails then then ovcs >>> i

Re: [PATCH] atm: lanai: use setup_timer instead of init_timer

2017-11-30 Thread Colin Ian King
On 30/11/17 14:23, David Miller wrote: > From: Colin King > Date: Fri, 24 Nov 2017 13:27:12 + > >> From: Colin Ian King >> >> Use setup_timer function instead of initializing timer with the >> function and data fields. >> >> Signed-off-by: Co

NAK: [PATCH] usb: gadget: pxa27x: Remove redundant assignment to is_short

2017-11-07 Thread Colin Ian King
On 07/11/17 14:31, Colin King wrote: > From: Colin Ian King > > Variable is set to zero but this value is never read as it is > overwritten with a new value later on, hence it is a redundant > assignment and can be removed. Cleans up clang warning: > > drivers/usb/gadget/ud

Re: [PATCH] USB: remove redundant assignment to temp

2017-11-07 Thread Colin Ian King
On 07/11/17 15:42, Alan Stern wrote: > On Tue, 7 Nov 2017, Colin King wrote: > >> From: Colin Ian King >> >> The variable temp is being set at the end of each loop iteration >> but this value is never read, it is either being updated in just >> the case 1 bl

NAK: [PATCH][mtd-next] mtd: sharpslpart: fix overflow on block_adr calculation

2017-11-08 Thread Colin Ian King
On 08/11/17 15:46, Colin King wrote: > From: Colin Ian King > > Multiplying block_num and mtd->erasesize may potentially overflow > as they are both unsigned ints and so the multiplication is evaluated > in unsigned int arithmetic . Cast block_adr to off_t to ensure > mu

Re: [alsa-devel] [PATCH] ASoC: Intel: remove status, it is shadowing status of a higher scope

2016-09-09 Thread Colin Ian King
On 09/09/16 18:04, Pierre-Louis Bossart wrote: > On 9/9/16 2:09 AM, Colin King wrote: >> From: Colin Ian King >> >> The second declaration of status is shadowing the status of a higher >> scope. This uninitialized status results in garbage being returned >&

Re: [PATCH] ARM: dma-mapping: add in missing white space in error message text

2016-09-12 Thread Colin Ian King
On 12/09/16 15:33, Russell King - ARM Linux wrote: > On Mon, Sep 12, 2016 at 02:06:09PM +0100, Robin Murphy wrote: >> On 12/09/16 13:52, Colin King wrote: >>> From: Colin Ian King >>> >>> A dev_warn message spans two lines and the literal string is missing >

Re: [PATCH] powerpc/32: add missing \n at end of printk warning message

2016-09-12 Thread Colin Ian King
On 12/09/16 17:34, Joe Perches wrote: > On Mon, 2016-09-12 at 11:12 +0100, Colin King wrote: >> From: Colin Ian King >> The message is missing a \n, add it. > > Was this found via inspection or a tool? > grep

Re: [PATCH] regulator: da9055: remove null pointer check on array pdata->regulators

2016-09-12 Thread Colin Ian King
>> pdata->regulators >> >> From: Colin Ian King >> >> pdata->regulators is an array of DA9052_MAX_REGULATORS struct >> regulator_init_data pointers hence cannot be null, so the null pointer >> check on pdata->regulators is redundant. Remove it. >

Re: [PATCH] ath10k: fix memory leak on caldata on error exit path

2016-09-03 Thread Colin Ian King
On 02/09/16 16:45, Valo, Kalle wrote: > Colin King writes: > >> From: Colin Ian King >> >> caldata is not being free'd on the error exit path, causing >> a memory leak. kfree it to fix the leak. >> >> Signed-off-by: Colin Ian King >> ---

Re: [PATCH] perf probe: check if *ptr2 is zero and not ptr2

2016-10-03 Thread Colin Ian King
On 03/10/16 12:19, Arnaldo Carvalho de Melo wrote: > Em Mon, Oct 03, 2016 at 11:34:31AM +0100, Colin King escreveu: >> From: Colin Ian King >> >> Static anaylsis with cppcheck detected an incorrect comparison: >> [tools/perf/util/probe-event.c:216]: (warning) Char liter

<    1   2   3   4   5   6   >