Patchwork [U-Boot,V2,2/4] bouncebuf: remove dummy implementation

login
register
mail settings
Submitter Stephen Warren
Date Nov. 6, 2012, 9:27 p.m.
Message ID <1352237250-8764-2-git-send-email-swarren@wwwdotorg.org>
Download mbox | patch
Permalink /patch/197549/
State Accepted
Delegated to: Andy Fleming
Headers show

Comments

Stephen Warren - Nov. 6, 2012, 9:27 p.m.
From: Stephen Warren <swarren@nvidia.com>

If any driver ever needs to use the bounce buffer API, it always needs
to use it. As such, providing a dummy implementation of those APIs when
CONFIG_BOUNCE_BUFFER isn't defined does not make sense. Remove the dummy
implementation.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: New patch.
---
 include/bouncebuf.h |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)
Simon Glass - Nov. 6, 2012, 10:54 p.m.
On Tue, Nov 6, 2012 at 1:27 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> If any driver ever needs to use the bounce buffer API, it always needs
> to use it. As such, providing a dummy implementation of those APIs when
> CONFIG_BOUNCE_BUFFER isn't defined does not make sense. Remove the dummy
> implementation.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

Tested on Seaboard, loading a kernel from ext2 partition.

Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>

Patch

diff --git a/include/bouncebuf.h b/include/bouncebuf.h
index 31021c5..aa2278c 100644
--- a/include/bouncebuf.h
+++ b/include/bouncebuf.h
@@ -51,7 +51,6 @@ 
  */
 #define GEN_BB_RW	(GEN_BB_READ | GEN_BB_WRITE)
 
-#ifdef CONFIG_BOUNCE_BUFFER
 /**
  * bounce_buffer_start() -- Start the bounce buffer session
  * data:	pointer to buffer to be aligned
@@ -70,18 +69,5 @@  int bounce_buffer_start(void **data, size_t len, void **backup, uint8_t flags);
  * flags:	flags describing the transaction, see above.
  */
 int bounce_buffer_stop(void **data, size_t len, void **backup, uint8_t flags);
-#else
-static inline int bounce_buffer_start(void **data, size_t len, void **backup,
-					uint8_t flags)
-{
-	return 0;
-}
-
-static inline int bounce_buffer_stop(void **data, size_t len, void **backup,
-					uint8_t flags)
-{
-	return 0;
-}
-#endif
 
 #endif