[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3_Pv-hmDvnHgQ23Qfo8jraLSL_aTmE4ROVhvbxAU-e+Q@mail.gmail.com>
Date:   Wed, 21 Jul 2021 10:32:59 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     Christoph Hellwig <hch@....de>
Cc:     Networking <netdev@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v5 2/4] net: socket: rework SIOC?IFMAP ioctls
On Wed, Jul 21, 2021 at 9:30 AM Christoph Hellwig <hch@....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@....de>
Thanks!
      Arnd
Powered by blists - more mailing lists
 
