Re: [PATCH 1/2] afs: Move UUID struct to linux/uuid.h

From: Arnd Bergmann
Date: Thu Jan 12 2017 - 11:24:03 EST


On Thu, Jan 12, 2017 at 5:14 PM, David Howells <dhowells@xxxxxxxxxx> wrote:
>> > reply.ia.uuid[3] = htonl((s8) afs_uuid.clock_seq_hi_and_reserved);
>> > reply.ia.uuid[4] = htonl((s8) afs_uuid.clock_seq_low);
>> > for (loop = 0; loop < 6; loop++)
>>
>> Shouldn't this be ntohs() instead of ntohl(), like this:
>>
>> reply.ia.uuid[1] = htonl(ntohl(afs_uuid.time_mid));
>> reply.ia.uuid[2] = htonl(ntohl(afs_uuid.time_hi_and_version));
>
> I think you forgot to change ntohl() to ntohs() in that - and you're right.
>
> Okay, how about the attached?

Yes, looks good to me.

Arnd