All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Guan-Yu Lin <guanyulin@google.com>
Cc: rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com,
	gregkh@linuxfoundation.org, petr.tesarik.ext@huawei.com,
	rdunlap@infradead.org, james@equiv.tech, broonie@kernel.org,
	james.clark@arm.com, masahiroy@kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v3] PM / core: conditionally skip system pm in device/driver model
Date: Mon, 26 Feb 2024 16:02:33 +0200	[thread overview]
Message-ID: <ZdyZ-e6m_rFG4dY6@smile.fi.intel.com> (raw)
In-Reply-To: <CAOuDEK1KbZ9=W3ffWN-h_AAhbB9RqJvKsnF4G9qus3o2wkk=3w@mail.gmail.com>

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@linux.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



  reply	other threads:[~2024-02-26 14:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 14:38 [PATCH v3] PM / core: conditionally skip system pm in device/driver model Guan-Yu Lin
2024-02-23 15:18 ` Andy Shevchenko
2024-02-26  9:15   ` Guan-Yu Lin
2024-02-26 14:02     ` Andy Shevchenko [this message]
2024-02-27  6:47       ` Guan-Yu Lin
2024-02-23 17:43 ` Rafael J. Wysocki
2024-02-26  9:45   ` Guan-Yu Lin
2024-02-27 11:28     ` Rafael J. Wysocki
2024-02-29 10:09       ` Guan-Yu Lin
2024-02-23 18:20 ` Florian Fainelli
2024-02-26 10:28   ` Guan-Yu Lin
2024-02-26 18:40     ` Florian Fainelli
2024-02-27  8:56       ` Guan-Yu Lin
2024-02-27  9:15         ` Greg KH
2024-02-29 10:27           ` Guan-Yu Lin
2024-02-27 17:57         ` Florian Fainelli
2024-02-29  9:08           ` Guan-Yu Lin
2024-02-29 20:34             ` Greg KH
2024-03-08 18:04               ` Guan-Yu Lin

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=ZdyZ-e6m_rFG4dY6@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=guanyulin@google.com \
    --cc=james.clark@arm.com \
    --cc=james@equiv.tech \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=petr.tesarik.ext@huawei.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    /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.