[PATCH] staging: lustre: lov: remove dead code

2017-07-28 Thread Dmitriy Cherkasov
This #if 0 block has been commented out for years. Assume it is not needed and remove it. Signed-off-by: Dmitriy Cherkasov --- drivers/staging/lustre/lustre/lov/lov_io.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c

Re: [PATCH] staging: vboxvideo: select CONFIG_GENERIC_ALLOCATOR

2017-07-28 Thread Greg Kroah-Hartman
On Fri, Jul 28, 2017 at 03:21:01PM +0200, Arnd Bergmann wrote: > vboxvideo fails to link without genalloc: > > drivers/staging/vboxvideo/vbox_hgsmi.o: In function `hgsmi_buffer_alloc': > vbox_hgsmi.c:(.text+0x1e): undefined reference to `gen_pool_dma_alloc' >

Re: [PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation

2017-07-28 Thread Greg KH
On Thu, Jul 20, 2017 at 05:56:36PM +0200, Marcus Wolf wrote: > Fixes problem with division in rf69_set_deviation > > Fixes: 874bcba65f9a ("staging: pi433: New driver") > Signed-off-by: Marcus Wolf > > diff --git a/drivers/staging/pi433/rf69.c

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

2017-07-28 Thread Greg Kroah-Hartman
On Thu, Jul 20, 2017 at 01:01:46PM +0200, 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

Re: [PATCH 1/3][staging-next] staging: pi433: Make a couple of functions static

2017-07-28 Thread Greg Kroah-Hartman
On Tue, Jul 18, 2017 at 02:03:58PM +0100, Colin King wrote: > From: Colin Ian King > > The functions pi433_receive and pi433_tx_thread are local to the source > and do not need to be in global scope, so make them static > > Cleans up sparse warnings: > symbol

Re: [PATCH] staging: pi433: fix Kconfig entry

2017-07-28 Thread Greg Kroah-Hartman
On Tue, Jul 25, 2017 at 05:38:05PM +0200, Arnd Bergmann wrote: > I ran into a build error with the new pi433 driver and > CONFIG_SPI disabled: > > drivers/staging/pi433/pi433_if.o: In function `pi433_probe.part.6': > pi433_if.c:(.text+0x1657): undefined reference to `spi_write_then_read' >

Re: [PATCH 0/3] ANDROID: binder: reconcile with android common tree

2017-07-28 Thread Greg KH
On Fri, Jul 28, 2017 at 01:56:05PM +0200, Martijn Coenen wrote: > When comparing the android common kernel branch with > upstream, I found several differences. > > The "add padding" patch has long been applied in common, > and shipping versions of Android userspace depends on this > particular

[PATCH 10/11] greybus: usb: constify hc_driver structures

2017-07-28 Thread Julia Lawall
The hc_driver structure is only passed as the first argument to usb_create_hcd, which is declared as const. Thus the hc_driver structure itself can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/staging/greybus/usb.c |2 +- 1

[PATCH 00/11] constify hc_driver structures

2017-07-28 Thread Julia Lawall
The hc_driver structure is only passed as the first argument to usb_create_hcd, which is declared as const. Thus the hc_driver structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct hc_driver i@p = { ... };

[PATCH v3/resubmit 3/3] staging: gs_fpgaboot: return valid error codes

2017-07-28 Thread Jacob von Chorus
The return values on error are modified to be valid error codes. Theses error codes are propagated back to the init function's return. Signed-off-by: Jacob von Chorus --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[PATCH v3/resubmit 1/3] staging: gs_fpgaboot: add buffer overflow checks

2017-07-28 Thread Jacob von Chorus
Four fields in struct fpgaimage are char arrays of length MAX_STR (256). The amount of data read into these buffers is controlled by a length field in the bitstream file read from userspace. If a corrupt or malicious firmware file was supplied, kernel data beyond these buffers can be overwritten

[PATCH v3/resubmit 2/3] staging: gs_fpgaboot: change char to u8

2017-07-28 Thread Jacob von Chorus
The bitstream storage variables were changed from char to u8 arrays to prevent issues such as negative lengths. This change makes the code compatible with the "data" field in "struct firmware" which is of type u8. Signed-off-by: Jacob von Chorus --- v3: - reduce

Re: [PATCH] staging: skein: move macros into header file

2017-07-28 Thread Jason Cooper
On Fri, Jul 28, 2017 at 10:56:59PM +0300, Dmytro Shynkevych wrote: > Move macro definitions from source file into respective header file > > This concludes macro cleanup as outlined in TODO > > Signed-off-by: Dmytro Shynkevych > --- > drivers/staging/skein/skein_block.c |

[PATCH] staging: skein: move macros into header file

2017-07-28 Thread Dmytro Shynkevych
Move macro definitions from source file into respective header file This concludes macro cleanup as outlined in TODO Signed-off-by: Dmytro Shynkevych --- drivers/staging/skein/skein_block.c | 323 drivers/staging/skein/skein_block.h |

[PATCH v2] Staging: greybus: Match alignment with open parenthesis.

2017-07-28 Thread Shreeya Patel
Alignment should match with open parenthesis. This fixes the coding style issue. Signed-off-by: Shreeya Patel --- Changes in v2: -Rebase the patch. drivers/staging/greybus/tools/loopback_test.c | 35 --- 1 file changed, 16 insertions(+),

[PATCH net-next v3 5/7] netvsc: optimize receive completions

2017-07-28 Thread Stephen Hemminger
Optimize how receive completion ring are managed. * Allocate only as many slots as needed for all buffers from host * Allocate before setting up sub channel for better error detection * Don't need to keep copy of initial receive section message * Precompute the watermark for when

[PATCH net-next v3 6/7] netvsc: fix error unwind on device setup failure

2017-07-28 Thread Stephen Hemminger
If setting receive buffer fails, the error unwind would cause kernel panic because it was not correctly doing RCU and NAPI unwind. RCU'd pointer needs to be reset to NULL, and NAPI needs to be disabled not deleted. Signed-off-by: Stephen Hemminger ---

[PATCH net-next v3 7/7] netvsc: signal host if receive ring is emptied

2017-07-28 Thread Stephen Hemminger
Latency improvement related to NAPI conversion. If all packets are processed from receive ring then need to signal host. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH net-next v3 2/7] netvsc: fix warnings reported by lockdep

2017-07-28 Thread Stephen Hemminger
This includes a bunch of fixups for issues reported by lockdep. * ethtool routines can assume RTNL * send is done with RCU lock (and BH disable) * avoid refetching internal device struct (netvsc) instead pass it as a parameter. Signed-off-by: Stephen Hemminger

[PATCH net-next v3 4/7] netvsc: remove unnecessary indirection of page_buffer

2017-07-28 Thread Stephen Hemminger
The internal API was passing struct hv_page_buffer ** when only simple struct hv_page_buffer * was necessary for passing an array. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc.c | 21 ++---

[PATCH net-next v3 3/7] netvsc: don't print pointer value in error message

2017-07-28 Thread Stephen Hemminger
Using %p to print pointer to packet meta-data doesn't give any good info, and exposes kernel memory offsets. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH net-next v3 1/7] netvsc: fix return value for set_channels

2017-07-28 Thread Stephen Hemminger
The error and normal case got swapped. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index

[PATCH net-next v3 0/7] netvsc: minor fixes and optimization

2017-07-28 Thread Stephen Hemminger
This is a subset of earlier submission with a few more fixes found during testing. The are two small optimizations, one is to better manage the receive completion ring, and the other is removing one unneeded level of indirection. Will submit the improved VF support and buffer sizing in a later

[PATCH] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-07-28 Thread Ian Abbott
Comedi's read and write file operation handlers (`comedi_read()` and `comedi_write()`) currently call `copy_to_user()` or `copy_from_user()` whilst in the `TASK_INTERRUPTIBLE` state, which falls foul of the `might_fault()` checks when enabled. Fix it by setting the current task state back to

Send a large patch right now or is it better to do it later?

2017-07-28 Thread Marcus Wolf
Hi Greg, according to the proposals of Walter Harms, I revised the rf69.c: I replaced some macros with inline functions and removed some obsolete ifdefs. According to walter this will improve the resource situation. In addition the readybility is enhanced, since lines got shorter. It's a quite

Re: [PATCH] staging: pi433: use div_u64 for 64-bit division

2017-07-28 Thread Marcus Wolf
Hi Dan, Thanks for the hint. I don't get, what went wrong. If I take the mail from my outbox and view it, it looks nice. Seems, I really need to look for another mailtool. But for several reasons, that's not possible at the moment (slow move of 20 domains with someting arround 80 mail adresses

[PATCH] staging: lustre: lustre: Off by two in lmv_fid2path()

2017-07-28 Thread Dan Carpenter
We want to concatonate join string one, a '/' character, string two and then a NUL terminator. The destination buffer holds ori_gf->gf_pathlen characters. The strlen() function returns the number of characters not counting the NUL terminator. So we should be adding two extra spaces, one for the

Re: [PATCH] staging: pi433: use div_u64 for 64-bit division

2017-07-28 Thread Dan Carpenter
On Fri, Jul 28, 2017 at 04:21:05PM +0200, Marcus Wolf wrote: > Hi Arnd, > > we already have a patch for this: > [PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation > from 20.07.2017 https://patchwork.kernel.org/patch/9855261/ > > Maybe I did something wrong, but my

Re: [PATCH] staging: pi433: use div_u64 for 64-bit division

2017-07-28 Thread Arnd Bergmann
On Fri, Jul 28, 2017 at 4:21 PM, Marcus Wolf wrote: > Hi Arnd, > > we already have a patch for this: > [PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation > from 20.07.2017 > > Maybe I did something wrong, but my first solution was

[PATCH] fs: convert a pile of fsync routines to errseq_t based reporting

2017-07-28 Thread Jeff Layton
From: Jeff Layton This patch converts most of the in-kernel filesystems that do writeback out of the pagecache to report errors using the errseq_t-based infrastructure that was recently added. This allows them to report errors once for each open file description. Most

Re: [PATCH] staging: pi433: use div_u64 for 64-bit division

2017-07-28 Thread Marcus Wolf
Hi Arnd, we already have a patch for this: [PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation from 20.07.2017 Maybe I did something wrong, but my first solution was exactly like your proposal. As far as I remeber, I wasn't able to compile it that way. Therefore I made

Re: [PATCH] Staging: pi433: fix some warnings detected using sparse

2017-07-28 Thread Dan Carpenter
On Fri, Jul 28, 2017 at 02:56:26PM +0200, Elia Geretto wrote: > This patch corrects some visibility issues regarding some functions and > solves a warning related to a non-matching union. After this patch, > sparse produces only one other warning regarding a bitwise operator; > however, this

Re: [PATCH] staging: comedi: ni_mio_common.c: fix coding style issue

2017-07-28 Thread Ian Abbott
On 23/07/17 13:14, Christopher MÃ¥rtensson wrote: From 3e90ab52ad9b437d7c09cc667161cdb855c0cc7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20M=C3=A5rtensson?= Date: Sun, 23 Jul 2017 13:05:09 +0200 Subject: [PATCH] staging: comedi: ni_mio_common.c: fix coding style

[PATCH] staging: pi433: use div_u64 for 64-bit division

2017-07-28 Thread Arnd Bergmann
I ran into this link error on an ARM OABI build: drivers/staging/pi433/rf69.o: In function `rf69_set_frequency': rf69.c:(.text+0xc9c): undefined reference to `__udivdi3' No idea why I didn't see it with the default EABI configurations, but the right solution here seems to be to use div_u64() to

[PATCH] staging: vboxvideo: select CONFIG_GENERIC_ALLOCATOR

2017-07-28 Thread Arnd Bergmann
vboxvideo fails to link without genalloc: drivers/staging/vboxvideo/vbox_hgsmi.o: In function `hgsmi_buffer_alloc': vbox_hgsmi.c:(.text+0x1e): undefined reference to `gen_pool_dma_alloc' drivers/staging/vboxvideo/vbox_hgsmi.o: In function `hgsmi_buffer_free': vbox_hgsmi.c:(.text+0xf2): undefined

[PATCH] Staging: pi433: fix some warnings detected using sparse

2017-07-28 Thread Elia Geretto
This patch corrects some visibility issues regarding some functions and solves a warning related to a non-matching union. After this patch, sparse produces only one other warning regarding a bitwise operator; however, this behaviour seems to be intended. Signed-off-by: Elia Geretto

[PATCH 1/3] ANDROID: binder: add padding to binder_fd_array_object.

2017-07-28 Thread Martijn Coenen
binder_fd_array_object starts with a 4-byte header, followed by a few fields that are 8 bytes when ANDROID_BINDER_IPC_32BIT=N. This can cause alignment issues in a 64-bit kernel with a 32-bit userspace, as on x86_32 an 8-byte primitive may be aligned to a 4-byte address. Pad with a __u32 to fix

[PATCH 0/3] ANDROID: binder: reconcile with android common tree

2017-07-28 Thread Martijn Coenen
When comparing the android common kernel branch with upstream, I found several differences. The "add padding" patch has long been applied in common, and shipping versions of Android userspace depends on this particular alignment; so while it does change UAPI, we have never shipped a userspace

[PATCH 3/3] ANDROID: binder: fix proc->tsk check.

2017-07-28 Thread Martijn Coenen
Commit c4ea41ba195d ("binder: use group leader instead of open thread")' was incomplete and didn't update a check in binder_mmap(), causing all mmap() calls into the binder driver to fail. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 2 +- 1 file changed, 1

[PATCH 2/3] ANDROID: binder: add hwbinder, vndbinder to BINDER_DEVICES.

2017-07-28 Thread Martijn Coenen
These will be required going forward. Signed-off-by: Martijn Coenen --- drivers/android/Kconfig| 2 +- kernel/configs/android-base.config | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig index

Re: [PATCH] drivers:staging:wlan-ng Correct multiple line dereference

2017-07-28 Thread Joe Perches
On Fri, 2017-07-28 at 15:33 +0530, janani-sankarababu wrote: > This patch fixes multiple line dereference Warning reported by checkpath > script. This has been made to simplify the code and make it more readable. Please wrap your commit messages to 75 characters per line. And run your suggested

Re: [PATCH v2] staging:wlan-ng Correct multiple line dereference

2017-07-28 Thread Dan Carpenter
>From header. Subject. Doesn't apply (read Documentation/process/email-clients.rst). On Fri, Jul 28, 2017 at 04:14:29PM +0530, janani-sankarababu wrote: > This patch fixes the multiple line dereference Warning reported by > checkpath script. This has been made to simplify the code and make >

[PATCH v2] staging:wlan-ng Correct multiple line dereference

2017-07-28 Thread janani-sankarababu
This patch fixes the multiple line dereference Warning reported by checkpath script. This has been made to simplify the code and make it more readable. Signed-off-by: Janani Sankara Babu --- drivers/staging/wlan-ng/hfa384x_usb.c | 12 +--- 1 file changed, 5

Re: [PATCH] drivers:staging:wlan-ng Correct multiple line dereference

2017-07-28 Thread Dan Carpenter
Fix your email From header to match your Signed-off-by line. The subject should be: [PATCH] staging: wlan-ng: Correct multiple line dereference On Fri, Jul 28, 2017 at 03:33:27PM +0530, janani-sankarababu wrote: > This patch fixes multiple line dereference Warning reported by checkpath >

[PATCH] drivers:staging:wlan-ng Correct multiple line dereference

2017-07-28 Thread janani-sankarababu
This patch fixes multiple line dereference Warning reported by checkpath script. This has been made to simplify the code and make it more readable. Signed-off-by: Janani S --- drivers/staging/wlan-ng/hfa384x_usb.c | 12 +--- 1 file changed, 5 insertions(+), 7

Re: [PATCH] Staging: greybus: Match alignment with open parenthesis.

2017-07-28 Thread Johan Hovold
On Thu, Jul 27, 2017 at 09:49:32PM -0700, Greg KH wrote: > On Mon, Jul 24, 2017 at 10:08:37AM +0300, Dan Carpenter wrote: > > I don't understand why greybus has to be special instead of the same as > > everything else. Who cares about this stuff really? Just do whatever > > is easiest and most

Re: [PATCH 2/3] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-28 Thread Dan Carpenter
On Fri, Jul 28, 2017 at 09:59:41AM +0530, Suniel Mahesh wrote: > On Friday 28 July 2017 01:18 AM, Dan Carpenter wrote: > > On Thu, Jul 27, 2017 at 05:27:33PM +0300, Gilad Ben-Yossef wrote: > >> + new_drvdata->cc_base = devm_ioremap_resource(_dev->dev, > >> +