another DECLARE transform needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey,

I've been struggling with this for awhile so I might as well just ask for help.

../include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 'phylink_link_state'
../include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 'phylink_link_state'

This comes from:

struct phylink_link_state {
	__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising);
	__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising);
	phy_interface_t interface;
	int speed;
	int duplex;
	int pause;
	unsigned int link:1;
	unsigned int an_enabled:1;
	unsigned int an_complete:1;
};

where __ETHTOOL_DECLARE_LINK_MODE_MASK() is basically a DECLARE_BITMAP():
(from include/linux/ethtool.h:)

/* number of link mode bits/ulongs handled internally by kernel */
#define __ETHTOOL_LINK_MODE_MASK_NBITS			\
	(__ETHTOOL_LINK_MODE_LAST + 1)

/* declare a link mode bitmap */
#define __ETHTOOL_DECLARE_LINK_MODE_MASK(name)		\
	DECLARE_BITMAP(name, __ETHTOOL_LINK_MODE_MASK_NBITS)

I have tried multiple string substitutions but they have all failed, so if anyone
can make it work, please do so.

thanks.
-- 
Here's my current patch:
---
From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Add support for __ETHTOOL_DECLARE_LINK_MODE_MASK() as used in
<linux/phylink.h>.

../include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 'phylink_link_state'
../include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 'phylink_link_state'

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
---
 scripts/kernel-doc |    2 ++
 1 file changed, 2 insertions(+)

--- lnx-416-rc6.orig/scripts/kernel-doc
+++ lnx-416-rc6/scripts/kernel-doc
@@ -1020,6 +1020,8 @@ sub dump_struct($$) {
 	$members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
 	# replace DECLARE_BITMAP
 	$members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
+	# replace __ETHTOOL_DECLARE_LINK_MODE_MASK
+	$members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([a-zA-Z0-9_]+)\)/unsigned long $1\[BITS_TO_LONGS\(__ETHTOOL_LINK_MODE_MASK_NBITS\)\]/gos;
 	# replace DECLARE_HASHTABLE
 	$members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
 	# replace DECLARE_KFIFO


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux