linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
@ 2014-12-03  1:34 Rafael J. Wysocki
  2014-12-03  2:34 ` Aaron Lu
  2014-12-03 23:50 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2014-12-03  1:34 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linux PM list, Linux Kernel Mailing List, Alan Stern, Aaron Lu

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.

Replace CONFIG_PM_RUNTIME with CONFIG_PM in the block device core.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
PM_SLEEP is selected) which is only in linux-next at the moment (via the
linux-pm tree).

Please let me know if it is OK to take this one into linux-pm.

---
 block/blk-core.c       |    6 +++---
 block/elevator.c       |    2 +-
 include/linux/blkdev.h |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

Index: linux-pm/include/linux/blkdev.h
===================================================================
--- linux-pm.orig/include/linux/blkdev.h
+++ linux-pm/include/linux/blkdev.h
@@ -398,7 +398,7 @@ struct request_queue {
 	 */
 	struct kobject mq_kobj;
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	struct device		*dev;
 	int			rpm_status;
 	unsigned int		nr_pending;
@@ -1057,7 +1057,7 @@ extern void blk_put_queue(struct request
 /*
  * block layer runtime pm functions
  */
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 extern void blk_pm_runtime_init(struct request_queue *q, struct device *dev);
 extern int blk_pre_runtime_suspend(struct request_queue *q);
 extern void blk_post_runtime_suspend(struct request_queue *q, int err);
Index: linux-pm/block/blk-core.c
===================================================================
--- linux-pm.orig/block/blk-core.c
+++ linux-pm/block/blk-core.c
@@ -1325,7 +1325,7 @@ void part_round_stats(int cpu, struct hd
 }
 EXPORT_SYMBOL_GPL(part_round_stats);
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static void blk_pm_put_request(struct request *rq)
 {
 	if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && !--rq->q->nr_pending)
@@ -2134,7 +2134,7 @@ void blk_account_io_done(struct request
 	}
 }
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 /*
  * Don't process normal requests when queue is suspended
  * or in the process of suspending/resuming
@@ -3159,7 +3159,7 @@ void blk_finish_plug(struct blk_plug *pl
 }
 EXPORT_SYMBOL(blk_finish_plug);
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 /**
  * blk_pm_runtime_init - Block layer runtime PM initialization routine
  * @q: the queue of the device
Index: linux-pm/block/elevator.c
===================================================================
--- linux-pm.orig/block/elevator.c
+++ linux-pm/block/elevator.c
@@ -539,7 +539,7 @@ void elv_bio_merged(struct request_queue
 		e->type->ops.elevator_bio_merged_fn(q, rq, bio);
 }
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static void blk_pm_requeue_request(struct request *rq)
 {
 	if (rq->q->dev && !(rq->cmd_flags & REQ_PM))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  2014-12-03  1:34 [PATCH] block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM Rafael J. Wysocki
@ 2014-12-03  2:34 ` Aaron Lu
  2014-12-03 23:50 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Aaron Lu @ 2014-12-03  2:34 UTC (permalink / raw)
  To: Rafael J. Wysocki, Jens Axboe
  Cc: Linux PM list, Linux Kernel Mailing List, Alan Stern

On 12/03/2014 09:34 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
> selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
> depending on CONFIG_PM_RUNTIME may now be changed to depend on
> CONFIG_PM.

Nice change!

> 
> Replace CONFIG_PM_RUNTIME with CONFIG_PM in the block device core.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Reviewed-by: Aaron Lu <aaron.lu@intel.com>

Thanks,
Aaron

> ---
> 
> Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
> PM_SLEEP is selected) which is only in linux-next at the moment (via the
> linux-pm tree).
> 
> Please let me know if it is OK to take this one into linux-pm.
> 
> ---
>  block/blk-core.c       |    6 +++---
>  block/elevator.c       |    2 +-
>  include/linux/blkdev.h |    4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> Index: linux-pm/include/linux/blkdev.h
> ===================================================================
> --- linux-pm.orig/include/linux/blkdev.h
> +++ linux-pm/include/linux/blkdev.h
> @@ -398,7 +398,7 @@ struct request_queue {
>  	 */
>  	struct kobject mq_kobj;
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  	struct device		*dev;
>  	int			rpm_status;
>  	unsigned int		nr_pending;
> @@ -1057,7 +1057,7 @@ extern void blk_put_queue(struct request
>  /*
>   * block layer runtime pm functions
>   */
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  extern void blk_pm_runtime_init(struct request_queue *q, struct device *dev);
>  extern int blk_pre_runtime_suspend(struct request_queue *q);
>  extern void blk_post_runtime_suspend(struct request_queue *q, int err);
> Index: linux-pm/block/blk-core.c
> ===================================================================
> --- linux-pm.orig/block/blk-core.c
> +++ linux-pm/block/blk-core.c
> @@ -1325,7 +1325,7 @@ void part_round_stats(int cpu, struct hd
>  }
>  EXPORT_SYMBOL_GPL(part_round_stats);
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static void blk_pm_put_request(struct request *rq)
>  {
>  	if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && !--rq->q->nr_pending)
> @@ -2134,7 +2134,7 @@ void blk_account_io_done(struct request
>  	}
>  }
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  /*
>   * Don't process normal requests when queue is suspended
>   * or in the process of suspending/resuming
> @@ -3159,7 +3159,7 @@ void blk_finish_plug(struct blk_plug *pl
>  }
>  EXPORT_SYMBOL(blk_finish_plug);
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  /**
>   * blk_pm_runtime_init - Block layer runtime PM initialization routine
>   * @q: the queue of the device
> Index: linux-pm/block/elevator.c
> ===================================================================
> --- linux-pm.orig/block/elevator.c
> +++ linux-pm/block/elevator.c
> @@ -539,7 +539,7 @@ void elv_bio_merged(struct request_queue
>  		e->type->ops.elevator_bio_merged_fn(q, rq, bio);
>  }
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static void blk_pm_requeue_request(struct request *rq)
>  {
>  	if (rq->q->dev && !(rq->cmd_flags & REQ_PM))
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  2014-12-03  1:34 [PATCH] block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM Rafael J. Wysocki
  2014-12-03  2:34 ` Aaron Lu
@ 2014-12-03 23:50 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2014-12-03 23:50 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux PM list, Linux Kernel Mailing List, Alan Stern, Aaron Lu

On 12/02/2014 06:34 PM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
> selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
> depending on CONFIG_PM_RUNTIME may now be changed to depend on
> CONFIG_PM.
>
> Replace CONFIG_PM_RUNTIME with CONFIG_PM in the block device core.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
> PM_SLEEP is selected) which is only in linux-next at the moment (via the
> linux-pm tree).
>
> Please let me know if it is OK to take this one into linux-pm.

Yes that's fine, you can add my acked-by to it.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-03 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-03  1:34 [PATCH] block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM Rafael J. Wysocki
2014-12-03  2:34 ` Aaron Lu
2014-12-03 23:50 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).