lkml.org 
[lkml]   [2004]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.27-pre2: tg3: there's no WARN_ON in 2.4
Marc-Christian Petersen wrote:
> On Tuesday 04 May 2004 22:46, Adrian Bunk wrote:
>
> Hi Adrian,
>
>
>>drivers/net/net.o(.text+0x60293): In function `tg3_get_strings':
>>: undefined reference to `WARN_ON'
>>make: *** [vmlinux] Error 1
>>There's no WARN_ON in 2.4.
>
>
> yep. Either we backport WARN_ON ;) or simply do the attached.
>
> --- old/drivers/net/tg3.c 2004-05-04 14:30:22.000000000 +0200
> +++ new/drivers/net/tg3.c 2004-05-04 14:49:58.000000000 +0200
> @@ -51,6 +51,10 @@
> #define TG3_TSO_SUPPORT 0
> #endif
>
> +#ifndef WARN_ON
> +#define WARN_ON(x) do { } while (0)
> +#endif

Related but off topic. Do people find the ab#define WARN_ON(x)
a macro acceptable? The fact is that not mentioning 'x' means any
side-effects are not executed, meaning the author must take special
care when using this macro.

Maybe something like
#define WARN_ON(x) do {(void)(x);} while (0)
which may still attract a warning about "stmt has no effect" (not
sure).

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.766 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site