Skip to contentSkip to conversation

mmc: queue: add #ifdef around bounce buffer code

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 30, 2016 – Dec 1, 2016 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: queue: add #ifdef around bounce buffer code

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()")
---
 drivers/mmc/card/queue.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/card/queue.c +2 -0
index 8d10fab701b6..6ae6bfb8b221 100644
@@ -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)
 {
Signature · 1 line
2.9.0
#1 lore raw
Quoted 11 lines · Arnd Bergmann

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()")

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

Quoted 27 lines
---
 drivers/mmc/card/queue.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/card/queue.c +2 -1
index 8d10fab701b6..6ae6bfb8b221 100644
@@ -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