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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32598586.Mjd66ZhNnG@kreacher>
Date:   Thu, 01 Aug 2019 00:17:57 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Stephen Boyd <swboyd@...omium.org>, Tri Vo <trong@...roid.com>
Cc:     gregkh@...uxfoundation.org, viresh.kumar@...aro.org,
        rafael@...nel.org, hridya@...gle.com, sspatil@...gle.com,
        kaleshsingh@...gle.com, ravisadineni@...omium.org,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        kernel-team@...roid.com
Subject: Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

On Wednesday, July 31, 2019 11:59:32 PM CEST Stephen Boyd wrote:
> Quoting Tri Vo (2019-07-31 14:55:14)
> > +/**
> > + * wakeup_source_sysfs_add - Add wakeup_source attributes to sysfs.
> > + * @parent: Device given wakeup source is associated with (or NULL if virtual).
> > + * @ws: Wakeup source to be added in sysfs.
> > + */
> > +int wakeup_source_sysfs_add(struct device *parent, struct wakeup_source *ws)
> > +{
> > +       struct device *dev;
> > +       int id;
> > +
> > +       id = ida_alloc(&wakeup_ida, GFP_KERNEL);

So can anyone remind me why the IDA thing is needed here at all?

> > +       if (id < 0)
> > +               return id;
> > +       ws->id = id;
> > +
> > +       dev = device_create_with_groups(wakeup_class, parent, MKDEV(0, 0), ws,
> > +                                       wakeup_source_groups, "ws%d",
> 
> I thought the name was going to still be 'wakeupN'?

So can't we prefix the wakeup source name with something like "wakeup:" or similar here?



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ