lkml.org 
[lkml]   [2022]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] remove CONFIG_ANDROID
On Wed, Jun 29, 2022 at 06:44:14PM -0700, Joe Perches wrote:
> On Thu, 2022-06-30 at 02:50 +0200, Jason A. Donenfeld wrote:
> > On Wed, Jun 29, 2022 at 05:36:57PM -0700, Joe Perches wrote:
> > > > > +static ssize_t pm_userspace_autosleeper_show(struct kobject *kobj,
> > > > > + struct kobj_attribute *attr, char *buf)
> > > > > +{
> > > > > + return sprintf(buf, "%d\n", pm_userspace_autosleeper_enabled);
> > >
> > > This should use sysfs_emit no?
> >
> > Probably, yea. Note that I just copy and pasted a nearby function,
> > pm_async_show, `:%s/`d the variable name, and then promptly `git diff |
> > clip`d it and plonked it into my email. Looking at the file, it uses
> > sprintf all over the place in this fashion. So you may want to submit a
> > cleanup to Rafael on this if you're right about sysfs_emit() being
> > universally preferred.
>
> Perhaps:
>
> (trivial refactored and added a missing newline in autosleep_show)
>
> ---
> kernel/power/main.c | 102 ++++++++++++++++++++++++++--------------------------
> 1 file changed, 52 insertions(+), 50 deletions(-)

You should probably post a proper patch to the PM people. At least I'm
not going to look at that here, as it's not really relevant at all to
this discussion.

Jason

\
 
 \ /
  Last update: 2022-06-30 05:04    [W:0.098 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site