df6edfdf94333f7bf85a0d7f29c065a221d72b80
[openwrt/staging/ansuel.git] /
1 From: Lorenzo Bianconi <lorenzo@kernel.org>
2 Date: Sun, 27 Aug 2023 19:33:47 +0200
3 Subject: [PATCH] net: ethernet: mtk_wed: minor change in wed_{tx,rx}info_show
4
5 No functional changes, just cosmetic ones.
6
7 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
8 Link: https://lore.kernel.org/r/71e046c72a978745f0435af265dda610aa9bfbcf.1693157578.git.lorenzo@kernel.org
9 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
10 ---
11
12 --- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
13 +++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
14 @@ -84,7 +84,6 @@ dump_wed_regs(struct seq_file *s, struct
15 }
16 }
17
18 -
19 static int
20 wed_txinfo_show(struct seq_file *s, void *data)
21 {
22 @@ -142,10 +141,8 @@ wed_txinfo_show(struct seq_file *s, void
23 struct mtk_wed_hw *hw = s->private;
24 struct mtk_wed_device *dev = hw->wed_dev;
25
26 - if (!dev)
27 - return 0;
28 -
29 - dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
30 + if (dev)
31 + dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
32
33 return 0;
34 }
35 @@ -217,10 +214,8 @@ wed_rxinfo_show(struct seq_file *s, void
36 struct mtk_wed_hw *hw = s->private;
37 struct mtk_wed_device *dev = hw->wed_dev;
38
39 - if (!dev)
40 - return 0;
41 -
42 - dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
43 + if (dev)
44 + dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
45
46 return 0;
47 }