lkml.org 
[lkml]   [2012]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] netxen: qlogic ethernet : Fix Endian Bug.
From
here "mac" is in "u64" and I have casted it to "__le64".
Because its required there.

If you have any better suggestion, please let me know.


regards
santosh

On Mon, Mar 12, 2012 at 3:07 PM, David Laight <David.Laight@aculab.com> wrote:
>
>
>> -----Original Message-----
>> From: netdev-owner@vger.kernel.org
>> [mailto:netdev-owner@vger.kernel.org] On Behalf Of santosh
>> prasad nayak
>> Sent: 11 March 2012 09:17
>> To: Rajesh Borundia
>> Cc: Sony Chacko; netdev; linux-kernel; kernel-janitors@vger.kernel.org
>> Subject: Re: [PATCH 3/3] netxen: qlogic ethernet : Fix Endian Bug.
>>
>> Thanks Rajesh for clarification.
>> Included all your inputs in the following patch.
>> This is for review not a formal one. Once review is done I will send a
>> formal patch.
>
> I'm not sure of the exact nature of the issues here,
> but whenever I see code that casts between the addresses
> of integer types large bells start ringing - such code
> tends to have unwanted dependencies against the sizes
> and endiannesses of the relevant fields.
> This code might be ok, but lines like:
>> +     if (*(__le64 *)mac == cpu_to_le64(~0ULL)) {
> rather give me the willies.
>
>        David
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-03-12 10:49    [W:0.050 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site