lkml.org 
[lkml]   [2015]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: gdm724: adding kernel endianness header
On Fri, May 08, 2015 at 06:29:24PM -0500, Jaime Arrocha wrote:
> >From TODO list: remove test for host endian
> Included header to gather information about host endianness.
> Please let me know if the code addition requires corrections
> to meet standards.
>

No. This isn't really an improvement. We need to get rid of ->host_ed
entirely. Which is actually easy. Basically change gdm_cpu_to_dev16()
and friends to do so something:

u16 gdm_cpu_to_dev16(struct gdm_endian *ed, u16 x)
{
if (ed->dev_ed == ENDIANNESS_LITTLE)
return cpu_to_le16(x);
else
return cpu_to_be16(x);
}

regards,
dan carpenter



\
 
 \ /
  Last update: 2015-05-09 13:21    [W:0.046 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site