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

2017-07-07 Thread Joe Perches
On Fri, 2017-07-07 at 20:40 -0400, Amitoj Kaur Chawla wrote: > Conditionally calling kfree()/vfree() can be replaced by a call to > kvfree() which handles both kmalloced memory and vmalloced memory. [] > diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c >

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

2017-07-07 Thread Amitoj Kaur Chawla
Conditionally calling kfree()/vfree() can be replaced by a call to kvfree() which handles both kmalloced memory and vmalloced memory. Consequently removed an unnecessary comment. The Coccinelle semantic patch used to make the change is as follows: // @@ expression a; @@ - if(...) { vfree(a); }

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

2017-07-07 Thread Amitoj Kaur Chawla
Conditionally calling kfree()/vfree() can be replaced by a call to kvfree() which handles both kmalloced memory and vmalloced memory. The Coccinelle semantic patch used to make the change is as follows: // @@ expression a; @@ - if(...) { vfree(a); } - else { kfree(a); } + kvfree(a); @@

[PATCH v5] staging: lustre: lnet: remove dead code and useless wrapper

2017-07-07 Thread Dmitriy Cherkasov
After removing commented out code, ksocknal_csum() becomes a useless wrapper for crc32_le(). Remove it, and instead call crc32_le() directly. Fixes the following checkpatch warning: WARNING: space prohibited before semicolon Signed-off-by: Dmitriy Cherkasov --- v5:

tty contention resulting from tty_open_by_device export

2017-07-07 Thread Okash Khawaja
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 kernel-space open of the same tty. For example, opening a tty from user space

[patch] staging: speakup: safely close tty

2017-07-07 Thread Okash Khawaja
Speakup opens tty using tty_open_by_driver. When closing, it calls tty_ldisc_release but doesn't close and remove the tty itself. As a result, that tty cannot then be opened from user space. This patch calls tty_release_struct which ensures that tty is safely removed and freed up. It also calls

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-07 Thread Todd Kjos
I suspect there won't be a respin. I'll ping you later if you don't remember it yourself ;) On Wed, Jul 5, 2017 at 11:47 AM, Greg KH wrote: > On Wed, Jul 05, 2017 at 09:13:16AM -0700, Todd Kjos wrote: >> Yes, this one back to 4.4. 01/37 should go to 4.9 (its not in

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-07 Thread Greg KH
On Fri, Jul 07, 2017 at 11:23:16AM -0700, Todd Kjos wrote: > I suspect there won't be a respin. I'll ping you later if you don't > remember it yourself ;) Ok, not a problem, I can't do anything with these until after 4.13-rc1 is out, so it will be at least a week or so until I get to them...

Re: [PATCH v3] staging: typec: Fix endianness warning discovered by sparse

2017-07-07 Thread Guenter Roeck
On Fri, Jul 07, 2017 at 10:24:32AM +1000, Thomas Gardner wrote: > The below warning is resolved by removing the cpu_to_le32() call. This > call was redundant; vdm_run_state_machine() ensures that SVDM responses > have the correct endianness before sending. > > typec/tcpm.c:1019:49: warning:

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

2017-07-07 Thread Hari Prasath
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 | 10 +++--- 1 file changed, 3 insertions(+), 7

Re: [PATCH] staging: atomisp: replace kmalloc & memcpy with kmemdup

2017-07-07 Thread hari prasath
On 07-Jul-2017 5:25 PM, "Alan Cox" wrote: On Fri, 2017-07-07 at 17:20 +0530, Hari Prasath wrote: > kmemdup can be used to replace kmalloc followed by a memcpy.This was > pointed out by the coccinelle tool. And kstrdup could do the job even better I think ? > Yes & thanks

Re: [PATCH] staging: atomisp: replace kmalloc & memcpy with kmemdup

2017-07-07 Thread Alan Cox
On Fri, 2017-07-07 at 17:20 +0530, Hari Prasath wrote: > kmemdup can be used to replace kmalloc followed by a memcpy.This was > pointed out by the coccinelle tool. And kstrdup could do the job even better I think ? Alan ___ devel mailing list

[PATCH] staging: atomisp: replace kmalloc & memcpy with kmemdup

2017-07-07 Thread Hari Prasath
kmemdup can be used to replace kmalloc followed by a memcpy.This was pointed out by the coccinelle tool. Signed-off-by: Hari Prasath --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

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

2017-07-07 Thread Alan Cox
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 as const. > > File size before: >    text    data bss   

[PATCH] staging: rtl8712: Remove explicit NULL comparison

2017-07-07 Thread Muhammad Falak R Wani
Replace the explicit "if (val != NULL)" with if (val). Signed-off-by: Muhammad Falak R Wani --- drivers/staging/rtl8712/rtl8712_xmit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c