lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1210984676.5915.70.camel@brick>
Date:	Fri, 16 May 2008 17:37:56 -0700
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Bryan Wu <cooloney@...nel.org>, Jie Zhang <jie.zhang@...log.com>,
	Oliver Neukum <oliver@...kum.org>, david-b@...bell.net,
	greg@...ah.com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC-PATCH] lib: add byteorder helpers for the aligned case

On Fri, 2008-05-16 at 20:35 -0400, Alan Stern wrote:
> On Fri, 16 May 2008, Harvey Harrison wrote:
> 
> > +static inline void put_le16(u16 val, void *ptr)
> > +{
> > +	*(__le16 *)ptr = cpu_to_le16(val);
> > +}
> 
> Is this able to do the byte rearrangement at compile time if val is a 
> compile-time constant?  I imagine it would.
> 

Yes, the cpu_to_le/be functions to get optimized if they are passed a
compile time constant.


Harvey

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ