Messages in this thread | | | Subject | Re: [PATCH 05/44 take 2] [UBI] internal common header | From | Artem Bityutskiy <> | Date | Mon, 26 Feb 2007 12:28:02 +0200 |
| |
On Sun, 2007-02-25 at 05:45 +0000, Christoph Hellwig wrote: > It's definitively not safe for userspace - packed is not an ISO C thing > and there's no guarantee userspace compilers understand it. Also you > really don't want to use packed in new code, if you really need oddly > aligned types it's much better to use byte arrays.
Let me express my unsorted points:
1. It is certainly OK in kernel, if it is not OK in user-space, 'make headers_install' should remove the __attribute__ stuff.
2. I failed to find __atribute__ stuff in ISO C99, so it is not standard. _BUT_ there are many non-C99 assumptions in kernel anyway. So "non ISO C" is a weak argument anyway.
3. [dedekind@mordor ubi-2.6.git]$ make headers_install .... [snip] [dedekind@mordor include]$ grep -r packed * | wc -l 117
This is the _fact_ of life.
4. Nonetheless, I do not mind at all to remove the "packed" stuff if you can guarantee that all this compilers on all platforms will use it as packed. Otherwise we should play safe instead.
Artem.
-- Best regards, Artem Bityutskiy (Битюцкий Артём)
- 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/
| |