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(-)
Drop LIST_HEAD where the variable it declares is never used.
This was introduced in c5c707f96fc9a ("nfsd: implement pNFS
layout recalls"), but was not used even in that commit.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: c5c707f96fc9a ("nfsd: implement pNFS layout recalls")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
fs/nfsd/nfs4layouts.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c
index 2b36aa037ce0..44517fb5c0de 100644
--- a/fs/nfsd/nfs4layouts.c
+++ b/fs/nfsd/nfs4layouts.c
@@ -656,7 +656,6 @@ nfsd4_cb_layout_done(struct nfsd4_callback *cb, struct rpc_task *task)
struct nfsd_net *nn;
ktime_t now, cutoff;
const struct nfsd4_layout_ops *ops;
- LIST_HEAD(reaplist);
switch (task->tk_status) {
Drop LIST_HEAD where the variable it declares is never used.
These became useless in 244cd96adb5f ("net_sched: remove list_head
from tc_action")
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 4d6c9757afad..cae6c6d48984 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2183,7 +2183,6 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
{
const struct tc_action *a;
bool modify_ip_header;
- LIST_HEAD(actions);
u8 htype, ip_proto;
void *headers_v;
u16 ethertype;
@@ -2272,7 +2271,6 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
{
struct mlx5_nic_flow_attr *attr = flow->nic_attr;
const struct tc_action *a;
- LIST_HEAD(actions);
u32 action = 0;
int err, i;
@@ -2511,7 +2509,6 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
struct mlx5e_rep_priv *rpriv = priv->ppriv;
struct ip_tunnel_info *info = NULL;
const struct tc_action *a;
- LIST_HEAD(actions);
bool encap = false;
u32 action = 0;
int err, i;
Drop LIST_HEAD where the variable it declares is never used.
These were introduced in 8a9d2e8003040 ("[SCSI] lpfc 8.3.31:
Correct handling of SLI4-port XRI resource-provisioning profile
change"), but were not even used at that time.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 8a9d2e8003040 ("[SCSI] lpfc 8.3.31: Correct handling of SLI4-port XRI resource-provisioning profile change")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/scsi/lpfc/lpfc_scsi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index b4f1a840b3b4..dd415d783593 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -805,9 +805,7 @@ lpfc_new_scsi_buf_s4(struct lpfc_vport *vport, int num_to_alloc)
dma_addr_t pdma_phys_bpl;
uint16_t iotag, lxri = 0;
int bcnt, num_posted, sgl_size;
- LIST_HEAD(prep_sblist);
LIST_HEAD(post_sblist);
- LIST_HEAD(scsi_sblist);
sgl_size = phba->cfg_sg_dma_buf_size -
(sizeof(struct fcp_cmnd) + sizeof(struct fcp_rsp));
Drop LIST_HEAD where the variable it declares is never used.
The uses were removed in 244cd96adb5f ("net_sched: remove
list_head from tc_action"), but not the declaration.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index c742a581f0d0..eed1045e4d96 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -1347,7 +1347,6 @@ static int mlxsw_sp_port_add_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
struct mlxsw_sp_port_mall_tc_entry *mall_tc_entry;
__be16 protocol = f->common.protocol;
const struct tc_action *a;
- LIST_HEAD(actions);
int err;
if (!tcf_exts_has_one_action(f->exts)) {
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)
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: c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by guests")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 31bd56727022..eb13d3618162 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -4729,7 +4729,6 @@ static void rem_slave_srqs(struct mlx4_dev *dev, int slave)
struct res_srq *tmp;
int state;
u64 in_param;
- LIST_HEAD(tlist);
int srqn;
int err;
@@ -4795,7 +4794,6 @@ static void rem_slave_cqs(struct mlx4_dev *dev, int slave)
struct res_cq *tmp;
int state;
u64 in_param;
- LIST_HEAD(tlist);
int cqn;
int err;
@@ -4858,7 +4856,6 @@ static void rem_slave_mrs(struct mlx4_dev *dev, int slave)
struct res_mpt *tmp;
int state;
u64 in_param;
- LIST_HEAD(tlist);
int mptn;
int err;
@@ -4926,7 +4923,6 @@ static void rem_slave_mtts(struct mlx4_dev *dev, int slave)
struct res_mtt *mtt;
struct res_mtt *tmp;
int state;
- LIST_HEAD(tlist);
int base;
int err;
@@ -5115,7 +5111,6 @@ static void rem_slave_eqs(struct mlx4_dev *dev, int slave)
struct res_eq *tmp;
int err;
int state;
- LIST_HEAD(tlist);
int eqn;
err = move_all_busy(dev, slave, RES_EQ);
Drop LIST_HEAD where the variable it declares is never used.
The variable has not been used since the function was introduced
in 740aa95703c5 ("dmaengine: pl330: Split device_control").
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 740aa95703c5 ("dmaengine: pl330: Split device_control")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/dma/pl330.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index cff1b143fff5..eec79fdf27a5 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2267,7 +2267,6 @@ static int pl330_terminate_all(struct dma_chan *chan)
struct dma_pl330_desc *desc;
unsigned long flags;
struct pl330_dmac *pl330 = pch->dmac;
- LIST_HEAD(list);
bool power_down = false;
pm_runtime_get_sync(pl330->ddma.dev);
Drop LIST_HEAD where the variable it declares is never used.
The declarations were introduced with the file, but the declared
variables were not 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: 1107ba885e46 ("xen: add xenfs to allow usermode <-> Xen interaction")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/xen/xenbus/xenbus_dev_frontend.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c
index c3e201025ef0..25c53545ea01 100644
--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
+++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
@@ -465,7 +465,6 @@ static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u)
struct watch_adapter *watch;
char *path, *token;
int err, rc;
- LIST_HEAD(staging_q);
path = u->u.buffer + sizeof(u->u.msg);
token = memchr(path, 0, u->u.msg.len);
@@ -523,7 +522,6 @@ static ssize_t xenbus_file_write(struct file *filp,
uint32_t msg_type;
int rc = len;
int ret;
- LIST_HEAD(staging_q);
/*
* We're expecting usermode to be writing properly formed
Drop LIST_HEAD where the variable it declares is never used.
Commit 0410c3bb2b88 ("xfs: factor ag btree root block
initialisation") stopped using buffer_list and started using a
buffer list in an aghdr_init_data structure, but the declaration
of buffer_list was not removed.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 0410c3bb2b88 ("xfs: factor ag btree root block initialisation")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
fs/xfs/xfs_fsops.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index ec2e63a7963b..f3ef70c542e1 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -40,7 +40,6 @@ xfs_growfs_data_private(
xfs_rfsblock_t new;
xfs_agnumber_t oagcount;
xfs_trans_t *tp;
- LIST_HEAD (buffer_list);
struct aghdr_init_data id = {};
nb = in->newblocks;
Drop LIST_HEAD where the variable it declares is never used.
The uses were removed in 3fd0a5585eb9 ("Btrfs: Metadata ENOSPC
handling for balance"), but not the declaration.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 3fd0a5585eb9 ("Btrfs: Metadata ENOSPC handling for balance")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
fs/btrfs/relocation.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 272b287f8cf0..de802ba35a34 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2128,7 +2128,6 @@ static noinline_for_stack int merge_reloc_root(struct reloc_control *rc,
struct btrfs_root *root)
{
struct btrfs_fs_info *fs_info = rc->extent_root->fs_info;
- LIST_HEAD(inode_list);
struct btrfs_key key;
struct btrfs_key next_key;
struct btrfs_trans_handle *trans = NULL;
Drop LIST_HEAD where the variable it declares is never used.
Commit 31c02e215700 ("IPoIB: Avoid using stale last_send counter
when reaping AHs") removed the uses, but not the declaration.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 31c02e215700 ("IPoIB: Avoid using stale last_send counter when reaping AHs")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/infiniband/ulp/ipoib/ipoib_ib.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 6d35570092d6..78fa777c87b1 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -669,7 +669,6 @@ static void __ipoib_reap_ah(struct net_device *dev)
{
struct ipoib_dev_priv *priv = ipoib_priv(dev);
struct ipoib_ah *ah, *tah;
- LIST_HEAD(remove_list);
unsigned long flags;
netif_tx_lock_bh(dev);
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: 895427bd012ce ("scsi: lpfc: NVME Initiator: Base modifications")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/scsi/lpfc/lpfc_sli.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 30734caf77e1..13fe9d3331b9 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -3948,7 +3948,6 @@ lpfc_sli_abort_iocb_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
void
lpfc_sli_abort_wqe_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
- LIST_HEAD(completions);
struct lpfc_iocbq *iocb, *next_iocb;
if (pring->ringno == LPFC_ELS_RING)
Drop LIST_HEAD where the variable it declares is never used.
These were introduced with the file, but were not even used
at that time.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 01649561a8b4b ("scsi: lpfc: NVME Initiator: bind to nvme_fc api")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/scsi/lpfc/lpfc_nvme.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 4c66b19e6199..2119f36213e4 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -2234,9 +2234,7 @@ lpfc_new_nvme_buf(struct lpfc_vport *vport, int num_to_alloc)
dma_addr_t pdma_phys_sgl;
uint16_t iotag, lxri = 0;
int bcnt, num_posted;
- LIST_HEAD(prep_nblist);
LIST_HEAD(post_nblist);
- LIST_HEAD(nvme_nblist);
for (bcnt = 0; bcnt < num_to_alloc; bcnt++) {
lpfc_ncmd = kzalloc(sizeof(struct lpfc_nvme_buf), GFP_KERNEL);
On Sun, Dec 23, 2018 at 09:57:01AM +0100, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> Commit 31c02e215700 ("IPoIB: Avoid using stale last_send counter
> when reaping AHs") removed the uses, but not the declaration.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: 31c02e215700 ("IPoIB: Avoid using stale last_send counter when reaping AHs")
> Signed-off-by: Julia Lawall <[email protected]>
>
Thanks,
Reviewed-by: Leon Romanovsky <[email protected]>
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: 26f1fe858f274 ("xfs: reduce lock hold times in buffer writeback")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
fs/xfs/xfs_buf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index b21ea2ba768d..eedc5e0156ff 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1992,7 +1992,6 @@ xfs_buf_delwri_submit_buffers(
struct list_head *wait_list)
{
struct xfs_buf *bp, *n;
- LIST_HEAD (submit_list);
int pinned = 0;
struct blk_plug plug;
Drop LIST_HEAD where the variable it declares is never used.
The uses of new_fcports were removed in 726b85487067 ("qla2xxx:
Add framework for async fabric discovery"), but not the
declaration.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/scsi/qla2xxx/qla_init.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 364bb52ed2a6..d72e3ad97a54 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -5400,7 +5400,6 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha)
fc_port_t *fcport;
uint16_t mb[MAILBOX_REGISTER_COUNT];
uint16_t loop_id;
- LIST_HEAD(new_fcports);
struct qla_hw_data *ha = vha->hw;
int discovery_gen;
Drop LIST_HEAD where the variable it declares is never used.
tmp_list has been declared since the introduction of the driver
and has never been used. The two declarations of list were
introduced with the containing functions but were also not 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: dc78baa2b90b ("dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller")
Fixes: 4facfe7f09f2b ("dmaengine: hdmac: Split device_control")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/dma/at_hdmac.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 01d936c9fe89..a0a9cd76c1d4 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -134,7 +134,6 @@ static struct at_desc *atc_desc_get(struct at_dma_chan *atchan)
struct at_desc *ret = NULL;
unsigned long flags;
unsigned int i = 0;
- LIST_HEAD(tmp_list);
spin_lock_irqsave(&atchan->lock, flags);
list_for_each_entry_safe(desc, _desc, &atchan->free_list, desc_node) {
@@ -1387,8 +1386,6 @@ static int atc_pause(struct dma_chan *chan)
int chan_id = atchan->chan_common.chan_id;
unsigned long flags;
- LIST_HEAD(list);
-
dev_vdbg(chan2dev(chan), "%s\n", __func__);
spin_lock_irqsave(&atchan->lock, flags);
@@ -1408,8 +1405,6 @@ static int atc_resume(struct dma_chan *chan)
int chan_id = atchan->chan_common.chan_id;
unsigned long flags;
- LIST_HEAD(list);
-
dev_vdbg(chan2dev(chan), "%s\n", __func__);
if (!atc_chan_is_paused(atchan))
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: 4a533218fccf ("dmaengine: sa11x0: Split device_control")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/dma/sa11x0-dma.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c
index 784d5f1a473b..3fae23768b47 100644
--- a/drivers/dma/sa11x0-dma.c
+++ b/drivers/dma/sa11x0-dma.c
@@ -705,7 +705,6 @@ static int sa11x0_dma_device_pause(struct dma_chan *chan)
struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device);
struct sa11x0_dma_phy *p;
- LIST_HEAD(head);
unsigned long flags;
dev_dbg(d->slave.dev, "vchan %p: pause\n", &c->vc);
@@ -732,7 +731,6 @@ static int sa11x0_dma_device_resume(struct dma_chan *chan)
struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device);
struct sa11x0_dma_phy *p;
- LIST_HEAD(head);
unsigned long flags;
dev_dbg(d->slave.dev, "vchan %p: resume\n", &c->vc);
Drop LIST_HEAD where the variable it declares is never used.
The declarations were introduced with the file, but the declared
variables were not 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: 6b4cd727eaf1 ("dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/dma/st_fdma.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c
index 07c20aa2e955..954f7cf62bb1 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -294,8 +294,6 @@ static void st_fdma_free_chan_res(struct dma_chan *chan)
struct rproc *rproc = fchan->fdev->slim_rproc->rproc;
unsigned long flags;
- LIST_HEAD(head);
-
dev_dbg(fchan->fdev->dev, "%s: freeing chan:%d\n",
__func__, fchan->vchan.chan.chan_id);
@@ -626,7 +624,6 @@ static void st_fdma_issue_pending(struct dma_chan *chan)
static int st_fdma_pause(struct dma_chan *chan)
{
unsigned long flags;
- LIST_HEAD(head);
struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
int ch_id = fchan->vchan.chan.chan_id;
unsigned long cmd = FDMA_CMD_PAUSE(ch_id);
Drop LIST_HEAD where the variable it declares is never used.
Commit ab703f818ac3 ("dmaengine: dw: lazy allocation of dma
descriptors") removed the uses, but not the declaration.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
// </smpl>
Fixes: ab703f818ac3 ("dmaengine: dw: lazy allocation of dma descriptors")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
drivers/dma/dw/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index dc053e62f894..290d21be4d4c 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -1150,7 +1150,6 @@ static void dwc_free_chan_resources(struct dma_chan *chan)
struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
struct dw_dma *dw = to_dw_dma(chan->device);
unsigned long flags;
- LIST_HEAD(list);
dev_dbg(chan2dev(chan), "%s: descs allocated=%u\n", __func__,
dwc->descs_allocated);
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: 0e20162ed1e9 ("NFSv4.1 Use MDS auth flavor for data server connection")
Signed-off-by: Julia Lawall <[email protected]>
---
Successfully 0-day tested on 151 configurations.
fs/nfs/nfs4client.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 2548405da1f7..735c1056a91c 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -145,7 +145,6 @@ static void
nfs4_shutdown_ds_clients(struct nfs_client *clp)
{
struct nfs4_ds_server *dss;
- LIST_HEAD(shutdown_list);
while (!list_empty(&clp->cl_ds_clients)) {
dss = list_entry(clp->cl_ds_clients.next,
On Sun, Dec 23, 2018 at 09:56:57AM +0100, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> These became useless in 244cd96adb5f ("net_sched: remove list_head
> from tc_action")
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action")
> Signed-off-by: Julia Lawall <[email protected]>
>
Thanks,
Reviewed-by: Leon Romanovsky <[email protected]>
Applied, thanks.--b.
On Sun, Dec 23, 2018 at 09:56:56AM +0100, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> This was introduced in c5c707f96fc9a ("nfsd: implement pNFS
> layout recalls"), but was not used even in that commit.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: c5c707f96fc9a ("nfsd: implement pNFS layout recalls")
> Signed-off-by: Julia Lawall <[email protected]>
>
> ---
> Successfully 0-day tested on 151 configurations.
>
> fs/nfsd/nfs4layouts.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c
> index 2b36aa037ce0..44517fb5c0de 100644
> --- a/fs/nfsd/nfs4layouts.c
> +++ b/fs/nfsd/nfs4layouts.c
> @@ -656,7 +656,6 @@ nfsd4_cb_layout_done(struct nfsd4_callback *cb, struct rpc_task *task)
> struct nfsd_net *nn;
> ktime_t now, cutoff;
> const struct nfsd4_layout_ops *ops;
> - LIST_HEAD(reaplist);
>
>
> switch (task->tk_status) {
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(-)
>
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(-)
> >
>
On Sun, Dec 23, 2018 at 09:57:03AM +0100, Julia Lawall 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: 26f1fe858f274 ("xfs: reduce lock hold times in buffer writeback")
> Signed-off-by: Julia Lawall <[email protected]>
Looks ok; are you planning to push this whole series directly to Linus
or do you want me to take the two xfs patches through?
Reviewed-by: Darrick J. Wong <[email protected]>
--D
>
> ---
> Successfully 0-day tested on 151 configurations.
>
> fs/xfs/xfs_buf.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index b21ea2ba768d..eedc5e0156ff 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -1992,7 +1992,6 @@ xfs_buf_delwri_submit_buffers(
> struct list_head *wait_list)
> {
> struct xfs_buf *bp, *n;
> - LIST_HEAD (submit_list);
> int pinned = 0;
> struct blk_plug plug;
>
>
On Sun, Dec 23, 2018 at 09:57:04AM +0100, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> Commit 0410c3bb2b88 ("xfs: factor ag btree root block
> initialisation") stopped using buffer_list and started using a
> buffer list in an aghdr_init_data structure, but the declaration
> of buffer_list was not removed.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: 0410c3bb2b88 ("xfs: factor ag btree root block initialisation")
> Signed-off-by: Julia Lawall <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
--D
>
> ---
> Successfully 0-day tested on 151 configurations.
>
> fs/xfs/xfs_fsops.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
> index ec2e63a7963b..f3ef70c542e1 100644
> --- a/fs/xfs/xfs_fsops.c
> +++ b/fs/xfs/xfs_fsops.c
> @@ -40,7 +40,6 @@ xfs_growfs_data_private(
> xfs_rfsblock_t new;
> xfs_agnumber_t oagcount;
> xfs_trans_t *tp;
> - LIST_HEAD (buffer_list);
> struct aghdr_init_data id = {};
>
> nb = in->newblocks;
>
On Sun, 23 Dec 2018, Darrick J. Wong wrote:
> On Sun, Dec 23, 2018 at 09:57:03AM +0100, Julia Lawall 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: 26f1fe858f274 ("xfs: reduce lock hold times in buffer writeback")
> > Signed-off-by: Julia Lawall <[email protected]>
>
> Looks ok; are you planning to push this whole series directly to Linus
> or do you want me to take the two xfs patches through?
Please take them. Thanks.
julia
>
> Reviewed-by: Darrick J. Wong <[email protected]>
>
> --D
>
> >
> > ---
> > Successfully 0-day tested on 151 configurations.
> >
> > fs/xfs/xfs_buf.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> > index b21ea2ba768d..eedc5e0156ff 100644
> > --- a/fs/xfs/xfs_buf.c
> > +++ b/fs/xfs/xfs_buf.c
> > @@ -1992,7 +1992,6 @@ xfs_buf_delwri_submit_buffers(
> > struct list_head *wait_list)
> > {
> > struct xfs_buf *bp, *n;
> > - LIST_HEAD (submit_list);
> > int pinned = 0;
> > struct blk_plug plug;
> >
> >
>
On Sun, Dec 23, 2018 at 09:57:02AM +0100, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> tmp_list has been declared since the introduction of the driver
> and has never been used. The two declarations of list were
> introduced with the containing functions but were also not 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: dc78baa2b90b ("dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller")
> Fixes: 4facfe7f09f2b ("dmaengine: hdmac: Split device_control")
> Signed-off-by: Julia Lawall <[email protected]>
Acked-by: Ludovic Desroches <[email protected]>
Thanks
>
> ---
> Successfully 0-day tested on 151 configurations.
>
> drivers/dma/at_hdmac.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 01d936c9fe89..a0a9cd76c1d4 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -134,7 +134,6 @@ static struct at_desc *atc_desc_get(struct at_dma_chan *atchan)
> struct at_desc *ret = NULL;
> unsigned long flags;
> unsigned int i = 0;
> - LIST_HEAD(tmp_list);
>
> spin_lock_irqsave(&atchan->lock, flags);
> list_for_each_entry_safe(desc, _desc, &atchan->free_list, desc_node) {
> @@ -1387,8 +1386,6 @@ static int atc_pause(struct dma_chan *chan)
> int chan_id = atchan->chan_common.chan_id;
> unsigned long flags;
>
> - LIST_HEAD(list);
> -
> dev_vdbg(chan2dev(chan), "%s\n", __func__);
>
> spin_lock_irqsave(&atchan->lock, flags);
> @@ -1408,8 +1405,6 @@ static int atc_resume(struct dma_chan *chan)
> int chan_id = atchan->chan_common.chan_id;
> unsigned long flags;
>
> - LIST_HEAD(list);
> -
> dev_vdbg(chan2dev(chan), "%s\n", __func__);
>
> if (!atc_chan_is_paused(atchan))
>
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(-)
>> >
>>
>
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.
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.
>
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
On 23-12-18, 09:57, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> Commit ab703f818ac3 ("dmaengine: dw: lazy allocation of dma
> descriptors") removed the uses, but not the declaration.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
Applied, thanks
--
~Vinod
On 23-12-18, 09:57, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> The variable has not been used since the function was introduced
> in 740aa95703c5 ("dmaengine: pl330: Split device_control").
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
Applied, thanks
--
~Vinod
On 23-12-18, 09:57, Julia Lawall 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>
Applied, thanks
--
~Vinod
On 23-12-18, 09:57, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> tmp_list has been declared since the introduction of the driver
> and has never been used. The two declarations of list were
> introduced with the containing functions but were also not used.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
Applied with Ludovic's ack, thanks
--
~Vinod
On 23-12-18, 09:57, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> The declarations were introduced with the file, but the declared
> variables were not 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: 6b4cd727eaf1 ("dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support")
> Signed-off-by: Julia Lawall <[email protected]>
Applied, thanks
--
~Vinod
On Sun, Dec 23, 2018 at 09:57:06AM +0100, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> The uses were removed in 3fd0a5585eb9 ("Btrfs: Metadata ENOSPC
> handling for balance"), but not the declaration.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: 3fd0a5585eb9 ("Btrfs: Metadata ENOSPC handling for balance")
> Signed-off-by: Julia Lawall <[email protected]>
Added to patch queue, thanks. I've dropepd the Fixes: line as it's not
really a fix that would need to go to stable. The original commit is
mentioned in the changelog which is IMHO sufficient.
On Sun, Dec 23, 2018 at 09:57:01AM +0100, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> Commit 31c02e215700 ("IPoIB: Avoid using stale last_send counter
> when reaping AHs") removed the uses, but not the declaration.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: 31c02e215700 ("IPoIB: Avoid using stale last_send counter when reaping AHs")
> Signed-off-by: Julia Lawall <[email protected]>
> Reviewed-by: Leon Romanovsky <[email protected]>
> ---
> Successfully 0-day tested on 151 configurations.
>
> drivers/infiniband/ulp/ipoib/ipoib_ib.c | 1 -
> 1 file changed, 1 deletion(-)
Applied to rdma for-next thanks
Jason
On 23/12/2018 09:57, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
>
> The declarations were introduced with the file, but the declared
> variables were not 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: 1107ba885e46 ("xen: add xenfs to allow usermode <-> Xen interaction")
> Signed-off-by: Julia Lawall <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Juergen
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
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
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
On Sun, 2018-12-23 at 09:57 +0100, Julia Lawall 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: 0e20162ed1e9 ("NFSv4.1 Use MDS auth flavor for data server
> connection")
> Signed-off-by: Julia Lawall <[email protected]>
>
> ---
> Successfully 0-day tested on 151 configurations.
>
> fs/nfs/nfs4client.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
> index 2548405da1f7..735c1056a91c 100644
> --- a/fs/nfs/nfs4client.c
> +++ b/fs/nfs/nfs4client.c
> @@ -145,7 +145,6 @@ static void
> nfs4_shutdown_ds_clients(struct nfs_client *clp)
> {
> struct nfs4_ds_server *dss;
> - LIST_HEAD(shutdown_list);
>
> while (!list_empty(&clp->cl_ds_clients)) {
> dss = list_entry(clp->cl_ds_clients.next,
>
Thanks Julia! Applied to my linux-next branch for inclusion in the 5.1
merge window.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]