[PATCH] staging: dgnc: check return value of kzalloc

2015-05-29 Thread Gujulan Elango, Hari Prasath (H.)
check return value of kzalloc and return error if it fails. Signed-off-by: Gujulan Elango Hari Prasath hguju...@visteon.com --- drivers/staging/dgnc/dgnc_tty.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index

Re: [PATCH] staging: dgnc: check return value of kzalloc

2015-05-29 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 04:32:30PM +0300, Dan Carpenter wrote: On Thu, May 28, 2015 at 01:23:57PM +, Gujulan Elango, Hari Prasath (H.) wrote: Check the return value of kzalloc return error if it fails. Signed-off-by: Gujulan Elango Hari Prasath hguju...@visteon.com ---

Re: [PATCH] staging: dgnc: check return value of kzalloc

2015-05-29 Thread Dan Carpenter
On Fri, May 29, 2015 at 07:44:11AM +, Gujulan Elango, Hari Prasath (H.) wrote: check return value of kzalloc and return error if it fails. There is a problem with your patch. See if you can spot it. Also can you add to the changelog what are the user visible effects of not checking for

[PATCH] staging: dgnc: delete all references to 'flipbuf'

2015-05-29 Thread Gujulan Elango, Hari Prasath (H.)
This patch deletes all references to 'flipbuf'.Memory is allocated and freed but never used anywhere in the driver.Also deleted an ununsed Macro defined in the header file. Signed-off-by: Gujulan Elango Hari Prasath hguju...@visteon.com --- drivers/staging/dgnc/dgnc_driver.c | 9 -

[PATCH] staging: dgnc: remove unwanted else block

2015-05-29 Thread Gujulan Elango, Hari Prasath (H.)
Remove the unwanted else block Signed-off-by: Gujulan Elango Hari Prasath hguju...@visteon.com --- drivers/staging/dgnc/dgnc_tty.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index 2397c66..ca07b7f 100644 ---

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-29 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 09:39:14AM -0700, insop.s...@gainspeed.com wrote: On Thu, May 28, 2015 at 01:08:36PM +0300, Dan Carpenter wrote: On Thu, May 28, 2015 at 09:38:23AM +, Gujulan Elango, Hari Prasath (H.) wrote: remove redundant code in this function by introducing a new retval

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-29 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 12:03:26PM -0700, insop.s...@gainspeed.com wrote: On Thu, May 28, 2015 at 09:50:23PM +0300, Dan Carpenter wrote: On Thu, May 28, 2015 at 09:39:14AM -0700, insop.s...@gainspeed.com wrote: On Thu, May 28, 2015 at 01:08:36PM +0300, Dan Carpenter wrote: On Thu, May

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-29 Thread Dan Carpenter
Originally when I was reviewing Hari's patch I had no idea you wrote this code so I was not as polite as I could have been. Sorry. On Thu, May 28, 2015 at 12:03:26PM -0700, insop.s...@gainspeed.com wrote: poorly thought out error messages. which one are you exactly refering? err =

Re: [PATCH] staging: dgnc: check return value of kzalloc

2015-05-29 Thread Gujulan Elango, Hari Prasath (H.)
On Fri, May 29, 2015 at 01:52:28PM +0300, Dan Carpenter wrote: On Fri, May 29, 2015 at 10:06:48AM +, Gujulan Elango, Hari Prasath (H.) wrote: On Fri, May 29, 2015 at 11:54:09AM +0300, Dan Carpenter wrote: On Fri, May 29, 2015 at 07:44:11AM +, Gujulan Elango, Hari Prasath (H.)

Re: [PATCH 13/13] android: binder: add function for processing work nodes in binder_thread_read

2015-05-29 Thread Dan Carpenter
On Thu, May 28, 2015 at 04:08:31PM -0700, Riley Andrews wrote: -done: +static int binder_thread_read(struct binder_proc *proc, + struct binder_thread *thread, + binder_uintptr_t binder_buffer, size_t size, +

Re: [PATCH v3 1/4] ozwpan: Use proper check to prevent heap overflow

2015-05-29 Thread Dan Carpenter
On Fri, May 29, 2015 at 01:06:58PM +0200, Jason A. Donenfeld wrote: --- a/drivers/staging/ozwpan/ozusbsvc1.c +++ b/drivers/staging/ozwpan/ozusbsvc1.c @@ -390,10 +390,15 @@ void oz_usb_rx(struct oz_pd *pd, struct oz_elt *elt) case OZ_GET_DESC_RSP: { struct

Re: [RFC][PATCH] x86: remove vmalloc.h from asm/io.h

2015-05-29 Thread Ingo Molnar
* Stephen Rothwell s...@canb.auug.org.au wrote: Nothing in asm/io.h uses anything from vmalloc.h, so remove the include and fix up the build problems in an allmodconfig (64 bit and 32 bit) build. This may be the place where x86 builds get vmalloc.h implicitly included and that tends to

Re: [PATCH] staging: dgnc: check return value of kzalloc

2015-05-29 Thread Dan Carpenter
On Fri, May 29, 2015 at 10:06:48AM +, Gujulan Elango, Hari Prasath (H.) wrote: On Fri, May 29, 2015 at 11:54:09AM +0300, Dan Carpenter wrote: On Fri, May 29, 2015 at 07:44:11AM +, Gujulan Elango, Hari Prasath (H.) wrote: check return value of kzalloc and return error if it fails.

[RFC][PATCH] x86: remove vmalloc.h from asm/io.h

2015-05-29 Thread Stephen Rothwell
Nothing in asm/io.h uses anything from vmalloc.h, so remove the include and fix up the build problems in an allmodconfig (64 bit and 32 bit) build. This may be the place where x86 builds get vmalloc.h implicitly included and that tends to hide places where vmalloc() et al are added to files but

Re: [PATCH 03/13] android: binder: refactor binder_thread_write

2015-05-29 Thread Dan Carpenter
This patch is ok. Reviewed-by: Dan Carpenter dan.carpen...@oracle.com On Thu, May 28, 2015 at 04:08:21PM -0700, Riley Andrews wrote: +static void binder_call_inc_dec_ref(struct binder_thread *thread, + uint32_t target, uint32_t cmd) +{ + struct binder_proc

Re: [PATCH] staging: dgnc: check return value of kzalloc

2015-05-29 Thread Gujulan Elango, Hari Prasath (H.)
On Fri, May 29, 2015 at 11:54:09AM +0300, Dan Carpenter wrote: On Fri, May 29, 2015 at 07:44:11AM +, Gujulan Elango, Hari Prasath (H.) wrote: check return value of kzalloc and return error if it fails. There is a problem with your patch. See if you can spot it. Also can you add

Re: [PATCH 01/13] drivers: android: correct the size of struct binder_uintptr_t for BC_DEAD_BINDER_DONE

2015-05-29 Thread Dan Carpenter
On Thu, May 28, 2015 at 04:08:19PM -0700, Riley Andrews wrote: From: Lisa Du c...@marvell.com There's one point was missed in the patch commit da49889deb34 (staging: binder: Support concurrent 32 bit and 64 bit processes.). When configure BINDER_IPC_32BIT, the size of binder_uintptr_t was

Re: [PATCH 05/13] android: binder: refactor binder_transact transaction buffer loop

2015-05-29 Thread Dan Carpenter
On Thu, May 28, 2015 at 04:08:23PM -0700, Riley Andrews wrote: +static int binder_transaction_buffer_acquire( + struct binder_transaction *t, struct binder_transaction_data *tr, + struct binder_thread *thread, struct binder_transaction *in_reply_to) +{ + struct binder_proc *proc =

[PATCH v3 3/4] ozwpan: divide-by-zero leading to panic

2015-05-29 Thread Jason A. Donenfeld
A network supplied parameter was not checked before division, leading to a divide-by-zero. Since this happens in the softirq path, it leads to a crash. A PoC follows below, which requires the ozprotocol.h file from this module. =-=-=-=-=-= #include arpa/inet.h #include linux/if_packet.h

[PATCH v3 2/4] ozwpan: Use unsigned ints to prevent heap overflow

2015-05-29 Thread Jason A. Donenfeld
Using signed integers, the subtraction between required_size and offset could wind up being negative, resulting in a memcpy into a heap buffer with a negative length, resulting in huge amounts of network-supplied data being copied into the heap, which could potentially lead to remote code

[PATCH v3 4/4] ozwpan: unchecked signed subtraction leads to DoS

2015-05-29 Thread Jason A. Donenfeld
The subtraction here was using a signed integer and did not have any bounds checking at all. This commit adds proper bounds checking, made easy by use of an unsigned integer. This way, a single packet won't be able to remotely trigger a massive loop, locking up the system for a considerable amount

[PATCH v3 1/4] ozwpan: Use proper check to prevent heap overflow

2015-05-29 Thread Jason A. Donenfeld
Since elt-length is a u8, we can make this variable a u8. Then we can do proper bounds checking more easily. Without this, a potentially negative value is passed to the memcpy inside oz_hcd_get_desc_cnf, resulting in a remotely exploitable heap overflow with network supplied data. This could

[PATCH v3 0/4] ozwpan: Four remote packet-of-death vulnerabilities

2015-05-29 Thread Jason A. Donenfeld
This is v3 for this patch series, enhancing readability. The ozwpan driver accepts network packets, parses them, and converts them into various USB functionality. There are numerous security vulnerabilities in the handling of these packets. Two of them result in a memcpy(kernel_buffer,

Re: [PATCH v3 1/4] ozwpan: Use proper check to prevent heap overflow

2015-05-29 Thread Frans Klaver
Hi, On Fri, May 29, 2015 at 2:00 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, May 29, 2015 at 01:06:58PM +0200, Jason A. Donenfeld wrote: --- a/drivers/staging/ozwpan/ozusbsvc1.c +++ b/drivers/staging/ozwpan/ozusbsvc1.c @@ -390,10 +390,15 @@ void oz_usb_rx(struct oz_pd *pd,

Re: [RFC][PATCH] x86: remove vmalloc.h from asm/io.h

2015-05-29 Thread Takashi Iwai
At Fri, 29 May 2015 19:18:47 +1000, Stephen Rothwell wrote: Nothing in asm/io.h uses anything from vmalloc.h, so remove the include and fix up the build problems in an allmodconfig (64 bit and 32 bit) build. This may be the place where x86 builds get vmalloc.h implicitly included and that

[PATCH] Removing unnecessary return statements

2015-05-29 Thread Sharma, Abhishek (A.)
--- drivers/staging/comedi/drivers/adv_pci1724.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c b/drivers/staging/comedi/drivers/adv_pci1724.c index f7a7dab..9677111 100644 --- a/drivers/staging/comedi/drivers/adv_pci1724.c

Re: [PATCH v3 1/4] ozwpan: Use proper check to prevent heap overflow

2015-05-29 Thread Dan Carpenter
Oh. Duh. Of course. Acked-by: Dan Carpenter dan.carpen...@oracle.com regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] Removing unnecessary return statements

2015-05-29 Thread Ian Abbott
On 29/05/15 14:01, Sharma, Abhishek (A.) wrote: --- drivers/staging/comedi/drivers/adv_pci1724.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c b/drivers/staging/comedi/drivers/adv_pci1724.c index f7a7dab..9677111 100644

Re: [PATCH v3 1/4] ozwpan: Use proper check to prevent heap overflow

2015-05-29 Thread Jason A. Donenfeld
On Fri, May 29, 2015 at 2:41 PM, Dan Carpenter dan.carpen...@oracle.com wrote: Acked-by: Dan Carpenter dan.carpen...@oracle.com Acked for the rest of the set too? ___ devel mailing list de...@linuxdriverproject.org

[PATCH 1/1] Drivers: hv: balloon: check if ha_region_mutex was acquired in MEM_CANCEL_ONLINE case

2015-05-29 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov vkuzn...@redhat.com Memory notifiers are being executed in a sequential order and when one of them fails returning something different from NOTIFY_OK the remainder of the notification chain is not being executed. When a memory block is being onlined in online_pages() we do

RE: [PATCH v2 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable

2015-05-29 Thread KY Srinivasan
-Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Thursday, May 21, 2015 9:22 AM To: de...@linuxdriverproject.org Cc: KY Srinivasan; Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui; Ingo Molnar; Paul E. McKenney; Rafael J. Wysocki; Peter Zijlstra;

FW: [PATCH] Staging: vt6655: Remove unnecessary equality checks in rxtx.c

2015-05-29 Thread Harisangam, Sharvari (S.)
Modified the if-else statements to remove unnecessary comparisons in rxtx.c. This change was detected with the help of coccinelle tool Signed-off-by: Harisangam Sharvari shari...@visteon.com --- drivers/staging/vt6655/rxtx.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH] staging: unisys: use schedule_timeout_interruptible()

2015-05-29 Thread Nicholas Mc Guire
(localversion-next is -next-20150529) Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- As the actually intended timeout is not documented and msecs_to_jiffies timeouts can be a factor 10 different from the current effective timeout this needs to be checked by someone who knows the details

Re: [PATCH] Staging: comedi: Remove redundant return statements

2015-05-29 Thread Ian Abbott
On 29/05/15 15:29, Sharma, Abhishek (A.) wrote: Replace unnecessary conditional checks for variable 'ret' and replace by single return statement. Signed-off-by: Abhishek Sharma ashar...@visteon.com diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c

[PATCH 2/3] Drivers: hv: vmbus: Implement NUMA aware CPU affinity for channels

2015-05-29 Thread K. Y. Srinivasan
Channels/sub-channels can be affinitized to VCPUs in the guest. Implement this affinity in a way that is NUMA aware. The current protocol distributed the primary channels uniformly across all available CPUs. The new protocol is NUMA aware: primary channels are distributed across the available NUMA

[PATCH 3/3] Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashion

2015-05-29 Thread K. Y. Srinivasan
Signed-off-by: K. Y. Srinivasan k...@microsoft.com --- drivers/hv/channel.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 7a1c2db..603ce97 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@

[PATCH 1/3] Drivers: hv: vmbus: Use the vp_index map even for channels bound to CPU 0

2015-05-29 Thread K. Y. Srinivasan
Map target_cpu to target_vcpu using the mapping table. Signed-off-by: K. Y. Srinivasan k...@microsoft.com --- drivers/hv/channel_mgmt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 1f1417d..c3eba37 100644

re: Drivers: hv: kvp: convert to hv_utils_transport

2015-05-29 Thread Dan Carpenter
Hello Vitaly Kuznetsov, The patch 11bc3a5fa91f: Drivers: hv: kvp: convert to hv_utils_transport from Apr 11, 2015, leads to the following static checker warning: drivers/hv/hv_kvp.c:356 kvp_send_key() error: potential null dereference 'message'. (kzalloc returns null)

[PATCH 1/2] staging: dgnc: use schedule_timeout_interruptible()

2015-05-29 Thread Nicholas Mc Guire
correctly. Patch was compile tested with x86_64_defconfig + CONFIG_STAGING=y, CONFIG_DGNC=m Patch is against 4.1-rc5 (localversion-next is -next-20150529) Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- drivers/staging/dgnc/dgnc_utils.c |3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 2/2] staging: dgnc: switch timeout to signed type

2015-05-29 Thread Nicholas Mc Guire
is against 4.1-rc5 (localversion-next is -next-20150529) Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Note that there is a over 80 char warning here that was not fixed as there are quite a few in dgnc_driver.h. drivers/staging/dgnc/dgnc_driver.h |2 +- drivers/staging/dgnc/dgnc_utils.c

Re: [PATCH 1/3] Drivers: hv: vmbus: Use the vp_index map even for channels bound to CPU 0

2015-05-29 Thread Dan Carpenter
On Fri, May 29, 2015 at 11:09:02AM -0700, K. Y. Srinivasan wrote: Map target_cpu to target_vcpu using the mapping table. It's really hard to tell from this changelog what the user visible effects of this patch are. regards, dan carpenter ___ devel

Re: [PATCH v3 1/4] ozwpan: Use proper check to prevent heap overflow

2015-05-29 Thread Dan Carpenter
On Fri, May 29, 2015 at 05:20:52PM +0200, Jason A. Donenfeld wrote: On Fri, May 29, 2015 at 2:41 PM, Dan Carpenter dan.carpen...@oracle.com wrote: Acked-by: Dan Carpenter dan.carpen...@oracle.com Acked for the rest of the set too? Yes. Thanks. regards, dan carpenter

[patch] hv: util: checking the wrong variable

2015-05-29 Thread Dan Carpenter
We don't catch this allocation failure because there is a typo and we check the wrong variable. Fixes: 14b50f80c32d ('Drivers: hv: util: introduce hv_utils_transport abstraction') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/hv/hv_utils_transport.c

Re: [PATCH v3 1/4] ozwpan: Use proper check to prevent heap overflow

2015-05-29 Thread Jason A. Donenfeld
On Fri, May 29, 2015 at 2:36 PM, Frans Klaver franskla...@gmail.com wrote: I would say that it is because part of the expression has been placed inside parentheses: a - b + 1 == a - (b - 1) Guess it makes the decision logic slightly more readable. Yes, exactly this. It's so that the

Re: [RFC][PATCH] x86: remove vmalloc.h from asm/io.h

2015-05-29 Thread Stephen Rothwell
Hi Takashi, On Fri, 29 May 2015 14:43:14 +0200 Takashi Iwai ti...@suse.de wrote: For the sound bits, Acked-by: Takashi Iwai ti...@suse.de Thanks, noted. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpcAWfsHc9aM.pgp Description: OpenPGP digital signature

[PATCH 0/3] Drivers: hv: vmbus: Make VMBUS driver NUMA aware

2015-05-29 Thread K. Y. Srinivasan
Implement CPU affinity for channels based on NUMA topology. Also, allocate all channel specific memory from the appropriate NUMA node. K. Y. Srinivasan (3): Drivers: hv: vmbus: Use the vp_index map even for channels bound to CPU 0 Drivers: hv: vmbus: Implement NUMA aware CPU affinity for

Re: [PATCH] staging: me_daq: use schedule_timeout_interruptible()

2015-05-29 Thread Nicholas Mc Guire
to an available helper only - so only an API consolidation to improve readability. Patch was compile tested with x86_64_defconfig + CONFIG_STAGING=y, CONFIG_COMEDI=y, CONFIG_COMEDI_PCI_DRIVERS=y CONFIG_COMEDI_ME_DAQ=m Patch is against 4.1-rc5 (localversion-next is -next-20150529) Minor niggle: you

Re: [PATCH 2/2] staging: dgnc: switch timeout to signed type

2015-05-29 Thread Nicholas Mc Guire
On Fri, 29 May 2015, Dan Carpenter wrote: On Fri, May 29, 2015 at 06:41:28PM +0200, Nicholas Mc Guire wrote: The schedule_timeout*() helpers take the timeout as signed long, as ch_close_delay in struct channel_t was not used for other purposes its type was switched to signed long and the

Re: [PATCH 2/2] staging: dgnc: switch timeout to signed type

2015-05-29 Thread Dan Carpenter
On Fri, May 29, 2015 at 06:41:28PM +0200, Nicholas Mc Guire wrote: The schedule_timeout*() helpers take the timeout as signed long, as ch_close_delay in struct channel_t was not used for other purposes its type was switched to signed long and the declarations fixed up. Uh, we never pass it to

[PATCH] staging/lustre: Update header license for lustre_dlm_flags.h

2015-05-29 Thread green
From: Oleg Drokin gr...@linuxhacker.ru lustre_dlm_flags.h was autogenerated with a wrong script that mistakenly stated it is GPLv3 when in fact it should be GPLv2. Also since we are no longer autogenerating this header, drop all such mentionings. Reported by: George G. Davis ggdavi...@gmail.com

[PATCH] Drivers: staging: Fixed comment and helpline spelling errors

2015-05-29 Thread Colin Cronin
Fixed a few spelling errors in commented code, helpline text, and a TODO list Files changed: drivers/staging/dgnc/TODO drivers/staging/dgnc/dgnc_driver.h drivers/staging/dgnc/dgnc_tty.c drivers/staging/emxx_udc/emxx_udc.c drivers/staging/fbtft/Kconfig

Re: [PATCH] staging: dgnc: delete all references to 'flipbuf'

2015-05-29 Thread Sudip Mukherjee
On Fri, May 29, 2015 at 07:17:37AM +, Gujulan Elango, Hari Prasath (H.) wrote: This patch deletes all references to 'flipbuf'.Memory is allocated and freed but never used anywhere in the driver.Also deleted an ununsed Macro defined in the header file. after your patch MYFLIPLEN becomes

Re: [PATCH v2 0/3] staging: iio_simple_dummy: minor driver fixes

2015-05-29 Thread Dan Carpenter
Looks nice. :) regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/2] staging: iio_simple_dummy: zero check param

2015-05-29 Thread Vladimirs Ambrosovs
On Thu, May 28, 2015 at 09:59:34AM +0300, Dan Carpenter wrote: On Thu, May 28, 2015 at 01:12:40AM +0300, Vladimirs Ambrosovs wrote: On Wed, May 27, 2015 at 11:25:07AM +0300, Dan Carpenter wrote: On Wed, May 27, 2015 at 01:19:58AM +0300, Vladimirs Ambrosovs wrote: Check for zero was added

Re: [PATCH 2/2] staging: dgnc: switch timeout to signed type

2015-05-29 Thread Dan Carpenter
On Fri, May 29, 2015 at 07:21:26PM +0200, Nicholas Mc Guire wrote: On Fri, 29 May 2015, Dan Carpenter wrote: On Fri, May 29, 2015 at 06:41:28PM +0200, Nicholas Mc Guire wrote: The schedule_timeout*() helpers take the timeout as signed long, as ch_close_delay in struct channel_t was not

[PATCH 08/16] staging: wilc1000: remove unused memory handling code

2015-05-29 Thread Arnd Bergmann
The driver contains its own abstraction for memory allocation, most of it unused. This removes the unused parts, but the rest should also be removed later. Signed-off-by: Arnd Bergmann a...@arndb.de --- drivers/staging/wilc1000/wilc_memory.c| 5 -- drivers/staging/wilc1000/wilc_memory.h

[PATCH 14/16] staging: wilc1000: remove semaphore wrapper

2015-05-29 Thread Arnd Bergmann
The various semaphore functions all directly translate into sema_init(), down() and up(), so we can just remove the API. This is a mostly automated conversion using simple sed scripts, plus some manual changes to account for down() returning no error. As a positive side-effect, down() no longer

[PATCH 11/16] staging: wilc1000: clean up timer feature

2015-05-29 Thread Arnd Bergmann
The driver has a simple wrapper around timer_list, and an optional but unused feature to make the timer periodic. This removes support for the periodic timer and simplifies the code around timers. A follow-up should replace the remaining wrapper with open-coded timers. Signed-off-by: Arnd

[PATCH 07/16] staging: wilc1000: simplify msgqueue code

2015-05-29 Thread Arnd Bergmann
The driver contains an abstraction for message queues, with optional unused features, while the driver requires the main feature. This makes the msgqueue code unconditional as it's required but removes the unused parts. A later cleanup should remove the entire msgqueue code and replace it with

[PATCH 06/16] staging: wilc1000: remove unused string functions

2015-05-29 Thread Arnd Bergmann
The driver provides wrappers for a lot of string operations. Some of them are unused, while others should be replaced with normal kernel functions. This replaces the unused ones for now, and leaves the other ones for a later cleanup. Signed-off-by: Arnd Bergmann a...@arndb.de ---

[PATCH 10/16] staging: wilc1000: clean up sleep wrapper

2015-05-29 Thread Arnd Bergmann
The driver has a simple wrapper around msleep, as well as a more advanced sleep function that is unused. This removes the unused code and the options to turn the feature on or off. A follow-up should rework the code to use msleep directly. Signed-off-by: Arnd Bergmann a...@arndb.de ---

[PATCH 13/16] staging: wilc1000: remove EXPORT_SYMTAB

2015-05-29 Thread Arnd Bergmann
The EXPORT_SYMTAB symbol has not been used in Linux for a very long time, the driver does not need to set it. Signed-off-by: Arnd Bergmann a...@arndb.de --- drivers/staging/wilc1000/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/Makefile

[PATCH 09/16] staging: wilc1000: simplify semaphore wrapper

2015-05-29 Thread Arnd Bergmann
The driver has its own API for semaphores. This should be replaced with mutexes and completions, but for the moment we can start by removing the obviously unused parts. Signed-off-by: Arnd Bergmann a...@arndb.de --- drivers/staging/wilc1000/wilc_osconfig.h | 1 -

[PATCH 04/16] staging: wilc1000: remove __DRIVER_VERSION__ macro

2015-05-29 Thread Arnd Bergmann
The driver version is meaningless, and in particular does not have to be passed from the Makefile. This removes the macros, but leaves the behavior of printing the 10.2 version untouched for the moment. Signed-off-by: Arnd Bergmann a...@arndb.de --- drivers/staging/wilc1000/Makefile | 6

[PATCH 16/16] staging: wilc1000: fix compiler warnings

2015-05-29 Thread Arnd Bergmann
This avoids the remaining warnings that one gets on a normal build: unused variables, unused labels, and invalid printk format strings. Signed-off-by: Arnd Bergmann a...@arndb.de --- drivers/staging/wilc1000/linux_wlan.c | 8 ++-- drivers/staging/wilc1000/linux_wlan_spi.c | 3 ---

[PATCH 15/16] staging: wilc1000: fix const cast warnings

2015-05-29 Thread Arnd Bergmann
The wilc1000 driver produces a lot of warnings about invalid casts between const and non-const variables. This reworks the code to avoid all those warnings, by marking variables and function arguments const. A lot of the types use WILC_Uint8, I change them to const u8 for style reasons, as I'm

[PATCH 02/16] staging: wilc1000: remove platform version checks

2015-05-29 Thread Arnd Bergmann
For code that is integrated into mainline Linux, checks for the OS platform make no sense, because we know that we are on Linux. This removes all checks and the associated dead code. Signed-off-by: Arnd Bergmann a...@arndb.de --- drivers/staging/wilc1000/Makefile | 3 +--

[PATCH 01/16] staging: wilc1000: remove linux version checks

2015-05-29 Thread Arnd Bergmann
For code that is integrated into mainline Linux, checks for the kernel version make no sense, because we know which version we are compiling against. This removes all checks and the associated dead code. Signed-off-by: Arnd Bergmann a...@arndb.de --- drivers/staging/wilc1000/linux_wlan.c

[PATCH 00/16] wilc1000: dead code removal and other cleanup

2015-05-29 Thread Arnd Bergmann
Hi Greg, This turned out to be more work than the first version, but I think I've split it up enough sensibly to allow review, and I've added a few more patches at the end. Arnd Arnd Bergmann (16): staging: wilc1000: remove linux version checks staging: wilc1000: remove platform

[PATCH 12/16] staging: wilc1000: remove unused OS abstraction features

2015-05-29 Thread Arnd Bergmann
All the remaining features from the OS abstraction layer are not used at all in the driver, so we can just remove the remaining references to them. Signed-off-by: Arnd Bergmann a...@arndb.de --- drivers/staging/wilc1000/wilc_errorsupport.h | 17 drivers/staging/wilc1000/wilc_event.h

RE: [PATCH 2/6] scsi: storvsc: Use a single value to track protocol versions

2015-05-29 Thread Long Li
-Original Message- From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf Of K. Y. Srinivasan Sent: Friday, May 29, 2015 1:29 PM To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;

RE: [PATCH 5/6] scsi: storvsc: use storage protocol version to determine storage capabilities

2015-05-29 Thread Long Li
-Original Message- From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf Of K. Y. Srinivasan Sent: Friday, May 29, 2015 1:29 PM To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;

RE: [PATCH 4/6] scsi: storvsc: use correct defaults for values determined by protocol negotiation

2015-05-29 Thread Long Li
-Original Message- From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf Of K. Y. Srinivasan Sent: Friday, May 29, 2015 1:29 PM To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;

RE: [PATCH 6/6] scsi: storvsc: Allow write_same when host is windows 10

2015-05-29 Thread Long Li
-Original Message- From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf Of K. Y. Srinivasan Sent: Friday, May 29, 2015 1:29 PM To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;

[PATCH 3/6] hv:scsi:Untangle the storage protocol negotiation from the vmbus protocol negotiation.

2015-05-29 Thread K. Y. Srinivasan
From: keith.ma...@microsoft.com keith.ma...@microsoft.com Currently we are making decisions based on vmbus protocol versions that have been negotiated; use storage potocol versions instead. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com

[PATCH 4/6] scsi: storvsc: use correct defaults for values determined by protocol negotiation

2015-05-29 Thread K. Y. Srinivasan
From: keith.ma...@microsoft.com keith.ma...@microsoft.com Use correct defaults for values determined by protocol negotiation, instead of resetting them with every scsi controller. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y.

[PATCH 1/6] scsi: storvsc: Rather than look for sets of specific protocol versions, make decisions based on ranges.

2015-05-29 Thread K. Y. Srinivasan
From: keith.ma...@microsoft.com keith.ma...@microsoft.com Rather than look for sets of specific protocol versions, make decisions based on ranges. This will be safer and require fewer changes going forward as we add more storage protocol versions. Tested-by: Alex Ng ale...@microsoft.com

[PATCH 5/6] scsi: storvsc: use storage protocol version to determine storage capabilities

2015-05-29 Thread K. Y. Srinivasan
From: keith.ma...@microsoft.com keith.ma...@microsoft.com Use storage protocol version instead of vmbus protocol version when determining storage capabilities. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y. Srinivasan

[PATCH 0/6] scsi: storvsc: Some miscellaneous cleanup

2015-05-29 Thread K. Y. Srinivasan
Cleanup version handling as well as base feature detection on storage version as opposed to host version. keith.ma...@microsoft.com (6): scsi: storvsc: Rather than look for sets of specific protocol versions, make decisions based on ranges. scsi: storvsc: Use a single value to track

[PATCH 2/6] scsi: storvsc: Use a single value to track protocol versions

2015-05-29 Thread K. Y. Srinivasan
From: keith.ma...@microsoft.com keith.ma...@microsoft.com Use a single value to track protocol versions to simplify comparisons and to be consistent with vmbus version tracking. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y.

[PATCH 6/6] scsi: storvsc: Allow write_same when host is windows 10

2015-05-29 Thread K. Y. Srinivasan
From: keith.ma...@microsoft.com keith.ma...@microsoft.com Allow WRITE_SAME for Windows10 and above hosts. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y. Srinivasan k...@microsoft.com --- drivers/scsi/storvsc_drv.c |6 +-

Re: [PATCH] staging: ft1000: warning removal: extern functions to static ones

2015-05-29 Thread Greg KH
On Thu, May 28, 2015 at 11:16:27PM +0200, Xavier Roche wrote: Hi Greg mailing-list members, On Thu, 28 May 2015, Greg KH wrote: In the future, always use scripts/get_maintainer.pl to determine who to send patches to please. Sorry, I did use the get_maintainer.pl script, but I did not

RE: [PATCH 1/6] scsi: storvsc: Rather than look for sets of specific protocol versions, make decisions based on ranges.

2015-05-29 Thread Long Li
-Original Message- From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf Of K. Y. Srinivasan Sent: Friday, May 29, 2015 1:29 PM To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;

RE: [PATCH 3/6] hv:scsi:Untangle the storage protocol negotiation from the vmbus protocol negotiation.

2015-05-29 Thread Long Li
-Original Message- From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf Of K. Y. Srinivasan Sent: Friday, May 29, 2015 1:29 PM To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;

[PATCH] staging: panel: use schedule_timeout_interruptible()

2015-05-29 Thread Nicholas Mc Guire
, CONFIG_PANEL=m Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Patch is against 4.1-rc5 (localversion-next is -next-20150529) not really clear what the intent of (ms * HZ + 999) / 1000 was - this is HZ dependent and does not really make sense - the comment states sleeps that many milliseconds

RE: [PATCH 1/3] Drivers: hv: vmbus: Use the vp_index map even for channels bound to CPU 0

2015-05-29 Thread KY Srinivasan
-Original Message- From: Dan Carpenter [mailto:dan.carpen...@oracle.com] Sent: Friday, May 29, 2015 10:00 AM To: KY Srinivasan Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; vkuzn...@redhat.com;

Re: [PATCH 2/2] staging: dgnc: switch timeout to signed type

2015-05-29 Thread Nicholas Mc Guire
On Fri, 29 May 2015, Dan Carpenter wrote: On Fri, May 29, 2015 at 07:21:26PM +0200, Nicholas Mc Guire wrote: On Fri, 29 May 2015, Dan Carpenter wrote: On Fri, May 29, 2015 at 06:41:28PM +0200, Nicholas Mc Guire wrote: The schedule_timeout*() helpers take the timeout as signed long,

Re: [PATCHv3] staging: gs_fpgaboot: remove redundant code

2015-05-29 Thread insop.s...@gainspeed.com
On Thu, May 28, 2015 at 03:43:42PM +0300, Dan Carpenter wrote: On Thu, May 28, 2015 at 12:08:56PM +, Gujulan Elango, Hari Prasath (H.) wrote: remove redundant code in this function.remove return value check for function that always return success Signed-off-by: Gujulan Elango Hari

[PATCH v2 1/3] staging: iio_simple_dummy: fix init function

2015-05-29 Thread Vladimirs Ambrosovs
This patch fixes the init function for the iio_simple_dummy driver. The main issues were absence of kfree for the allocated array, and no devices being removed in case the probe function fails, running in a loop. Signed-off-by: Vladimirs Ambrosovs rodriguez.twis...@gmail.com ---

[PATCH v2 0/3] staging: iio_simple_dummy: minor driver fixes

2015-05-29 Thread Vladimirs Ambrosovs
v2 Fixed the code as per the comments from version 1: * Removed unnecessary comments * Fixed the label name to address label location * Changed the type of functions, which always return 0 to void Vladimirs Ambrosovs (3): staging: iio_simple_dummy: fix init function

[PATCH v2 3/3] staging: iio_simple_dummy: fix module_param type

2015-05-29 Thread Vladimirs Ambrosovs
Fix the module_param instances type to uint, since the variable type holding the value is unsigned. Signed-off-by: Vladimirs Ambrosovs rodriguez.twis...@gmail.com --- drivers/staging/iio/iio_simple_dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git