lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] input: joystick: Fix buffer data parsing
> >>   		case 2:
> >> - data_u16 = (const u16 *)data + idx;
> >> -
> >> /*
> >> * Data is aligned to the sample size by IIO core.
> >> * Call `get_unaligned_xe16` to hide type casting.
> >> */
> >> if (endianness == IIO_BE)
> >> - val = get_unaligned_be16(data_u16);
> >> + val = get_unaligned_be16(chan_data);
> >
> > I obviously missed this previously but these are aligned so we don't
> > need the
> > unaligned form.
>
> Yes, the comment above says that it's used to hide type casting.
oops :)

Thanks for pointing out my lack of observation!

Jonathan

\
 
 \ /
  Last update: 2022-08-22 21:37    [W:0.069 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site