mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
mm/page_reporting: change page_reporting_order to PAGE_REPORTING_ORDER_UNSPECIFIED
page_reporting_order when uninitialised, holds a magic number -1. Since we now maintain PAGE_REPORTING_ORDER_UNSPECIFIED as -1, which is also a flag, set page_reporting_order to this flag. Link: https://lkml.kernel.org/r/20260303113032.3008371-6-yuvraj.sakshith@oss.qualcomm.com Signed-off-by: Yuvraj Sakshith <yuvraj.sakshith@oss.qualcomm.com> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Cc: Brendan Jackman <jackmanb@google.com> Cc: Dexuan Cui <decui@microsoft.com> Cc: Eugenio Pérez <eperezma@redhat.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Jason Wang <jasowang@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Long Li <longli@microsoft.com> Cc: Lorenzo Stoakes (Oracle) <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Wei Liu <wei.liu@kernel.org> Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
5467c292d0
commit
4a34e46eb5
@@ -12,7 +12,7 @@
|
||||
#include "internal.h"
|
||||
|
||||
/* Initialize to an unsupported value */
|
||||
unsigned int page_reporting_order = -1;
|
||||
unsigned int page_reporting_order = PAGE_REPORTING_ORDER_UNSPECIFIED;
|
||||
|
||||
static int page_order_update_notify(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
@@ -369,7 +369,7 @@ int page_reporting_register(struct page_reporting_dev_info *prdev)
|
||||
* pageblock_order.
|
||||
*/
|
||||
|
||||
if (page_reporting_order == -1) {
|
||||
if (page_reporting_order == PAGE_REPORTING_ORDER_UNSPECIFIED) {
|
||||
if (prdev->order != PAGE_REPORTING_ORDER_UNSPECIFIED &&
|
||||
prdev->order <= MAX_PAGE_ORDER)
|
||||
page_reporting_order = prdev->order;
|
||||
|
||||
Reference in New Issue
Block a user