mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@wildopensource.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: kernel-janitors@osdl.org,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-pm@osdl.org, benh@kernel.crashing.org
Subject: Re: driver model u32 -> pm_message_t conversion: help needed
Date: 02 Feb 2005 03:30:55 -0500	[thread overview]
Message-ID: <yq0brb3qs74.fsf@jaguar.mkp.net> (raw)
In-Reply-To: <20050125194710.GA1711@elf.ucw.cz>

>>>>> "Pavel" == Pavel Machek <pavel@ucw.cz> writes:

Pavel> Hi!  Two Long time ago, BenH said that making patches is easy,
Pavel> so I hope to get his help now... And will probably need more.

Pavel> Suspend routines change, slowly.

Pavel> - int (*suspend)(struct device * dev, u32 state); + int
Pavel> (*suspend)(struct device * dev, pm_message_t state);

Pavel> For now u32 is typedef-ed to pm_message_t, but that is not
Pavel> going to be the case for 2.6.12. What needs to be done is
Pavel> changing all state parameters from u32 to
Pavel> pm_message_t. suspend() functions should not use state variable
Pavel> for now (except for PCI ones, those are allowed to call
Pavel> pci_choose_state and convert state into pci_power_t, and use
Pavel> that).

Pavel,

Sorry for being late responding to this, but I'd say this is a prime
example for typedef's considered evil (see Greg's OLS talk ;).

It would be a lot cleaner if it was made a struct and then passing a
struct pointer as the argument instead of passing the struct by value
as you do right now.

Pavel> -static int agp_via_suspend(struct pci_dev *pdev, u32 state)
Pavel> +static int agp_via_suspend(struct pci_dev *pdev, pm_message_t

Cheers,
Jes

  parent reply	other threads:[~2005-02-02  8:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-25 19:47 Pavel Machek
2005-01-25 23:50 ` Benjamin Herrenschmidt
2005-02-02  0:09 ` Daniel Drake
2005-02-02  0:10   ` Pavel Machek
2005-02-02  8:30 ` Jes Sorensen [this message]
2005-02-02  9:50   ` Pavel Machek
2005-02-02  9:57     ` [linux-pm] " Pavel Machek
2005-02-03  9:09       ` Jes Sorensen
2005-02-03 10:38         ` Pavel Machek

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=yq0brb3qs74.fsf@jaguar.mkp.net \
    --to=jes@wildopensource.com \
    --cc=benh@kernel.crashing.org \
    --cc=kernel-janitors@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@osdl.org \
    --cc=pavel@ucw.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome