mediatek/mt76: cleanup the code a bit
PATCH 1/1 mediatek/mt76: cleanup the code a bit
Function mt76_register_debugfs just call mt76_register_debugfs_fops with NULL op parameter.
This change is to cleanup the code a bit, elete the meaningless mt76_register_debugfs, and all call mt76_register_debugfs_fops.
--- drivers/net/wireless/mediatek/mt76/mt76.h | 4 ---- drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76.h +0 -4
@@ -927,10 +927,6 @@ int mt76_register_phy(struct mt76_phy *phy, bool vht,struct dentry *mt76_register_debugfs_fops (struct mt76_phy *phy,const struct file_operations *ops); -static inline struct dentry *mt76_register_debugfs (struct mt76_dev *dev) -{ -return mt76_register_debugfs_fops (&dev->phy,NULL ); -}int mt76_queues_read (struct seq_file *s,void *data); void mt76_seq_puts_array(struct seq_file *file, const char *str,
drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c +2 -1
@@ -96,8 +96,9 @@ DEFINE_SHOW_ATTRIBUTE(mt7603_ampdu_stat);void mt7603_init_debugfs (struct mt7603_dev *dev) {struct dentry *dir; +struct mt76_dev *pdev = &dev->mt76; - dir =mt76_register_debugfs (&dev->mt76); + dir =mt76_register_debugfs_fops (&pdev->phy,NULL );if (!dir)return ;
drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c +2 -1
@@ -117,8 +117,9 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_edcca, mt76_edcca_get, mt76_edcca_set,void mt76x02_init_debugfs (struct mt76x02_dev *dev) {struct dentry *dir; +struct mt76_dev *pdev = &dev->mt76; - dir =mt76_register_debugfs (&dev->mt76); + dir =mt76_register_debugfs_fops (&pdev->phy,NULL );if (!dir)return ;
Signature · 1 line
2.33.1
Quoted 6 lines · Bernard Zhao
Function
mt76_register_debugfsjust callmt76_register_debugfs_fopswith NULL op parameter.
This change is to cleanup the code a bit, elete the meaninglessmt76_register_debugfs, and all callmt76_register_debugfs_fops.Signed-off-by Bernard Zhao <[email protected]>
Please make the title more informative and don't use mediatek in the title, for example something like this:
mt76: remove simple mt76_register_debugfs() function
More info:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_title_is_wrong
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches