Re: [PATCH] spi: core: Validate lenght of the transfers in message

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

 



On Thu, Feb 13, 2014 at 04:46:46PM +0200, Ivan T. Ivanov wrote:

> +		/* No partial transfers accepted */
> +		if (!n_words || xfer->len & (w_size - 1))
> +			return -EINVAL;

Please write this using % rather than the & - it's a lot clearer what
it's checking for, I had to think what the above meant.  Hopefully the
compiler will make it equally fast either way.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux