linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: queue: add #ifdef around bounce buffer code
@ 2016-11-30 21:03 Arnd Bergmann
  2016-12-01  8:00 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-11-30 21:03 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Arnd Bergmann, Linus Walleij, Adrian Hunter, Jens Axboe,
	Harjani Ritesh, linux-mmc, linux-kernel

The two functions that got split out from the bounce
buffer handling are now unused when CONFIG_MMC_BLOCK_BOUNCE
is disabled:

mmc/card/queue.c:212:12: error: 'mmc_queue_alloc_bounce_sgs' defined but not used [-Werror=unused-function]
mmc/card/queue.c:189:13: error: 'mmc_queue_alloc_bounce_bufs' defined but not used [-Werror=unused-function]

This adds a new #ifdef around them.

Fixes: 0a6321310492 ("mmc: queue: Factor out mmc_queue_alloc_bounce_bufs()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mmc/card/queue.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 8d10fab701b6..6ae6bfb8b221 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -186,6 +186,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
 		queue_flag_set_unlocked(QUEUE_FLAG_SECERASE, q);
 }
 
+#ifdef CONFIG_MMC_BLOCK_BOUNCE
 static bool mmc_queue_alloc_bounce_bufs(struct mmc_queue *mq,
 					unsigned int bouncesz)
 {
@@ -226,6 +227,7 @@ static int mmc_queue_alloc_bounce_sgs(struct mmc_queue *mq,
 
 	return 0;
 }
+#endif
 
 static int mmc_queue_alloc_sgs(struct mmc_queue *mq, int max_segs)
 {
-- 
2.9.0

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

* Re: [PATCH] mmc: queue: add #ifdef around bounce buffer code
  2016-11-30 21:03 [PATCH] mmc: queue: add #ifdef around bounce buffer code Arnd Bergmann
@ 2016-12-01  8:00 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2016-12-01  8:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linus Walleij, Adrian Hunter, Jens Axboe, Harjani Ritesh,
	linux-mmc, linux-kernel

On 30 November 2016 at 22:03, Arnd Bergmann <arnd@arndb.de> wrote:
> The two functions that got split out from the bounce
> buffer handling are now unused when CONFIG_MMC_BLOCK_BOUNCE
> is disabled:
>
> mmc/card/queue.c:212:12: error: 'mmc_queue_alloc_bounce_sgs' defined but not used [-Werror=unused-function]
> mmc/card/queue.c:189:13: error: 'mmc_queue_alloc_bounce_bufs' defined but not used [-Werror=unused-function]
>
> This adds a new #ifdef around them.
>
> Fixes: 0a6321310492 ("mmc: queue: Factor out mmc_queue_alloc_bounce_bufs()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for the fix. This time I have already amended the changes that
causes the problem and pushed them for next by yesterday.

Kind regards
Uffe

> ---
>  drivers/mmc/card/queue.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
> index 8d10fab701b6..6ae6bfb8b221 100644
> --- a/drivers/mmc/card/queue.c
> +++ b/drivers/mmc/card/queue.c
> @@ -186,6 +186,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
>                 queue_flag_set_unlocked(QUEUE_FLAG_SECERASE, q);
>  }
>
> +#ifdef CONFIG_MMC_BLOCK_BOUNCE
>  static bool mmc_queue_alloc_bounce_bufs(struct mmc_queue *mq,
>                                         unsigned int bouncesz)
>  {
> @@ -226,6 +227,7 @@ static int mmc_queue_alloc_bounce_sgs(struct mmc_queue *mq,
>
>         return 0;
>  }
> +#endif
>
>  static int mmc_queue_alloc_sgs(struct mmc_queue *mq, int max_segs)
>  {
> --
> 2.9.0
>

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

end of thread, other threads:[~2016-12-01  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-30 21:03 [PATCH] mmc: queue: add #ifdef around bounce buffer code Arnd Bergmann
2016-12-01  8:00 ` Ulf Hansson

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).