[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdyZ-e6m_rFG4dY6@smile.fi.intel.com>
Date: Mon, 26 Feb 2024 16:02:33 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Guan-Yu Lin <guanyulin@...gle.com>
Cc: rafael@...nel.org, pavel@....cz, len.brown@...el.com,
gregkh@...uxfoundation.org, petr.tesarik.ext@...wei.com,
rdunlap@...radead.org, james@...iv.tech, broonie@...nel.org,
james.clark@....com, masahiroy@...nel.org,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH v3] PM / core: conditionally skip system pm in
device/driver model
On Mon, Feb 26, 2024 at 05:15:00PM +0800, Guan-Yu Lin wrote:
> On Fri, Feb 23, 2024 at 11:18 PM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> > On Fri, Feb 23, 2024 at 02:38:29PM +0000, Guan-Yu Lin wrote:
..
> > > + if (kstrtoint(buf, 0, &ret))
> >
> > Why is it int? It seems like flags, should not be unsigned as u32 or so?
>
> The ".event" member in struct pm_message is an int, but the values
> assigned to it are used like bit flags (e.g. PM_EVENT_FREEZE=0x1,
> PM_EVENT_SUSPEND=0x2, PM_EVENT_HIBERNATE=0x4). Is this an intentional
> design choice? We might need to change the design accordingly.
It might give a subtle errors related to promoted signdness.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists