Re: [PATCH 0/2] (Was: perf_event_mmap(vma) && !vma->vm_mm)

From: Oleg Nesterov
Date: Thu Oct 17 2013 - 11:34:29 EST


On 10/17, Oleg Nesterov wrote:
>
> - we do not really need "len", we can simply do
>
> size = strlen(name) + 1;
> while (size % sizeof(u64))
> name[size++] = '\0';
>
> although I won't argue if you dislike "size & 7" in while().

Or, perhaps,

while (!IS_ALIGNED(size, sizeof(u64)))
name[size++] = '\0';

to make it self-explanatory.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/