mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>,
	 Frederic Weisbecker <frederic@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	 linux-kernel@vger.kernel.org,
	Richard Cochran <richardcochran@gmail.com>,
	 Cyrill Gorcunov <gorcunov@gmail.com>
Subject: Re: [PATCH] posix-clock: Remove duplicate ioctl handler
Date: Sun, 26 Jan 2025 18:20:42 +0100	[thread overview]
Message-ID: <3401475f-bdbd-4b3f-8961-d3d747dc82f1@t-8ch.de> (raw)
In-Reply-To: <06196213-3106-4b69-a15d-4b2e4ac6f187@app.fastmail.com>

Hi Arnd,

On 2025-01-25 15:28:29+0100, Arnd Bergmann wrote:
> On Sat, Jan 25, 2025, at 11:20, Thomas Weißschuh wrote:
> >  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_operations = {
> >  	.open		= posix_clock_open,
> >  	.release	= posix_clock_release,
> >  #ifdef CONFIG_COMPAT
> > -	.compat_ioctl	= posix_clock_compat_ioctl,
> > +	.compat_ioctl	= posix_clock_ioctl,
> >  #endif
> 
> I would remove the #ifdef/#endif as well here. I would also suggest
> using compat_ptr_ioctl(), so on s390 the pointers get converted
> correctly, even if it clears the upper bit on the integer arguments.

Using compat_ptr_ioctl() here will break the logic from the closely
related fix to the PTP ioctl handler [0].
There is no other posix_clock_file_operations implementer than PTP.

I can drop the #ifdef.


Thomas

[0] https://lore.kernel.org/lkml/20250125-posix-clock-compat_ioctl-v2-1-11c865c500eb@weissschuh.net/

      reply	other threads:[~2025-01-26 17:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-25 10:20 Thomas Weißschuh
2025-01-25 12:25 ` Cyrill Gorcunov
2025-01-25 14:28 ` Arnd Bergmann
2025-01-26 17:20   ` Thomas Weißschuh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3401475f-bdbd-4b3f-8961-d3d747dc82f1@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=anna-maria@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=frederic@kernel.org \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®