Re: [PATCH v1 1/1] spi: Remove unneeded parentheses in spi_map_buf()

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

 



On Sat, Jun 19, 2021 at 02:15:26PM +0300, Andy Shevchenko wrote:
> The boolean expression to get kmap_buf is hard to read due to
> too many unneeded parentheses. Remove them for good.

> -	const bool kmap_buf = ((unsigned long)buf >= PKMAP_BASE &&
> -				(unsigned long)buf < (PKMAP_BASE +
> -					(LAST_PKMAP * PAGE_SIZE)));
> +	const bool kmap_buf = (unsigned long)buf >= PKMAP_BASE &&
> +			      (unsigned long)buf < (PKMAP_BASE + LAST_PKMAP * PAGE_SIZE);

No, I think this makes things worse - to the extent there's an issue
here it's not excessive brackets.

Attachment: signature.asc
Description: PGP 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