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]
Date:   Wed, 24 Jun 2020 13:31:06 +0200
From:   Ricardo Ribalda Delgado <ribalda@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-i2c@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] i2c: designware: platdrv: Set class based on dmi

Hi Andy

On Wed, Jun 24, 2020 at 12:46 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> On Wed, Jun 24, 2020 at 11:12:39AM +0200, Ricardo Ribalda wrote:
> > Current AMD's zen-based APUs use this core for some of its i2c-buses.
> >
> > With this patch we re-enable autodetection of hwmon-alike devices, so
> > lm-sensors will be able to work automatically.
> >
> > It does not affect the boot-time of embedded devices, as the class is
> > set based on the dmi information.
>
> Hmm... Do we really need to have DMI? I mean wouldn't be safe just always
> provide this to be compatible with HWMON class?
>

I do not care :), I was just trying to follow the logic of
70fba8302adecfa08a087c6f1dd39537a55f5bd3

If it is decided otherwise I can change it, no problem ;)

> ...
>
> > +static bool dw_i2c_hwmon_bus(void)
> > +{
> > +     if (strstr(dmi_get_system_info(DMI_PRODUCT_NAME), "QT5222"))
> > +             return true;
> > +     return false;
> > +}
>
> I don't like this. Perhaps for now you may simple use dmi_get_system_info()
> directly below.

I just realised that if there is no DMI, then we get a NULL, so we
need to add that check.

With the two ifs, I still prefer to put it on other function like now
(check v2).

If you still dont like it I will move it into the main function.

>
> ...
>
> > +     adap->class = dw_i2c_hwmon_bus() ? I2C_CLASS_HWMON
> > +                                      : I2C_CLASS_DEPRECATED;
>
> It's one line.

Fixed thanks
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ