lkml.org 
[lkml]   [2013]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH char-misc-linus 5/5] misc: mic: Fix user space namespace pollution from mic_common.h.
On 11/26/2013 10:15 AM, Ashutosh Dixit wrote:
> Avoid declaring ALIGN() and __aligned() in
> include/uapi/linux/mic_common.h since they pollute user space
> namespace. Also, mic_aligned_size() can be simply replaced simply by
> sizeof() since all structures where mic_aligned_size() is used are
> declared using __attribute__ ((aligned(8)));
>
> +#define MIC_ALIGN(a, x) (((a) + (x) - 1) & ~((x) - 1))
>

This is still user namespace. I would suggest __mic_align() or
_MIC_ALIGN() instead, unless you're actively expecting user code to make
use of this macro (in which case it should be made more robust.)

-hpa




\
 
 \ /
  Last update: 2013-11-26 21:41    [W:0.131 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site