Re: [PATCH v4 1/7] staging:lustre: move tcpip abstraction

2015-06-04 Thread Dan Carpenter
On Thu, Jun 04, 2015 at 11:05:54AM +0530, Sudip Mukherjee wrote: > On Wed, Jun 03, 2015 at 03:57:07PM -0400, James Simmons wrote: > > Rename libcfs/linux/linux-tcpip.c to lnet/lnet/lib-socket.c > looks like you have not just renamed the file, but there was also a change > in the #include which is n

Re: [PATCH v4 4/7] staging:lustre: rename tcpip handling functions to lnet_* prefix

2015-06-04 Thread Dan Carpenter
On Thu, Jun 04, 2015 at 11:27:10AM +0530, Sudip Mukherjee wrote: > On Wed, Jun 03, 2015 at 03:57:10PM -0400, James Simmons wrote: > > With all the TCPIP handling done in the lnet layer we should > > rename all the functions with the prefix lnet_*. One other > > change done was changing the remove a

Re: [PATCH v4 1/7] staging:lustre: move tcpip abstraction

2015-06-04 Thread Sudip Mukherjee
On Thu, Jun 04, 2015 at 10:34:20AM +0300, Dan Carpenter wrote: > On Thu, Jun 04, 2015 at 11:05:54AM +0530, Sudip Mukherjee wrote: > > On Wed, Jun 03, 2015 at 03:57:07PM -0400, James Simmons wrote: > > > Rename libcfs/linux/linux-tcpip.c to lnet/lnet/lib-socket.c > > looks like you have not just ren

Re: [PATCH v4 6/7] staging:lustre: style cleanups for lib-socket.c

2015-06-04 Thread Dan Carpenter
On Wed, Jun 03, 2015 at 03:57:12PM -0400, James Simmons wrote: > Handle all the style issues reported by checkpatch.pl. > Remove general white spaces, spaces in function calls, > etc. > What Sudip said but mostly "all the style" issues is a taboo phrase which pretty much gaurantees the change wil

[patch] staging: wilc1000: prevent some overflows in debugfs

2015-06-04 Thread Dan Carpenter
Add some limits here so we don't corrupt memory. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index 74b9fd5..c328208 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c

re: staging/lustre: Move /proc/fs/lustre root level files to sysfs

2015-06-04 Thread Dan Carpenter
Hello Oleg Drokin, The patch 8b8284450569: "staging/lustre: Move /proc/fs/lustre root level files to sysfs" from May 21, 2015, leads to the following static checker warning: drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:431 class_procfs_init() warn: missing error co

[PATCH] staging: fbtft: fix out of bound access

2015-06-04 Thread Sudip Mukherjee
size of str is 16, but in snprintf the size was mentioned as 128. Signed-off-by: Sudip Mukherjee --- drivers/staging/fbtft/fbtft-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index ce64521..0af8

Re: [PATCH] staging: fbtft: fix out of bound access

2015-06-04 Thread Joe Perches
On Thu, 2015-06-04 at 17:12 +0530, Sudip Mukherjee wrote: > size of str is 16, but in snprintf the size was mentioned as 128. [] > diff --git a/drivers/staging/fbtft/fbtft-core.c > b/drivers/staging/fbtft/fbtft-core.c [] > @@ -1096,7 +1096,7 @@ static int fbtft_init_display_dt(struct fbtft_par *pa

Re: [PATCH] staging: fbtft: fix out of bound access

2015-06-04 Thread Sudip Mukherjee
On Thu, Jun 04, 2015 at 05:12:23AM -0700, Joe Perches wrote: > On Thu, 2015-06-04 at 17:12 +0530, Sudip Mukherjee wrote: > > size of str is 16, but in snprintf the size was mentioned as 128. > [] > > diff --git a/drivers/staging/fbtft/fbtft-core.c > > b/drivers/staging/fbtft/fbtft-core.c > [] > >

Re: [PATCH] staging: fbtft: fix out of bound access

2015-06-04 Thread Dan Carpenter
On Thu, Jun 04, 2015 at 05:12:01PM +0530, Sudip Mukherjee wrote: > size of str is 16, but in snprintf the size was mentioned as 128. > > Signed-off-by: Sudip Mukherjee > --- > drivers/staging/fbtft/fbtft-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/sta

Re: [PATCH] staging: fbtft: fix out of bound access

2015-06-04 Thread Sudip Mukherjee
On Thu, Jun 04, 2015 at 03:36:31PM +0300, Dan Carpenter wrote: > On Thu, Jun 04, 2015 at 05:12:01PM +0530, Sudip Mukherjee wrote: > > size of str is 16, but in snprintf the size was mentioned as 128. > > > > Signed-off-by: Sudip Mukherjee > > --- > Good eye. How did you find this? :) not me. cp

[PATCH v5 00/13] Continued continued unisys driver update

2015-06-04 Thread Benjamin Romer
This patch set contains the remaining changes from our driver cleanup efforts. No functional changes have been made, only a rebase so that the patches would apply. David Kershner (4): staging: unisys: Update diag serverity enum staging: unisys: Remove unneeded fields in diagchannel.h staging

[PATCH v5 03/13] staging: unisys: Remove server flags

2015-06-04 Thread Benjamin Romer
From: Don Zickus The bus driver doesn't work in server mode, just remove the left over pieces. Signed-off-by: Don Zickus Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/visorbus_main.c| 66 +++--- drivers/staging/unisys/visorbus/visorbus_private.h | 5 --

[PATCH v5 02/13] staging: unisys: Remove unused cruft

2015-06-04 Thread Benjamin Romer
From: Don Zickus Removing stuff that isn't being used. Another prepartion patch to allow us to use visor_device everywhere without the baggage of bus/dev_info. Signed-off-by: Don Zickus Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/visorbus_main.c| 71

[PATCH v5 01/13] staging: unisys: Migrate bus from devdata to visor_device

2015-06-04 Thread Benjamin Romer
From: Don Zickus The bus device and regular device were using two different structs. Let's combine them as they are not entirely different from one another. This allows us to move this creation up the stack later and actually remove bus/dev_info easily. Most of the churn is just renaming devda

[PATCH v5 04/13] staging: unisys: Do not use 0 as the default bus root device number

2015-06-04 Thread Benjamin Romer
From: Don Zickus I used 0 as the device id for the bus root, neglecting the fact that device 0 is a valid id in Unisys's configuration. Modify this to use UINT_MAX instead as a unique number. As fallout from this change it was noticed the bus_no and dev_no was not defined the same way consisten

[PATCH v5 08/13] staging: unisys: Update diag serverity enum

2015-06-04 Thread Benjamin Romer
From: David Kershner Give the enum the correct values instead of based on other values. Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/include/diagchannel.h | 34 1 file changed, 10 insertions(+), 24 deletions(-) diff --git

[PATCH v5 07/13] staging: unisys: Removed unused entries from struct visor_channeltype_descriptor

2015-06-04 Thread Benjamin Romer
From: Jes Sorensen min_size/max_size aren't used anywhere, and they were just causing headaches in the drivers being ported over to the new interfaces. Signed-off-by: Jes Sorensen Signed-off-by: Benjamin Romer --- drivers/staging/unisys/include/visorbus.h | 2 -- 1 file changed, 2 deletions(-

[PATCH v5 11/13] staging: unisys: Fix double sysfs create for module version

2015-06-04 Thread Benjamin Romer
From: Don Zickus When we combined visorchipset and visorbus into one driver we negelected to strip out some of the MODULE_ stuff from one of the files. When building the drivers in, it causes a WARN that we try to create /proc/modules/visorbus/version when it is already created. visorchipset.c

[PATCH v5 05/13] staging: unisys: Convert bus creation to use visor_device

2015-06-04 Thread Benjamin Romer
From: Don Zickus This patch removes the legacy bus_info struct and instead creates and passes around a traditional struct device. This allows us to remove a lot of the various look up code and removes the doubt if the struct exists or not. Half of the churn is just the conversion of visorchipse

[PATCH v5 09/13] staging: unisys: Remove unneeded fields in diagchannel.h

2015-06-04 Thread Benjamin Romer
From: David Kershner Diagchannel.h is used primarily for the diagnostics channel. The diagnostics channel is not being used by linux guests currently, so the majority of the file is not needed. What is left is what is needed to perform postcode vmcalls. Those postcodes will eventually end up in t

[PATCH v5 12/13] staging: unisys: Fix clean up path

2015-06-04 Thread Benjamin Romer
From: Don Zickus When unloading a module, we need to cleanup the platform registration. However, unregistering the platform uncovered a couple of quirks, namely a missing device_release function. Fix things up so module unload works and allows us to reload the module. Signed-off-by: Don Zickus

[PATCH v5 06/13] staging: unisys: Convert device creation to use visor_device

2015-06-04 Thread Benjamin Romer
From: Don Zickus This patch removes the legacy dev_info struct and instead creates and passes around a traditional struct device. This allows us to remove a lot of the various look up code and removes the doubt if the struct exists or not. Half of the churn is just the conversion of visorchipse

[PATCH v5 13/13] staging: unisys: Add the bus device to the visor device list.

2015-06-04 Thread Benjamin Romer
From: David Kershner When the bus device was created the list_all variables were not being initialized. When the CONTROLVM_BUS_CONFIGURE message was being sent, it was failing to find the bus and produced a panic. Initialize the bus_info->list_all variable by doing a INIT_LIST_HEAD. Signed-off-b

[PATCH v5 10/13] staging: unisys: Clean up diag_serverity enum

2015-06-04 Thread Benjamin Romer
From: David Kershner Get rid of unused values in the enum. Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/include/diagchannel.h | 32 +++- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/staging/unisys/inc

[PATCH v2] staging: fbtft: fix out of bound access

2015-06-04 Thread Sudip Mukherjee
str was 16 bytes but was mentioned as 128 in snprintf. again msg is 128 bytes but not sufficient to hold the complete debug message of register values. Now removed the use of str, msg and print the register values from the loop. Signed-off-by: Sudip Mukherjee --- v2: removed the use of msg and s

Re: [PATCH 06/11] staging: rtl8192e: Remove dead code: rtl_dm.[ch]

2015-06-04 Thread Dan Carpenter
On Tue, Jun 02, 2015 at 10:48:10PM +0200, Mateusz Kulikowski wrote: > - Remove unused fields in dig_t structures. Some of them were only > initialized and never accessed. > - Remove unused enums/macros/defines in rtl_dm.h > - Remove duplicated function declarations > - Remove unused dm_change_dyn

Re: [PATCH 07/11] staging: rtl8192e: Remove dead code: dig_t::dbg_mode

2015-06-04 Thread Dan Carpenter
On Thu, Jun 04, 2015 at 10:48:08AM +0530, Sudip Mukherjee wrote: > On Wed, Jun 03, 2015 at 08:21:02PM +0200, Mateusz Kulikowski wrote: > > On 03.06.2015 09:26, Sudip Mukherjee wrote: > > > On Tue, Jun 02, 2015 at 10:48:11PM +0200, Mateusz Kulikowski wrote: > > > > No, I missed that - this one shou

Re: [PATCH v5 04/13] staging: unisys: Do not use 0 as the default bus root device number

2015-06-04 Thread Dan Carpenter
On Thu, Jun 04, 2015 at 09:22:40AM -0400, Benjamin Romer wrote: > diff --git a/drivers/staging/unisys/visorbus/visorchipset.c > b/drivers/staging/unisys/visorbus/visorchipset.c > index 4dd0a07..618732b 100644 > --- a/drivers/staging/unisys/visorbus/visorchipset.c > +++ b/drivers/staging/unisys/vis

Re: [PATCH v5 04/13] staging: unisys: Do not use 0 as the default bus root device number

2015-06-04 Thread Don Zickus
On Thu, Jun 04, 2015 at 05:19:44PM +0300, Dan Carpenter wrote: > On Thu, Jun 04, 2015 at 09:22:40AM -0400, Benjamin Romer wrote: > > diff --git a/drivers/staging/unisys/visorbus/visorchipset.c > > b/drivers/staging/unisys/visorbus/visorchipset.c > > index 4dd0a07..618732b 100644 > > --- a/drivers/

[PATCH] staging: unisys: drop format string in kthread_run

2015-06-04 Thread Kees Cook
Calling kthread_run with a single name parameter causes it to be handled as a format string. Since the uisthread interface lacks format parameters, use "%s" to avoid any potential accidents from callers passing in dynamic string content. Signed-off-by: Kees Cook --- drivers/staging/unisys/uislib

[PATCH] iio: mxs-lradc: add datasheet name for every usable channel

2015-06-04 Thread Stefan Wahren
In order to provide a channel name to in kernel consumers add the datasheet names for every usable AD channel. Signed-off-by: Stefan Wahren --- drivers/staging/iio/adc/mxs-lradc.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/sta

Re: [PATCH v2] staging: fbtft: fix out of bound access

2015-06-04 Thread Joe Perches
On Thu, 2015-06-04 at 19:04 +0530, Sudip Mukherjee wrote: > str was 16 bytes but was mentioned as 128 in snprintf. > again msg is 128 bytes but not sufficient to hold the complete debug > message of register values. > Now removed the use of str, msg and print the register values from the > loop. []

[PATCH V2 00/10] Drivers: hv: vmbus: Enable kexec and other misc cleanup

2015-06-04 Thread K. Y. Srinivasan
In addition to enabling kexec, this patch-set has a bunch of miscellaneous fixes. In this version of the patch-set; I have fixed up the subject line for couple of patches (Greg) Alex Ng (1): Drivers: hv: balloon: Enable dynamic memory protocol negotiation with Windows 10 hosts K. Y. Sriniv

[PATCH V2 10/10] Drivers: hv: vmbus: Permit sending of packets without payload

2015-06-04 Thread K. Y. Srinivasan
The guest may have to send a completion packet back to the host. To support this usage, permit sending a packet without a payload - we would be only sending the descriptor in this case. Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c |4 +++- 1 files changed, 3 insertions(+), 1 dele

[PATCH V2 06/10] Drivers: hv: vmbus: use 'die' notification chain instead of 'panic'

2015-06-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov current_pt_regs() returns regs of the userspace process and in case of kernel crash this is not what we need to report. E.g. when we trigger crash with sysrq we see the following: ... RIP: 0010:[] [] sysrq_handle_crash+0x16/0x20 RSP: 0018:8800db0a7d88 EFLAGS: 00010

[PATCH V2 02/10] Drivers: hv: vmbus: use cpu_hotplug_enable/disable

2015-06-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov Commit e513229b4c38 ("Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors") was altering smp_ops.cpu_disable to prevent CPU offlining. We can bo better by using cpu_hotplug_enable/disable functions instead of such hard-coding. Reported-by: Radim Kr.má Signed-of

[PATCH V2 01/10] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov Loaded Hyper-V module will use these functions to disable CPU hotplug under certain circumstances. Convert cpu_hotplug_disabled to a counter (protected by cpu_add_remove_lock) to support e.g. disable -> disable -> enable call sequences. Signed-off-by: Vitaly Kuznetsov Sig

[PATCH V2 04/10] Drivers: hv: vmbus: add special kexec handler

2015-06-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov When general-purpose kexec (not kdump) is being performed in Hyper-V guest the newly booted kernel fails with an MCE error coming from the host. It is the same error which was fixed in the "Drivers: hv: vmbus: Implement the protocol for tearing down vmbus state" commit - mo

[PATCH V2 09/10] Drivers: hv: balloon: Enable dynamic memory protocol negotiation with Windows 10 hosts

2015-06-04 Thread K. Y. Srinivasan
From: Alex Ng Support Win10 protocol for Dynamic Memory. Thia patch allows guests on Win10 hosts to hot-add memory even when dynamic memory is not enabled on the guest. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_balloon.c | 26 -- 1 fil

[PATCH V2 05/10] Drivers: hv: don't do hypercalls when hypercall_page is NULL

2015-06-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov At the very late stage of kexec a driver (which are not being unloaded) can try to post a message or signal an event. This will crash the kernel as we already did hv_cleanup() and the hypercall page is NULL. Move all common (between 32 and 64 bit code) declarations to the

[PATCH V2 08/10] Drivers: hv: fcopy: dynamically allocate smsg_out in fcopy_send_data()

2015-06-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov struct hv_start_fcopy is too big to be on stack on i386, the following warning is reported: >> drivers/hv/hv_fcopy.c:159:1: warning: the frame size of 1088 bytes is larger >> than 1024 bytes [-Wframe-larger-than=] Reported-by: kbuild test robot Signed-off-by: Vitaly Kuz

[PATCH V2 07/10] Drivers: hv: kvp: check kzalloc return value

2015-06-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov kzalloc() return value check was accidentally lost in 11bc3a5fa91f: "Drivers: hv: kvp: convert to hv_utils_transport" commit. We don't need to reset kvp_transaction.state here as we have the kvp_timeout_func() timeout function and in case we're in OOM situation it is prefe

[PATCH V2 03/10] Drivers: hv: vmbus: remove hv_synic_free_cpu() call from hv_synic_cleanup()

2015-06-04 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov We already have hv_synic_free() which frees all per-cpu pages for all CPUs, let's remove the hv_synic_free_cpu() call from hv_synic_cleanup() so it will be possible to do separate cleanup (writing to MSRs) and final freeing. This is going to be used to assist kexec. Signed

Re: [PATCH v2] staging: fbtft: fix out of bound access

2015-06-04 Thread Sudip Mukherjee
On Thu, Jun 04, 2015 at 01:48:31PM -0700, Joe Perches wrote: > On Thu, 2015-06-04 at 19:04 +0530, Sudip Mukherjee wrote: > > str was 16 bytes but was mentioned as 128 in snprintf. > > again msg is 128 bytes but not sufficient to hold the complete debug > > message of register values. > > Now remove

Re: [PATCH v5 09/13] staging: unisys: Remove unneeded fields in diagchannel.h

2015-06-04 Thread Sudip Mukherjee
On Thu, Jun 04, 2015 at 09:22:45AM -0400, Benjamin Romer wrote: > From: David Kershner > > Diagchannel.h is used primarily for the diagnostics channel. The > diagnostics channel is not being used by linux guests currently, so > the majority of the file is not needed. What is left is what is > nee

Re: [PATCH v2] staging: fbtft: fix out of bound access

2015-06-04 Thread Joe Perches
On Fri, 2015-06-05 at 10:22 +0530, Sudip Mukherjee wrote: > On Thu, Jun 04, 2015 at 01:48:31PM -0700, Joe Perches wrote: [] > ccing you just slipped out of my mind. No worries. > > > diff --git a/drivers/staging/fbtft/fbtft-core.c > > > b/drivers/staging/fbtft/fbtft-core.c > > [] > > > @@ -1067,

Re: [PATCH v5 00/13] Continued continued unisys driver update

2015-06-04 Thread Sudip Mukherjee
On Thu, Jun 04, 2015 at 09:22:36AM -0400, Benjamin Romer wrote: > This patch set contains the remaining changes from our driver cleanup > efforts. No functional changes have been made, only a rebase so that the > patches would apply. Hi, its not related to your this patchset, but one of your previo

[PATCH] staging: rts5208: Use common pci_get_bus_and_slot() instead of private one

2015-06-04 Thread Yijing Wang
We already have a inline pci_get_bus_and_slot() in include/linux/pci.h, Use it instead of local one. Signed-off-by: Yijing Wang --- drivers/staging/rts5208/rtsx.h |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.h b/drivers/staging/rts5208/r

Re: [PATCH] staging: unisys: drop format string in kthread_run

2015-06-04 Thread Sudip Mukherjee
On Thu, Jun 04, 2015 at 11:37:01AM -0700, Kees Cook wrote: > Calling kthread_run with a single name parameter causes it to be handled > as a format string. Since the uisthread interface lacks format parameters, > use "%s" to avoid any potential accidents from callers passing in dynamic > string con