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] [day] [month] [year] [list]
Message-ID: <ZNYAXK69CIiBhiRT@smile.fi.intel.com>
Date:   Fri, 11 Aug 2023 12:33:16 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     wenhua lin <wenhua.lin1994@...il.com>
Cc:     Wenhua Lin <Wenhua.Lin@...soc.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Nuno Sá <nuno.sa@...log.com>,
        Arnd Bergmann <arnd@...db.de>,
        Samuel Holland <samuel@...lland.org>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        Mattijs Korpershoek <mkorpershoek@...libre.com>,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        Xiongpeng Wu <xiongpeng.wu@...soc.com>
Subject: Re: [PATCH] input: keyboard: Add sprd-keypad driver

On Fri, Aug 11, 2023 at 03:31:01PM +0800, wenhua lin wrote:
> On Thu, Aug 10, 2023 at 10:01 PM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> > On Thu, Aug 10, 2023 at 08:42:36PM +0800, wenhua lin wrote:
> > > On Tue, Aug 8, 2023 at 9:51 PM Andy Shevchenko
> > > <andriy.shevchenko@...ux.intel.com> wrote:
> > > > On Tue, Aug 08, 2023 at 03:25:01PM +0800, Wenhua Lin wrote:

...

> > > > > +     u32 rows_en; /* enabled rows bits */
> > > > > +     u32 cols_en; /* enabled cols bits */
> > > >
> > > > Why not bitmaps?
> > >
> > > Bitmap has been used, each bit represents different rows and different columns.
> >
> > I meant the bitmap type (as of bitmap.h APIs).
> 
> I understand what you mean, I need to study how this bitmap is used.

Input subsystem already is using them.

...

> > > > > +static int sprd_keypad_parse_dt(struct device *dev)
> > > >
> > > > dt -> fw
> > >
> > > I don't quite understand what you mean,。
> > > is it to change the function name to sprd_keypad_parse_fw?
> >
> > Yes. And make it firmware (which may be ACPI/DT or something else).
> 
> We need to think about how to modify it.

As I told already, replace mention of "DT"/"OF" by "firmware" and use device
property APIs as per property.h.

...

> > > > And I'm wondering if input subsystem already does this for you.
> > >
> > > I don't quite understand what you mean.
> >
> > Does input subsystem parse the (some of) device properties already?
> 
> Yes

Does it cover what you are parsing here? At least partially...

...

> > > > > +err_free:
> > > > > +     devm_kfree(&pdev->dev, data);
> > > >
> > > > Huh?!
> >
> > It's a red flag, and you have no answer to it...
> 
> I realized the problem, the interface using devm_  does not need to do the free.
> I will fix this issue in patch v2.

The problem is to understand where you can and where you can't use devm_*()
in the first place. _Then_ as you said.

> > > > > +     return ret;

...

> > > > > +             .owner = THIS_MODULE,
> > > >
> > > > ~15 years this is not needed.
> > > > Where did you get this code from? Time machine?
> > >
> > > Do you mean the keypad driver is no longer in use?
> >
> > No, I meant specifically emphasized line.
> 
> The keypad driver code is used on the platform
>  and has not been submitted to the community.

I'm not sure I understand to what you reply here...
I'm talking about the "owner" member assignment in the respective
data structure.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ