Re: [PATCH net-next] hyperv: Add support for Virtual Receive SideScaling (vRSS)

From: David Miller
Date: Thu Dec 19 2013 - 18:00:20 EST


From: Tom Herbert <therbert@xxxxxxxxxx>
Date: Thu, 19 Dec 2013 13:43:06 -0800

> + u32 v, r;
> + int off, rem;
> +
> + off = idx / 8;
> + rem = idx % 8;
> +
> + v = (((unsigned int)key[off]) << 24) +
> + (((unsigned int)key[off + 1]) << 16) +
> + (((unsigned int)key[off + 2]) << 8) +
> + (((unsigned int)key[off + 3]));
> +
> + r = v << rem | (unsigned int)key[off + 4] >> (8 - rem);

Minor nit, since the type you are using is "u32", that's probably what
you should be casting to in these spots instead of "unsigned int".
--
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/