Re: [RFC PATCH v3 04/21] mm/zsmalloc: add alternatives of frequently used helper functions

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

 



On Thu, Nov 30, 2023 at 07:12:25PM +0900, Hyeonggon Yoo wrote:
> +static __maybe_unused int is_first_zsdesc(struct zsdesc *zsdesc)
> +{
> +	return PagePrivate(zsdesc_page(zsdesc));
> +}

static inline bool is_first_zsdesc(struct zsdesc *zsdesc)
{
	return folio_test_private(zsdesc_folio(zsdesc));
}

> -static inline struct page *get_first_page(struct zspage *zspage)
> +static __maybe_unused inline struct page *get_first_page(struct zspage *zspage)

I don't think you need __maybe_unused with inline.

> +static __maybe_unused struct zsdesc *get_first_zsdesc(struct zspage *zspage)
> +{
> +	struct zsdesc *first_zsdesc = zspage->first_zsdesc;
> +
> +	VM_BUG_ON_PAGE(!is_first_zsdesc(first_zsdesc), zsdesc_page(first_zsdesc));

Do we want a VM_BUG_ON_ZSDESC?





[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