lkml.org 
[lkml]   [2007]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 05/44 take 2] [UBI] internal common header
From
Date
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/

\
 
 \ /
  Last update: 2007-02-26 11:37    [W:0.173 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site