All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Networking <netdev@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v5 2/4] net: socket: rework SIOC?IFMAP ioctls
Date: Wed, 21 Jul 2021 10:32:59 +0200	[thread overview]
Message-ID: <CAK8P3a3_Pv-hmDvnHgQ23Qfo8jraLSL_aTmE4ROVhvbxAU-e+Q@mail.gmail.com> (raw)
In-Reply-To: <20210721072847.GB11257@lst.de>

On Wed, Jul 21, 2021 at 9:30 AM Christoph Hellwig <hch@lst.de> wrote:
>
> > +static int dev_getifmap(struct net_device *dev, struct ifreq *ifr)
> > +{
> > +     struct ifmap *ifmap = &ifr->ifr_map;
> > +     struct compat_ifmap *cifmap = (struct compat_ifmap *)&ifr->ifr_map;
> > +
> > +     if (in_compat_syscall()) {
>
> Any reason that the cifmap declaration is outside this conditional?

I was going for the slightly shorter version, as moving it into the block
runs into the 80-character limit. I'll change it.

> > +static int dev_setifmap(struct net_device *dev, struct ifreq *ifr)
> > +{
> > +     struct compat_ifmap *cifmap = (struct compat_ifmap *)&ifr->ifr_map;
> > +
> > +     if (!dev->netdev_ops->ndo_set_config)
> > +             return -EOPNOTSUPP;
> > +
> > +     if (in_compat_syscall()) {
>
> Same here.
>
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

      Arnd

  reply	other threads:[~2021-07-21  8:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 14:24 [PATCH net-next v5 0/4] remove compat_alloc_user_space() Arnd Bergmann
2021-07-20 14:24 ` [PATCH v5 1/4] ethtool: improve compat ioctl handling Arnd Bergmann
2021-07-20 14:24 ` [PATCH v5 2/4] net: socket: rework SIOC?IFMAP ioctls Arnd Bergmann
2021-07-21  7:28   ` Christoph Hellwig
2021-07-21  8:32     ` Arnd Bergmann [this message]
2021-07-20 14:24 ` [PATCH v5 3/4] net: socket: simplify dev_ifconf handling Arnd Bergmann
2021-07-21  7:32   ` Christoph Hellwig
2021-07-21  9:12     ` Arnd Bergmann
2021-07-20 14:24 ` [PATCH v5 4/4] net: socket: rework compat_ifreq_ioctl() Arnd Bergmann

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=CAK8P3a3_Pv-hmDvnHgQ23Qfo8jraLSL_aTmE4ROVhvbxAU-e+Q@mail.gmail.com \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=hch@lst.de \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.