Re: [PATCH] staging: dgnc: Fix a NULL pointer dereference

2016-05-03 Thread Greg KH
On Wed, May 04, 2016 at 02:41:22PM +0900, Daeseok Youn wrote: > The error handling for print_drive after calling tty_alloc_driver() > was needed. But there was error handling but too late for this. > Error handling code moved after tty_alloc_driver() call. > > Fixes: 60b3109e5e2d ("staging: dgnc:

[PATCH] staging: dgnc: Fix a NULL pointer dereference

2016-05-03 Thread Daeseok Youn
The error handling for print_drive after calling tty_alloc_driver() was needed. But there was error handling but too late for this. Error handling code moved after tty_alloc_driver() call. Fixes: 60b3109e5e2d ("staging: dgnc: use tty_alloc_driver instead of kcalloc") Reported-by: Dan Carpenter

Re: staging: dgnc: use tty_alloc_driver instead of kcalloc

2016-05-03 Thread DaeSeok Youn
2016-05-03 17:15 GMT+09:00 Dan Carpenter : > Hello Daeseok Youn, Hello Dan, > > The patch 60b3109e5e2d: "staging: dgnc: use tty_alloc_driver instead > of kcalloc" from Apr 14, 2016, leads to the following static checker > warning: > >

[PATCH 1/3] staging: dgnc: remove redundant NULL check in

2016-05-03 Thread Daeseok Youn
tty and ch are already checked for NULL before calling dgnc_block_til_ready(). Signed-off-by: Daeseok Youn --- drivers/staging/dgnc/dgnc_tty.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c

[PATCH 3/3] staging: dgnc: clean up the dgnc_get_modem_info()

2016-05-03 Thread Daeseok Youn
the "ch" in dgnc_get_modem_info() was already checked before calling this function and also if "ch" is not NULL, dgnc_get_mstat() returns valid value so it doesn't need to check an error. Signed-off-by: Daeseok Youn --- drivers/staging/dgnc/dgnc_tty.c | 12 +---

[PATCH V6 9/9] staging: rtl8192u: propagate errors in write_nic_dword

2016-05-03 Thread Salah Triki
Propagate errors from kzalloc and usb_control_msg and change the return type of write_nic_dword from void to int. Signed-off-by: Salah Triki --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 10 +++--- 2 files changed, 8

[PATCH V6 7/9] staging: rtl8192u: propagate errors in write_nic_byte_E

2016-05-03 Thread Salah Triki
Propagate errors from kzalloc and usb_control_msg and change the return type of write_nic_byte_E from void to int. Signed-off-by: Salah Triki --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 9 ++--- 2 files changed, 7

[PATCH V6 2/9] staging: rtl8192u: propagate errors in eprom_read

2016-05-03 Thread Salah Triki
Propagate error from eprom_r and change the return type of eprom_read from u32 to int. Signed-off-by: Salah Triki --- drivers/staging/rtl8192u/r8180_93cx6.c | 9 +++-- drivers/staging/rtl8192u/r8180_93cx6.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff

[PATCH V6 3/9] staging: rtl8192u: check return value eprom_read

2016-05-03 Thread Salah Triki
The call of eprom_read may fail, therefore its return value must be checked Signed-off-by: Salah Triki --- drivers/staging/rtl8192u/r8192U_core.c | 112 ++--- 1 file changed, 76 insertions(+), 36 deletions(-) diff --git

[PATCH V6 8/9] staging: rtl8192u: propagate errors in write_nic_word

2016-05-03 Thread Salah Triki
Propagate errors from kzalloc and usb_control_msg and change the return type of write_nic_word from void to int. Signed-off-by: Salah Triki --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 10 +++--- 2 files changed, 8

[PATCH V6 4/9] staging: rtl8192u: propagate errors in rtl8192_read_eeprom_info

2016-05-03 Thread Salah Triki
Propagate error from eprom_read and change the return type of rtl8192_read_eeprom_info from void to int. Signed-off-by: Salah Triki --- drivers/staging/rtl8192u/r8192U_core.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff

[PATCH V6 1/9] staging: rtl8192u: check return value of read_nic_word_E

2016-05-03 Thread Salah Triki
The call of read_nic_word_E may fail, therefore its return value must be checked and propagated in the case of error. Signed-off-by: Salah Triki --- drivers/staging/rtl8192u/r8180_93cx6.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff

[PATCH V6 0/9] staging: rtl8192u: Checking return value/propagating errors

2016-05-03 Thread Salah Triki
These patchs check the return value/propagate error of the functions read_nic_word_E, eprom_r, eprom_read, rtl8192_read_eeprom_info, write_nic_* Salah Triki (9): staging: rtl8192u: check return value of read_nic_word_E staging: rtl8192u: propagate errors in eprom_read staging: rtl8192u:

[PATCH] fix infoleak in wilc_wfi_cfgoperations

2016-05-03 Thread Kangjie Lu
"mac" is an array allocated in stack without being initialized, and will be sent out via "nla_put". The dump_station() is supposed to initialize the mac address; otherwise, sensitive data in kernel stack will be leaked. To fix this, copy the mac address to it. Signed-off-by: Kangjie Lu

[PATCH 00/19] staging: comedi: dt2811: cleanup driver

2016-05-03 Thread H Hartley Sweeten
Fix all the checkpatch.pl issues and tidy up the driver. H Hartley Sweeten (19): staging: comedi: dt2811: tidy up copyright and comedi comments staging: comedi: dt2811: remove redundant block comment staging: comedi: dt2811: remove disabled code staging: comedi: dt2811: tidy up A/D

[PATCH 05/19] staging: comedi: dt2811: tidy up A/D Gain/Channel register defines

2016-05-03 Thread H Hartley Sweeten
Cleanup the defines for this register and its bits and remove the redundant information in the comment. Make the (*insn_read) use the range to set the gain bits correctly. Currently the gain is always set to 1. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott

[PATCH 19/19] staging: comedi: dt2811: update the MODULE_DESCRIPTION

2016-05-03 Thread H Hartley Sweeten
Change the MODULE_DESCRIPTION to something more useful than the generic "Comedi low-level driver". Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2811.c |

[PATCH 17/19] staging: comedi: dt2811: remove unused define

2016-05-03 Thread H Hartley Sweeten
This define is not used by the driver. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2811.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 10/19] staging: comedi: dt2811: tidy up the digital subdevices

2016-05-03 Thread H Hartley Sweeten
Add some whitespace to the digital input and output subdevice initialization. Reorder the initialization a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 04/19] staging: comedi: dt2811: tidy up A/D Control/Status register defines

2016-05-03 Thread H Hartley Sweeten
Cleanup the defines for this register and its bits and remove the redundant information in the comment. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 11/19] staging: comedi: dt2811: simplify analog output range options

2016-05-03 Thread H Hartley Sweeten
The D/A ranges are not programmable. Currently this driver uses some configuration options to select the comedi_lrange for each channel. This is a bit messy and it requires the user to make sure the correct option value is used. The range information isn't used by the driver. The user space

[PATCH 14/19] staging: comedi: dt2811: remove private data

2016-05-03 Thread H Hartley Sweeten
The remaining members of the private data are not used by the driver. Remove it and the allocation. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2811.c |

[PATCH 01/19] staging: comedi: dt2811: tidy up copyright and comedi comments

2016-05-03 Thread H Hartley Sweeten
Fix the checkpatch.pl issue: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2811.c | 78

[PATCH 09/19] staging: comedi: dt2811: tidy up Timer/Counter register defines

2016-05-03 Thread H Hartley Sweeten
This register currently is not being used. For aesthetics, cleanup the define and the comment about the frequency control. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 16/19] staging: comedi: dt2811: tidy up analog input subdevice init

2016-05-03 Thread H Hartley Sweeten
Add some whitespace to the analog output subdevice initialization and rename the (*insn_read) function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 02/19] staging: comedi: dt2811: remove redundant block comment

2016-05-03 Thread H Hartley Sweeten
The configuration options are listed in the comedi comment block. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2811.c | 20 1 file

[PATCH 07/19] staging: comedi: dt2811: tidy up D/A Data register defines

2016-05-03 Thread H Hartley Sweeten
Cleanup the defines for these registers and and remove the redundant information in the comment. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2811.c | 19

[PATCH 15/19] staging: comedi: dt2811: simplify analog input range options

2016-05-03 Thread H Hartley Sweeten
The A/D ranges are not programmable but the gain is. Currently this driver uses a configuration option to select the comedi_lrange that will be used for the analog input subdevice. This requires that the user makes sure the correct option value is used. The user space library uses the range

[PATCH 08/19] staging: comedi: dt2811: tidy up Digital Input/Output register defines

2016-05-03 Thread H Hartley Sweeten
The digital input and outputs are separate ports even though they share the same register offset. For aesthetics, define then separately and remove the redundant information in the comment. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 19/25] staging: comedi: das16m1: tidy up misc. defines

2016-05-03 Thread H Hartley Sweeten
For aesthetics, move these after the register map defines and rename the FIFO_SIZE define. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 14

[PATCH 00/25] staging: comedi: das16m1: cleanup driver

2016-05-03 Thread H Hartley Sweeten
Fixe all the checkpatch.pl issues and tidy up the driver. H Hartley Sweeten (25): staging: comedi: das16m1: tidy up copyright and comedi comments staging: comedi: das16m1: tidy up comments in das16m1_handler() staging: comedi: das16m1: tidy up comment in das16m1_cmd_exec() staging:

[PATCH 15/25] staging: comedi: das16m1: tidy up digital input subdevice init

2016-05-03 Thread H Hartley Sweeten
Add some whitespace to the subdevice init and rename the support function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 21

[PATCH 09/25] staging: comedi: das16m1: tidy up clear interrupt register define

2016-05-03 Thread H Hartley Sweeten
Rename this define and use a consistent comment throughout the code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 13 +++-- 1 file

[PATCH 21/25] staging: comedi: das16m1: init local variables when declared

2016-05-03 Thread H Hartley Sweeten
For aesthetics, init the comedi_subdevice, comedi_async, and comedi_cmd pointers when the local variables are declared. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 03/25] staging: comedi: das16m1: tidy up comment in das16m1_cmd_exec()

2016-05-03 Thread H Hartley Sweeten
Fix the checkpatch.pl issue: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 6 --

[PATCH 02/25] staging: comedi: das16m1: tidy up comments in das16m1_handler()

2016-05-03 Thread H Hartley Sweeten
Fix the checkpatch.pl issue: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 18

[PATCH 22/25] staging: comedi: das16m1: minor cleanup to das16m1_ai_insn_read()

2016-05-03 Thread H Hartley Sweeten
The (*insn_read) functions return the number of data values read. The 'n' value is correct but for clarity change the return to 'insn->n'. For aesthetics, change the 'n' loop variable name to 'i'. That's more common in comedi drivers. Signed-off-by: H Hartley Sweeten

[PATCH 11/25] staging: comedi: das16m1: tidy up interrupt control register defines

2016-05-03 Thread H Hartley Sweeten
Rename these defines and use the BIT macro to define the bits. Define some macros for the multi-bit fields in the register. Rename the private data 'control_state' member to better match the register name. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott

[PATCH 06/25] staging: comedi: das16m1: tidy up analog input data register defines

2016-05-03 Thread H Hartley Sweeten
Convert the inline helper munge_sample() into a macro and rename the defines for the analog input data register/bits. Use the register define when accessing this register instead of just dev->iobase. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott

[PATCH 23/25] staging: comedi: das16m1: convert munge_sample_array() into a subdevice (*munge)

2016-05-03 Thread H Hartley Sweeten
For aesthetics, convert this function into a subdevice (*munge) function and let the comedi core handle the munging. Add a comment about why the data needs to be munged. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 05/25] staging: comedi: das16m1: tidy up register map comment

2016-05-03 Thread H Hartley Sweeten
The comment about all the registers is not neccessary. The defines give the same information. This also fixes a checkpatch.pl issue: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 13/25] staging: comedi: das16m1: introduce das16m1_ai_set_queue()

2016-05-03 Thread H Hartley Sweeten
Introduce a helper function to handle writing the channel/gain data to the queue for single channel reads, (*insn_read), and multi-channel scans, (*do_cmd). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 12/25] staging: comedi: das16m1: tidy up queue register defines

2016-05-03 Thread H Hartley Sweeten
Rename these defines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 25 - 1 file changed, 12 insertions(+), 13

[PATCH 10/25] staging: comedi: das16m1: remove unnecessary ai 'cancel' operations

2016-05-03 Thread H Hartley Sweeten
The comedi core will only call the (*insn_read) and (*do_cmd) functions if the subdevice is not "busy". All async commands are terminated by a (*cancel) operation which clears the INTE and PACER_MASK bits in the interrupt control register. These bits are also cleared when the driver first

[PATCH 14/25] staging: comedi: das16m1: tidy up analog input subdevice init

2016-05-03 Thread H Hartley Sweeten
Add some whitespace to the subdevice init and rename the support functions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 48

[PATCH 20/25] staging: comedi: das16m1: remove an unnecessery comment

2016-05-03 Thread H Hartley Sweeten
The configuration options are listed in the comedi comment block. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 5 - 1 file changed, 5

[PATCH 01/25] staging: comedi: das16m1: tidy up copyright and comedi comments

2016-05-03 Thread H Hartley Sweeten
Fix the checkpatch.pl issue: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 98

[PATCH 25/25] staging: comedi: das16m1: update the MODULE_DESCRIPTION

2016-05-03 Thread H Hartley Sweeten
Change the MODULE_DESCRIPTION to something more usefull than the generic "Comedi low-level driver". Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c

[PATCH 16/25] staging: comedi: das16m1: tidy up das16m1_di_insn_bits()

2016-05-03 Thread H Hartley Sweeten
The (*insn_bits) for a digital input subdevice only needs to return the state of the inputs in data[1]. Remove the cruft. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 24/25] staging: comedi: das16m1: rename struct das16m1_private_struct

2016-05-03 Thread H Hartley Sweeten
For aesthetics, remove the redundant '_struct' suffix. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 12 ++-- 1 file changed, 6

[PATCH 04/25] staging: comedi: das16m1: remove unnecessary private data comments

2016-05-03 Thread H Hartley Sweeten
These comments are just extra cruft. Removing them also fixes a checkpatch.pl issue: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 18/25] staging: comedi: das16m1: tidy up 8254/8255 register defines

2016-05-03 Thread H Hartley Sweeten
For aesthetics, rename these defines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 22 +++--- 1 file changed, 11 insertions(+),

[PATCH 07/25] staging: comedi: das16m1: tidy up control/status register defines

2016-05-03 Thread H Hartley Sweeten
Rename the defines for the control/status register/bits. Use the BIT macro to define the bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 26

[PATCH 08/25] staging: comedi: das16m1: tidy up digital input/output register defines

2016-05-03 Thread H Hartley Sweeten
The digtial inputs and outputs are read/written using the same register offset but they are different logical registers. Physically they are the same register with the hi 4 bits returning the inputs and the lo 4 bits driving the outputs. For aesthetics, use two different defines for the

RE: [PATCH [RFC]] PCI: hv: add explicit fencing to config space access

2016-05-03 Thread Jake Oshins
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, May 3, 2016 5:22 AM > To: linux-...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; Bjorn > Helgaas ; Haiyang Zhang > ;

[PATCH net-next 4/5] treewide: replace dev->trans_start update with helper

2016-05-03 Thread Florian Westphal
Replace all trans_start updates with netif_trans_update helper. change was done via spatch: struct net_device *d; @@ - d->trans_start = jiffies + netif_trans_update(d) Compile tested only. Cc: user-mode-linux-de...@lists.sourceforge.net Cc: linux-xte...@linux-xtensa.org Cc:

Re: [PATCH 0/6] Intel Secure Guard Extensions

2016-05-03 Thread Pavel Machek
Hi! > We have been following and analyzing this technology since the first > HASP paper was published detailing its development. We have been (1) > > I told my associates the first time I reviewed this technology that > SGX has the ability to be a bit of a Pandora's box and it seems to be >

[PATCH] staging:comedi:Use unsigned int instead of unsigned

2016-05-03 Thread Nikita Eshkeev
This patch fixed the checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Nikita Eshkeev --- drivers/staging/comedi/comedi.h | 2 +- drivers/staging/comedi/drivers/comedi_bond.c | 10 +-

Re: [PATCH v2] vme: change LM callback argument to void pointer

2016-05-03 Thread Aaron Sierra
- Original Message - > From: "Dan Carpenter" > To: "Alessio Igor Bogani" > Sent: Tuesday, May 3, 2016 8:18:38 AM > > On Tue, May 03, 2016 at 02:52:54PM +0200, Alessio Igor Bogani wrote: > > Dan, > > > > On 30 April 2016 at 12:16,

Re: [PATCH v2] vme: change LM callback argument to void pointer

2016-05-03 Thread Alessio Igor Bogani
Dan, On 30 April 2016 at 12:16, Dan Carpenter wrote: > On Fri, Apr 29, 2016 at 04:41:02PM -0500, Aaron Sierra wrote: >> There appear to be no in-kernel callers of vme_lm_attach (or >> vme_lme_request for that matter), so this change only affects the VME >> subsystem and

Re: [PATCH 00/19] staging: comedi: mite: final cleanup

2016-05-03 Thread Ian Abbott
On 02/05/16 18:11, H Hartley Sweeten wrote: This "driver" is not a actually a comedi driver. It's a helper module that handles DMA for the National Instruments boards that use the MITE ASIC. This series is mostly an aesthetic cleanup that shortens the long struct names and the members of the

Re: [PATCH 10/19] staging: comedi: mite: use prefered form for passing a struct size

2016-05-03 Thread Ian Abbott
On 02/05/16 18:11, H Hartley Sweeten wrote: Add a local variable to mite_buf_change() so that the prefered form of passing a struct size, sizeof(*p), can be used. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

Re: [PATCH 0/6] Intel Secure Guard Extensions

2016-05-03 Thread Dr. Greg Wettstein
On May 2, 11:37am, "Austin S. Hemmelgarn" wrote: } Subject: Re: [PATCH 0/6] Intel Secure Guard Extensions Good morning, I hope the day is starting out well for everyone. > On 2016-04-29 16:17, Jarkko Sakkinen wrote: > > On Tue, Apr 26, 2016 at 09:00:10PM +0200, Pavel Machek wrote: > >> On Mon