On Mon, 2008-02-25 at 10:53 +0100, Johannes Berg wrote:Could gcc validate the printf %M arguments? Another possibility without changing printf argument validation is to use a MAC_FMT macro in place of "%s" #ifdef CONFIG_INLINE_MAC #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" #define DECLARE_MAC_BUF(var) #define print_mac(buf, addr) (addr)[0], (addr)[1], (addr)[2], (addr)[3], (addr)[4], (addr)[5] #else #define MAC_FMT "%s" #define DECLARE_MAC_BUF(var) char var[18]; extern char *print_mac(char *buf, const unsigned char *addr); #endif use: DECLARE_MAC_BUF(mac); printk(KERN_INFO "Mac address is: " MAC_FMT "\n", print_mac(mac, addr)); -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| James Bottomley | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Trent Piepho | Re: [PATCH] fakephp: Allocate PCI resources before adding the device |
| Antonio Almeida | HTB accuracy for high speed |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
git: | |
