From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Pei Xiao <xiaopei01@kylinos.cn>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
rafael@kernel.org, dakr@kernel.org,
bartosz.golaszewski@linaro.org
Subject: Re: [PATCH] devres: Move remaining devm_alloc_percpu and devm_device_add_group to devres.h
Date: Fri, 23 May 2025 19:18:51 +0300 [thread overview]
Message-ID: <aDCf6-xhBStld-a4@smile.fi.intel.com> (raw)
In-Reply-To: <3abc216a-1af5-4cc2-a70c-e406943be274@kylinos.cn>
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
next prev parent reply other threads:[~2025-05-23 16:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 9:01 [PATCH] devres: Move remaining devm_alloc_percpu and devm_device_add_group to devres.h Pei Xiao
2025-05-22 12:54 ` Andy Shevchenko
2025-05-23 3:08 ` Pei Xiao
2025-05-23 16:18 ` Andy Shevchenko [this message]
2025-05-27 9:41 ` Pei Xiao
2025-05-27 11:09 ` Andy Shevchenko
2025-05-28 3:07 ` Pei Xiao
2025-05-28 9:31 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aDCf6-xhBStld-a4@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=xiaopei01@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.