mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/3] fix "no previous prototype" warnings
@ 2017-03-20  6:59 Antony Pavlov
  2017-03-20  6:59 ` [PATCH 1/3] gui: bmp.c: fix "no previous prototype" warning Antony Pavlov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Antony Pavlov @ 2017-03-20  6:59 UTC (permalink / raw)
  To: barebox

Antony Pavlov (3):
  gui: bmp.c: fix "no previous prototype" warning
  clk: clk-gate-shared: fix "no previous prototype" warning
  gui: image_renderer: fix "no previous prototype for
    'image_renderer_unregister'" warning

 drivers/clk/clk-gate-shared.c | 6 +++---
 include/gui/image_renderer.h  | 2 +-
 lib/gui/bmp.c                 | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 1/3] gui: bmp.c: fix "no previous prototype" warning
  2017-03-20  6:59 [PATCH 0/3] fix "no previous prototype" warnings Antony Pavlov
@ 2017-03-20  6:59 ` Antony Pavlov
  2017-03-20  6:59 ` [PATCH 2/3] clk: clk-gate-shared: " Antony Pavlov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Antony Pavlov @ 2017-03-20  6:59 UTC (permalink / raw)
  To: barebox

The patch fixes these compiler's warnings:

  lib/gui/bmp.c:12:15: warning: no previous prototype for 'bmp_open' [-Wmissing-prototypes]
   struct image *bmp_open(char *inbuf, int insize)
                 ^
  lib/gui/bmp.c:33:6: warning: no previous prototype for 'bmp_close' [-Wmissing-prototypes]
   void bmp_close(struct image *img)
        ^

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 lib/gui/bmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/gui/bmp.c b/lib/gui/bmp.c
index 143aa2805..8bffc70a4 100644
--- a/lib/gui/bmp.c
+++ b/lib/gui/bmp.c
@@ -9,7 +9,7 @@
 #include <gui/image_renderer.h>
 #include <asm/unaligned.h>
 
-struct image *bmp_open(char *inbuf, int insize)
+static struct image *bmp_open(char *inbuf, int insize)
 {
 	struct image *img = calloc(1, sizeof(struct image));
 	struct bmp_image *bmp = (struct bmp_image*)inbuf;
@@ -30,7 +30,7 @@ struct image *bmp_open(char *inbuf, int insize)
 	return img;
 }
 
-void bmp_close(struct image *img)
+static void bmp_close(struct image *img)
 {
 	free(img->data);
 }
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/3] clk: clk-gate-shared: fix "no previous prototype" warning
  2017-03-20  6:59 [PATCH 0/3] fix "no previous prototype" warnings Antony Pavlov
  2017-03-20  6:59 ` [PATCH 1/3] gui: bmp.c: fix "no previous prototype" warning Antony Pavlov
@ 2017-03-20  6:59 ` Antony Pavlov
  2017-03-20  6:59 ` [PATCH 3/3] gui: image_renderer: fix "no previous prototype for 'image_renderer_unregister'" warning Antony Pavlov
  2017-03-20  8:05 ` [PATCH 0/3] fix "no previous prototype" warnings Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Antony Pavlov @ 2017-03-20  6:59 UTC (permalink / raw)
  To: barebox

The patch fixes these compiler's warnings:

  drivers/clk/clk-gate-shared.c:72:13: warning: no previous prototype for 'clk_gate_shared_alloc' [-Wmissing-prototypes]
   struct clk *clk_gate_shared_alloc(const char *name, const char *parent, const char *companion,
               ^
  drivers/clk/clk-gate-shared.c:89:6: warning: no previous prototype for 'clk_gate_shared_free' [-Wmissing-prototypes]
   void clk_gate_shared_free(struct clk *clk)
        ^

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/clk/clk-gate-shared.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk-gate-shared.c b/drivers/clk/clk-gate-shared.c
index a95f940dd..c3b678a31 100644
--- a/drivers/clk/clk-gate-shared.c
+++ b/drivers/clk/clk-gate-shared.c
@@ -69,8 +69,8 @@ static struct clk_ops clk_gate_shared_ops = {
 	.is_enabled = clk_gate_shared_is_enabled,
 };
 
-struct clk *clk_gate_shared_alloc(const char *name, const char *parent, const char *companion,
-			   unsigned flags)
+static struct clk *clk_gate_shared_alloc(const char *name, const char *parent,
+				const char *companion, unsigned flags)
 {
 	struct clk_gate_shared *g = xzalloc(sizeof(*g));
 
@@ -86,7 +86,7 @@ struct clk *clk_gate_shared_alloc(const char *name, const char *parent, const ch
 	return &g->clk;
 }
 
-void clk_gate_shared_free(struct clk *clk)
+static void clk_gate_shared_free(struct clk *clk)
 {
 	struct clk_gate_shared *g = to_clk_gate_shared(clk);
 
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 3/3] gui: image_renderer: fix "no previous prototype for 'image_renderer_unregister'" warning
  2017-03-20  6:59 [PATCH 0/3] fix "no previous prototype" warnings Antony Pavlov
  2017-03-20  6:59 ` [PATCH 1/3] gui: bmp.c: fix "no previous prototype" warning Antony Pavlov
  2017-03-20  6:59 ` [PATCH 2/3] clk: clk-gate-shared: " Antony Pavlov
@ 2017-03-20  6:59 ` Antony Pavlov
  2017-03-20  8:05 ` [PATCH 0/3] fix "no previous prototype" warnings Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Antony Pavlov @ 2017-03-20  6:59 UTC (permalink / raw)
  To: barebox

The patch fixes this compiler's warning:

  lib/gui/image_renderer.c:92:6: warning: no previous prototype for 'image_renderer_unregister' [-Wmissing-prototypes]
   void image_renderer_unregister(struct image_renderer *ir)
        ^

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 include/gui/image_renderer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/gui/image_renderer.h b/include/gui/image_renderer.h
index e0b1eae25..bfdea1b14 100644
--- a/include/gui/image_renderer.h
+++ b/include/gui/image_renderer.h
@@ -32,7 +32,7 @@ struct image_renderer {
 
 #ifdef CONFIG_IMAGE_RENDERER
 int image_renderer_register(struct image_renderer *ir);
-void image_render_unregister(struct image_renderer *ir);
+void image_renderer_unregister(struct image_renderer *ir);
 
 int image_renderer_image(struct screen *sc, struct surface *s, struct image *img);
 
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 0/3] fix "no previous prototype" warnings
  2017-03-20  6:59 [PATCH 0/3] fix "no previous prototype" warnings Antony Pavlov
                   ` (2 preceding siblings ...)
  2017-03-20  6:59 ` [PATCH 3/3] gui: image_renderer: fix "no previous prototype for 'image_renderer_unregister'" warning Antony Pavlov
@ 2017-03-20  8:05 ` Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2017-03-20  8:05 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Mon, Mar 20, 2017 at 09:59:51AM +0300, Antony Pavlov wrote:
> Antony Pavlov (3):
>   gui: bmp.c: fix "no previous prototype" warning
>   clk: clk-gate-shared: fix "no previous prototype" warning
>   gui: image_renderer: fix "no previous prototype for
>     'image_renderer_unregister'" warning

Applied, thanks

I notice we currently have -Wmissing-prototypes only on Mips. Maybe we
should enable this on other architectures aswell to make these warnings
more visible.
On ARM though we have tons of missing prototypes, so we should fix a
fair amount of them before enabling this warning in the tree.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2017-03-20  8:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20  6:59 [PATCH 0/3] fix "no previous prototype" warnings Antony Pavlov
2017-03-20  6:59 ` [PATCH 1/3] gui: bmp.c: fix "no previous prototype" warning Antony Pavlov
2017-03-20  6:59 ` [PATCH 2/3] clk: clk-gate-shared: " Antony Pavlov
2017-03-20  6:59 ` [PATCH 3/3] gui: image_renderer: fix "no previous prototype for 'image_renderer_unregister'" warning Antony Pavlov
2017-03-20  8:05 ` [PATCH 0/3] fix "no previous prototype" warnings Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox