Re: [PATCH] Staging: octeon-usb: octeon-hcd.c: Remove boiler plate and add SPDX

2018-06-13 Thread Greg KH
On Wed, Jun 13, 2018 at 05:28:25PM -0400, Javier Martinez wrote: > Removed massive boiler plate text at top of the file and instead > replaced it with a simple SPDX license identifier. > > Signed-off-by: Javier Martinez > --- > drivers/staging/octeon-usb/octeon-hcd.c | 47

Re: [PATCH v3] staging: pi433: fix race condition in pi433_ioctl

2018-06-13 Thread kbuild test robot
Hi Hugo, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] [also build test ERROR on v4.17 next-20180613] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

Re: [PATCH v3] staging: pi433: fix race condition in pi433_ioctl

2018-06-13 Thread kbuild test robot
Hi Hugo, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] [also build test ERROR on v4.17 next-20180613] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

Re: [PATCH 2/2] dt-bindings: document gpio-mt7621 bindings

2018-06-13 Thread Sergio Paracuellos
On Wed, Jun 13, 2018 at 01:28:35PM -0600, Rob Herring wrote: > On Wed, Jun 13, 2018 at 10:23 AM, Sergio Paracuellos > wrote: > > Hi Rob, > > > > Thanks for your time in reviewing this. > > > > On Tue, Jun 12, 2018 at 10:56 PM, Rob Herring wrote: > >> On Sat, Jun 02, 2018 at 09:30:10AM +0200,

Re: [PATCH v2] staging: pi433: fix race condition in pi433_ioctl

2018-06-13 Thread Hugo Lefeuvre
Hi Dan, > There is no need for this comment, since it's obvious. Also if you use > simpler names then the copy fits on one line: > > if (copy_from_user(_cfg, argp, sizeof(tx_cfg)) { > > > > + mutex_lock(>tx_fifo_lock); > > + if (copy_from_user(_cfg_buffer,

[PATCH v4] staging: pi433: fix race condition in pi433_ioctl

2018-06-13 Thread Hugo Lefeuvre
In the PI433_IOC_WR_TX_CFG case in pi433_ioctl, instance->tx_cfg is modified via copy_from_user(>tx_cfg, argp, sizeof(struct pi433_tx_cfg))) without any kind of synchronization. In the case where two threads would execute this same command concurrently the tx_cfg field might enter in an

[PATCH v3] staging: pi433: fix race condition in pi433_ioctl

2018-06-13 Thread Hugo Lefeuvre
In the PI433_IOC_WR_TX_CFG case in pi433_ioctl, instance->tx_cfg is modified via copy_from_user(>tx_cfg, argp, sizeof(struct pi433_tx_cfg))) without any kind of synchronization. In the case where two threads would execute this same command concurrently the tx_cfg field might enter in an

RE: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()

2018-06-13 Thread Dexuan Cui
> From: Bjorn Helgaas > Sent: Wednesday, June 13, 2018 15:15 > > ... > > It looks Lorenzo's pci.git tree has not been updated for 3+ weeks. > > I guess Lorenzo may be on vacation. > > > > @Bjorn, can this patch go through your tree? > > Should I resubmit it? > > No need to resubmit it, Lorenzo

Re: [PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-13 Thread Stephen Hemminger
On Wed, 13 Jun 2018 22:03:34 + Yidong Ren wrote: > > From: devel On Behalf > > Of Stephen Hemminger > > > +/* statistics per queue (rx/tx packets/bytes) */ #define > > > +NETVSC_PCPU_STATS_LEN (num_present_cpus() * > > ARRAY_SIZE(pcpu_stats)) > > > > Even though Hyper-V/Azure does not

Re: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()

2018-06-13 Thread Bjorn Helgaas
On Wed, Jun 13, 2018 at 08:32:13PM +, Dexuan Cui wrote: > > From: Dexuan Cui > > Sent: Wednesday, June 6, 2018 17:15 > > To: Haiyang Zhang ; Lorenzo Pieralisi > > ; Bjorn Helgaas ; > > linux-...@vger.kernel.org; KY Srinivasan ; Stephen > > Hemminger ; o...@aepfle.de; > > a...@canonical.com;

RE: [PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-13 Thread Yidong Ren
> From: devel On Behalf > Of Stephen Hemminger > > +/* statistics per queue (rx/tx packets/bytes) */ #define > > +NETVSC_PCPU_STATS_LEN (num_present_cpus() * > ARRAY_SIZE(pcpu_stats)) > > Even though Hyper-V/Azure does not support hot plug cpu's it might be > better to num_cpu_possible to avoid

Re: [PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-13 Thread Stephen Hemminger
On Wed, 13 Jun 2018 12:36:08 -0700 Yidong Ren wrote: > From: Yidong Ren > > This patch implements following ethtool stats fields for netvsc: > cpu_tx/rx_packets/bytes > cpu_vf_tx/rx_packets/bytes > > Corresponding per-cpu counters exist in current code. Exposing these > counters will help

[PATCH] Staging: octeon-usb: octeon-hcd.c: Remove boiler plate and add SPDX

2018-06-13 Thread Javier Martinez
Removed massive boiler plate text at top of the file and instead replaced it with a simple SPDX license identifier. Signed-off-by: Javier Martinez --- drivers/staging/octeon-usb/octeon-hcd.c | 47 ++--- 1 file changed, 2 insertions(+), 45 deletions(-) diff --git

RE: [PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-13 Thread Yidong Ren
> From: Eric Dumazet > You actually want to allocate memory local to this cpu, possibly in one chunk, > not spread all over the places. > > kvmalloc(nr_cpu_ids * sizeof(struct netvsc_ethtool_pcpu_stats)) should be > really better, since it would most of the time be satisfied by a single >

Re: [PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-13 Thread Eric Dumazet
On 06/13/2018 12:36 PM, Yidong Ren wrote: > From: Yidong Ren > > This patch implements following ethtool stats fields for netvsc: > cpu_tx/rx_packets/bytes > cpu_vf_tx/rx_packets/bytes ... > > + pcpu_sum = alloc_percpu(struct netvsc_ethtool_pcpu_stats); > +

Re: [PATCH] Staging: octeon-usb: octeon-hcd.c: style fix line length warning

2018-06-13 Thread Greg KH
On Wed, Jun 13, 2018 at 04:40:15PM -0400, Javier Martinez wrote: > Checkpatch.pl issued a warning in the top of the commment within > octeon-hcd.c. This is a simple style fix for that. > > Signed-off-by: Javier Martinez > --- > drivers/staging/octeon-usb/octeon-hcd.c | 2 +- > 1 file changed, 1

[PATCH] Staging: octeon-usb: octeon-hcd.c: style fix line length warning

2018-06-13 Thread Javier Martinez
Checkpatch.pl issued a warning in the top of the commment within octeon-hcd.c. This is a simple style fix for that. Signed-off-by: Javier Martinez --- drivers/staging/octeon-usb/octeon-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()

2018-06-13 Thread Dexuan Cui
> From: Dexuan Cui > Sent: Wednesday, June 6, 2018 17:15 > To: Haiyang Zhang ; Lorenzo Pieralisi > ; Bjorn Helgaas ; > linux-...@vger.kernel.org; KY Srinivasan ; Stephen > Hemminger ; o...@aepfle.de; > a...@canonical.com; jasow...@redhat.com > Cc: linux-ker...@vger.kernel.org;

[PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-13 Thread Yidong Ren
From: Yidong Ren This patch implements following ethtool stats fields for netvsc: cpu_tx/rx_packets/bytes cpu_vf_tx/rx_packets/bytes Corresponding per-cpu counters exist in current code. Exposing these counters will help troubleshooting performance issues. Signed-off-by: Yidong Ren ---

Re: [PATCH 2/2] dt-bindings: document gpio-mt7621 bindings

2018-06-13 Thread Rob Herring
On Wed, Jun 13, 2018 at 10:23 AM, Sergio Paracuellos wrote: > Hi Rob, > > Thanks for your time in reviewing this. > > On Tue, Jun 12, 2018 at 10:56 PM, Rob Herring wrote: >> On Sat, Jun 02, 2018 at 09:30:10AM +0200, Sergio Paracuellos wrote: >>> Add a devicetree binding documentation for the

Re: [PATCH v4] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-13 Thread Dan Carpenter
On Wed, Jun 13, 2018 at 08:26:43PM +0200, Chris Opperman wrote: > Hi Dan/Ian, > > Noted your comments regarding additional text, thanks! Just curious whether > the "scissors" format given at the link below is valid? > > https://kernelnewbies.org/PatchTipsAndTricks > > It is given as an

[PATCH] Staging: comedi: ssv_dnp: fixed style line length warning

2018-06-13 Thread Javier Martinez
Fixed style line length warning detected by checkpatch.pl in the file ssv_dnp.c. Signed-off-by: Javier Martinez --- drivers/staging/comedi/drivers/ssv_dnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c

[PATCH] Staging: comedi: ssv_dnp: fixed style line length warning

2018-06-13 Thread Javier Martinez
Fixed style line length warning detected by checkpatch.pl in the file ssv_dnp.c. Signed-off-by: Javier Martinez --- drivers/staging/comedi/drivers/ssv_dnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c

Re: [PATCH v5] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-13 Thread Ian Abbott
On 13/06/18 18:14, Chris Opperman wrote: Improve readability of comedi_nsamples_left: a) Reduce nesting by using more return statements. b) Declare variables scans_left and samples_left at start of function. c) Change type of scans_Left to unsigned long long to avoid cast. Signed-off-by: Chris

[PATCH v3] staging: rts5208: add error handling into rtsx_probe

2018-06-13 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then release_everything() will crash on uninitialized dev->cmnd_ready complete. Patch adds error handling into rtsx_probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v3: fix subject and commit

Re: [PATCH v4] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-13 Thread Ian Abbott
On 13/06/18 19:26, Chris Opperman wrote: Hi Dan/Ian, Noted your comments regarding additional text, thanks! Just curious whether the "scissors" format given at the link below is valid? https://kernelnewbies.org/PatchTipsAndTricks It is given as an alternative to placing additional text below

[no subject]

2018-06-13 Thread Anton Vasilyev
Subject: [PATCH v3] staging: rts5208: add error handling into rtsx_probe If rtsx_probe() fails to allocate dev->chip, then release_everything() will crash on uninitialized dev->cmnd_ready complete. Patch adds error handling into rtsx_probe. Found by Linux Driver Verification project

[PATCH v5] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-13 Thread Chris Opperman
Improve readability of comedi_nsamples_left: a) Reduce nesting by using more return statements. b) Declare variables scans_left and samples_left at start of function. c) Change type of scans_Left to unsigned long long to avoid cast. Signed-off-by: Chris Opperman --- Changes v5: a) Moved

Re: [PATCH v2] staging: rts5208: add check on NULL before dereference

2018-06-13 Thread Andy Shevchenko
On Wed, Jun 13, 2018 at 7:55 PM, Anton Vasilyev wrote: > If rtsx_probe() fails to allocate dev->chip, then NULL pointer > dereference occurs at release_everything()->rtsx_release_resources(). > > Found by Linux Driver Verification project (linuxtesting.org). > You forgot to adjust subject and

[PATCH v2] staging: rts5208: add check on NULL before dereference

2018-06-13 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then NULL pointer dereference occurs at release_everything()->rtsx_release_resources(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: Add error handling into rtsx_probe based on Dan Carpenter's

Re: [PATCH v4] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-13 Thread Chris Opperman
Hi Dan/Ian, Noted your comments regarding additional text, thanks! Just curious whether the "scissors" format given at the link below is valid? https://kernelnewbies.org/PatchTipsAndTricks It is given as an alternative to placing additional text below the cut-off line. Kind Regards, Chris

Re: [PATCH 2/2] dt-bindings: document gpio-mt7621 bindings

2018-06-13 Thread Sergio Paracuellos
Hi Rob, Thanks for your time in reviewing this. On Tue, Jun 12, 2018 at 10:56 PM, Rob Herring wrote: > On Sat, Jun 02, 2018 at 09:30:10AM +0200, Sergio Paracuellos wrote: >> Add a devicetree binding documentation for the mt7621 driver. > > Bindings are for h/w, not a driver. You are totally

Re: [PATCH v2 0/3] hwmon: (nct7904) Fix style issues

2018-06-13 Thread Guenter Roeck
On Wed, Jun 13, 2018 at 05:13:22PM +0200, Jakob Albert wrote: > This set of patches fixes style errors reported by checkpatch.pl. This > adapts the code to the coding style. > > Changes since v1: > * Changed patch subjects and descriptions > > > > Jakob Albert (3): > hwmon: (nct7904) Fix

[PATCH v2 3/3] hwmon: (nct7904) Fix UNSPECIFIED_INT warning

2018-06-13 Thread Jakob Albert
Fix UNSPECIFIED_INT warning reported by checkpatch.pl Signed-off-by: Lorenz Kaestle Signed-off-by: Jakob Albert --- v1->v2: Changed patch subject and description drivers/hwmon/nct7904.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/nct7904.c

[PATCH v2 2/3] hwmon: (nct7904) Fix CODE_INDENT error

2018-06-13 Thread Jakob Albert
Fix CODE_INDENT error reported by checkpatch.pl Signed-off-by: Lorenz Kaestle Signed-off-by: Jakob Albert --- v1->v2: Changed patch subject and description drivers/hwmon/nct7904.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff

[PATCH v2 1/3] hwmon: (nct7904) Fix SPACING errors

2018-06-13 Thread Jakob Albert
Fix SPACING errors reported by checkpatch.pl Signed-off-by: Lorenz Kaestle Signed-off-by: Jakob Albert --- v1->v2: Changed patch subject and description drivers/hwmon/nct7904.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/nct7904.c

[PATCH v2 0/3] hwmon: (nct7904) Fix style issues

2018-06-13 Thread Jakob Albert
This set of patches fixes style errors reported by checkpatch.pl. This adapts the code to the coding style. Changes since v1: * Changed patch subjects and descriptions Jakob Albert (3): hwmon: (nct7904) Fix SPACING errors hwmon: (nct7904) Fix CODE_INDENT error hwmon: (nct7904) Fix

Re: [PATCH v4] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-13 Thread Ian Abbott
On 12/06/18 22:09, Chris Opperman wrote: Changes since v3: a) Reverted u64 to unsigned long long and u32 to unsigned int. b) Added patch versioning. c) Changed type of scans_left to unsigned long long to avoid cast. d) Clarified and updated changelog.

RE: [PATCH] staging: lustre: add error handling for try_module_get

2018-06-13 Thread NeilBrown
On Wed, Jun 13 2018, David Laight wrote: > From: Zhouyang Jia >> Sent: 12 June 2018 05:49 >> >> When try_module_get fails, the lack of error-handling code may >> cause unexpected results. >> >> This patch adds error-handling code after calling try_module_get. > ... >> +++

RE: [PATCH] staging: lustre: add error handling for try_module_get

2018-06-13 Thread David Laight
From: Zhouyang Jia > Sent: 12 June 2018 05:49 > > When try_module_get fails, the lack of error-handling code may > cause unexpected results. > > This patch adds error-handling code after calling try_module_get. ... > +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c > @@ -2422,7 +2422,10

Re: [PATCH 2/2] dt-bindings: document gpio-mt7621 bindings

2018-06-13 Thread Dan Carpenter
On Tue, Jun 12, 2018 at 02:56:38PM -0600, Rob Herring wrote: > Bindings are for h/w, not a driver. > > > Signed-off-by: Sergio Paracuellos > > Reviewed-by: NeilBrown > > Space ^ Pretty sure that was deliberate... Otherwise he's been making that same mistake for over a decade

Re: [PATCH v4] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-13 Thread Dan Carpenter
So close... On Tue, Jun 12, 2018 at 11:09:44PM +0200, Chris Opperman wrote: > Changes since v3: > a) Reverted u64 to unsigned long long and u32 to unsigned int. > b) Added patch versioning. > c) Changed type of scans_left to unsigned long long to avoid cast. > d) Clarified and updated

Re: [PATCH v2] staging: pi433: fix race condition in pi433_ioctl

2018-06-13 Thread Dan Carpenter
On Tue, Jun 12, 2018 at 09:47:41PM -0400, Hugo Lefeuvre wrote: > drivers/staging/pi433/pi433_if.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/pi433/pi433_if.c > b/drivers/staging/pi433/pi433_if.c > index b061f77dda41..3ec1ed01d04b 100644

Re: [PATCH v2] staging: pi433: fix race condition in pi433_ioctl

2018-06-13 Thread Dan Carpenter
On Tue, Jun 12, 2018 at 09:47:41PM -0400, Hugo Lefeuvre wrote: > In the PI433_IOC_WR_TX_CFG case in pi433_ioctl, instance->tx_cfg is > modified via > > copy_from_user(>tx_cfg, argp, sizeof(struct pi433_tx_cfg))) > > without any kind of synchronization. In the case where two threads > would

Re: [PATCH v5 2/4] resource: Use list_head to link sibling resource

2018-06-13 Thread Baoquan He
On 06/12/18 at 05:10pm, Julia Lawall wrote: > This looks wrong. After a list iterator, the index variable points to a > dummy structure. > > julia > > url: > https://github.com/0day-ci/linux/commits/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600 > :: branch