RE: [PATCH net] hyperv: Fix a compiler warning in netvsc_send()

From: Haiyang Zhang
Date: Tue Apr 16 2013 - 16:46:49 EST


> -----Original Message-----
> From: Joe Perches [mailto:joe@xxxxxxxxxxx]
> Sent: Tuesday, April 16, 2013 4:31 PM
> To: Haiyang Zhang
> Cc: David Miller; netdev@xxxxxxxxxxxxxxx; KY Srinivasan; olaf@xxxxxxxxx;
> jasowang@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> devel@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH net] hyperv: Fix a compiler warning in netvsc_send()
>
> On Tue, 2013-04-16 at 20:18 +0000, Haiyang Zhang wrote:
> > > From: David Miller [mailto:davem@xxxxxxxxxxxxx] It works fine, but
> > > it's unclean.
> > > Keep the req_id type as "u64", because that's what it is, a 64-bit request
> ID.
> > I will make this update and submit a new patch, with the added comments.
>
> Do you mean you'll use this to avoid compiler warnings?
>
> req_id = (u64)(unsigned long)packet;

I will use:
req_id = (ulong)packet;

Assigning 32 bit integer to 64 bit variable is fine.

Thanks,
- Haiyang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/