* [PATCH 1/2] PM: really deprecate deprecated user ioctls
@ 2010-01-27 16:46 Jiri Slaby
2010-01-27 16:46 ` [PATCH 2/2] PM / Hibernate: swap, remove useless check from swsusp_read Jiri Slaby
2010-01-27 19:48 ` [PATCH 1/2] PM: really deprecate deprecated user ioctls Pavel Machek
0 siblings, 2 replies; 6+ messages in thread
From: Jiri Slaby @ 2010-01-27 16:46 UTC (permalink / raw)
To: rjw; +Cc: linux-pm, linux-kernel, Pavel Machek
They were deprecated and removed from exported headers more than 2
years ago. Inform users about their removal in the future now.
(Switch cases needed to be reorderded for an easy fall through.)
And add an entry to feature-removal-schedule.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
---
Documentation/feature-removal-schedule.txt | 11 +++++++++++
kernel/power/user.c | 23 +++++++++++++++++++----
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 0dc4dd7..a71a1c6 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -64,6 +64,17 @@ Who: Robin Getz <rgetz@blackfin.uclinux.org> & Matt Mackall <mpm@selenic.com>
---------------------------
+What: Deprecated snapshot ioctls
+When: 2.6.36
+
+Why: The ioctls in kernel/power/user.c were marked as deprecated long time
+ ago. Now they notify users about that so that they need to replace
+ their userspace. After some more time, remove them completely.
+
+Who: Jiri Slaby <jirislaby@gmail.com>
+
+---------------------------
+
What: The ieee80211_regdom module parameter
When: March 2010 / desktop catchup
diff --git a/kernel/power/user.c b/kernel/power/user.c
index bf0014d..4d22896 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -195,6 +195,15 @@ static ssize_t snapshot_write(struct file *filp, const char __user *buf,
return res;
}
+static void snapshot_deprecated_ioctl(unsigned int cmd)
+{
+ if (printk_ratelimit())
+ printk(KERN_NOTICE "%pf: ioctl '%.8x' is deprecated and will "
+ "be removed soon, update your suspend-to-disk "
+ "utilities\n",
+ __builtin_return_address(0), cmd);
+}
+
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{
@@ -246,8 +255,9 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
data->frozen = 0;
break;
- case SNAPSHOT_CREATE_IMAGE:
case SNAPSHOT_ATOMIC_SNAPSHOT:
+ snapshot_deprecated_ioctl(cmd);
+ case SNAPSHOT_CREATE_IMAGE:
if (data->mode != O_RDONLY || !data->frozen || data->ready) {
error = -EPERM;
break;
@@ -275,8 +285,9 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
data->ready = 0;
break;
- case SNAPSHOT_PREF_IMAGE_SIZE:
case SNAPSHOT_SET_IMAGE_SIZE:
+ snapshot_deprecated_ioctl(cmd);
+ case SNAPSHOT_PREF_IMAGE_SIZE:
image_size = arg;
break;
@@ -290,15 +301,17 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
error = put_user(size, (loff_t __user *)arg);
break;
- case SNAPSHOT_AVAIL_SWAP_SIZE:
case SNAPSHOT_AVAIL_SWAP:
+ snapshot_deprecated_ioctl(cmd);
+ case SNAPSHOT_AVAIL_SWAP_SIZE:
size = count_swap_pages(data->swap, 1);
size <<= PAGE_SHIFT;
error = put_user(size, (loff_t __user *)arg);
break;
- case SNAPSHOT_ALLOC_SWAP_PAGE:
case SNAPSHOT_GET_SWAP_PAGE:
+ snapshot_deprecated_ioctl(cmd);
+ case SNAPSHOT_ALLOC_SWAP_PAGE:
if (data->swap < 0 || data->swap >= MAX_SWAPFILES) {
error = -ENODEV;
break;
@@ -321,6 +334,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
break;
case SNAPSHOT_SET_SWAP_FILE: /* This ioctl is deprecated */
+ snapshot_deprecated_ioctl(cmd);
if (!swsusp_swap_in_use()) {
/*
* User space encodes device types as two-byte values,
@@ -362,6 +376,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
break;
case SNAPSHOT_PMOPS: /* This ioctl is deprecated */
+ snapshot_deprecated_ioctl(cmd);
error = -EINVAL;
switch (arg) {
--
1.6.6.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] PM / Hibernate: swap, remove useless check from swsusp_read
2010-01-27 16:46 [PATCH 1/2] PM: really deprecate deprecated user ioctls Jiri Slaby
@ 2010-01-27 16:46 ` Jiri Slaby
2010-01-27 23:06 ` Rafael J. Wysocki
2010-01-27 19:48 ` [PATCH 1/2] PM: really deprecate deprecated user ioctls Pavel Machek
1 sibling, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2010-01-27 16:46 UTC (permalink / raw)
To: rjw; +Cc: linux-pm, linux-kernel, Pavel Machek
It will never reach here if the sws_resume_bdev is erratic.
swsusp_read is called only from software_resume, but after
swsusp_check which would catch the error state.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
---
kernel/power/swap.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 09b2b0a..1d57573 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -657,10 +657,6 @@ int swsusp_read(unsigned int *flags_p)
struct swsusp_info *header;
*flags_p = swsusp_header->flags;
- if (IS_ERR(resume_bdev)) {
- pr_debug("PM: Image device not initialised\n");
- return PTR_ERR(resume_bdev);
- }
memset(&snapshot, 0, sizeof(struct snapshot_handle));
error = snapshot_write_next(&snapshot, PAGE_SIZE);
--
1.6.6.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] PM: really deprecate deprecated user ioctls
2010-01-27 16:46 [PATCH 1/2] PM: really deprecate deprecated user ioctls Jiri Slaby
2010-01-27 16:46 ` [PATCH 2/2] PM / Hibernate: swap, remove useless check from swsusp_read Jiri Slaby
@ 2010-01-27 19:48 ` Pavel Machek
2010-01-27 23:05 ` Rafael J. Wysocki
1 sibling, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2010-01-27 19:48 UTC (permalink / raw)
To: Jiri Slaby; +Cc: rjw, linux-pm, linux-kernel
On Wed 2010-01-27 17:46:17, Jiri Slaby wrote:
> They were deprecated and removed from exported headers more than 2
> years ago. Inform users about their removal in the future now.
>
> (Switch cases needed to be reorderded for an easy fall through.)
>
> And add an entry to feature-removal-schedule.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Pavel Machek <pavel@ucw.cz>
ACK.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] PM: really deprecate deprecated user ioctls
2010-01-27 19:48 ` [PATCH 1/2] PM: really deprecate deprecated user ioctls Pavel Machek
@ 2010-01-27 23:05 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2010-01-27 23:05 UTC (permalink / raw)
To: Pavel Machek; +Cc: Jiri Slaby, linux-pm, linux-kernel
On Wednesday 27 January 2010, Pavel Machek wrote:
> On Wed 2010-01-27 17:46:17, Jiri Slaby wrote:
> > They were deprecated and removed from exported headers more than 2
> > years ago. Inform users about their removal in the future now.
> >
> > (Switch cases needed to be reorderded for an easy fall through.)
> >
> > And add an entry to feature-removal-schedule.
> >
> > Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > Cc: Pavel Machek <pavel@ucw.cz>
>
> ACK.
Applied.
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] PM / Hibernate: swap, remove useless check from swsusp_read
2010-01-27 16:46 ` [PATCH 2/2] PM / Hibernate: swap, remove useless check from swsusp_read Jiri Slaby
@ 2010-01-27 23:06 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2010-01-27 23:06 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-pm, linux-kernel, Pavel Machek
On Wednesday 27 January 2010, Jiri Slaby wrote:
> It will never reach here if the sws_resume_bdev is erratic.
> swsusp_read is called only from software_resume, but after
> swsusp_check which would catch the error state.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Pavel Machek <pavel@ucw.cz>
Applied.
> ---
> kernel/power/swap.c | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/power/swap.c b/kernel/power/swap.c
> index 09b2b0a..1d57573 100644
> --- a/kernel/power/swap.c
> +++ b/kernel/power/swap.c
> @@ -657,10 +657,6 @@ int swsusp_read(unsigned int *flags_p)
> struct swsusp_info *header;
>
> *flags_p = swsusp_header->flags;
> - if (IS_ERR(resume_bdev)) {
> - pr_debug("PM: Image device not initialised\n");
> - return PTR_ERR(resume_bdev);
> - }
>
> memset(&snapshot, 0, sizeof(struct snapshot_handle));
> error = snapshot_write_next(&snapshot, PAGE_SIZE);
>
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] PM / Hibernate: swap, remove useless check from swsusp_read
2010-01-27 10:57 [PATCH 1/2] PM: remove " Jiri Slaby
@ 2010-01-27 10:57 ` Jiri Slaby
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Slaby @ 2010-01-27 10:57 UTC (permalink / raw)
To: rjw; +Cc: linux-kernel, jirislaby
It will never reach here if the sws_resume_bdev is erratic.
swsusp_read is called only from software_resume, but after
swsusp_check which would catch the error state.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
kernel/power/swap.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 09b2b0a..1d57573 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -657,10 +657,6 @@ int swsusp_read(unsigned int *flags_p)
struct swsusp_info *header;
*flags_p = swsusp_header->flags;
- if (IS_ERR(resume_bdev)) {
- pr_debug("PM: Image device not initialised\n");
- return PTR_ERR(resume_bdev);
- }
memset(&snapshot, 0, sizeof(struct snapshot_handle));
error = snapshot_write_next(&snapshot, PAGE_SIZE);
--
1.6.6.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-27 23:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-27 16:46 [PATCH 1/2] PM: really deprecate deprecated user ioctls Jiri Slaby
2010-01-27 16:46 ` [PATCH 2/2] PM / Hibernate: swap, remove useless check from swsusp_read Jiri Slaby
2010-01-27 23:06 ` Rafael J. Wysocki
2010-01-27 19:48 ` [PATCH 1/2] PM: really deprecate deprecated user ioctls Pavel Machek
2010-01-27 23:05 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2010-01-27 10:57 [PATCH 1/2] PM: remove " Jiri Slaby
2010-01-27 10:57 ` [PATCH 2/2] PM / Hibernate: swap, remove useless check from swsusp_read Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®