Re: [PATCH v3] mm/page_alloc: simplify page_is_buddy() for better code readability

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

 



On Tue, Mar 10, 2020 at 05:15:29PM +0800, qiwuchen55@xxxxxxxxx wrote:
> Simplify page_is_buddy() to reduce the redundant code for better code
> readability.

If you're making these larger changes, then ...

> @@ -794,29 +794,23 @@ static inline void set_page_order(struct page *page, unsigned int order)
>  static inline int page_is_buddy(struct page *page, struct page *buddy,
>  							unsigned int order)

Ideally this should return 'bool'.

> +	/*
> +	 * zone check is done late to avoid uselessly
> +	 * calculating zone/node ids for pages that could
> +	 * never merge.
> +	 */

This comment could be reflowed onto fewer lines.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux