diff --git a/drivers/media/platform/tegra/camera/fusa-capture/capture-isp-channel.c b/drivers/media/platform/tegra/camera/fusa-capture/capture-isp-channel.c index 6a51a45a..102e9904 100644 --- a/drivers/media/platform/tegra/camera/fusa-capture/capture-isp-channel.c +++ b/drivers/media/platform/tegra/camera/fusa-capture/capture-isp-channel.c @@ -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, diff --git a/drivers/media/platform/tegra/camera/fusa-capture/capture-vi-channel.c b/drivers/media/platform/tegra/camera/fusa-capture/capture-vi-channel.c index 4d0f8e85..4049b6fa 100644 --- a/drivers/media/platform/tegra/camera/fusa-capture/capture-vi-channel.c +++ b/drivers/media/platform/tegra/camera/fusa-capture/capture-vi-channel.c @@ -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, diff --git a/drivers/misc/nvsciipc/nvsciipc.c b/drivers/misc/nvsciipc/nvsciipc.c index aae900d2..6512cab5 100644 --- a/drivers/misc/nvsciipc/nvsciipc.c +++ b/drivers/misc/nvsciipc/nvsciipc.c @@ -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, }; diff --git a/drivers/platform/tegra/rtcpu/camchar.c b/drivers/platform/tegra/rtcpu/camchar.c index c271f19d..67fd36e7 100644 --- a/drivers/platform/tegra/rtcpu/camchar.c +++ b/drivers/platform/tegra/rtcpu/camchar.c @@ -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 @@ -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) diff --git a/drivers/video/tegra/host/nvcsi/nvcsi-t194.c b/drivers/video/tegra/host/nvcsi/nvcsi-t194.c index 4e76118d..77af2ba0 100644 --- a/drivers/video/tegra/host/nvcsi/nvcsi-t194.c +++ b/drivers/video/tegra/host/nvcsi/nvcsi-t194.c @@ -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 @@ -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, diff --git a/drivers/video/tegra/host/nvcsi/nvcsi.c b/drivers/video/tegra/host/nvcsi/nvcsi.c index 2cc96809..4a2e326d 100644 --- a/drivers/video/tegra/host/nvcsi/nvcsi.c +++ b/drivers/video/tegra/host/nvcsi/nvcsi.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/video/tegra/host/nvdla/nvdla_ioctl.c b/drivers/video/tegra/host/nvdla/nvdla_ioctl.c index 1ab08669..1459e4e2 100644 --- a/drivers/video/tegra/host/nvdla/nvdla_ioctl.c +++ b/drivers/video/tegra/host/nvdla/nvdla_ioctl.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/video/tegra/host/pva/pva_ioctl.c b/drivers/video/tegra/host/pva/pva_ioctl.c index 03bdd8ec..a6947869 100644 --- a/drivers/video/tegra/host/pva/pva_ioctl.c +++ b/drivers/video/tegra/host/pva/pva_ioctl.c @@ -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 #include #include @@ -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, diff --git a/drivers/virt/tegra/tegra_hv_pm_ctl.c b/drivers/virt/tegra/tegra_hv_pm_ctl.c index 246b4376..5b39d1f9 100644 --- a/drivers/virt/tegra/tegra_hv_pm_ctl.c +++ b/drivers/virt/tegra/tegra_hv_pm_ctl.c @@ -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, diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index ab973f34..9d53dd2e 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -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 diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 63a25776..a021ee62 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -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 + 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