]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xen/grant-table: guard gnttab_suspend/resume with CONFIG_HIBERNATE_CALLBACKS
authorPengpeng Hou <pengpeng.hou@isrc.iscas.ac.cn>
Tue, 10 Mar 2026 08:08:00 +0000 (08:08 +0000)
committerJuergen Gross <jgross@suse.com>
Fri, 10 Apr 2026 09:07:21 +0000 (11:07 +0200)
commit3f100dd61ad4ee7c1fb6a44775a928dcdba7515b
tree3369085f19dcfe98390ee204445383678612f336
parentbdd5de3d9e2da45852d0d21313af3a02f0e0626e
xen/grant-table: guard gnttab_suspend/resume with CONFIG_HIBERNATE_CALLBACKS

In current linux.git, gnttab_suspend() and gnttab_resume() are defined
and declared unconditionally. However, their only in-tree callers reside
in drivers/xen/manage.c, which are guarded by CONFIG_HIBERNATE_CALLBACKS.

Match the helper scope to their callers by wrapping the definitions in
CONFIG_HIBERNATE_CALLBACKS and providing no-op stubs in the header. This
fixes the config-scope mismatch and reduces the code footprint when
hibernation callbacks are disabled.

Signed-off-by: Pengpeng Hou <pengpeng.hou@isrc.iscas.ac.cn>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20260310080800.742223-1-pengpeng.hou@isrc.iscas.ac.cn>
drivers/xen/grant-table.c
include/xen/grant_table.h