mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
virt: hvc_sysfs: Fix build for Linux v6.16
In Linux v6.16, the 'bin_attribute' argument to the 'read' and 'write' function pointers of the 'bin_attribute' structure was made const. Add a test to conftest to detect this and update the Tegra HVC SYSFS driver accordingly. JIRA LINQPJ14-60 Change-Id: I74b88bc0d1ed55eca1565386b38d16ff65626132 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3375213 (cherry picked from commit fef581cb0bac2d1468a710927771be9fa027f6e0) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461880 Reviewed-by: Brad Griffis <bgriffis@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
e48b52cbba
commit
da9c8f46c4
@@ -93,6 +93,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += __alloc_pages_bulk_has_no_page_list_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += __assign_str_has_no_src_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += aperture_remove_all_conflicting_devices
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += bin_attribute_struct_mmap_has_const_bin_attribute_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += bin_attribute_struct_readwrite_has_const_bin_attribute_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += blk_execute_rq_has_no_gendisk_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += blk_mq_alloc_disk_for_queue
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += blk_mq_alloc_queue
|
||||
|
||||
@@ -6588,6 +6588,26 @@ compile_test() {
|
||||
"NV_BIN_ATTRIBUTE_STRUCT_MMAP_HAS_CONST_BIN_ATTRIBUTE_ARG" "" "types"
|
||||
;;
|
||||
|
||||
bin_attribute_struct_readwrite_has_const_bin_attribute_arg)
|
||||
#
|
||||
# Determine if the 'bin_attribute' structure 'read' and 'write'
|
||||
# function pointers have a const 'struct bin_attribute' argument.
|
||||
#
|
||||
# This change was made in Linux v6.16 by commit 97d06802d10a
|
||||
# ("sysfs: constify bin_attribute argument of bin_attribute::read/write()").
|
||||
#
|
||||
CODE="
|
||||
#include <linux/sysfs.h>
|
||||
void conftest(struct bin_attribute *attr) {
|
||||
ssize_t (*fn)(struct file *, struct kobject *,
|
||||
const struct bin_attribute *,
|
||||
char *, loff_t, size_t) = attr->read;
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" \
|
||||
"NV_BIN_ATTRIBUTE_STRUCT_READWRITE_HAS_CONST_BIN_ATTRIBUTE_ARG" "" "types"
|
||||
;;
|
||||
|
||||
blk_execute_rq_has_no_gendisk_arg)
|
||||
#
|
||||
# Determine if the function blk_execute_rq() has an argument of
|
||||
|
||||
Reference in New Issue
Block a user