lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Mf9MZRkvK5bvqsQuqwcUe5Wmsk+D7jwg2wMEK_cYVfe+Q@mail.gmail.com>
Date:   Wed, 24 Jul 2019 10:26:45 +0200
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Rich Felker <dalias@...c.org>,
        Lee Jones <lee.jones@...aro.org>,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Jingoo Han <jingoohan1@...il.com>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-sh@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v2 2/7] backlight: gpio: simplify the platform data handling

wt., 23 lip 2019 o 17:32 Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> napisał(a):
>
> On Tue, Jul 23, 2019 at 08:28:00AM +0200, Bartosz Golaszewski wrote:
> > pon., 22 lip 2019 o 18:06 Andy Shevchenko
> > <andriy.shevchenko@...ux.intel.com> napisał(a):
> > >
> > > On Mon, Jul 22, 2019 at 05:02:57PM +0200, Bartosz Golaszewski wrote:
> > > > From: Bartosz Golaszewski <bgolaszewski@...libre.com>
> > > >
> > > > Now that the last user of platform data (sh ecovec24) defines a proper
> > > > GPIO lookup and sets the 'default-on' device property, we can drop the
> > > > platform_data-specific GPIO handling and unify a big chunk of code.
> > > >
> > > > The only field used from the platform data is now the fbdev pointer.
> > >
> > > > -static int gpio_backlight_probe_dt(struct platform_device *pdev,
> > > > -                                struct gpio_backlight *gbl)
> > > > -{
> > > > -     struct device *dev = &pdev->dev;
> > > > -     enum gpiod_flags flags;
> > > > -     int ret;
> > > > -
> > > > -     gbl->def_value = device_property_read_bool(dev, "default-on");
> > > > -     flags = gbl->def_value ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
> > > > -
> > > > -     gbl->gpiod = devm_gpiod_get(dev, NULL, flags);
> > > > -     if (IS_ERR(gbl->gpiod)) {
> > > > -             ret = PTR_ERR(gbl->gpiod);
> > > > -
> > > > -             if (ret != -EPROBE_DEFER) {
> > > > -                     dev_err(dev,
> > > > -                             "Error: The gpios parameter is missing or invalid.\n");
> > > > -             }
> > > > -             return ret;
> > > > -     }
> > > > -
> > > > -     return 0;
> > > > -}
> > >
> > > Why not leave this function (perhaps with different name)?
> >
> > Why would we do that if the entire probe() function is now less than
> > 50 lines long? Also: it gets inlined by the compiler anyway. It
> > doesn't make sense IMO.
>
> I'm not against this, perhaps, dropping and moving can be split to two changes.
>

This really is unnecessary - we can do it in a single patch alright.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ