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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzRXM2wN4Z5TYsS9@smile.fi.intel.com>
Date:   Wed, 28 Sep 2022 17:16:19 +0300
From:   Andy Shevchenko <andriy.shevchenko@...el.com>
To:     Hans de Goede <hdegoede@...hat.com>
Cc:     Armin Wolf <W_Armin@....de>, markgross@...nel.org,
        rafael@...nel.org, lenb@...nel.org, hmh@....eng.br,
        matan@...alib.org, corentin.chary@...il.com, jeremy@...tem76.com,
        productdev@...tem76.com, mario.limonciello@....com,
        pobrn@...tonmail.com, coproscefalo@...il.com,
        platform-driver-x86@...r.kernel.org, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] platform/x86: dell: Add new dell-wmi-ddv driver

On Wed, Sep 28, 2022 at 01:33:53PM +0200, Hans de Goede wrote:
> On 9/28/22 12:47, Andy Shevchenko wrote:
> > On Tue, Sep 27, 2022 at 10:45:21PM +0200, Armin Wolf wrote:

...

> >> +	default m
> > 
> > Why? (Imagine I have Dell, but old machine)
> 
> Then you can select N if you really want to.
> 
> > (And yes, I see that other Kconfig options are using it, but we shall avoid
> >  cargo cult and each default choice like this has to be explained at least.)
> 
> This has been discussed during the review of v1 already.
> 
> There are quite a few dell modules and the choice has
> been made to put these all behind a dell platform drivers
> options and then default all the individual modules to 'm'.

Okay, thanks for pointing out that this was discussed. I was not aware.

...

> >> +	kfree(obj);
> > 
> > I'm wondering what is the best to use in the drivers:
> >  1) kfree()
> >  2) acpi_os_free()
> >  3) ACPI_FREE()

> > ?
> 
> Most ACPI driver code I know of just uses kfree() the other 2
> are more ACPI-core / ACPICA internal helpers.

To me 2) would look more consistent, esp. in case if it is extended in
the future.

...

> >> +	ret = device_create_file(&battery->dev, &data->temp_attr);
> >> +	if (ret < 0)
> >> +		return ret;
> >> +
> >> +	ret = device_create_file(&battery->dev, &data->eppid_attr);
> >> +	if (ret < 0) {
> >> +		device_remove_file(&battery->dev, &data->temp_attr);
> >> +
> >> +		return ret;
> >> +	}
> > 
> > Why dev_groups member can't be utilized?
> 
> Because this is an extension to the ACPI battery driver, IOW
> this adds extra attributes to the power-supply-class device
> registered by the ACPI battery driver. Note that the device
> in this case is managed by the power-supply-class code, so
> there is no access to dev_groups even in the ACPI battery code.

Ah, I see now, so we extend the attributes of the 3rd party driver here.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ