Simon Brand simon.brand at
Sat Jan 17 14:45:06 EST 2015

Am Sat, 17 Jan 2015 08:58:13 -0800
schrieb Manish Katiyar <mkatiyar at>:

> Have you searched through archives. Exactly 7 years ago, I had the
> same question.

No, sorry, I missed that :-x
Thank you.

To get this straight: it is only to produce a warning at compile time,
when it is misused?

I compiled the kernel two times, one time with the original code and
one time with
#define container_of(ptr, type, member) ({			\
	(type *)( (char *)ptr - offsetof(type,member) );})

The secound kernel does not work proberly. 
First there is a kernel BUG at include/drm/drm_mm.h:145 at every boot:

Secound the kernel hangs on reboot and poweroff:

Third for example startx only produces the output:
waiting for X server to begin accepting connections

There is no further output in dmesg.

The X server starts correctly with the first/original kernel.

I compiled both kernels with following config:
and following patches:

I compiled a little c code with both defines and gcc is producing
another binary, but both are working as they should.

Thank you for your reply.

More information about the Kernelnewbies mailing list