Re: [PATCH v2] net: introduce helper macro for_each_cmsghdr

David Miller
2014-12-10T19:44:37Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: Text/Plain; charset=iso-8859-7, Size: 2758 bytes --]

From: David Miller <davem@davemloft.net>
Date: Wed, 10 Dec 2014 13:48:04 -0500 (EST)

> From: Gu Zheng <guz.fnst@cn.fujitsu.com>
> Date: Wed, 10 Dec 2014 13:36:25 +0800
>
>> Introduce helper macro for_each_cmsghdr as a wrapper of the enumerating
>> cmsghdr from msghdr, just cleanup.
>>
>> Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
>
> Applied, thanks.

This breaks the build, I'm reverting.

You cannot use your new macros in
Documentation/networking/timestamping/txtimestamp.c, that is a
userland program and the header you are adding your helper to is not
available to userspace.

This also means you didn't sufficiently test the build of your
changes.

Documentation/networking/timestamping/timestamping.c: In function ¡printpacket¢:
Documentation/networking/timestamping/timestamping.c:172:2: warning: implicit declaration of function ¡for_each_cmsghdr¢ [-Wimplicit-function-declaration]
Documentation/networking/timestamping/timestamping.c:172:30: error: expected ¡;¢ before ¡{¢ token
Documentation/networking/timestamping/timestamping.c:161:18: warning: unused variable ¡ts¢ [-Wunused-variable]
Documentation/networking/timestamping/timestamping.c:160:17: warning: unused variable ¡tv¢ [-Wunused-variable]
make[3]: *** [Documentation/networking/timestamping/timestamping] Error 1
make[3]: *** Waiting for unfinished jobs....
Documentation/networking/timestamping/txtimestamp.c: In function ¡__recv_errmsg_cmsg¢:
Documentation/networking/timestamping/txtimestamp.c:187:2: warning: implicit declaration of function ¡for_each_cmsghdr¢ [-Wimplicit-function-declaration]
Documentation/networking/timestamping/txtimestamp.c:187:19: error: ¡cmsg¢ undeclared (first use in this function)
Documentation/networking/timestamping/txtimestamp.c:187:19: note: each undeclared identifier is reported only once for each function it appears in
Documentation/networking/timestamping/txtimestamp.c:187:30: error: expected ¡;¢ before ¡{¢ token
Documentation/networking/timestamping/txtimestamp.c:185:18: warning: unused variable ¡cm¢ [-Wunused-variable]
Documentation/networking/timestamping/txtimestamp.c:184:27: warning: unused variable ¡tss¢ [-Wunused-variable]
Documentation/networking/timestamping/txtimestamp.c:183:28: warning: unused variable ¡serr¢ [-Wunused-variable]
Documentation/networking/timestamping/txtimestamp.c: At top level:
Documentation/networking/timestamping/txtimestamp.c:123:13: warning: ¡print_timestamp¢ defined but not used [-Wunused-function]
Documentation/networking/timestamping/txtimestamp.c:159:13: warning: ¡print_pktinfo¢ defined but not used [-Wunused-function]

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥