linux/drivers/char
Christian Brauner 641bb4394f fs: move FMODE_UNSIGNED_OFFSET to fop_flags
This is another flag that is statically set and doesn't need to use up
an FMODE_* bit. Move it to ->fop_flags and free up another FMODE_* bit.

(1) mem_open() used from proc_mem_operations
(2) adi_open() used from adi_fops
(3) drm_open_helper():
    (3.1) accel_open() used from DRM_ACCEL_FOPS
    (3.2) drm_open() used from
    (3.2.1) amdgpu_driver_kms_fops
    (3.2.2) psb_gem_fops
    (3.2.3) i915_driver_fops
    (3.2.4) nouveau_driver_fops
    (3.2.5) panthor_drm_driver_fops
    (3.2.6) radeon_driver_kms_fops
    (3.2.7) tegra_drm_fops
    (3.2.8) vmwgfx_driver_fops
    (3.2.9) xe_driver_fops
    (3.2.10) DRM_GEM_FOPS
    (3.2.11) DEFINE_DRM_GEM_DMA_FOPS
(4) struct memdev sets fmode flags based on type of device opened. For
    devices using struct mem_fops unsigned offset is used.

Mark all these file operations as FOP_UNSIGNED_OFFSET and add asserts
into the open helper to ensure that the flag is always set.

Link: https://lore.kernel.org/r/20240809-work-fop_unsigned-v1-1-658e054d893e@kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-08-30 08:22:36 +02:00
..
agp Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
hw_random This update includes the following changes: 2024-07-19 08:52:58 -07:00
ipmi ipmi: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-08 15:05:18 -05:00
mwave char/mwave: Adjust io port register size 2021-12-03 14:27:06 +01:00
tpm tpm: Use auth only after NULL check in tpm_buf_check_hmac_response() 2024-07-16 13:55:58 +03:00
xilinx_hwicap char: xilinx_hwicap: Fix NULL vs IS_ERR() bug 2024-03-07 21:48:38 +00:00
xillybus char: xillybus: Check USB endpoints when probing device 2024-08-16 09:57:56 +02:00
adi.c fs: move FMODE_UNSIGNED_OFFSET to fop_flags 2024-08-30 08:22:36 +02:00
apm-emulation.c apm-emulation: drop unexpected word "the" in the comments 2022-06-27 16:15:27 +02:00
applicom.c applicom: Fix PCI device refcount leak in applicom_init() 2023-01-20 13:05:39 +01:00
applicom.h
bsr.c bsr: add missing MODULE_DESCRIPTION() macro 2024-07-03 16:40:53 +02:00
ds1620.c char: add missing NetWinder MODULE_DESCRIPTION() macros 2024-07-31 13:47:45 +02:00
dsp56k.c dsp56k: add missing MODULE_DESCRIPTION() macro 2024-07-03 16:40:26 +02:00
dtlk.c dtlk: add missing MODULE_DESCRIPTION() macro 2024-07-03 16:40:23 +02:00
hangcheck-timer.c
hpet.c hpet: Support 32-bit userspace 2024-07-03 16:20:03 +02:00
Kconfig arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
lp.c parport: Remove parport_driver.devmodel 2024-07-03 16:44:22 +02:00
Makefile arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
mem.c fs: move FMODE_UNSIGNED_OFFSET to fop_flags 2024-08-30 08:22:36 +02:00
misc.c char: misc: make misc_class a static const structure 2023-06-23 10:27:15 +02:00
nsc_gpio.c
nvram.c char: add missing MODULE_DESCRIPTION() macros 2024-06-04 17:40:17 +02:00
nwbutton.c char: add missing NetWinder MODULE_DESCRIPTION() macros 2024-07-31 13:47:45 +02:00
nwbutton.h
nwflash.c char: add missing NetWinder MODULE_DESCRIPTION() macros 2024-07-31 13:47:45 +02:00
pc8736x_gpio.c
powernv-op-panel.c powerpc/powernv: Convert to platform remove callback returning void 2024-04-11 15:26:59 +02:00
ppdev.c parport: Remove parport_driver.devmodel 2024-07-03 16:44:22 +02:00
ps3flash.c
random.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
scx200_gpio.c
sonypi.c sonypi: Convert to platform remove callback returning void 2024-04-11 15:27:02 +02:00
tlclk.c tlclk: add missing MODULE_DESCRIPTION() macro 2024-06-04 17:40:14 +02:00
toshiba.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ttyprintk.c char: add missing MODULE_DESCRIPTION() macros 2024-06-04 17:40:17 +02:00
uv_mmtimer.c
virtio_console.c virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00