Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-07 Thread Nicholas A. Bellinger
Hi Elena, On Mon, 2017-03-06 at 16:21 +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations

Re: [PATCH] storvsc: workaround for virtual DVD SCSI version

2017-03-07 Thread Hannes Reinecke
On 03/07/2017 06:15 PM, Stephen Hemminger wrote: > Hyper-V host emulation of SCSI for virtual DVD device reports SCSI > version 0 (UNKNOWN) but is still capable of supporting REPORTLUN. > > Without this patch, a GEN2 Linux guest on Hyper-V will not boot 4.11 > successfully with virtual DVD ROM de

Re: [PATCH 10/12] staging: ks7010: add variables key, key_index

2017-03-07 Thread Tobin C. Harding
On Wed, Mar 08, 2017 at 08:54:36AM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 02:36:55PM +1100, Tobin C. Harding wrote: > > diff --git a/drivers/staging/ks7010/ks_hostif.c > > b/drivers/staging/ks7010/ks_hostif.c > > index 7dc0d99..7ff5345 100644 > > --- a/drivers/staging/ks7010/ks_host

Re: [PATCH v2] staging: wilc1000: Fix sparse warnings incorrect type assignment

2017-03-07 Thread Dan Carpenter
I think this change is buggy. On Tue, Mar 07, 2017 at 10:36:53PM +0100, Andrea Ghittino wrote: > Fixed sparse warnings related to the conversion of le16 and le32 to u16 and > u32, during the update of internal structures > > Fixed sparse warnings: > drivers/staging/wilc1000//wilc_wfi_cfgoperatio

Re: [PATCH 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-07 Thread Dan Carpenter
On Sun, Mar 05, 2017 at 03:22:33AM +0800, Cheah Kok Cheong wrote: > If comedi module is loaded with the following max allowed parameter > [comedi_num_legacy_minors=48], subsequent loading of an auto-configured > device will fail. Don't set comedi_num_legacy_minors=48, then? This doesn't seem like

Re: [PATCH 08/12] staging: ks7010: fix spelling of Michael MIC

2017-03-07 Thread Dan Carpenter
On Wed, Mar 08, 2017 at 02:36:53PM +1100, Tobin C. Harding wrote: > Various symbols are named 'michel*'. The keyed hash function name is > spelled 'Michael'. > > Rename symbols michel -> michael. > > Signed-off-by: Tobin C. Harding > --- > drivers/staging/ks7010/ks_hostif.c | 16 -

Re: [PATCH 10/12] staging: ks7010: add variables key, key_index

2017-03-07 Thread Dan Carpenter
On Wed, Mar 08, 2017 at 02:36:55PM +1100, Tobin C. Harding wrote: > diff --git a/drivers/staging/ks7010/ks_hostif.c > b/drivers/staging/ks7010/ks_hostif.c > index 7dc0d99..7ff5345 100644 > --- a/drivers/staging/ks7010/ks_hostif.c > +++ b/drivers/staging/ks7010/ks_hostif.c > @@ -318,6 +318,8 @@ int

Re: [PATCH] staging: comedi: cb_pcidas64: move loop invariant

2017-03-07 Thread Tobin C. Harding
On Wed, Mar 08, 2017 at 12:26:27AM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 08:18:50AM +1100, Tobin C. Harding wrote: > > On Tue, Mar 07, 2017 at 08:03:16PM +0100, Greg Kroah-Hartman wrote: > > > On Tue, Mar 07, 2017 at 01:29:35PM +1100, Tobin C. Harding wrote: > > > > Loop invariant i

[PATCH 12/12] staging: ks7010: fix checkpatch line over 80

2017-03-07 Thread Tobin C. Harding
Checkpatch emits WARNING: line over 80 characters. Modify the comment without loss of meaning to reduce the length of the line. Clear two warnings with single change. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH 11/12] staging: ks7010: refactor, improve code layout

2017-03-07 Thread Tobin C. Harding
Function hostif_data_indication_wpa() has various sites that can be improved with whitespace refactoring. In particular checkpatch emits WARNING: Avoid multiple line dereference. Also how long lines are broken up may be modified to enhance readability. Checkpatch also emits logical line continuatio

[PATCH 10/12] staging: ks7010: add variables key, key_index

2017-03-07 Thread Tobin C. Harding
'auth_type - 1' is used as an index into a key table. Adding a variable appropriately named simplifies the code and adds meaning when reading. Adding a pointer variable of type struct *kpa_key_t adds to readability by removing the table access each time the key is used. The key index is used to cr

[PATCH 09/12] staging: ks7010: add meaningful buffer names

2017-03-07 Thread Tobin C. Harding
Function contains a buffer named 'buf' and another named RecvMIC. Checkpatch emits WARNING: Avoid CamelCase on the symbol name RecvMIC. Since there are two buffers and we need to rename one of them let's give both of them new names in order to add meaning to code and simplify reading. Change buffe

[PATCH 08/12] staging: ks7010: fix spelling of Michael MIC

2017-03-07 Thread Tobin C. Harding
Various symbols are named 'michel*'. The keyed hash function name is spelled 'Michael'. Rename symbols michel -> michael. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 16 drivers/staging/ks7010/michael_mic.c | 8 drivers/staging/ks7010/mi

[PATCH 06/12] staging: ks7010: factor out WPA code

2017-03-07 Thread Tobin C. Harding
Function hostif_data_indication() is approx 200 lines long. Function has many local variables. WPA code is contained and may be factored out into a separate function. This will reduce the length and complexity of hostif_data_indication(). At times within the WPA code errors result in the function r

[PATCH 07/12] staging: ks7010: reduce level of indentation

2017-03-07 Thread Tobin C. Harding
Indentation may be reduced by inverting if statement conditional and returning. Invert conditional. Return if new conditional evaluates to true. Do not alter program logic. Reduce by one the level of indentation in subsequent code. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_h

[PATCH 05/12] staging: ks7010: remove unnecessary parenthesis

2017-03-07 Thread Tobin C. Harding
Checkpatch emits CHECK: Unnecessary parentheses. Remove unnecessary parentheses. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/st

[PATCH 04/12] staging: ks7010: fix spelling mistake

2017-03-07 Thread Tobin C. Harding
Comment contains misspelled work 'Adress'. Correct spelling: Adress -> Address Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.

[PATCH 03/12] staging: ks7010: replace C types with kernel types

2017-03-07 Thread Tobin C. Harding
Checkpatch emits CHECK prefer kernel type. Source and header file use C standard types uintN_t. Replace C standard types with kernel types. uintN_t -> uN Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 250 +++--- drivers/staging/ks7010/ks_hostif

[PATCH 02/12] staging: ks7010: fix checkpatch CONSTANT_COMPARISON

2017-03-07 Thread Tobin C. Harding
Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move comparison constant to the right side of the test. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[PATCH 00/12] refactor hostif_data_indication()

2017-03-07 Thread Tobin C. Harding
Checkpatch emits a bunch of checkpatch warnings, errors and checks when parsing ks_hostif.c and ks_hostif.h The First five patches of this set do general clean up, fixing various warnings along the way. Patch #1 fixes checkpatch warnings/errors relating to misplaced spaces. Patch #2, #3, #4 fix

[PATCH 01/12] staging: ks7010: fix checkpatch whitespace warnings

2017-03-07 Thread Tobin C. Harding
Checkpatch emits various warnings/errors pointing to misplaced spaces. - trailing whitespace - please, no spaces at the start of a line - please, no space before tabs - Unnecessary space before function pointer arguments - unnecessary whitespace before a quoted newline - code indent should use tab

[PATCH V5 2/2] staging: vchiq_arm: Disable ability to dump memory by default

2017-03-07 Thread Michael Zoran
vc04_services has an ioctl interface to dump arbitrary memory to a custom debug log. This is typically only needed by diagnostic tools, and can potentially be a security issue if the devtmpfs node doesn't have adequate permissions set. Since the ability to dump memory still has debugging value, c

[PATCH V5 0/2] staging: vchiq_arm: Add compatibility wrappers for ioctls

2017-03-07 Thread Michael Zoran
Here is V5 of the changes to add 32 compatibility to vc04_services as required by 32 bit only operating systems such as Raspbian which is the preferred system for the Raspberry PI. Changes: V1 - Complete rewrite of the ioctl code. V2 - Rewrite of only ioctls that change

[PATCH V5 1/2] staging: vchiq_arm: Add compatibility wrappers for ioctls

2017-03-07 Thread Michael Zoran
This patch adds compatibility wrappers for the ioctls exposed by vchiq/vc04_services. The compat ioctls are completely implemented on top of the native ioctls. No existing lines are modified. While the ideal approach would be to cleanup the existing code, this path is simplier and easier to revi

Re: [PATCH] storvsc: workaround for virtual DVD SCSI version

2017-03-07 Thread Martin K. Petersen
> "Stephen" == Stephen Hemminger writes: Stephen, Stephen> Hyper-V host emulation of SCSI for virtual DVD device reports Stephen> SCSI version 0 (UNKNOWN) but is still capable of supporting Stephen> REPORTLUN. Stephen> Without this patch, a GEN2 Linux guest on Hyper-V will not boot Stephen>

Re: [PATCH 1/3] staging: rtl8188eu: wrap macro parameters in parentheses

2017-03-07 Thread Sebastian Haas
On Tue, Mar 07, 2017 at 11:06:48PM +0300, Dan Carpenter wrote: > On Sat, Mar 04, 2017 at 11:05:58PM +0100, Sebastian Haas wrote: > > diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h > > b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h > > index 9330361..ca9db14 100644 > > --- a/driv

Re: [PATCH] storvsc: workaround for virtual DVD SCSI version

2017-03-07 Thread Christoph Hellwig
Thanks Stephen, this looks good to me: Reviewed-by: Christoph Hellwig ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: unisys: fix sparse warnings

2017-03-07 Thread Andrea Ghittino
On Tue, Mar 07, 2017 at 11:17:36PM +0300, Dan Carpenter wrote: > On Sat, Mar 04, 2017 at 06:20:50PM +0100, Andrea Ghittino wrote: > > Sparse generates two warnings related to incorrect type in assignment. > > This patch changes the types in the struct defined in unisys > > Can you post the Sparse

[PATCH v2] staging: wilc1000: Fix sparse warnings incorrect type assignment

2017-03-07 Thread Andrea Ghittino
Fixed sparse warnings related to the conversion of le16 and le32 to u16 and u32, during the update of internal structures Fixed sparse warnings: drivers/staging/wilc1000//wilc_wfi_cfgoperations.c:2011:52: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000//wilc

Re: [PATCH] staging: comedi: cb_pcidas64: move loop invariant

2017-03-07 Thread Dan Carpenter
On Wed, Mar 08, 2017 at 08:18:50AM +1100, Tobin C. Harding wrote: > On Tue, Mar 07, 2017 at 08:03:16PM +0100, Greg Kroah-Hartman wrote: > > On Tue, Mar 07, 2017 at 01:29:35PM +1100, Tobin C. Harding wrote: > > > Loop invariant is inside the loop so code checks invariant on each > > > iteration of t

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Dan Carpenter
On Wed, Mar 08, 2017 at 08:06:31AM +1100, Tobin C. Harding wrote: > On Tue, Mar 07, 2017 at 08:03:51PM +0300, Dan Carpenter wrote: > > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > > > @@ -419,17 +411,14 @@ static int dgnc_init_one(struct pci_dev *pdev, > > > const struct pci

Re: [PATCH] staging: comedi: cb_pcidas64: move loop invariant

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:03:16PM +0100, Greg Kroah-Hartman wrote: > On Tue, Mar 07, 2017 at 01:29:35PM +1100, Tobin C. Harding wrote: > > Loop invariant is inside the loop so code checks invariant on each > > iteration of the loop. Invariant can be moved outside of the loop so > > it is only chec

Re: [PATCH 3/3] staging: ks7010: add additional goto target

2017-03-07 Thread Dan Carpenter
On Wed, Mar 08, 2017 at 08:10:44AM +1100, Tobin C. Harding wrote: > On Tue, Mar 07, 2017 at 08:19:03PM +0300, Dan Carpenter wrote: > > On Tue, Mar 07, 2017 at 09:31:16AM +1100, Tobin C. Harding wrote: > > @@ -610,12 +610,7 @@ static void ks_sdio_interrupt(struct sdio_func *func) > > >

Re: [PATCH 3/3] staging: ks7010: add additional goto target

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:19:03PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 09:31:16AM +1100, Tobin C. Harding wrote: > @@ -610,12 +610,7 @@ static void ks_sdio_interrupt(struct sdio_func *func) > > if (atomic_read(&priv->psstatus.status) == > > PS_SNOOZE)

Re: [PATCH 3/4] staging: dgnc: audit goto's in dgnc_tty

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:08:44PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 05:33:08PM +1100, Tobin C. Harding wrote: > > @@ -1668,20 +1669,20 @@ static int dgnc_tty_tiocmget(struct tty_struct *tty) > > { > > struct channel_t *ch; > > struct un_t *un; > > - int result = -EIO

Re: [PATCH 2/4] staging: dgnc: audit goto's in dgnc_mgmt

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:05:10PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 05:33:07PM +1100, Tobin C. Harding wrote: > > + /* Only allow 1 open at a time on mgmt device */ > > + if (dgnc_mgmt_in_use[minor]) { > > + rc = -EBUSY; > > + goto out; > > + } > > +

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:03:51PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > > @@ -419,17 +411,14 @@ static int dgnc_init_one(struct pci_dev *pdev, const > > struct pci_device_id *ent) > > brd->dpastatus = BD_RUNNING; > > > > dgnc_b

Re: [PATCH] staging: unisys: fix sparse warnings

2017-03-07 Thread Dan Carpenter
On Sat, Mar 04, 2017 at 06:20:50PM +0100, Andrea Ghittino wrote: > Sparse generates two warnings related to incorrect type in assignment. > This patch changes the types in the struct defined in unisys Can you post the Sparse warning? Otherwise when I'm reviewing this code I have to re-run Sparse

Re: [PATCH 1/3] staging: rtl8188eu: wrap macro parameters in parentheses

2017-03-07 Thread Dan Carpenter
On Sat, Mar 04, 2017 at 11:05:58PM +0100, Sebastian Haas wrote: > diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h > b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h > index 9330361..ca9db14 100644 > --- a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h > +++ b/drivers/staging/rtl8

Re: [PATCH 17/29] drivers, pci: convert hv_pci_dev.refs from atomic_t to refcount_t

2017-03-07 Thread Stephen Hemminger
On Mon, 6 Mar 2017 15:38:29 -0600 Bjorn Helgaas wrote: > [+cc Hyper-V folks, -cc others] > > On Mon, Mar 06, 2017 at 04:21:04PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. Thi

Re: [PATCH 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

2017-03-07 Thread Greg KH
On Sun, Mar 05, 2017 at 03:22:32AM +0800, Cheah Kok Cheong wrote: > Change to unsigned to allow removal of negative value check in > init section. Why? > Use smaller data type since the max possible value currently is 48. Does it matter? thanks, greg k-h ___

Re: [PATCH 10/29] drivers, md: convert stripe_head.count from atomic_t to refcount_t

2017-03-07 Thread Shaohua Li
On Mon, Mar 06, 2017 at 04:20:57PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. >

Re: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init

2017-03-07 Thread Bjorn Helgaas
On Thu, Feb 16, 2017 at 03:38:05PM +0100, Thomas Gleixner wrote: > On Thu, 16 Feb 2017, Bjorn Helgaas wrote: > > On Wed, Feb 15, 2017 at 10:16:32PM +0100, Thomas Gleixner wrote: > > > > > I think I suggested to Jiang to do that 'update with default functions' to > > > > > > - avoid exporting the

Re: [PATCH 08/29] drivers, md: convert mddev.active from atomic_t to refcount_t

2017-03-07 Thread Shaohua Li
On Mon, Mar 06, 2017 at 04:20:55PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. L

Re: [PATCH] staging: comedi: cb_pcidas64: move loop invariant

2017-03-07 Thread Greg Kroah-Hartman
On Tue, Mar 07, 2017 at 01:29:35PM +1100, Tobin C. Harding wrote: > Loop invariant is inside the loop so code checks invariant on each > iteration of the loop. Invariant can be moved outside of the loop so > it is only checked once. > > Move loop invariant outside of for loop. But does it really

[PATCH v2 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-07 Thread Cheah Kok Cheong
If comedi module is loaded with the following max allowed parameter [comedi_num_legacy_minors=48], subsequent loading of an auto-configured device will fail at auto-configuration. If there's no fall back in place then module loading will fail. In this case, a default to auto-configure comedi_test

[PATCH v2 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

2017-03-07 Thread Cheah Kok Cheong
Change to unsigned to allow removal of negative value check in init section. Use smaller data type since the max possible value currently is 48. Signed-off-by: Cheah Kok Cheong --- V2: -No changes. drivers/staging/comedi/comedi_fops.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-

Re: [PATCH 3/3] staging: sm750fb: Alignment should match open parenthesis

2017-03-07 Thread Dan Carpenter
On Sun, Mar 05, 2017 at 04:54:50PM +0530, Arushi Singhal wrote: > @@ -147,18 +146,18 @@ static int programModeRegisters(mode_parameter_t > *pModeParam, > PANEL_HORIZONTAL_SYNC_START_MASK)); > > poke32(PANEL_VERTICAL_TOTAL, > - (((pM

Re: [PATCH 1/3] staging: sm750fb: fixes add blank line after function/struct/union/enum declarations

2017-03-07 Thread Dan Carpenter
On Sun, Mar 05, 2017 at 04:54:48PM +0530, Arushi Singhal wrote: > This patch fixes the warnings reported by checkpatch.pl > for please use a blank line after function/struct/union/enum > declarations. > > Signed-off-by: Arushi Singhal > --- > drivers/staging/sm750fb/ddk750_display.h | 1 + > dri

Re: [PATCH] Staging: wlan-ng: hfa384x.h: fixed a newline coding style issue

2017-03-07 Thread Dan Carpenter
On Tue, Mar 07, 2017 at 12:36:46PM -0500, Mark Stenglein wrote: > All, > > Thanks for the feedback. Trying to introduce myself and in retrospect > this seems to be a fairly non-productive way to go about it. Apologies > for any time lost. > It's fine. I'm just rushing through patches as fast as

Re: [PATCH] Staging: wlan-ng: hfa384x.h: fixed a newline coding style issue

2017-03-07 Thread Mark Stenglein
All, Thanks for the feedback. Trying to introduce myself and in retrospect this seems to be a fairly non-productive way to go about it. Apologies for any time lost. Best, Mark Stenglein On Tue, Mar 07, 2017 at 08:31:13PM +0300, Dan Carpenter wrote: > On Sun, Mar 05, 2017 at 09:09:12PM -0500, Mar

[PATCH] Staging: rtl8192u: clean up some white space issues

2017-03-07 Thread Elia Geretto
This patch fixes two coding style errors, reported by the checkpatch script. Signed-off-by: Elia Geretto --- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_co

Re: [PATCH] Staging: wlan-ng: hfa384x.h: fixed a newline coding style issue

2017-03-07 Thread Dan Carpenter
On Sun, Mar 05, 2017 at 09:09:12PM -0500, Mark Stenglein wrote: > Fixed a coding style issue. > > Signed-off-by: Mark Stenglein > --- > drivers/staging/wlan-ng/hfa384x.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/wlan-ng/hfa384x.h > b/drivers/staging/wlan-ng/hfa38

Re: [PATCH 1/1] Fix coding style errors

2017-03-07 Thread Dan Carpenter
Resend with a better subject. [PATCH] Staging: rtl8192u: clean up some white space issues regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: wilc1000: Fix sparse warnings incorrect type assignment

2017-03-07 Thread Dan Carpenter
On Tue, Mar 07, 2017 at 08:23:04PM +0300, Dan Carpenter wrote: > This commit doesn't tell me if you though about what you are doing at > all. We get so many commits where people just randomly do random endian > things... Did you think about this? Could you resend with a better > commit message?

Re: [PATCH] staging: wilc1000: Fix sparse warnings incorrect type assignment

2017-03-07 Thread Dan Carpenter
On Mon, Mar 06, 2017 at 10:11:21PM +0100, Andrea Ghittino wrote: > Fixed sparse warnings > drivers/staging/wilc1000//wilc_wfi_cfgoperations.c:2011:52: warning: > incorrect type in assignment (different base types) > drivers/staging/wilc1000//wilc_wfi_cfgoperations.c:2011:52:expected > unsigne

Re: [PATCH 3/4] staging: dgnc: audit goto's in dgnc_tty

2017-03-07 Thread Dan Carpenter
On Tue, Mar 07, 2017 at 05:33:08PM +1100, Tobin C. Harding wrote: > @@ -1375,7 +1378,7 @@ static int dgnc_tty_chars_in_buffer(struct tty_struct > *tty) > ushort thead; > ushort ttail; > uint tmask; > - uint chars = 0; > + uint chars; > unsigned long flags; > >

Re: [PATCH 3/3] staging: ks7010: add additional goto target

2017-03-07 Thread Dan Carpenter
On Tue, Mar 07, 2017 at 09:31:16AM +1100, Tobin C. Harding wrote: @@ -610,12 +610,7 @@ static void ks_sdio_interrupt(struct sdio_func *func) > if (atomic_read(&priv->psstatus.status) == > PS_SNOOZE) { > if (cnt_txqbody(priv)) { >

RE: [PATCH] storvsc: workaround for virtual DVD SCSI version

2017-03-07 Thread KY Srinivasan
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Tuesday, March 7, 2017 9:16 AM > To: KY Srinivasan ; Haiyang Zhang > ; Long Li ; > martin.peter...@oracle.com; h...@lst.de; h...@suse.de > Cc: linux-s...@vger.kernel.org; linux-ker...@vger.kernel.or

[PATCH] storvsc: workaround for virtual DVD SCSI version

2017-03-07 Thread Stephen Hemminger
Hyper-V host emulation of SCSI for virtual DVD device reports SCSI version 0 (UNKNOWN) but is still capable of supporting REPORTLUN. Without this patch, a GEN2 Linux guest on Hyper-V will not boot 4.11 successfully with virtual DVD ROM device. What happens is that the SCSI scan process falls back

Re: [PATCH] staging: rtl8192e: fix coding style issue, improve error handling

2017-03-07 Thread Dan Carpenter
On Tue, Mar 07, 2017 at 12:39:40PM +0530, Suniel Mahesh wrote: > Fix coding style issue and comments in rtl_core.c > Return -ENOMEM, if it is out of memory > Pointer comparison with NULL replaced by logical NOT > Split it up into 3 commits. regards, dan carpenter ___

Re: [PATCH v2 0/4] staging: dgnc: remove goto task from TODO list

2017-03-07 Thread Dan Carpenter
Better to always wait overnight before sending a v2. ;) regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 3/4] staging: dgnc: audit goto's in dgnc_tty

2017-03-07 Thread Dan Carpenter
On Tue, Mar 07, 2017 at 05:33:08PM +1100, Tobin C. Harding wrote: > @@ -1668,20 +1669,20 @@ static int dgnc_tty_tiocmget(struct tty_struct *tty) > { > struct channel_t *ch; > struct un_t *un; > - int result = -EIO; > + int rc = -EIO; > unsigned char mstat = 0; > uns

Re: [PATCH 2/4] staging: dgnc: audit goto's in dgnc_mgmt

2017-03-07 Thread Dan Carpenter
On Tue, Mar 07, 2017 at 05:33:07PM +1100, Tobin C. Harding wrote: > + /* Only allow 1 open at a time on mgmt device */ > + if (dgnc_mgmt_in_use[minor]) { > + rc = -EBUSY; > + goto out; > + } > + dgnc_mgmt_in_use[minor]++; > > +out: Better to use "unlock" i

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Dan Carpenter
On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > @@ -419,17 +411,14 @@ static int dgnc_init_one(struct pci_dev *pdev, const > struct pci_device_id *ent) > brd->dpastatus = BD_RUNNING; > > dgnc_board[dgnc_num_boards++] = brd; > - > return 0; > There's nothi

[staging:staging-next 261/261] drivers/staging/built-in.o:(.bss+0x109d0): multiple definition of `dbg_level'

2017-03-07 Thread kbuild test robot
Hi Greg, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next head: 25016567be26887232aa3f6fd0d0116356691cc3 commit: 25016567be26887232aa3f6fd0d0116356691cc3 [261/261] staging: atomisp: fix include Makefile mess config

Re: [RFC PATCH v2 08/32] x86: Use PAGE_KERNEL protection for ioremap of memory page

2017-03-07 Thread Borislav Petkov
On Thu, Mar 02, 2017 at 10:13:32AM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > In order for memory pages to be properly mapped when SEV is active, we > need to use the PAGE_KERNEL protection attribute as the base protection. > This will insure that memory mapping of, e.g. ACPI tables, re

RE: [PATCH 13/29] drivers, media: convert vb2_vmarea_handler.refcount from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> Hi Elena, > > On Mon, Mar 06, 2017 at 04:21:00PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-af

RE: [PATCH 12/29] drivers, media: convert s2255_dev.num_channels from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> Hi Elena, > > On Mon, Mar 06, 2017 at 04:20:59PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-a

RE: [PATCH] staging: unisys: fix sparse warnings

2017-03-07 Thread Kershner, David A
> -Original Message- > From: Andrea Ghittino [mailto:aghitt...@gmail.com] > Sent: Saturday, March 4, 2017 12:21 PM > To: de...@driverdev.osuosl.org; Kershner, David A > ; gre...@linuxfoundation.org; *S-Par- > Maintainer ; linux-ker...@vger.kernel.org > Subject: [PATCH] staging: unisys: fi

Re: [RFC PATCH v2 07/32] x86/efi: Access EFI data as encrypted when SEV is active

2017-03-07 Thread Borislav Petkov
On Thu, Mar 02, 2017 at 10:13:21AM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > EFI data is encrypted when the kernel is run under SEV. Update the > page table references to be sure the EFI memory areas are accessed > encrypted. > > Signed-off-by: Tom Lendacky > Signed-off-by: Brijesh S

Re: [RFC PATCH v2 02/32] x86: Secure Encrypted Virtualization (SEV) support

2017-03-07 Thread Borislav Petkov
On Thu, Mar 02, 2017 at 10:12:20AM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > Provide support for Secure Encyrpted Virtualization (SEV). This initial > support defines a flag that is used by the kernel to determine if it is > running with SEV active. > > Signed-off-by: Tom Lendacky B

Re: [RFC PATCH v2 05/32] x86: Use encrypted access of BOOT related data with SEV

2017-03-07 Thread Borislav Petkov
On Thu, Mar 02, 2017 at 10:12:59AM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > When Secure Encrypted Virtualization (SEV) is active, BOOT data (such as > EFI related data, setup data) is encrypted and needs to be accessed as > such when mapped. Update the architecture override in early_m

Re: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Sergei Shtylyov
On 3/7/2017 10:52 AM, Reshetova, Elena wrote: refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshet

Re: [PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-07 Thread Dilger, Andreas
On Mar 6, 2017, at 08:20, James Simmons wrote: > >> >> Doubly linked lists which are iterated using list_empty >> and list_entry macros have been replaced with list_for_each_entry_safe >> macro. >> This makes the iteration simpler and more readable. >> >> This patch replaces the while loop co

[PATCH v2 3/4] staging: dgnc: audit goto's in dgnc_tty

2017-03-07 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_tty.c | 219 1 file changed, 112 insertions(+), 107 d

[PATCH v2 4/4] staging: dgnc: remove item from TODO list

2017-03-07 Thread Tobin C. Harding
TODO file contains task to verify and correct function return sites. Need to check for and implement correct usage of goto's when there is work to be done before returning. Remove task from TODO list after already having completed audit of directory drivers/staging/dgnc. Signed-off-by: Tobin C. H

[PATCH v2 2/4] staging: dgnc: audit goto's in dgnc_mgmt

2017-03-07 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_mgmt.c | 37 - 1 file changed, 20 insertions(+), 17 deleti

[PATCH v2 0/4] staging: dgnc: remove goto task from TODO list

2017-03-07 Thread Tobin C. Harding
TODO file contains task to verify and correct function return sites. Need to check for and implement correct usage of goto's when there is work to be done before returning. Patch series is broken up by file to ease review. Perhaps a single patch would have been more appropriate. Changes to dgnc_m

[PATCH v2 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_driver.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- v1 -> v2: - remove out of place white space change drivers/staging/dgnc/dgnc_driver.c | 23 +--

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 10:28:17AM +0100, Greg Kroah-Hartman wrote: > On Tue, Mar 07, 2017 at 07:57:40PM +1100, Tobin C. Harding wrote: > > On Tue, Mar 07, 2017 at 09:42:53AM +0100, Greg Kroah-Hartman wrote: > > > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > > > > TODO file r

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Greg Kroah-Hartman
On Tue, Mar 07, 2017 at 07:57:40PM +1100, Tobin C. Harding wrote: > On Tue, Mar 07, 2017 at 09:42:53AM +0100, Greg Kroah-Hartman wrote: > > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > > > TODO file requests fix up of error handling. > > > > > > Audit dgnc_driver.c and fix a

Re: [PATCH 1/3] staging: ks7010: remove one level of indentation

2017-03-07 Thread kbuild test robot
/20170307-162643 config: x86_64-randconfig-x018-201710 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): In file included from include/asm-gener

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 09:42:53AM +0100, Greg Kroah-Hartman wrote: > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > > TODO file requests fix up of error handling. > > > > Audit dgnc_driver.c and fix all return paths to be uniform and inline > > with kernel coding style. > >

Re: [PATCH 13/29] drivers, media: convert vb2_vmarea_handler.refcount from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
Hi Elena, On Mon, Mar 06, 2017 at 04:21:00PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > sit

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Greg Kroah-Hartman
On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > TODO file requests fix up of error handling. > > Audit dgnc_driver.c and fix all return paths to be uniform and inline > with kernel coding style. > > Signed-off-by: Tobin C. Harding > --- > drivers/staging/dgnc/dgnc_driver.c |

Re: [PATCH 12/29] drivers, media: convert s2255_dev.num_channels from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
Hi Elena, On Mon, Mar 06, 2017 at 04:20:59PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > sit

Re: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
On Mon, Mar 06, 2017 at 04:20:58PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. >