Search Linux Wireless

Re: [PATCH 11/17] cw1200: v2: WSM (ie host-firmware) host interface

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

 



On Sat, Dec 22, 2012 at 06:18:26PM -0500, Solomon Peachy wrote:
> +	size_t pos = buf->data - buf->begin;
> +	size_t size = pos + extra_size;
> +
> +
> +	if (size & (FWLOAD_BLOCK_SIZE - 1)) {
> +		size &= FWLOAD_BLOCK_SIZE;
> +		size += FWLOAD_BLOCK_SIZE;
> +	}

I think this should be

    size = round_up(size, FWLOAD_BLOCK_SIZE);

Otherwise it fails if size > 2 * FWLOAD_BLOCK_SIZE (it may never be,
but it still looks wrong).

-- 
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux