[PATCH 2/2] staging: ccree: use sizeof(*var) in kmalloc

2017-07-08 Thread Gustavo A. R. Silva
Fix the following checkpatch warning: CHECK: Prefer kmalloc(sizeof(*buff_mgr_handle)...) over kmalloc(sizeof(struct buff_mgr_handle)...) Signed-off-by: Gustavo A. R. Silva --- drivers/staging/ccree/ssi_buffer_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/stag

[PATCH 1/2] staging: ccree: remove unnecessary cast on kmalloc

2017-07-08 Thread Gustavo A. R. Silva
The assignment operator implicitly converts a void pointer to the type of the pointer it is assigned to. This issue was detected using Coccinelle and the following semantic patch: @@ expression * e; expression arg1, arg2; type T; @@ - e=(T*) + e= kmalloc(arg1, arg2); Signed-off-by: Gustavo A. R

Re: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with kvfree()

2017-07-08 Thread Amitoj Kaur Chawla
On Sat, Jul 8, 2017 at 4:58 AM, Bernd Petrovitsch wrote: > On Fri, 2017-07-07 at 20:41 -0400, Amitoj Kaur Chawla wrote: > [...] >> --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c >> +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c >> @@ -117,11 +117,7 @@ void *atomisp_

[PATCH] staging: wilc1000: add parameter name to function definition

2017-07-08 Thread Dmitriy Cherkasov
Add missing parameter name to fix the following checkpatch.pl warning: WARNING: function definition argument 'struct device *' should also have an identifier name Signed-off-by: Dmitriy Cherkasov --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[PATCH] staging: rtl8192u: Use __func__ instead of function name in strings

2017-07-08 Thread Chris Coffey
Replace hard-coded function names in strings with '"%s...", __func__' in the r8190_rtl8256.c file. Issue found by checkpatch.pl. Signed-off-by: Chris Coffey --- Patch generated on staging tree, staging-testing branch. drivers/staging/rtl8192u/r8190_rtl8256.c | 10 +- 1 file changed, 5

Re: [PATCH] staging: atomisp: gc0310: constify acpi_device_id.

2017-07-08 Thread Sakari Ailus
On Fri, Jul 07, 2017 at 11:47:43AM +0100, Alan Cox wrote: > On Thu, 2017-07-06 at 21:50 +0530, Arvind Yadav wrote: > > acpi_device_id are not supposed to change at runtime. All functions > > working with acpi_device_id provided by work with > > const acpi_device_id. So mark the non-const structs a

[PATCH] staging: rtl8723bs: Place constant at the right.

2017-07-08 Thread Shreeya Patel
Move constant to the right of a relational operator. This coding style is more common for the kernel code. Problem found by checkpatch. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/core/rtw_btcoex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/stagin

Re: [PATCH] Coding style fixes for /drivers/staging/ccree/. This is for the eudyptula challenge.

2017-07-08 Thread Frans Klaver
On Sat, Jul 8, 2017 at 1:55 PM, SnazyMan wrote: > [PATCH] Coding style fixes for /drivers/staging/ccree/. This is for the > eudyptula challenge. That's way too generic. Also, these patches are for the kernel, not Little Penguin :D. It really isn't that important to the kernel that you submit thi

[PATCH] Coding style fixes for /drivers/staging/ccree/. This is for the eudyptula challenge.

2017-07-08 Thread SnazyMan
Signed-off-by: Tyler Olivieri --- drivers/staging/ccree/ssi_buffer_mgr.c | 14 ++ drivers/staging/ccree/ssi_cipher.c | 6 ++- drivers/staging/ccree/ssi_driver.c | 5 +- drivers/staging/ccree/ssi_fips.c | 2 - drivers/staging/ccree/ssi_fips_ll.c| 85 +++

Re: [PATCH v2] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-08 Thread Sakari Ailus
Hi Hari, On Fri, Jul 07, 2017 at 08:15:21PM +0530, Hari Prasath wrote: > kstrdup kernel primitive can be used to replace kmalloc followed by > string copy. This was reported by coccinelle tool > > Signed-off-by: Hari Prasath > --- > .../media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c

Re: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with kvfree()

2017-07-08 Thread Bernd Petrovitsch
On Fri, 2017-07-07 at 20:41 -0400, Amitoj Kaur Chawla wrote: [...] > --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c > +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c > @@ -117,11 +117,7 @@ void *atomisp_kernel_zalloc(size_t bytes, bool > zero_mem) >   */ >  void atomi

Re: tty contention resulting from tty_open_by_device export

2017-07-08 Thread Okash Khawaja
On Sat, Jul 08, 2017 at 10:38:03AM +0200, Greg Kroah-Hartman wrote: > > + > > +if (tty) { > > +tty_kref_put(tty); /* drop kref from > > tty_driver_lookup_tty() */ > > Put the comment above the line? > Sure > > +tty = ERR_PTR(-EBUSY); > > +} else

Re: tty contention resulting from tty_open_by_device export

2017-07-08 Thread Greg Kroah-Hartman
On Fri, Jul 07, 2017 at 09:28:41PM +0100, Okash Khawaja wrote: > Hi, > > The commit 12e84c71b7d4ee (tty: export tty_open_by_driver) exports > tty_open_by_device to allow tty to be opened from inside kernel which > works fine except that it doesn't handle contention with user space or > another ker