[PATCH 5/6] dwc_eth_qos: constify ethtool_ops structures

2016-08-31 Thread Julia Lawall
r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/net/

[PATCH 0/6] constify ethtool_ops structures

2016-08-31 Thread Julia Lawall
Constify ethtool_ops structures. --- drivers/net/ethernet/agere/et131x.c |2 +- drivers/net/ethernet/broadcom/bcmsysport.c |2 +- drivers/net/ethernet/broadcom/genet/bcmgenet.c |2 +- drivers/net/ethernet/hisilicon/hip04_eth.c |2 +- drivers/net/etherne

[PATCH 4/6] net: hisilicon: constify ethtool_ops structures

2016-08-31 Thread Julia Lawall
r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/net/

[PATCH 6/6] net: systemport: constify ethtool_ops structures

2016-08-31 Thread Julia Lawall
r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/net/

[PATCH 2/6] net: ethernet: et131x: constify ethtool_ops structures

2016-08-31 Thread Julia Lawall
r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/net/

[PATCH 3/6] net: bcmgenet: constify ethtool_ops structures

2016-08-31 Thread Julia Lawall
r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/net/

Re: checkpatch: See if modified files are marked obsolete in MAINTAINERS

2016-08-23 Thread Julia Lawall
On Tue, 23 Aug 2016, SF Markus Elfring wrote: > > Use get_maintainer to check the status of individual files. > > If "obsolete", suggest leaving the files alone. > > Will another software system like the "kbuild test robot" > need any more fine-tuning for this change? It only works on files in

Re: [PATCH] net: dsa: b53: constify xfrm_replay structures

2016-08-09 Thread Julia Lawall
On Tue, 9 Aug 2016, Florian Fainelli wrote: > On 08/09/2016 09:58 AM, Julia Lawall wrote: > > The xfrm_replay structures are never modified, so declare them as const. > > You mean b53_io_ops here, right? Oops. I sent a v2. julia > Other than that LTGM, but this will >

[PATCH v2] net: dsa: b53: constify b53_io_ops structures

2016-08-09 Thread Julia Lawall
The b53_io_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- v2: Refer to the right structure in the commit message drivers/net/dsa/b53/b53_common.c |3 ++- drivers/net/dsa/b53/b53_mdio.c |2 +- drivers

[PATCH] net: dsa: b53: constify xfrm_replay structures

2016-08-09 Thread Julia Lawall
The xfrm_replay structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/dsa/b53/b53_common.c |3 ++- drivers/net/dsa/b53/b53_mdio.c |2 +- drivers/net/dsa/b53/b53_mmap.c |2 +- drivers/net/dsa/b53

[PATCH] xfrm: constify xfrm_replay structures

2016-08-09 Thread Julia Lawall
The xfrm_replay structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- include/net/xfrm.h |2 +- net/xfrm/xfrm_replay.c |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/net/xfrm.h

Re: [PATCH RESEND net-next 07/15] smc: remote memory buffers (RMBs) (fwd)

2016-08-09 Thread Julia Lawall
Is there a guarantee that the contrinues can't fall off the end of the loop? julia -- Forwarded message -- Date: Tue, 9 Aug 2016 20:06:24 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: Re: [PATCH RESEND net-next 07/15] smc: remote memory buffers

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
On Fri, 5 Aug 2016, Sergei Shtylyov wrote: > Hello. > > On 8/5/2016 11:56 AM, Julia Lawall wrote: > > > Use of_property_read_bool to check for the existence of a property. > > > > The semantic patch that makes this change is as follows:

[PATCH 08/11 v2] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
; + x = of_property_read_bool(e1,e2); // Signed-off-by: Julia Lawall --- v2: special case for propagating true and false drivers/net/ethernet/freescale/xgmac_mdio.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
On Fri, 5 Aug 2016, Johannes Berg wrote: > On Fri, 2016-08-05 at 12:08 +0200, Julia Lawall wrote: > >  > > Can I do the same for: > > > > if (of_property_read_bool(np, "phy-clk-valid")) > >     pdata->check_phy_clk_valid =

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
On Fri, 5 Aug 2016, Johannes Berg wrote: > > > - if (of_get_property(pdev->dev.of_node, > > - "little-endian", NULL)) > > + if (of_property_read_bool(pdev->dev.of_node, "little- > > endian")) > >   priv->is_little_endian = true; > >   else > >   pr

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
On Fri, 5 Aug 2016, Johannes Berg wrote: > > > - if (of_get_property(pdev->dev.of_node, > > - "little-endian", NULL)) > > + if (of_property_read_bool(pdev->dev.of_node, "little- > > endian")) > >   priv->is_little_endian = true; > >   else > >   pr

[PATCH 00/11] use of_property_read_bool

2016-08-05 Thread Julia Lawall
Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else

[PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
else S2 // Signed-off-by: Julia Lawall --- drivers/net/ethernet/freescale/xgmac_mdio.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index 7b8fe86..a77ba98 100644 --- a/drivers/net

[PATCH] net: ethernet: fix odd_ptr_err.cocci warnings

2016-06-21 Thread Julia Lawall
PTR_ERR should normally access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Tien Hock Loh Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- This patch refers to the following code: url: https://github.com/0day-ci/linux/commits/thloh

Re: [PATCH] macvtap: fix bugon.cocci warnings

2016-06-08 Thread Julia Lawall
On Wed, 8 Jun 2016, David Miller wrote: > From: Julia Lawall > Date: Wed, 8 Jun 2016 18:15:29 +0200 (CEST) > > > Use BUG_ON instead of a if condition followed by BUG. > > > > Generated by: scripts/coccinelle/misc/bugon.cocci > > > > CC: Mike Ra

[PATCH] macvtap: fix bugon.cocci warnings

2016-06-08 Thread Julia Lawall
Use BUG_ON instead of a if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci CC: Mike Rapoport Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- macvtap.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/macvtap.c +++ b

Re: [PATCH 0/7] fix typo

2016-05-17 Thread Julia Lawall
On Tue, 17 May 2016, Kalle Valo wrote: > Julia Lawall writes: > > > firmare -> firmware > > > > --- > > > > drivers/media/dvb-frontends/mn88473.c |2 +- > > drivers/net/wireless/ath/ath6kl/core.h |2 +- > > drivers/net/wir

[PATCH 0/7] fix typo

2016-05-17 Thread Julia Lawall
firmare -> firmware --- drivers/media/dvb-frontends/mn88473.c |2 +- drivers/net/wireless/ath/ath6kl/core.h |2 +- drivers/net/wireless/marvell/mwifiex/pcie.c |2 +- drivers/scsi/pm8001/pm8001_init.c |2 +- drivers/scsi/snic/snic_fwint.h |2 +

[PATCH 7/7] mwifiex: fix typo

2016-05-17 Thread Julia Lawall
firmare -> firmware Signed-off-by: Julia Lawall --- drivers/net/wireless/marvell/mwifiex/pcie.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index 0c7937e..9246ce8 100644 --

[PATCH 6/7] ath6kl: fix typo

2016-05-17 Thread Julia Lawall
firmare -> firmware Signed-off-by: Julia Lawall --- drivers/net/wireless/ath/ath6kl/core.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 713a571..ebc40f6 100644 --- a/drivers/

Re: [PATCH] i40e: constify i40e_client_ops structure

2016-05-13 Thread Julia Lawall
On Fri, 13 May 2016, Jeff Kirsher wrote: > On Fri, 2016-05-13 at 12:50 -0400, Doug Ledford wrote: > > On 05/01/2016 08:07 AM, Julia Lawall wrote: > > > The i40e_client_ops structure is never modified, so declare it as > > const. > > >  > > > Done with t

Re: [PATCH] Bluetooth: Use hci_conn_hash_lookup_le

2016-05-02 Thread Julia Lawall
On Mon, 2 May 2016, Johan Hedberg wrote: > Hi, > > On Fri, Apr 29, 2016, Julia Lawall wrote: > > --- a/net/bluetooth/mgmt.c > > +++ b/net/bluetooth/mgmt.c > > @@ -4773,7 +4773,8 @@ static int get_conn_info(struct sock *sk, struct > > hci_dev *hdev,

[PATCH] rtlwifi: rtl818x: constify rtl_intf_ops structures

2016-05-01 Thread Julia Lawall
The rtl_intf_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/wireless/realtek/rtlwifi/pci.c |2 +- drivers/net/wireless/realtek/rtlwifi/pci.h |2 +- drivers/net/wireless/realtek/rtlwifi/usb.c

[PATCH] VSOCK: constify vsock_transport structure

2016-05-01 Thread Julia Lawall
The vsock_transport structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- net/vmw_vsock/vmci_transport.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock

[PATCH] drivers: net: xgene: constify xgene_cle_ops structure

2016-05-01 Thread Julia Lawall
The xgene_cle_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/ethernet/apm/xgene/xgene_enet_cle.c |2 +- drivers/net/ethernet/apm/xgene/xgene_enet_cle.h |2 +- drivers/net/ethernet/apm/xgene

[PATCH] i40e: constify i40e_client_ops structure

2016-05-01 Thread Julia Lawall
The i40e_client_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/infiniband/hw/i40iw/i40iw_main.c |2 +- drivers/net/ethernet/intel/i40e/i40e_client.h |2 +- 2 files changed, 2 insertions(+), 2

[PATCH] Bluetooth: Use hci_conn_hash_lookup_le

2016-04-29 Thread Julia Lawall
: Julia Lawall --- This was done by analogy with f5ad4ff and from the explanation in 1b51c7b6. It is not tested, and I don't really know if it is correct. net/bluetooth/mgmt.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/m

[PATCH] net: tsi108: use NULL for pointer-typed argument

2016-04-23 Thread Julia Lawall
The first argument of pci_free_consistent has type struct pci_dev *, so use NULL instead of 0. The semantic patch that performs this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ @@ pci_free_consistent( - 0 + NULL , ...) // Signed-off-by: Julia Lawall --- drivers/net

[PATCH 2/5] arcnet: com90xx: add __init attribute

2016-04-18 Thread Julia Lawall
check_mirror Done with the help of Coccinelle. The semantic patch checks for local static non-init functions that are called from an __init function and are not called from any other function. Signed-off-by: Julia Lawall --- drivers/net/arcnet/com90xx.c |2 +- 1 file changed, 1 insertion(+), 1

[PATCH 0/5] add __init attribute

2016-04-18 Thread Julia Lawall
Add __init attribute on a function that is only called from other __init functions and that is not inlined. The complete semantic patch used to detect the need for this change is below (http://coccinelle.lip6.fr/). This semantic patch checks for local static non-init functions that are called fro

[PATCH] qdisc: constify meta_type_ops structures

2016-04-09 Thread Julia Lawall
The meta_type_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- net/sched/em_meta.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index

Re: unused code in net/netfilter/ipset/ip_set_bitmap_ipmac.c

2016-02-29 Thread Julia Lawall
On Mon, 29 Feb 2016, Jozsef Kadlecsik wrote: > Hi, > > On Mon, 29 Feb 2016, Julia Lawall wrote: > > > The file net/netfilter/ipset/ip_set_bitmap_ipmac.c seems to contain a lot > > of static functions that are not used in the file: > > > > bitmap_ipmac

unused code in net/netfilter/ipset/ip_set_bitmap_ipmac.c

2016-02-29 Thread Julia Lawall
The file net/netfilter/ipset/ip_set_bitmap_ipmac.c seems to contain a lot of static functions that are not used in the file: bitmap_ipmac_add_timeout bitmap_ipmac_do_add bitmap_ipmac_do_del bitmap_ipmac_do_head bitmap_ipmac_do_list bitmap_ipmac_do_test bitmap_ipmac_gc_test bitmap_ipmac_is_filled b

Re: [PATCH] ehea: Drop owner assignment from platform_driver

2016-02-19 Thread Julia Lawall
On Fri, 19 Feb 2016, Thadeu Lima de Souza Cascardo wrote: > On Fri, Feb 19, 2016 at 04:52:19PM +0530, Amitoj Kaur Chawla wrote: > > platform_driver does not need to set an owner, it will be populated by > > the driver core. > > > > Generated-by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Re: [PATCH 9/26] eCryptfs: Use skcipher and shash

2016-01-24 Thread Julia Lawall
Maybe the goto on line 1726 needs a preceding mutex_unlock? julia On Mon, 25 Jan 2016, kbuild test robot wrote: > Hi Herbert, > > [auto build test WARNING on net/master] > [also build test WARNING on v4.4 next-20160122] > [if your patch is applied to the wrong git tree, please drop us a note to

[PATCH] chelsio: constify cphy_ops structures

2016-01-03 Thread Julia Lawall
The cphy_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/ethernet/chelsio/cxgb/cphy.h |2 +- drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c |2 +- drivers/net/ethernet/chelsio/cxgb

[PATCH] ixgbe: constify ixgbe_mbx_operations structure

2016-01-02 Thread Julia Lawall
This ixgbe_mbx_operations structure is never modified, so declare it as const. The other structure of this type is already const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c |2 +- drivers/net/ethernet/intel/ixgbe

[PATCH] igb: constify e1000_phy_operations structure

2016-01-02 Thread Julia Lawall
This e1000_phy_operations structure is never modified, so declare it as const. Other structures of this type are already const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/ethernet/intel/igb/e1000_82575.c |2 +- drivers/net/ethernet/intel/igb/e1000_hw.h

Re: [PATCH] net-libertas: Better exception handling in if_spi_host_to_card_worker()

2016-01-02 Thread Julia Lawall
On Sat, 2 Jan 2016, SF Markus Elfring wrote: > >> Move the jump label directly before the desired log statement > >> so that the variable "err" will not be checked once more > >> after it was determined that a function call failed. > >> Use the identifier "report_failure" instead of the label "e

Re: [PATCH] net-libertas: Better exception handling in if_spi_host_to_card_worker()

2016-01-01 Thread Julia Lawall
On Fri, 1 Jan 2016, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 1 Jan 2016 22:27:20 +0100 > > This issue was detected by using the Coccinelle software. > > Move the jump label directly before the desired log statement > so that the variable "err" will not be checked once more

Re: [PATCH 1/3] net-gianfar: Less function calls in gfar_ethflow_to_filer_table() after error detection

2016-01-01 Thread Julia Lawall
On Fri, 1 Jan 2016, SF Markus Elfring wrote: > >> +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c > >> @@ -778,11 +778,13 @@ static int gfar_ethflow_to_filer_table(struct > >> gfar_private *priv, u64 ethflow, > >> > >>local_rqfpr = kmalloc_array(MAX_FILER_IDX + 1, sizeof(unsigned int

Re: [PATCH 1/3] net-gianfar: Less function calls in gfar_ethflow_to_filer_table() after error detection

2016-01-01 Thread Julia Lawall
On Fri, 1 Jan 2016, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 1 Jan 2016 11:16:04 +0100 > > The kfree() function was called in one case by the > gfar_ethflow_to_filer_table() function during error handling > even if a passed variable contained a null pointer. > > * Return d

[PATCH] iwlegacy: 4965-mac: constify il_sensitivity_ranges structure

2015-12-30 Thread Julia Lawall
The il_sensitivity_ranges is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/wireless/intel/iwlegacy/4965-mac.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlegacy/4965

[PATCH] qlcnic: constify qlcnic_dcb_ops structures

2015-12-27 Thread Julia Lawall
The qlcnic_dcb_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c |4 ++-- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h |2 +- 2 files changed, 3 insertions

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

2015-12-27 Thread Julia Lawall
On Sun, 27 Dec 2015, SF Markus Elfring wrote: > > 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 concentr

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: [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 di

[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 b/scripts/coccinelle/api

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 > > >

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

2015-12-26 Thread Julia Lawall
urn ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Julia Lawall --- v2: propagate platform_get_irq return value, at all calls drivers/net/ethernet/ti/cpsw.c | 10 +++--- 1 file cha

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

[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] drivers: net: cpsw: fix error return code

2015-12-26 Thread Julia Lawall
amp;ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Julia Lawall --- drivers/net/ethernet/ti/cpsw.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index

[PATCH] mac802154: constify ieee802154_llsec_ops structure

2015-12-23 Thread Julia Lawall
The ieee802154_llsec_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- include/net/ieee802154_netdev.h |2 +- net/mac802154/mac_cmd.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH] i40iw: fix compare_const_fl.cocci warnings

2015-12-22 Thread Julia Lawall
Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Faisal Latif Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- It's a minor point, but when I first looked at the code, I thought that MIN and MAX were inverte

Re: [PATCH 03/14 v2] ipv4, ipv6: use list_for_each_entry*

2015-12-19 Thread Julia Lawall
On Sat, 19 Dec 2015, Geliang Tang wrote: > Use list_for_each_entry*() instead of list_for_each*() to simplify > the code. Is the code really simpler? At least in the case of net/ipv6/addrconf.c, I have the impression that there can be an access from a pointer that is not really pointing to the

Re: [PATCH 03/14] ipv4, ipv6: use list_for_each_entry*

2015-12-18 Thread Julia Lawall
I don't think this code can work. list_for_each_entry uses answer to get from one element to the next. julia On Sat, 19 Dec 2015, kbuild test robot wrote: > CC: kbuild-...@01.org > In-Reply-To: > <0167bba2ecf8c4fcb6b0b3135a4e957309986498.1450451516.git.geliangt...@163.com> > TO: Geliang Tang

[PATCH] chelsio: constify cmac_ops structures

2015-12-08 Thread Julia Lawall
The cmac_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/ethernet/chelsio/cxgb/pm3393.c |2 +- drivers/net/ethernet/chelsio/cxgb/vsc7326.c |2 +- 2 files changed, 2 insertions(+), 2 deletions

[PATCH] drivers: net: xgene: constify xgene_mac_ops and xgene_port_ops structures

2015-12-08 Thread Julia Lawall
The xgene_mac_ops and xgene_port_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c|4 ++-- drivers/net/ethernet/apm/xgene/xgene_enet_hw.h|4 ++-- drivers

[PATCH] prism54: fix compare_const_fl.cocci warnings (fwd)

2015-12-07 Thread Julia Lawall
Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- It looks a little nicer to me because n is the thing we care about. oid_mgt.c | 10 +- 1 file changed, 5

Re: [PATCH] net: hisilicon: constify hnae_buf_ops and hnae_ae_ops structures

2015-12-06 Thread Julia Lawall
On Sun, 6 Dec 2015, David Miller wrote: > From: Julia Lawall > Date: Sun, 6 Dec 2015 17:24:57 +0100 > > > The hnae_buf_ops and hnae_ae_ops structures are never modified, so declare > > them as const. > > > > Done with the help of Coccinelle. > > >

[PATCH] mwifiex: fix semicolon.cocci warnings

2015-12-06 Thread Julia Lawall
Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/marvell/mwifiex/init.c +++ b/drivers/net/wireless/marvell

[PATCH] net: hisilicon: constify hnae_buf_ops and hnae_ae_ops structures

2015-12-06 Thread Julia Lawall
The hnae_buf_ops and hnae_ae_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- I have the impression that this driver is not recorded properly in the MAINTAINERS file. drivers/net/ethernet/hisilicon/hns/hnae.c

[PATCH] brcm80211: fix compare_const_fl.cocci warnings

2015-12-05 Thread Julia Lawall
Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- Minor point. But in my opinion, it would look a little nicer to have the thing acted on (code[...]) come first

[PATCH] VSOCK: fix returnvar.cocci warnings

2015-12-05 Thread Julia Lawall
Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: Asias He Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- vsock.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/vhost/vsock.c +++ b/drivers

Re: [PATCH net-next V1 13/18] net/mlx5: E-Switch, Add SR-IOV (FDB) support

2015-11-29 Thread Julia Lawall
Please check line 442. It seems clear that match_c was intended. julia On Mon, 30 Nov 2015, kbuild test robot wrote: > CC: kbuild-...@01.org > In-Reply-To: <1448811446-18598-14-git-send-email-ogerl...@mellanox.com> > TO: Or Gerlitz > CC: "David S. Miller" > CC: netdev@vger.kernel.org, Don Dut

[PATCH] iwlwifi: fix compare_const_fl.cocci warnings

2015-11-27 Thread Julia Lawall
Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- This looks a bit nicer around the other way, in my opinion. calib.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] VSOCK: constify vmci_transport_notify_ops structures

2015-11-21 Thread Julia Lawall
The vmci_transport_notify_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- net/vmw_vsock/vmci_transport.h |2 +- net/vmw_vsock/vmci_transport_notify.c|2 +- net/vmw_vsock

[PATCH] net: atm: constify in_cache_ops and eg_cache_ops structures

2015-11-21 Thread Julia Lawall
The in_cache_ops and eg_cache_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- net/atm/mpc.h |4 ++-- net/atm/mpoa_caches.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net

[PATCH] brcmfmac: constify brcmf_bus_ops structures

2015-11-14 Thread Julia Lawall
The brcmf_bus_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/wireless/brcm80211/brcmfmac/bus.h |2 +- drivers/net/wireless/brcm80211/brcmfmac/pcie.c |2 +- drivers/net/wireless/brcm80211

[PATCH 1/9] net: cavium: liquidio: constify pci_error_handlers structures

2015-11-14 Thread Julia Lawall
This pci_error_handlers structure is never modified, like all the other pci_error_handlers structures, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- There are no dependencies between these patches. drivers/net/ethernet/cavium/liquidio/lio_main.c

[PATCH 0/9] constify pci_error_handlers structures

2015-11-14 Thread Julia Lawall
Constify never-modified pci_error_handlers structures. --- drivers/crypto/qat/qat_common/adf_aer.c |2 +- drivers/misc/genwqe/card_base.c |2 +- drivers/net/ethernet/cavium/liquidio/lio_main.c |2 +- drivers/net/ethernet/sfc/efx.c |2 +- d

[PATCH 5/9] sfc: constify pci_error_handlers structures

2015-11-14 Thread Julia Lawall
This pci_error_handlers structure is never modified, like all the other pci_error_handlers structures, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- There are no dependencies between these patches. drivers/net/ethernet/sfc/efx.c |2 +- 1 file

Re: [PATCH] decnet: remove macro-local declarations

2015-11-07 Thread Julia Lawall
On Sat, 7 Nov 2015, David Miller wrote: > From: Julia Lawall > Date: Fri, 6 Nov 2015 11:57:34 +0100 (CET) > > >> > Would it be preferable to remove the macro entirely and inline the for > >> > loop header? > >> > >> Could you show me an e

Re: [PATCH] decnet: remove macro-local declarations

2015-11-06 Thread Julia Lawall
here are 2 users for this specific definition, but the same concept is used in 37 places, and having an inlined solution in one place and a macro based solution in another place is not going to be helpful. So the decision should be made in terms of all 37 users. julia > > re, > wh > &

Re: [PATCH] decnet: remove macro-local declarations

2015-11-06 Thread Julia Lawall
> > Would it be preferable to remove the macro entirely and inline the for > > loop header? > > Could you show me an example of how this would look exactly? One possible solution is below. I moved the initialization of the nh pointer inside the loop to reduce the size of the loop header. One cou

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Julia Lawall
On Thu, 5 Nov 2015, Joe Perches wrote: > On Thu, 2015-11-05 at 20:38 +0100, Julia Lawall wrote: > > On Thu, 5 Nov 2015, David Miller wrote: > > > From: Julia Lawall > > > Date: Thu, 5 Nov 2015 11:18:16 +0100> > > > > Move the variable decla

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Julia Lawall
On Thu, 5 Nov 2015, David Miller wrote: > From: Julia Lawall > Date: Thu, 5 Nov 2015 11:18:16 +0100 > > > Move the variable declarations from the for_nexthops macro to the > > surrounding context, so that it is clear where these variables are > > declared. Thi

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Julia Lawall
On Thu, 5 Nov 2015, David Miller wrote: > From: Julia Lawall > Date: Thu, 5 Nov 2015 11:18:16 +0100 > > > Move the variable declarations from the for_nexthops macro to the > > surrounding context, so that it is clear where these variables are > > declared. Thi

[PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Julia Lawall
pointer to the referenced object comes first, the index in the list comes next, and the list itself comes last, roughly in analogy with the list_for_each macros. Signed-off-by: Julia Lawall --- This patch takes care of a single file, where the macros are defined locally. If the basic

Re: [kbuild-all] [PATCH] mpls: fix semicolon.cocci warnings

2015-11-03 Thread Julia Lawall
On Wed, 4 Nov 2015, Fengguang Wu wrote: > On Tue, Nov 03, 2015 at 11:17:36AM -0500, David Miller wrote: > > From: kbuild test robot > > Date: Tue, 3 Nov 2015 23:25:39 +0800 > > > > > net/mpls/af_mpls.c:722:22-23: Unneeded semicolon > > > > > > > > > Remove unneeded semicolon. > > > > > > G

Re: [PATCH net-next] mpls: support for dead routes

2015-11-02 Thread Julia Lawall
Please check on what was intended. julia On Tue, 3 Nov 2015, kbuild test robot wrote: > CC: kbuild-...@01.org > In-Reply-To: <1446498529-50275-1-git-send-email-ro...@cumulusnetworks.com> > TO: Roopa Prabhu > CC: ebied...@xmission.com, rshea...@brocade.com, da...@davemloft.net, > netdev@vger.ke

[PATCH 4/8] net: phy: mdio: add missing of_node_put

2015-10-25 Thread Julia Lawall
; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // Signed-off-by: Julia Lawall --- drivers/net/phy/mdio-mux-mmioreg.c |2 ++ 1 file changed, 2 insertions(+) diff

[PATCH 8/8] net: mv643xx_eth: add missing of_node_put

2015-10-25 Thread Julia Lawall
; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // Signed-off-by: Julia Lawall --- drivers/net/ethernet/marvell/mv643xx_eth.c |4 +++- 1 file changed, 3

[PATCH 2/8] net: netcp: add missing of_node_put

2015-10-25 Thread Julia Lawall
; @@ for_each_child_of_node(r,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // Signed-off-by: Julia Lawall --- drivers/net/ethernet/ti/netcp_ethss.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti

[PATCH 0/8] add missing of_node_put

2015-10-25 Thread Julia Lawall
The various for_each device_node iterators performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. The complete semantic patch that fixes this problem is (http://coccinelle.lip6.fr): // @r@ local idexpression n; expression e1,e2; iterator name for_each_node

[PATCH 7/8] ath6kl: add missing of_node_put

2015-10-25 Thread Julia Lawall
; @@ for_each_compatible_node(n,...) { ... when != of_node_put(n) when != e = n ( return n; | + of_node_put(n); ? return ...; ) ... } // Signed-off-by: Julia Lawall --- drivers/net/wireless/ath/ath6kl/init.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath6kl

[PATCH 1/8] net: thunderx: add missing of_node_put

2015-10-25 Thread Julia Lawall
; @@ for_each_child_of_node(r,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // Signed-off-by: Julia Lawall --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet

[PATCH 3/8] netdev/phy: add missing of_node_put

2015-10-25 Thread Julia Lawall
; @@ for_each_available_child_of_node(r,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // Signed-off-by: Julia Lawall --- drivers/net/phy/mdio-mux.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy

[PATCH 1/2] NFC: delete null dereference

2015-10-17 Thread Julia Lawall
The exit label performs device_unlock(&dev->dev);, which will fail when dev is NULL, and nfc_put_device(dev);, which is not useful when dev is NULL, so just exit the function immediately. Problem found using scripts/coccinelle/null/deref_null.cocci Signed-off-by: Julia Lawall ---

[PATCH 0/2] delete null dereference

2015-10-17 Thread Julia Lawall
These patches delete NULL dereferences, as detected by scripts/coccinelle/null/deref_null.cocci. --- drivers/media/pci/netup_unidvb/netup_unidvb_spi.c |6 ++ net/nfc/netlink.c |6 ++ 2 files changed, 4 insertions(+), 8 deletions(-) -- To unsubscrib

[PATCH] qlcnic: constify qlcnic_mbx_ops structure

2015-10-11 Thread Julia Lawall
, to avoid a lot of trivial changes on the other lines. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h |2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions

Re: [net-next:master 92/95] drivers/net/ethernet/broadcom/genet/bcmgenet.c:527:30-56: duplicated argument to && or ||

2015-09-18 Thread Julia Lawall
Two uses of ec->tx_coalesce_usecs_high. Please check. julia On Fri, 18 Sep 2015, kbuild test robot wrote: > TO: Florian Fainelli > CC: kbuild-...@01.org > CC: netdev@vger.kernel.org > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git > master > head: 4730b4331

[PATCH 10/39] atm: he: drop null test before destroy functions

2015-09-13 Thread Julia Lawall
Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // Signed-off-by: Julia Lawall --- drivers/atm/he.c |7 ++- 1 file

<    1   2   3   4   >