Skip to content

Commit

Permalink
mac80211: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:
./drivers/net/wireless/mac80211_hwsim.c:1040:0-23: WARNING:
hwsim_fops_rx_rssi should be defined with
DEFINE_DEBUGFS_ATTRIBUTE

Signed-off-by: Yihao Han <hanyihao@vivo.com>
Link: https://lore.kernel.org/r/20220218070228.6210-1-hanyihao@vivo.com
[fix indentation]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Yihao Han authored and Johannes Berg committed Mar 11, 2022
1 parent 1922260 commit 3856f1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,9 +1037,9 @@ static int hwsim_fops_rx_rssi_write(void *dat, u64 val)
return 0;
}

DEFINE_SIMPLE_ATTRIBUTE(hwsim_fops_rx_rssi,
hwsim_fops_rx_rssi_read, hwsim_fops_rx_rssi_write,
"%lld\n");
DEFINE_DEBUGFS_ATTRIBUTE(hwsim_fops_rx_rssi,
hwsim_fops_rx_rssi_read, hwsim_fops_rx_rssi_write,
"%lld\n");

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

0 comments on commit 3856f1b

Please sign in to comment.