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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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".
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux