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] [day] [month] [year] [list]
Message-ID: <b47c91a4f4c337ec8e2fdb663e0a90fd62b5c3b6.camel@HansenPartnership.com>
Date: Sat, 06 Sep 2025 08:13:03 -0400
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Jani Nikula <jani.nikula@...ux.intel.com>, Mauro Carvalho Chehab
	 <mchehab+huawei@...nel.org>
Cc: Randy Dunlap <rdunlap@...radead.org>, linux-kernel@...r.kernel.org, 
 "Rafael J. Wysocki" <rafael@...nel.org>, Andrew Morton
 <akpm@...ux-foundation.org>, Greg Kroah-Hartman
 <gregkh@...uxfoundation.org>, Pavel Machek <pavel@....cz>, Len Brown
 <len.brown@...el.com>,  linux-pm@...r.kernel.org, Jonathan Corbet
 <corbet@....net>,  linux-doc@...r.kernel.org, Mauro Carvalho Chehab
 <mchehab@...nel.org>
Subject: Re: [PATCH v4] kernel.h: add comments for system_states

On Fri, 2025-09-05 at 16:06 +0300, Jani Nikula wrote:
> On Fri, 05 Sep 2025, Mauro Carvalho Chehab
> <mchehab+huawei@...nel.org> wrote:
> > Em Fri, 05 Sep 2025 12:02:37 +0300
> > Jani Nikula <jani.nikula@...ux.intel.com> escreveu:
> > 
> > > On Wed, 03 Sep 2025, Randy Dunlap <rdunlap@...radead.org> wrote:
[...]
> > > > +++ linux-next-20250819/Documentation/driver-api/pm/devices.rst
> > > > @@ -241,6 +241,14 @@ before reactivating its class I/O queues
> > > >  More power-aware drivers might prepare the devices for
> > > > triggering system wakeup
> > > >  events.
> > > >  
> > > > +System states available for drivers
> > > > +-----------------------------------
> > > > +
> > > > +These system states are available for drivers to help them
> > > > determine how to
> > > > +handle state transitions.
> > > > +
> > > > +.. kernel-doc:: include/linux/kernel.h
> > > > +   :doc: General system_states available for drivers
> > > >  
> > > >  Call Sequence Guarantees
> > > >  ------------------------
> > > >  
> > > 
> > 
> > If the problem is with "extern" before enum, fixing kdoc be
> > fairly trivial.
> 
> The non-trivial part is deciding whether you're documenting the enum
> type or the variable. Both are equally valid options.

If you're building a system that's easy to maintain, it shouldn't be at
all non trivial: you add the documentation where someone adding a new
state would find it.  i.e. on the enum.  If you document the variable,
no-one adding a new state would likely look at it.  I get that in this
case they're one after the other, but think about the precedent for
when they're not.

Regards,

James


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ