Skip to content

Commit

Permalink
mac80211_hwsim: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
Browse files Browse the repository at this point in the history
It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
operation rather than DEFINE_SIMPLE_ATTRIBUTE.

It is detected with the help of coccinelle.

Signed-off-by: zhong jiang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
xiongzhongjiang authored and jmberg-intel committed Nov 8, 2019
1 parent 3f2aef1 commit 7d13cf1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ static int hwsim_fops_ps_write(void *dat, u64 val)
return 0;
}

DEFINE_SIMPLE_ATTRIBUTE(hwsim_fops_ps, hwsim_fops_ps_read, hwsim_fops_ps_write,
"%llu\n");
DEFINE_DEBUGFS_ATTRIBUTE(hwsim_fops_ps, hwsim_fops_ps_read, hwsim_fops_ps_write,
"%llu\n");

static int hwsim_write_simulate_radar(void *dat, u64 val)
{
Expand All @@ -781,8 +781,8 @@ static int hwsim_write_simulate_radar(void *dat, u64 val)
return 0;
}

DEFINE_SIMPLE_ATTRIBUTE(hwsim_simulate_radar, NULL,
hwsim_write_simulate_radar, "%llu\n");
DEFINE_DEBUGFS_ATTRIBUTE(hwsim_simulate_radar, NULL,
hwsim_write_simulate_radar, "%llu\n");

static int hwsim_fops_group_read(void *dat, u64 *val)
{
Expand All @@ -798,9 +798,9 @@ static int hwsim_fops_group_write(void *dat, u64 val)
return 0;
}

DEFINE_SIMPLE_ATTRIBUTE(hwsim_fops_group,
hwsim_fops_group_read, hwsim_fops_group_write,
"%llx\n");
DEFINE_DEBUGFS_ATTRIBUTE(hwsim_fops_group,
hwsim_fops_group_read, hwsim_fops_group_write,
"%llx\n");

static netdev_tx_t hwsim_mon_xmit(struct sk_buff *skb,
struct net_device *dev)
Expand Down

0 comments on commit 7d13cf1

Please sign in to comment.