From nobody Mon Feb 9 07:43:03 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 405BD20A5F5 for ; Sat, 25 Jan 2025 10:21:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737800467; cv=none; b=olE6fyCth1KnwWTEHs9xSsswKCPJ7dVZqN9NOUqDUXYI2k1AN8zFIjQ1HZvKxfw3/IiyeYZWaiutsMmHXhLMh2xCIDzxdOFhFaLjThRZz9qBLKoB9yVxJEKxoRhbLl24Q78ReQhXA784VU0605NzsoNeXww58QeZOd3MDgengTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737800467; c=relaxed/simple; bh=ZnpTF3bczXq+xCZFwGstoT66OMOleMwnBJtO9lZFIoI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=ZignsXriNlqd1QXejs5yQKnuasQ/5XCQaaBp2RiKHm5CQVUL/LZNDDgqBYXdS/idoVNlICvSpZeiWKE0B5tmPffNseR2xV+6m/5ZBtMiBty+uUIv8cBZwla8kQZr7MW8KrGdl8R+4P4Fja7k8J5LMWsRZL+s3QhQw+5u+ne+a2M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=nbJDw1Ne; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="nbJDw1Ne" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1737800459; bh=ZnpTF3bczXq+xCZFwGstoT66OMOleMwnBJtO9lZFIoI=; h=From:Date:Subject:To:Cc:From; b=nbJDw1Nek/MdslsiUCbvyBw2FjjeBGKqN1GFn8S73q2u2tVwFJyZQfFuoXnGuPqg9 fPy3rfGiHigunRVJ4XPqvE0Q2/VX/AGhV/9ZEl/FOdjUdApnttvZ/jZzg2xotSePuR otShIyuLdmf3sGe+KKnaLeTRuqsGJxnJ499TgMyg= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 25 Jan 2025 11:20:49 +0100 Subject: [PATCH] posix-clock: Remove duplicate ioctl handler Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250125-posix-clock-compat-cleanup-v1-1-c8b0f377905b@weissschuh.net> X-B4-Tracking: v=1; b=H4sIAAC7lGcC/y3NQQrCMBCF4auUWTuQRAqlVxEX43Rqh2oSk1YKp Xd3UJffW/xvhypFpULf7FDkrVVTNPhTAzxRvAvqYIbgQut8aDGnqhvyI/GMnJ6ZFoNQXDNyuHW DIxnp7MECucio2zd+uf5c5LXax/Ifj+MDdDQSc4EAAAA= X-Change-ID: 20250125-posix-clock-compat-cleanup-c2b8d0aefa31 To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Richard Cochran , Arnd Bergmann , Cyrill Gorcunov , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737800458; l=1818; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=ZnpTF3bczXq+xCZFwGstoT66OMOleMwnBJtO9lZFIoI=; b=BcGg6g7XFL0MXgV+RlHtcVm9hhJdkWo9Nk3eOzx0wNF3pO/KmgqB8vLZ1JiBd5wAquh3fGdvl IKZGQH4GIeKDYII0+iUM9NI+o481pJCsvHdDMH/VeQ1RMjfI4f82QTJ X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The normal and compat ioctl handlers are identical, which is fine as compat ioctls are detected and handled dynamically [0]. The duplicate definition however is unnecessary. Just reuse the regular ioctl handler also for compat ioctls. [0] https://lore.kernel.org/lkml/20250125-posix-clock-compat_ioctl-v2-1-11c= 865c500eb@weissschuh.net/ Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Cyrill Gorcunov --- kernel/time/posix-clock.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c index 1af0bb2cc45c0aab843f77eb156992de469c8fb9..353dddea0dd0cb2b0b76b5d5c5c= 2e4c232006c37 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; } =20 -#ifdef CONFIG_COMPAT -static long posix_clock_compat_ioctl(struct file *fp, - unsigned int cmd, unsigned long arg) -{ - struct posix_clock_context *pccontext =3D fp->private_data; - struct posix_clock *clk =3D get_posix_clock(fp); - int err =3D -ENOTTY; - - if (!clk) - return -ENODEV; - - if (clk->ops.ioctl) - err =3D 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; @@ -174,7 +154,7 @@ static const struct file_operations posix_clock_file_op= erations =3D { .open =3D posix_clock_open, .release =3D posix_clock_release, #ifdef CONFIG_COMPAT - .compat_ioctl =3D posix_clock_compat_ioctl, + .compat_ioctl =3D posix_clock_ioctl, #endif }; =20 --- base-commit: b46c89c08f4146e7987fc355941a93b12e2c03ef change-id: 20250125-posix-clock-compat-cleanup-c2b8d0aefa31 Best regards, --=20 Thomas Wei=C3=9Fschuh