[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDCf6-xhBStld-a4@smile.fi.intel.com>
Date: Fri, 23 May 2025 19:18:51 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Pei Xiao <xiaopei01@...inos.cn>
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
rafael@...nel.org, dakr@...nel.org, bartosz.golaszewski@...aro.org
Subject: Re: [PATCH] devres: Move remaining devm_alloc_percpu and
devm_device_add_group to devres.h
On Fri, May 23, 2025 at 11:08:09AM +0800, Pei Xiao wrote:
> 在 2025/5/22 20:54, Andy Shevchenko 写道:
> > On Thu, May 22, 2025 at 05:01:26PM +0800, Pei Xiao wrote:
...
> > Don't you need to cleanup the header inclusions as well?
Any answer here?
...
> >> -int __must_check devm_device_add_group(struct device *dev,
> >> - const struct attribute_group *grp);
> > I'm not sure about this. The percpu seems standalone piece, but this has
> > relations with the other group related definitions just above.
And here? You should either agree on non-commented points (and remove them
when replying) or answer what's wrong with the suggestions. Ignoring is not
an option.
...
> >> +#include <linux/sysfs.h>
> >> +#include <asm/percpu.h>
> > What for are these new inclusions, please?
>
> I add these for build error:
>
> In file included from drivers/gpio/gpiolib-devres.c:9:
> ./include/linux/device/devres.h:189:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
> 189 | void __percpu *__devm_alloc_percpu(struct device *dev, size_t size,
> | ^
> ./include/linux/device/devres.h:191:57: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
> 191 | void devm_free_percpu(struct device *dev, void __percpu *pdata);
> | ^
Nice, and where is the __percpu defined?
> ./include/linux/device/devres.h:194:25: warning: ‘struct attribute_group’ declared inside parameter list will not be visible outside of this definition or declaration
> 194 | const struct attribute_group *grp);
> | ^~~~~~~~~~~~~~~
And why do you need the sysfs.h to resolve this? I don't see the use of
the struct attribute_group here. (The error message has the hint in it
on how to proceed)
...
> > Please, take your time to understand what is behind the __percpu and
> > why the asm/percpu.h is redundant here.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists