Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-14 Thread Arnd Bergmann
On Tue, Jun 12, 2018 at 9:53 PM, Gwendal Grignou  wrote:
> On Sun, Jun 10, 2018 at 11:08 PM Lee Jones  wrote:
>>
>> On Fri, 08 Jun 2018, Benson Leung wrote:
>>
>> >
>> > On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
>> > > This function is no longer called, so we get a harmless
>> > > warning until it is removed as well:
>> > >
>> > > drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not used 
>> > > [-Werror=unused-function]
>> > >
>> > > Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
>> >
>> > Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
>> > you mentioned that you readded the __remove to avoid a warning when built
>> > as a module. Can you explain what's going on?
>>
>> Yes please, and quickly.  I'm going to sent the patch-set today.  If I
>> don't hear from you promptly, I'll probably pull the patch!
> I readded it because when cros_ec_dev is loaded as module, I get a
> warning on dmesg when unloading:
>
> """Device 'cros_pd' [or 'cros_ec'] does not have a release() function,
> it is broken and must be fixed."""
>
> The warning comes from device_release(). Given I get a warning when I
> remove the release function or when I leave it empty. Let's pull the
> patch.

I had not realized that this function was supposed to be the .release
callback for a device, only that it was not being called at all.

The runtime warning you get is obviously correct and you do need a
.release function in the device that will free the memory for the
cros_ec_dev structure when the last reference to the device goes away.

Please send a fix for this, replacing the incorrect devm_kzalloc with
a working allocation/deallocation.

 Arnd


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-14 Thread Arnd Bergmann
On Tue, Jun 12, 2018 at 9:53 PM, Gwendal Grignou  wrote:
> On Sun, Jun 10, 2018 at 11:08 PM Lee Jones  wrote:
>>
>> On Fri, 08 Jun 2018, Benson Leung wrote:
>>
>> >
>> > On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
>> > > This function is no longer called, so we get a harmless
>> > > warning until it is removed as well:
>> > >
>> > > drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not used 
>> > > [-Werror=unused-function]
>> > >
>> > > Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
>> >
>> > Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
>> > you mentioned that you readded the __remove to avoid a warning when built
>> > as a module. Can you explain what's going on?
>>
>> Yes please, and quickly.  I'm going to sent the patch-set today.  If I
>> don't hear from you promptly, I'll probably pull the patch!
> I readded it because when cros_ec_dev is loaded as module, I get a
> warning on dmesg when unloading:
>
> """Device 'cros_pd' [or 'cros_ec'] does not have a release() function,
> it is broken and must be fixed."""
>
> The warning comes from device_release(). Given I get a warning when I
> remove the release function or when I leave it empty. Let's pull the
> patch.

I had not realized that this function was supposed to be the .release
callback for a device, only that it was not being called at all.

The runtime warning you get is obviously correct and you do need a
.release function in the device that will free the memory for the
cros_ec_dev structure when the last reference to the device goes away.

Please send a fix for this, replacing the incorrect devm_kzalloc with
a working allocation/deallocation.

 Arnd


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-12 Thread Lee Jones
On Tue, 12 Jun 2018, Gwendal Grignou wrote:

> On Sun, Jun 10, 2018 at 11:08 PM Lee Jones  wrote:
> >
> > On Fri, 08 Jun 2018, Benson Leung wrote:
> >
> > >
> > > On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
> > > > This function is no longer called, so we get a harmless
> > > > warning until it is removed as well:
> > > >
> > > > drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not 
> > > > used [-Werror=unused-function]
> > > >
> > > > Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
> > >
> > > Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
> > > you mentioned that you readded the __remove to avoid a warning when built
> > > as a module. Can you explain what's going on?
> >
> > Yes please, and quickly.  I'm going to sent the patch-set today.  If I
> > don't hear from you promptly, I'll probably pull the patch!
> I readded it because when cros_ec_dev is loaded as module, I get a
> warning on dmesg when unloading:
> 
> """Device 'cros_pd' [or 'cros_ec'] does not have a release() function,
> it is broken and must be fixed."""
> 
> The warning comes from device_release(). Given I get a warning when I
> remove the release function or when I leave it empty. Let's pull the
> patch.

I already did.  It's in Mainline. :)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-12 Thread Lee Jones
On Tue, 12 Jun 2018, Gwendal Grignou wrote:

> On Sun, Jun 10, 2018 at 11:08 PM Lee Jones  wrote:
> >
> > On Fri, 08 Jun 2018, Benson Leung wrote:
> >
> > >
> > > On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
> > > > This function is no longer called, so we get a harmless
> > > > warning until it is removed as well:
> > > >
> > > > drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not 
> > > > used [-Werror=unused-function]
> > > >
> > > > Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
> > >
> > > Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
> > > you mentioned that you readded the __remove to avoid a warning when built
> > > as a module. Can you explain what's going on?
> >
> > Yes please, and quickly.  I'm going to sent the patch-set today.  If I
> > don't hear from you promptly, I'll probably pull the patch!
> I readded it because when cros_ec_dev is loaded as module, I get a
> warning on dmesg when unloading:
> 
> """Device 'cros_pd' [or 'cros_ec'] does not have a release() function,
> it is broken and must be fixed."""
> 
> The warning comes from device_release(). Given I get a warning when I
> remove the release function or when I leave it empty. Let's pull the
> patch.

I already did.  It's in Mainline. :)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-12 Thread Gwendal Grignou
On Sun, Jun 10, 2018 at 11:08 PM Lee Jones  wrote:
>
> On Fri, 08 Jun 2018, Benson Leung wrote:
>
> >
> > On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
> > > This function is no longer called, so we get a harmless
> > > warning until it is removed as well:
> > >
> > > drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not used 
> > > [-Werror=unused-function]
> > >
> > > Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
> >
> > Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
> > you mentioned that you readded the __remove to avoid a warning when built
> > as a module. Can you explain what's going on?
>
> Yes please, and quickly.  I'm going to sent the patch-set today.  If I
> don't hear from you promptly, I'll probably pull the patch!
I readded it because when cros_ec_dev is loaded as module, I get a
warning on dmesg when unloading:

"""Device 'cros_pd' [or 'cros_ec'] does not have a release() function,
it is broken and must be fixed."""

The warning comes from device_release(). Given I get a warning when I
remove the release function or when I leave it empty. Let's pull the
patch.

Sorry for the confusion,

Gwendal.
>
> --
> Lee Jones [李琼斯]
> Linaro Services Technical Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-12 Thread Gwendal Grignou
On Sun, Jun 10, 2018 at 11:08 PM Lee Jones  wrote:
>
> On Fri, 08 Jun 2018, Benson Leung wrote:
>
> >
> > On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
> > > This function is no longer called, so we get a harmless
> > > warning until it is removed as well:
> > >
> > > drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not used 
> > > [-Werror=unused-function]
> > >
> > > Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
> >
> > Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
> > you mentioned that you readded the __remove to avoid a warning when built
> > as a module. Can you explain what's going on?
>
> Yes please, and quickly.  I'm going to sent the patch-set today.  If I
> don't hear from you promptly, I'll probably pull the patch!
I readded it because when cros_ec_dev is loaded as module, I get a
warning on dmesg when unloading:

"""Device 'cros_pd' [or 'cros_ec'] does not have a release() function,
it is broken and must be fixed."""

The warning comes from device_release(). Given I get a warning when I
remove the release function or when I leave it empty. Let's pull the
patch.

Sorry for the confusion,

Gwendal.
>
> --
> Lee Jones [李琼斯]
> Linaro Services Technical Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-11 Thread Lee Jones
On Fri, 08 Jun 2018, Benson Leung wrote:

> 
> On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
> > This function is no longer called, so we get a harmless
> > warning until it is removed as well:
> > 
> > drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not used 
> > [-Werror=unused-function]
> > 
> > Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
> 
> Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
> you mentioned that you readded the __remove to avoid a warning when built
> as a module. Can you explain what's going on?

Yes please, and quickly.  I'm going to sent the patch-set today.  If I
don't hear from you promptly, I'll probably pull the patch!

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-11 Thread Lee Jones
On Fri, 08 Jun 2018, Benson Leung wrote:

> 
> On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
> > This function is no longer called, so we get a harmless
> > warning until it is removed as well:
> > 
> > drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not used 
> > [-Werror=unused-function]
> > 
> > Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
> 
> Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
> you mentioned that you readded the __remove to avoid a warning when built
> as a module. Can you explain what's going on?

Yes please, and quickly.  I'm going to sent the patch-set today.  If I
don't hear from you promptly, I'll probably pull the patch!

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-08 Thread Benson Leung

On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
> This function is no longer called, so we get a harmless
> warning until it is removed as well:
> 
> drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not used 
> [-Werror=unused-function]
> 
> Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")

Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
you mentioned that you readded the __remove to avoid a warning when built
as a module. Can you explain what's going on?

Benson

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
ble...@google.com
Chromium OS Project
ble...@chromium.org


signature.asc
Description: PGP signature


Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-08 Thread Benson Leung

On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote:
> This function is no longer called, so we get a harmless
> warning until it is removed as well:
> 
> drivers/mfd/cros_ec_dev.c:265:13: error: '__remove' defined but not used 
> [-Werror=unused-function]
> 
> Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")

Gwendal, in PATCH v2 of https://patchwork.kernel.org/patch/10439449/
you mentioned that you readded the __remove to avoid a warning when built
as a module. Can you explain what's going on?

Benson

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
ble...@google.com
Chromium OS Project
ble...@chromium.org


signature.asc
Description: PGP signature