Re: [PATCH 1/3] sparc: Increase portability of strncpy_from_user() implementation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 May 2012 09:04:27 -0700

> Btw, this would have been much cleaner with something like
> 
>    #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
>       #define IS_UNALIGNED(src,dst) 0
>    #else
>       #define IS_UNALIGNED(src,dst) (((long)(src) | (long)(dst)) &
> (sizeof(long) - 1))
>    #endif
> 
> and then just
> 
>      if (IS_UNALIGNED(src,dst))
>         goto byte_at_a_time;

Ok, I'll make this adjustment.
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux