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/
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
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/
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/
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/
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/
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
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
>
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
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
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
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
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:
;
+ 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
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 =
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
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
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
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
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
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
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
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
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 +
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
--
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/
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
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,
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
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
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
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
: 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>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 <=
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
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
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
> > >
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
> > 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
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 !
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
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
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
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
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
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
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
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
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.
> >
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>
&
> > 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
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
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
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
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
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
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
;
@@
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
;
@@
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
;
@@
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
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
;
@@
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
;
@@
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
;
@@
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
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
---
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
, 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
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
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
201 - 300 of 323 matches
Mail list logo