2018-12-23 09:35:37

by Julia Lawall

[permalink] [raw]
Subject: [PATCH 00/20] drop useless LIST_HEAD

Drop LIST_HEAD where the variable it declares is never used.

---

drivers/dma/at_hdmac.c | 5 -----
drivers/dma/dw/core.c | 1 -
drivers/dma/pl330.c | 1 -
drivers/dma/sa11x0-dma.c | 2 --
drivers/dma/st_fdma.c | 3 ---
drivers/infiniband/ulp/ipoib/ipoib_ib.c | 1 -
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 -----
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 ---
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 -
drivers/net/wireless/st/cw1200/queue.c | 1 -
drivers/scsi/lpfc/lpfc_nvme.c | 2 --
drivers/scsi/lpfc/lpfc_scsi.c | 2 --
drivers/scsi/lpfc/lpfc_sli.c | 1 -
drivers/scsi/qla2xxx/qla_init.c | 1 -
drivers/xen/xenbus/xenbus_dev_frontend.c | 2 --
fs/btrfs/relocation.c | 1 -
fs/nfs/nfs4client.c | 1 -
fs/nfsd/nfs4layouts.c | 1 -
fs/xfs/xfs_buf.c | 1 -
fs/xfs/xfs_fsops.c | 1 -
20 files changed, 36 deletions(-)


2018-12-23 09:34:27

by Julia Lawall

[permalink] [raw]
Subject: [PATCH 20/20] cw1200: drop useless LIST_HEAD

Drop LIST_HEAD where the variable it declares has never
been used.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>

Fixes: a910e4a94f692 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")
Signed-off-by: Julia Lawall <[email protected]>

---
Successfully 0-day tested on 151 configurations.

drivers/net/wireless/st/cw1200/queue.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/st/cw1200/queue.c b/drivers/net/wireless/st/cw1200/queue.c
index 7c31b63b8258..7895efefa95d 100644
--- a/drivers/net/wireless/st/cw1200/queue.c
+++ b/drivers/net/wireless/st/cw1200/queue.c
@@ -283,7 +283,6 @@ int cw1200_queue_put(struct cw1200_queue *queue,
struct cw1200_txpriv *txpriv)
{
int ret = 0;
- LIST_HEAD(gc_list);
struct cw1200_queue_stats *stats = queue->stats;

if (txpriv->link_id >= queue->stats->map_capacity)


2018-12-23 21:49:22

by Tom Psyborg

[permalink] [raw]
Subject: Re: [PATCH 00/20] drop useless LIST_HEAD

Why do you CC this to so many lists?

On 23/12/2018, Julia Lawall <[email protected]> wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> ---
>
> drivers/dma/at_hdmac.c | 5 -----
> drivers/dma/dw/core.c | 1 -
> drivers/dma/pl330.c | 1 -
> drivers/dma/sa11x0-dma.c | 2 --
> drivers/dma/st_fdma.c | 3 ---
> drivers/infiniband/ulp/ipoib/ipoib_ib.c | 1 -
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 -----
> drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 ---
> drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 -
> drivers/net/wireless/st/cw1200/queue.c | 1 -
> drivers/scsi/lpfc/lpfc_nvme.c | 2 --
> drivers/scsi/lpfc/lpfc_scsi.c | 2 --
> drivers/scsi/lpfc/lpfc_sli.c | 1 -
> drivers/scsi/qla2xxx/qla_init.c | 1 -
> drivers/xen/xenbus/xenbus_dev_frontend.c | 2 --
> fs/btrfs/relocation.c | 1 -
> fs/nfs/nfs4client.c | 1 -
> fs/nfsd/nfs4layouts.c | 1 -
> fs/xfs/xfs_buf.c | 1 -
> fs/xfs/xfs_fsops.c | 1 -
> 20 files changed, 36 deletions(-)
>

2018-12-23 22:06:20

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH 00/20] drop useless LIST_HEAD



On Sun, 23 Dec 2018, Tom Psyborg wrote:

> Why do you CC this to so many lists?

Because the different files are in different subsystems. The cover letter
goes to a list for each file, or to a person if there is no list. The
patches go to the people and lists associated with the affected files.

julia

>
> On 23/12/2018, Julia Lawall <[email protected]> wrote:
> > Drop LIST_HEAD where the variable it declares is never used.
> >
> > ---
> >
> > drivers/dma/at_hdmac.c | 5 -----
> > drivers/dma/dw/core.c | 1 -
> > drivers/dma/pl330.c | 1 -
> > drivers/dma/sa11x0-dma.c | 2 --
> > drivers/dma/st_fdma.c | 3 ---
> > drivers/infiniband/ulp/ipoib/ipoib_ib.c | 1 -
> > drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 -----
> > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 ---
> > drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 -
> > drivers/net/wireless/st/cw1200/queue.c | 1 -
> > drivers/scsi/lpfc/lpfc_nvme.c | 2 --
> > drivers/scsi/lpfc/lpfc_scsi.c | 2 --
> > drivers/scsi/lpfc/lpfc_sli.c | 1 -
> > drivers/scsi/qla2xxx/qla_init.c | 1 -
> > drivers/xen/xenbus/xenbus_dev_frontend.c | 2 --
> > fs/btrfs/relocation.c | 1 -
> > fs/nfs/nfs4client.c | 1 -
> > fs/nfsd/nfs4layouts.c | 1 -
> > fs/xfs/xfs_buf.c | 1 -
> > fs/xfs/xfs_fsops.c | 1 -
> > 20 files changed, 36 deletions(-)
> >
>

2018-12-25 22:12:29

by Tom Psyborg

[permalink] [raw]
Subject: Re: [PATCH 00/20] drop useless LIST_HEAD

there was discussion about this just some days ago. CC 4-5 lists is
more than enough

On 23/12/2018, Julia Lawall <[email protected]> wrote:
>
>
> On Sun, 23 Dec 2018, Tom Psyborg wrote:
>
>> Why do you CC this to so many lists?
>
> Because the different files are in different subsystems. The cover letter
> goes to a list for each file, or to a person if there is no list. The
> patches go to the people and lists associated with the affected files.
>
> julia
>
>>
>> On 23/12/2018, Julia Lawall <[email protected]> wrote:
>> > Drop LIST_HEAD where the variable it declares is never used.
>> >
>> > ---
>> >
>> > drivers/dma/at_hdmac.c | 5 -----
>> > drivers/dma/dw/core.c | 1 -
>> > drivers/dma/pl330.c | 1 -
>> > drivers/dma/sa11x0-dma.c | 2 --
>> > drivers/dma/st_fdma.c | 3 ---
>> > drivers/infiniband/ulp/ipoib/ipoib_ib.c | 1 -
>> > drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 -----
>> > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 ---
>> > drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 -
>> > drivers/net/wireless/st/cw1200/queue.c | 1 -
>> > drivers/scsi/lpfc/lpfc_nvme.c | 2 --
>> > drivers/scsi/lpfc/lpfc_scsi.c | 2 --
>> > drivers/scsi/lpfc/lpfc_sli.c | 1 -
>> > drivers/scsi/qla2xxx/qla_init.c | 1 -
>> > drivers/xen/xenbus/xenbus_dev_frontend.c | 2 --
>> > fs/btrfs/relocation.c | 1 -
>> > fs/nfs/nfs4client.c | 1 -
>> > fs/nfsd/nfs4layouts.c | 1 -
>> > fs/xfs/xfs_buf.c | 1 -
>> > fs/xfs/xfs_fsops.c | 1 -
>> > 20 files changed, 36 deletions(-)
>> >
>>
>

2018-12-27 13:47:17

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 00/20] drop useless LIST_HEAD

On Tue, Dec 25, 2018 at 11:12:20PM +0100, Tom Psyborg wrote:
> there was discussion about this just some days ago. CC 4-5 lists is
> more than enough
>

I don't know who you were discussing this with...

You should CC the 0th patch to all the mailinglists. That much is a
clear rule.

For the rest, Julia's position is the more conservative one. I was in
a conversation in RL and they were like, "CC everyone for all the
patches". It depends on the context, of course. If the patches are
dependent on each other then you *have* to CC everyone for everything.

If we really have other clear rules, then it should be encoded into
get_maintainer.pl so that it's automatic.

My other question is why do the [email protected]
people feel like they need to be CC'd about every driver??? I always
remove them from the CC list unless it's an arch/arm issue.

regards,
dan carpenter

PS: Please, no more top posting.


2018-12-29 05:25:56

by Darrick J. Wong

[permalink] [raw]
Subject: Re: [PATCH 00/20] drop useless LIST_HEAD

On Thu, Dec 27, 2018 at 04:40:55PM +0300, Dan Carpenter wrote:
> On Tue, Dec 25, 2018 at 11:12:20PM +0100, Tom Psyborg wrote:
> > there was discussion about this just some days ago. CC 4-5 lists is
> > more than enough
> >
>
> I don't know who you were discussing this with...
>
> You should CC the 0th patch to all the mailinglists. That much is a
> clear rule.
>
> For the rest, Julia's position is the more conservative one. I was in
> a conversation in RL and they were like, "CC everyone for all the
> patches". It depends on the context, of course. If the patches are
> dependent on each other then you *have* to CC everyone for everything.

Agreed. Ms. Lawall, sending "Cover letter + all relevant XFS patches"
(as you did) was exactly the right thing for us xfs types. :)

For that matter, we prefer to receive through linux-xfs more patches
than necessary (one can send the entire series if one is unsure) than to
go wanting for more context.

--D

> If we really have other clear rules, then it should be encoded into
> get_maintainer.pl so that it's automatic.
>
> My other question is why do the [email protected]
> people feel like they need to be CC'd about every driver??? I always
> remove them from the CC list unless it's an arch/arm issue.
>
> regards,
> dan carpenter
>
> PS: Please, no more top posting.
>

2018-12-29 06:19:45

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH 00/20] drop useless LIST_HEAD



On Fri, 28 Dec 2018, Darrick J. Wong wrote:

> On Thu, Dec 27, 2018 at 04:40:55PM +0300, Dan Carpenter wrote:
> > On Tue, Dec 25, 2018 at 11:12:20PM +0100, Tom Psyborg wrote:
> > > there was discussion about this just some days ago. CC 4-5 lists is
> > > more than enough
> > >
> >
> > I don't know who you were discussing this with...
> >
> > You should CC the 0th patch to all the mailinglists. That much is a
> > clear rule.
> >
> > For the rest, Julia's position is the more conservative one. I was in
> > a conversation in RL and they were like, "CC everyone for all the
> > patches". It depends on the context, of course. If the patches are
> > dependent on each other then you *have* to CC everyone for everything.
>
> Agreed. Ms. Lawall, sending "Cover letter + all relevant XFS patches"
> (as you did) was exactly the right thing for us xfs types. :)
>
> For that matter, we prefer to receive through linux-xfs more patches
> than necessary (one can send the entire series if one is unsure) than to
> go wanting for more context.

Thanks for the confirmation. I was planning to ignore the 4-5 advice,
because there is no way in this case to make a meaningful 4-5 list
suggestion - it's either all or nothing. But 20 patches at once is
perhaps a lot as well. In this case, I just wanted to get rid of the
whole issue at once.

julia

2019-01-08 16:31:04

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 20/20] cw1200: drop useless LIST_HEAD

Julia Lawall <[email protected]> writes:

> Drop LIST_HEAD where the variable it declares has never
> been used.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: a910e4a94f692 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")
> Signed-off-by: Julia Lawall <[email protected]>
>
> ---
> Successfully 0-day tested on 151 configurations.

I assume I can take this to wireless-drivers-next. If you are planning
to push this via some other tree please let me know.

--
Kalle Valo

2019-01-08 16:44:37

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH 20/20] cw1200: drop useless LIST_HEAD



On Tue, 8 Jan 2019, Kalle Valo wrote:

> Julia Lawall <[email protected]> writes:
>
> > Drop LIST_HEAD where the variable it declares has never
> > been used.
> >
> > The semantic patch that fixes this problem is as follows:
> > (http://coccinelle.lip6.fr/)
> >
> > // <smpl>
> > @@
> > identifier x;
> > @@
> > - LIST_HEAD(x);
> > ... when != x
> > // </smpl>
> >
> > Fixes: a910e4a94f692 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")
> > Signed-off-by: Julia Lawall <[email protected]>
> >
> > ---
> > Successfully 0-day tested on 151 configurations.
>
> I assume I can take this to wireless-drivers-next. If you are planning
> to push this via some other tree please let me know.

Please take it. Thanks.

julia

2019-01-10 11:36:13

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 20/20] cw1200: drop useless LIST_HEAD

Julia Lawall <[email protected]> wrote:

> Drop LIST_HEAD where the variable it declares has never
> been used.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: a910e4a94f692 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")
> Signed-off-by: Julia Lawall <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

06605b0d38b4 cw1200: drop useless LIST_HEAD

--
https://patchwork.kernel.org/patch/10741603/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches