Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Julia Lawall
> > diff --git a/drivers/net/ethernet/ti/cpsw.c > > b/drivers/net/ethernet/ti/cpsw.c > > index 3409e80..6a76992 100644 > > --- a/drivers/net/ethernet/ti/cpsw.c > > +++ b/drivers/net/ethernet/ti/cpsw.c > > @@ -2448,8 +2448,10 @@ static int cpsw_probe(struct platform_device *pdev) > > > > /* RX

Re: [PATCH net-next 3/4] soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF

2015-12-26 Thread Craig Gallek
On Thu, Dec 24, 2015 at 11:36 AM, Alexei Starovoitov wrote: > On Tue, Dec 22, 2015 at 03:05:09PM -0500, Craig Gallek wrote: >> From: Craig Gallek >> >> Expose socket options for setting a classic or extended BPF program >> for use when selecting

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Sergei Shtylyov
Hello. On 12/26/2015 08:50 PM, Sergei Shtylyov wrote: diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 3409e80..6a76992 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2448,8 +2448,10 @@ static int cpsw_probe(struct

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Sergei Shtylyov
On 12/26/2015 11:07 PM, Julia Lawall wrote: diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 3409e80..6a76992 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2448,8 +2448,10 @@ static int cpsw_probe(struct platform_device

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Julia Lawall
On Sat, 26 Dec 2015, Sergei Shtylyov wrote: > Hello. > > On 12/26/2015 08:50 PM, Sergei Shtylyov wrote: > > > > > > diff --git a/drivers/net/ethernet/ti/cpsw.c > > > > > b/drivers/net/ethernet/ti/cpsw.c > > > > > index 3409e80..6a76992 100644 > > > > > --- a/drivers/net/ethernet/ti/cpsw.c > > >

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Sergei Shtylyov
Hello. On 12/26/2015 6:28 PM, Julia Lawall wrote: Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return

Re: [PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Sergei Shtylyov
On 12/26/2015 8:40 PM, Julia Lawall wrote: diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 3409e80..6a76992 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2448,8 +2448,10 @@ static int cpsw_probe(struct platform_device

[PATCH v2] wl1251: add sysfs interface for bluetooth coexistence mode configuration

2015-12-26 Thread Pali Rohár
Port the bt_coex_mode sysfs interface from wl1251 driver version included in the Maemo Fremantle kernel to allow bt-coexistence mode configuration. This enables userspace applications to set one of the modes WL1251_BT_COEX_OFF, WL1251_BT_COEX_ENABLE and WL1251_BT_COEX_MONOAUDIO. The default mode

[PATCH 6/7] drivers: net: cpsw: fix error return code

2015-12-26 Thread Julia Lawall
Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when !=

[PATCH 0/7] fix error return code

2015-12-26 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @ok exists@ identifier f,ret,i; expression e; constant c; @@ // identify a function that returns a negative return value at least once. f(...) { ... when any ( return -c@i; | ret = -c@i; ... when

[PATCH 6/7 v2] drivers: net: cpsw: fix error return code

2015-12-26 Thread Julia Lawall
Propagate the return value of platform_get_irq on failure. A simplified version of the semantic match that finds the two cases where no error code is returned at all is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return

Re: [PATCH/RFC v2 net-next] ravb: Add dma queue interrupt support

2015-12-26 Thread Yoshihiro Kaneko
Hello, 2015-12-23 0:02 GMT+09:00 Sergei Shtylyov : > Hello. > > On 12/20/2015 12:15 PM, Yoshihiro Kaneko wrote: > >> From: Kazuya Mizuguchi >> >> This patch supports the following interrupts. >> >> - One interrupt for multiple

Re: Small improvements for the at803x PHY driver

2015-12-26 Thread Mason
[ CCing people who might be interested in this patch series ] On 26/12/2015 01:26, Martin Blumenstingl wrote: > while trying to debug a problem on a board with an AR8030 PHY (which turned > out to be an incorrectly configured MDC clock) I made a few changes to the > at803x driver. > Due to lack

Re: [PATCH 4/6] bpf: hash: convert per-hashtable lock into per-bucket bit spinlock

2015-12-26 Thread Ming Lei
On Fri, Dec 18, 2015 at 2:20 PM, Alexei Starovoitov wrote: > On Wed, Dec 16, 2015 at 02:58:08PM +0800, Ming Lei wrote: >> On Wed, Dec 16, 2015 at 1:01 PM, Yang Shi wrote: >> >> > >> > I recalled Steven confirmed raw_spin_lock has the lockdep

[PATCH 0/3] bpf: hash: use per-bucket spinlock

2015-12-26 Thread Ming Lei
Hi, This patchset tries to optimize ebpf hash map, and follows the idea: Both htab_map_update_elem() and htab_map_delete_elem() can be called from eBPF program, and they may be in kernel hot path, it isn't efficient to use a per-hashtable lock in this two helpers,

[PATCH 3/3] bpf: hash: use per-bucket spinlock

2015-12-26 Thread Ming Lei
From: Ming Lei Both htab_map_update_elem() and htab_map_delete_elem() can be called from eBPF program, and they may be in kernel hot path, so it isn't efficient to use a per-hashtable lock in this two helpers. The per-hashtable spinlock is used just for protecting

[PATCH 1/3] bpf: hash: use atomic count

2015-12-26 Thread Ming Lei
Preparing for removing global per-hashtable lock, so the counter need to be defined as aotmic_t first. Signed-off-by: Ming Lei --- kernel/bpf/hashtab.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/bpf/hashtab.c

[PATCH] RFKill airplane mode LED trigger

2015-12-26 Thread João Paulo Rechi Vita
This patch adds a LED trigger to drive the airplane mode LED present in some modern laptops. It will be used by the asus-wireless platform driver, which is currently under review on platform-driver-...@vger.kernel.org (the idea was mainly approved, but I'm addressing some comments by the

[PATCH] net/rfkill: Create "airplane mode" LED trigger

2015-12-26 Thread João Paulo Rechi Vita
For platform drivers to be able to correctly drive the "Airplane Mode" indicative LED there needs to be a RFKill LED trigger tied to the global state of RFKILL_TYPE_ALL (instead of to a specific RFKill) and that works in an inverted manner of regular RFKill LED triggers, that is, the LED is ON

[PATCH 2/3] bpf: hash: move select_bucket() out of htab's spinlock

2015-12-26 Thread Ming Lei
The spinlock is just used for protecting the per-bucket hlist, so it isn't needed for selecting bucket. Signed-off-by: Ming Lei --- kernel/bpf/hashtab.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c

[PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread Julia Lawall
The error return value of platform_get_irq seems to often get dropped. Signed-off-by: Julia Lawall --- v2: Check for the direct return case also. Added some mailing lists of common offenders. diff --git a/scripts/coccinelle/api/platform_get_irq_return.cocci

Re: [PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread Julia Lawall
On Sun, 27 Dec 2015, Sergei Shtylyov wrote: > On 12/26/2015 11:58 PM, Julia Lawall wrote: > > > The error return value of platform_get_irq seems to often get dropped. > > > > Signed-off-by: Julia Lawall > > > > --- > > > > v2: Check for the direct return case also.

Re: [PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread Sergei Shtylyov
On 12/27/2015 01:32 AM, Julia Lawall wrote: The error return value of platform_get_irq seems to often get dropped. Signed-off-by: Julia Lawall --- v2: Check for the direct return case also. Added some mailing lists of common offenders. diff --git

Re: [PATCH/RFC v2 net-next] ravb: Add dma queue interrupt support

2015-12-26 Thread Sergei Shtylyov
Hello. On 12/26/2015 02:26 PM, Yoshihiro Kaneko wrote: From: Kazuya Mizuguchi This patch supports the following interrupts. - One interrupt for multiple (descriptor, error, management) - One interrupt for emac - Four interrupts for dma queue (best effort

Re: [PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread Sergei Shtylyov
On 12/26/2015 11:58 PM, Julia Lawall wrote: The error return value of platform_get_irq seems to often get dropped. Signed-off-by: Julia Lawall --- v2: Check for the direct return case also. Added some mailing lists of common offenders. diff --git

Re: [PATCH 3/4] net: phy: at803x: Clean up duplicate register definitions

2015-12-26 Thread Florian Fainelli
Le 25/12/2015 16:27, Martin Blumenstingl a écrit : > Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli > --- > drivers/net/phy/at803x.c | 19 +++ > 1 file changed, 11 insertions(+), 8 deletions(-) > >

Re: [PATCH 2/4] net: phy: at803x: Allow specifying the RGMII RX clock delay via phy mode

2015-12-26 Thread Florian Fainelli
Le 25/12/2015 16:27, Martin Blumenstingl a écrit : > at803x currently automatically enables the RGMII TX clock delay when the > phy interface mode is PHY_INTERFACE_MODE_RGMII_TXID. The same should be > done when PHY_INTERFACE_MODE_RGMII_ID is specified. > Use a similar logic to enable the RGMII RX

Re: [PATCH 4/4] net: phy: at803x: Add the interrupt register bit definitions

2015-12-26 Thread Florian Fainelli
Le 25/12/2015 16:27, Martin Blumenstingl a écrit : > Also use them instead of a magic value when enabling the interrupts. > > Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli > --- > drivers/net/phy/at803x.c | 32

Re: Small improvements for the at803x PHY driver

2015-12-26 Thread Florian Fainelli
Le 26/12/2015 03:57, Mason a écrit : > [ CCing people who might be interested in this patch series ] > > On 26/12/2015 01:26, Martin Blumenstingl wrote: > >> while trying to debug a problem on a board with an AR8030 PHY (which turned >> out to be an incorrectly configured MDC clock) I made a few

Re: [PATCH 1/4] net: phy: at803x: Don't set gbit features for the AR8030 phy

2015-12-26 Thread Florian Fainelli
Le 25/12/2015 16:26, Martin Blumenstingl a écrit : > The 8030 is only a "RMII Fast Ethernet PHY", thus it must not have the > SUPPORTED_1000* bits set. > > Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli > --- >

Re: [PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread Julia Lawall
>Well, looking again, the patch should be good. I just thought its goal was > to fix the code as well... I could do that for the irq < 0 case, but I think that in that case, kbuild will only run the patch version, and the <= cases will not be reported on. I don't have a general fix for the <=

Re: [Cocci] [PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread SF Markus Elfring
> The error return value of platform_get_irq seems to often get dropped. How do you think about any more fine-tuning here? Commit message: * … of the platform_get_irq() function seems to get dropped too often. * Why do you concentrate on a single function name? Do you plan to extend this