[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174058589753.10177.9335743981668865509.tip-bot2@tip-bot2>
Date: Wed, 26 Feb 2025 16:04:57 -0000
From:
tip-bot2 for Thomas Weißschuh <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: linux@...ssschuh.net, Thomas Gleixner <tglx@...utronix.de>,
Cyrill Gorcunov <gorcunov@...il.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: timers/core] posix-clock: Remove duplicate compat ioctl() handler
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 7a6b158e00c862ccfa7fe447682bd0bf5c229c73
Gitweb: https://git.kernel.org/tip/7a6b158e00c862ccfa7fe447682bd0bf5c229c73
Author: Thomas Weißschuh <linux@...ssschuh.net>
AuthorDate: Tue, 25 Feb 2025 18:00:47 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 26 Feb 2025 16:53:58 +01:00
posix-clock: Remove duplicate compat ioctl() handler
The normal and compat ioctl handlers are identical,
which is fine as compat ioctls are detected and handled dynamically
inside the underlying clock implementation.
The duplicate definition however is unnecessary.
Just reuse the regular ioctl handler also for compat ioctls.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Cyrill Gorcunov <gorcunov@...il.com>
Link: https://lore.kernel.org/all/20250225-posix-clock-compat-cleanup-v2-1-30de86457a2b@weissschuh.net
---
kernel/time/posix-clock.c | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c
index 1af0bb2..7f4e4fb 100644
--- a/kernel/time/posix-clock.c
+++ b/kernel/time/posix-clock.c
@@ -90,26 +90,6 @@ static long posix_clock_ioctl(struct file *fp,
return err;
}
-#ifdef CONFIG_COMPAT
-static long posix_clock_compat_ioctl(struct file *fp,
- unsigned int cmd, unsigned long arg)
-{
- struct posix_clock_context *pccontext = fp->private_data;
- struct posix_clock *clk = get_posix_clock(fp);
- int err = -ENOTTY;
-
- if (!clk)
- return -ENODEV;
-
- if (clk->ops.ioctl)
- err = clk->ops.ioctl(pccontext, cmd, arg);
-
- put_posix_clock(clk);
-
- return err;
-}
-#endif
-
static int posix_clock_open(struct inode *inode, struct file *fp)
{
int err;
@@ -171,11 +151,9 @@ static const struct file_operations posix_clock_file_operations = {
.read = posix_clock_read,
.poll = posix_clock_poll,
.unlocked_ioctl = posix_clock_ioctl,
+ .compat_ioctl = posix_clock_ioctl,
.open = posix_clock_open,
.release = posix_clock_release,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = posix_clock_compat_ioctl,
-#endif
};
int posix_clock_register(struct posix_clock *clk, struct device *dev)
Powered by blists - more mailing lists