Subject: Re: [PATCH net] mscan: zero accidentally copied register content

From: Oliver Hartkopp <[email-masked]>
Date: Thu, 06 Oct 2011 16:01:45 +0200

On 10/06/11 11:24, Wolfram Sang wrote:

> 
>> Why do you want to change 16-bit accesses in general? They are faster
>> than two 8 bit accesses. 
> 
> Yup, was thinking the same.

Ah, i did not get this from your code example

	if (can_dlc & 1)
		*payload = in_be16() & mask;

which probably does the same as Wolfgangs more obvious suggestion

	if (frame->can_dlc & 1)
		frame->data[frame->can_dlc - 1] = in_8(data);

:-)

As my patch could be done without real testing, as i did not change the
register access and only fixed the result ...

	if (frame->can_dlc & 1)
		frame->data[frame->can_dlc] = 0;

... it would be nice if e.g. Wolfgang could send his patch after some testing,
as i currently don't have access to my MPC5200 hardware here.

Tnx & best regards,
Oliver