From: Pavel Machek <pavel@ucw.cz>
To: Andrew Morton <akpm@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: fix-u32-vs-pm_message_t-in-usb
Date: Fri, 11 Mar 2005 14:10:40 +0100 [thread overview]
Message-ID: <20050311131040.GD1379@elf.ucw.cz> (raw)
In-Reply-To: <20050310223353.47601d54.akpm@osdl.org>
Hi!
> This patch has been spitting warnings:
>
> drivers/usb/host/uhci-hcd.c:838: warning: initialization from incompatible pointer type
> drivers/usb/host/ohci-pci.c:191: warning: initialization from incompatible pointer type
>
> Because hc_driver.suspend() takes a u32 as its second arg. Changing that
> to pci_power_t causes build failures and including pci.h in usb.h seems
> wrong.
>
> Wanna fix it sometime?
While fixing usb, I stomped on a few more fixes. Print error when some
device fails to power down, and 2 is no longer valid state to pass in
pm_message_t. Please apply,
Pavel
--- clean-mm/drivers/base/power/suspend.c 2005-01-12 11:07:39.000000000 +0100
+++ linux-mm/drivers/base/power/suspend.c 2005-03-11 13:46:41.000000000 +0100
@@ -134,6 +134,8 @@
Done:
return error;
Error:
+ printk(KERN_ERR "Could not power down device %s: "
+ "error %d\n", kobject_name(&dev->kobj), error);
dpm_power_up();
goto Done;
}
Only in linux-mm/drivers/char: consolemap_deftbl.c
--- clean-mm/drivers/ide/ide-disk.c 2005-03-11 11:25:34.000000000 +0100
+++ linux-mm/drivers/ide/ide-disk.c 2005-03-11 13:44:18.000000000 +0100
@@ -1096,7 +1096,7 @@
}
printk("Shutdown: %s\n", drive->name);
- dev->bus->suspend(dev, PM_SUSPEND_STANDBY);
+ dev->bus->suspend(dev, PMSG_SUSPEND);
}
/*
--- clean-mm/drivers/pci/pci.c 2005-03-11 11:25:36.000000000 +0100
+++ linux-mm/drivers/pci/pci.c 2005-03-11 13:55:50.000000000 +0100
@@ -312,22 +312,24 @@
/**
* pci_choose_state - Choose the power state of a PCI device
* @dev: PCI device to be suspended
- * @state: target sleep state for the whole system
+ * @state: target sleep state for the whole system. This is the value
+ * that is passed to suspend() function.
*
* Returns PCI power state suitable for given device and given system
* message.
*/
-pci_power_t pci_choose_state(struct pci_dev *dev, u32 state)
+pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
{
if (!pci_find_capability(dev, PCI_CAP_ID_PM))
return PCI_D0;
switch (state) {
- case 0: return PCI_D0;
- case 2: return PCI_D2;
+ case 0: return PCI_D0;
case 3: return PCI_D3hot;
- default: BUG();
+ default:
+ printk("They asked me for state %d\n", state);
+ BUG();
}
return PCI_D0;
}
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
prev parent reply other threads:[~2005-03-11 13:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050310223353.47601d54.akpm@osdl.org>
2005-03-11 13:08 ` fix-u32-vs-pm_message_t-in-usb Pavel Machek
2005-03-18 21:43 ` fix-u32-vs-pm_message_t-in-usb Greg KH
2005-03-18 23:44 ` fix-u32-vs-pm_message_t-in-usb Pavel Machek
2005-03-18 23:53 ` fix-u32-vs-pm_message_t-in-usb Andrew Morton
2005-03-19 0:00 ` fix-u32-vs-pm_message_t-in-usb Pavel Machek
2005-03-19 0:28 ` fix-u32-vs-pm_message_t-in-usb Pavel Machek
2005-03-11 13:10 ` Pavel Machek [this message]
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=20050311131040.GD1379@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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.