mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drivers: Fix build for Linux v6.12
In Linux v6.12 the definition 'no_llseek' was finally removed. Since Linux v6.0 it had been redefined as NULL. Add a test to conftest to determine if 'no_llseek' is present and if not then it is no longer necessary to populate this and we can leave as NULL. Bug 4876974 Change-Id: I051fdb285b32260b5913dad89cabe0be04253f67 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3222106 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
// Copyright (c) 2017-2023 NVIDIA Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
/**
|
||||
* @file drivers/media/platform/tegra/camera/fusa-capture/capture-isp-channel.c
|
||||
@@ -477,7 +477,9 @@ static long isp_channel_ioctl(
|
||||
|
||||
static const struct file_operations isp_channel_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
.unlocked_ioctl = isp_channel_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = isp_channel_ioctl,
|
||||
|
||||
@@ -638,7 +638,9 @@ static long vi_channel_ioctl(
|
||||
|
||||
static const struct file_operations vi_channel_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
.unlocked_ioctl = vi_channel_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = vi_channel_ioctl,
|
||||
|
||||
@@ -687,7 +687,9 @@ static const struct file_operations nvsciipc_fops = {
|
||||
.open = nvsciipc_dev_open,
|
||||
.release = nvsciipc_dev_release,
|
||||
.unlocked_ioctl = nvsciipc_dev_ioctl,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
.read = nvsciipc_dbg_read,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
@@ -226,7 +226,9 @@ static const struct file_operations tegra_camchar_fops = {
|
||||
.release = tegra_camchar_release,
|
||||
.unlocked_ioctl = tegra_camchar_ioctl,
|
||||
.compat_ioctl = tegra_camchar_ioctl,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init tegra_camchar_init(struct tegra_ivc_driver *drv)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
@@ -112,7 +110,9 @@ static int t194_nvcsi_release(struct inode *inode, struct file *file)
|
||||
|
||||
const struct file_operations tegra194_nvcsi_ctrl_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
.unlocked_ioctl = t194_nvcsi_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = t194_nvcsi_ioctl,
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2014-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2014-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
/*
|
||||
* NVCSI driver
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/module.h>
|
||||
@@ -129,7 +132,9 @@ static int nvcsi_release(struct inode *inode, struct file *file)
|
||||
|
||||
const struct file_operations tegra_nvcsi_ctrl_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
.unlocked_ioctl = nvcsi_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = nvcsi_ioctl,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2016-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
/*
|
||||
* Copyright (c) 2016-2023, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* NVDLA IOCTL for T194
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/arm64-barrier.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -1329,7 +1330,9 @@ static int nvdla_release(struct inode *inode, struct file *file)
|
||||
|
||||
const struct file_operations tegra_nvdla_ctrl_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
.unlocked_ioctl = nvdla_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = nvdla_ioctl,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2016-2024, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2016-2024, NVIDIA CORPORATION. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/jiffies.h>
|
||||
@@ -1133,7 +1133,9 @@ static ssize_t pva_read_vpu_print_buffer(struct file *file,
|
||||
|
||||
const struct file_operations tegra_pva_ctrl_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
.unlocked_ioctl = pva_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = pva_ioctl,
|
||||
|
||||
@@ -391,7 +391,9 @@ static int tegra_hv_pm_ctl_release(struct inode *inode, struct file *filp)
|
||||
|
||||
static const struct file_operations tegra_hv_pm_ctl_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
#if defined(NV_NO_LLSEEK_PRESENT)
|
||||
.llseek = no_llseek,
|
||||
#endif
|
||||
.read = tegra_hv_pm_ctl_read,
|
||||
.write = tegra_hv_pm_ctl_write,
|
||||
.poll = tegra_hv_pm_ctl_poll,
|
||||
|
||||
@@ -147,6 +147,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += module_import_ns_macro
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += msi_get_virq
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += no_llseek
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += of_get_named_gpio_flags
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += gpio_chip_struct_has_of_node_present
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += gpio_device_find
|
||||
|
||||
@@ -7525,6 +7525,25 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_MODULE_IMPORT_NS_PRESENT" "" "types"
|
||||
;;
|
||||
|
||||
no_llseek)
|
||||
#
|
||||
# Determine if the function no_llseek() is present.
|
||||
#
|
||||
# Commit cb787f4ac0c2 ("[tree-wide] finally take no_llseek out")
|
||||
# removed the definition for no_llseek() in Linux v6.12-rc1. Note
|
||||
# that commit 868941b14441 ("fs: remove no_llseek") in Linux v6.0
|
||||
# had previously redefined no_llseek as NULL in preparation for
|
||||
# its removal.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/fs.h>
|
||||
void conftest_no_llseek(void) {
|
||||
no_llseek();
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_NO_LLSEEK_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
of_property_for_each_u32_removed_internal_args)
|
||||
#
|
||||
# Determine if the internal arguments for the macro
|
||||
|
||||
Reference in New Issue
Block a user