[PATCH v2 09/23] mm/balloon_compaction: make balloon_mops static

David Hildenbrand (Red Hat) posted 23 patches 3 weeks, 4 days ago
There is a newer version of this series
[PATCH v2 09/23] mm/balloon_compaction: make balloon_mops static
Posted by David Hildenbrand (Red Hat) 3 weeks, 4 days ago
There is no need to expose this anymore, so let's just make it static.

Signed-off-by: David Hildenbrand (Red Hat) <david@kernel.org>
---
 include/linux/balloon_compaction.h | 1 -
 mm/balloon_compaction.c            | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
index ad594af6ed100..7db66c2c86cdc 100644
--- a/include/linux/balloon_compaction.h
+++ b/include/linux/balloon_compaction.h
@@ -78,7 +78,6 @@ static inline void balloon_devinfo_init(struct balloon_dev_info *balloon)
 }
 
 #ifdef CONFIG_BALLOON_COMPACTION
-extern const struct movable_operations balloon_mops;
 /*
  * balloon_page_device - get the b_dev_info descriptor for the balloon device
  *			 that enqueues the given page.
diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
index 28ef0cb6b3bbc..c44e0b62203cc 100644
--- a/mm/balloon_compaction.c
+++ b/mm/balloon_compaction.c
@@ -286,7 +286,7 @@ static int balloon_page_migrate(struct page *newpage, struct page *page,
 	return 0;
 }
 
-const struct movable_operations balloon_mops = {
+static const struct movable_operations balloon_mops = {
 	.migrate_page = balloon_page_migrate,
 	.isolate_page = balloon_page_isolate,
 	.putback_page = balloon_page_putback,
-- 
2.52.0
Re: [PATCH v2 09/23] mm/balloon_compaction: make balloon_mops static
Posted by Lorenzo Stoakes 3 weeks, 4 days ago
On Thu, Jan 15, 2026 at 10:19:59AM +0100, David Hildenbrand (Red Hat) wrote:
> There is no need to expose this anymore, so let's just make it static.
>
> Signed-off-by: David Hildenbrand (Red Hat) <david@kernel.org>

Seems reasonable, so:

Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>

> ---
>  include/linux/balloon_compaction.h | 1 -
>  mm/balloon_compaction.c            | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
> index ad594af6ed100..7db66c2c86cdc 100644
> --- a/include/linux/balloon_compaction.h
> +++ b/include/linux/balloon_compaction.h
> @@ -78,7 +78,6 @@ static inline void balloon_devinfo_init(struct balloon_dev_info *balloon)
>  }
>
>  #ifdef CONFIG_BALLOON_COMPACTION
> -extern const struct movable_operations balloon_mops;
>  /*
>   * balloon_page_device - get the b_dev_info descriptor for the balloon device
>   *			 that enqueues the given page.
> diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
> index 28ef0cb6b3bbc..c44e0b62203cc 100644
> --- a/mm/balloon_compaction.c
> +++ b/mm/balloon_compaction.c
> @@ -286,7 +286,7 @@ static int balloon_page_migrate(struct page *newpage, struct page *page,
>  	return 0;
>  }
>
> -const struct movable_operations balloon_mops = {
> +static const struct movable_operations balloon_mops = {
>  	.migrate_page = balloon_page_migrate,
>  	.isolate_page = balloon_page_isolate,
>  	.putback_page = balloon_page_putback,
> --
> 2.52.0
>