Re: [PATCH v1 1/2] gpiolib: Fix line event handling in syscall compatible mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 14, 2020 at 4:00 PM Bartosz Golaszewski
<bgolaszewski@xxxxxxxxxxxx> wrote:
> On Sat, Sep 12, 2020 at 4:21 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> > On Fri, Sep 11, 2020 at 05:28:46PM +0300, Andy Shevchenko wrote:
> > > On Fri, Sep 11, 2020 at 06:17:14PM +0800, Kent Gibson wrote:

...

> > > I don't like the difference between 2nd and 3rd argument. This what looks to me
> > > hackish. Variant with explicit compat structure I like more.
> > >
> >
> > Agreed - writing it that way does look pretty nasty.
> >
> > But my suggestion is actually this:
> >
> > ret = copy_to_user(buf, &ge, event_size);
> >
> > I suggested ge_size previously, but event_size might help highlight that
> > it isn't always sizeof(ge).
> >
> > > But if you think it's okay, I will update your way.
> > >
> >
> > I would defer to Bart or Linus, but I think just calculating the
> > appropriate size is preferable for this case.
> >
> > Cheers,
> > Kent.
>
> Kent has been producing clean and elegant code so far so I trust him
> on code quality issues TBH. Personally in this case however I'd go
> with an explicit compat structure as Andy prefers.
>
> I don't have a strong opinion on this so I really am fine either way.

Since the initial idea was Arnd's and he agreed on Kent's approach, I
will re-do that way.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux