lkml.org 
[lkml]   [2008]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] byteorder: eliminate pointer bytorder api

On Wednesday 2008-05-21 00:30, Harvey Harrison wrote:
>On Tue, 2008-05-20 at 15:19 -0700, David Miller wrote:
>> From: Harvey Harrison <harvey.harrison@gmail.com>
>> Date: Tue, 20 May 2008 15:15:25 -0700
>>
>> > Obviously I missed that part, my apologies. Would it be acceptable if,
>> > taking the possibly arch-specific parts, moved the [endian]_to_cpup
>> > name over to get_[endian]
>>
>> Why are we fiddling with interface names that have been fine for about
>> 10 years?

I suggest some comments be added to the cpu_to_*p() to specify their
reason for being there (namely, speedups on some CPUs)

>Saw a lot of (or similar in a private helper):
>
>*(__be32 *)ptr = cpu_to_be32(val);
>
>So I came up with
>
>void put_be32(val, ptr);

I think it would be better to follow the common notation of the target
being on the left side (like most intel asm commands and things like
C's memcpy, etc)

void put_be32(ptr, val);



\
 
 \ /
  Last update: 2008-05-26 14:21    [W:0.041 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site