Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: ethernet: mtk_wed: annotate RCU release in attach()

There are some sparse warnings in wifi, and it seems that
it's actually possible to annotate a function pointer with
__releases(), making the sparse warnings go away. In a way
that also serves as documentation that rcu_read_unlock()
must be called in the attach method, so add that annotation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250423150811.456205-2-johannes@sipsolutions.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Johannes Berg and committed by
Jakub Kicinski
d57ee998 a764e811

+1 -1
+1 -1
include/linux/soc/mediatek/mtk_wed.h
··· 192 192 }; 193 193 194 194 struct mtk_wed_ops { 195 - int (*attach)(struct mtk_wed_device *dev); 195 + int (*attach)(struct mtk_wed_device *dev) __releases(RCU); 196 196 int (*tx_ring_setup)(struct mtk_wed_device *dev, int ring, 197 197 void __iomem *regs, bool reset); 198 198 int (*rx_ring_setup)(struct mtk_wed_device *dev, int ring,