From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: pavel@ucw.cz, len.brown@intel.com, rdunlap@xenotime.net,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-doc@vger.kernel.org, jirislaby@gmail.com, jslaby@suse.cz
Subject: Re: [PATCH] PM / Hibernate: Remove deprecated hibernation snapshot ioctls
Date: Thu, 8 Dec 2011 23:56:12 +0100 [thread overview]
Message-ID: <201112082356.12839.rjw@sisk.pl> (raw)
In-Reply-To: <20111208185318.19183.12112.stgit@srivatsabhat.in.ibm.com>
On Thursday, December 08, 2011, Srivatsa S. Bhat wrote:
> Several snapshot ioctls were marked for removal quite some time ago,
> since they were deprecated. Remove them.
>
> Suggested-by: Rafael J. Wysocki <rjw@sisk.pl>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Applied to linux-pm/linux-next.
Thanks,
Rafael
> ---
>
> Documentation/feature-removal-schedule.txt | 11 ----
> kernel/power/user.c | 87 ----------------------------
> 2 files changed, 0 insertions(+), 98 deletions(-)
>
> diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
> index 3d84912..9f51fc4 100644
> --- a/Documentation/feature-removal-schedule.txt
> +++ b/Documentation/feature-removal-schedule.txt
> @@ -85,17 +85,6 @@ 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 98ade21..78bdb44 100644
> --- a/kernel/power/user.c
> +++ b/kernel/power/user.c
> @@ -30,28 +30,6 @@
>
> #include "power.h"
>
> -/*
> - * NOTE: The SNAPSHOT_SET_SWAP_FILE and SNAPSHOT_PMOPS ioctls are obsolete and
> - * will be removed in the future. They are only preserved here for
> - * compatibility with existing userland utilities.
> - */
> -#define SNAPSHOT_SET_SWAP_FILE _IOW(SNAPSHOT_IOC_MAGIC, 10, unsigned int)
> -#define SNAPSHOT_PMOPS _IOW(SNAPSHOT_IOC_MAGIC, 12, unsigned int)
> -
> -#define PMOPS_PREPARE 1
> -#define PMOPS_ENTER 2
> -#define PMOPS_FINISH 3
> -
> -/*
> - * NOTE: The following ioctl definitions are wrong and have been replaced with
> - * correct ones. They are only preserved here for compatibility with existing
> - * userland utilities and will be removed in the future.
> - */
> -#define SNAPSHOT_ATOMIC_SNAPSHOT _IOW(SNAPSHOT_IOC_MAGIC, 3, void *)
> -#define SNAPSHOT_SET_IMAGE_SIZE _IOW(SNAPSHOT_IOC_MAGIC, 6, unsigned long)
> -#define SNAPSHOT_AVAIL_SWAP _IOR(SNAPSHOT_IOC_MAGIC, 7, void *)
> -#define SNAPSHOT_GET_SWAP_PAGE _IOR(SNAPSHOT_IOC_MAGIC, 8, void *)
> -
>
> #define SNAPSHOT_MINOR 231
>
> @@ -213,15 +191,6 @@ unlock:
> 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)
> {
> @@ -272,8 +241,6 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
> data->frozen = 0;
> break;
>
> - case SNAPSHOT_ATOMIC_SNAPSHOT:
> - snapshot_deprecated_ioctl(cmd);
> case SNAPSHOT_CREATE_IMAGE:
> if (data->mode != O_RDONLY || !data->frozen || data->ready) {
> error = -EPERM;
> @@ -308,8 +275,6 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
> data->ready = 0;
> break;
>
> - case SNAPSHOT_SET_IMAGE_SIZE:
> - snapshot_deprecated_ioctl(cmd);
> case SNAPSHOT_PREF_IMAGE_SIZE:
> image_size = arg;
> break;
> @@ -324,16 +289,12 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
> error = put_user(size, (loff_t __user *)arg);
> break;
>
> - 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_GET_SWAP_PAGE:
> - snapshot_deprecated_ioctl(cmd);
> case SNAPSHOT_ALLOC_SWAP_PAGE:
> if (data->swap < 0 || data->swap >= MAX_SWAPFILES) {
> error = -ENODEV;
> @@ -356,27 +317,6 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
> free_all_swap_pages(data->swap);
> 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,
> - * so we need to recode them
> - */
> - if (old_decode_dev(arg)) {
> - data->swap = swap_type_of(old_decode_dev(arg),
> - 0, NULL);
> - if (data->swap < 0)
> - error = -ENODEV;
> - } else {
> - data->swap = -1;
> - error = -EINVAL;
> - }
> - } else {
> - error = -EPERM;
> - }
> - break;
> -
> case SNAPSHOT_S2RAM:
> if (!data->frozen) {
> error = -EPERM;
> @@ -399,33 +339,6 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
> error = hibernation_platform_enter();
> break;
>
> - case SNAPSHOT_PMOPS: /* This ioctl is deprecated */
> - snapshot_deprecated_ioctl(cmd);
> - error = -EINVAL;
> -
> - switch (arg) {
> -
> - case PMOPS_PREPARE:
> - data->platform_support = 1;
> - error = 0;
> - break;
> -
> - case PMOPS_ENTER:
> - if (data->platform_support)
> - error = hibernation_platform_enter();
> - break;
> -
> - case PMOPS_FINISH:
> - if (data->platform_support)
> - error = 0;
> - break;
> -
> - default:
> - printk(KERN_ERR "SNAPSHOT_PMOPS: invalid argument %ld\n", arg);
> -
> - }
> - break;
> -
> case SNAPSHOT_SET_SWAP_AREA:
> if (swsusp_swap_in_use()) {
> error = -EPERM;
>
>
>
prev parent reply other threads:[~2011-12-08 22:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 18:54 Srivatsa S. Bhat
2011-12-08 22:56 ` Rafael J. Wysocki [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=201112082356.12839.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=jirislaby@gmail.com \
--cc=jslaby@suse.cz \
--cc=len.brown@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rdunlap@xenotime.net \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
/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
all inboxes | Powered by JetHome®