]> code.ossystems Code Review - openembedded-core.git/commitdiff
psplash: Turn psplash_fb_plot_pixel() into static inline
authorKhem Raj <raj.khem@gmail.com>
Sat, 22 Aug 2015 14:16:20 +0000 (07:16 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Aug 2015 11:34:13 +0000 (12:34 +0100)
This function is not used anywhere except psplash-fb.c so make it static
inline function which is portable across compilers

Fixes issues like
psplash-fb.o: In function `psplash_fb_draw_rect':
|
/mnt/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-glibc/work/i586-oe-linux/psplash/0.1+gitAUTOINC+14c8f7b705-r15/git/psplash-fb.c:363:
undefined reference to `psplash_fb_plot_pixel'

(From OE-Core rev: 2429932c2dc1f81bf04f4377911094e2c8a04a19)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/psplash/files/0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch [new file with mode: 0644]
meta/recipes-core/psplash/psplash_git.bb

diff --git a/meta/recipes-core/psplash/files/0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch b/meta/recipes-core/psplash/files/0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch
new file mode 100644 (file)
index 0000000..93b3c6b
--- /dev/null
@@ -0,0 +1,53 @@
+From 8f5de12cc75bfaa8400adf32f30c015d8f813540 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Aug 2015 07:12:20 -0700
+Subject: [PATCH] psplash-fb: Convert psplash_fb_plot_pixel() to a static
+ inline
+
+This function is not used outside psplash-fb.c and by making it
+static inline we keep the performance and also make it portable across
+multiple compilers and gcc versions
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ psplash-fb.c | 2 +-
+ psplash-fb.h | 8 --------
+ 2 files changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/psplash-fb.c b/psplash-fb.c
+index bd9cd9d..6d235db 100644
+--- a/psplash-fb.c
++++ b/psplash-fb.c
+@@ -260,7 +260,7 @@ psplash_fb_new (int angle)
+ #define OFFSET(fb,x,y) (((y) * (fb)->stride) + ((x) * ((fb)->bpp >> 3)))
+-inline void
++static inline void
+ psplash_fb_plot_pixel (PSplashFB    *fb,
+                      int          x,
+                      int          y,
+diff --git a/psplash-fb.h b/psplash-fb.h
+index 42592ed..c6c3144 100644
+--- a/psplash-fb.h
++++ b/psplash-fb.h
+@@ -57,14 +57,6 @@ psplash_fb_destroy (PSplashFB *fb);
+ PSplashFB*
+ psplash_fb_new (int angle);
+-inline void
+-psplash_fb_plot_pixel (PSplashFB    *fb, 
+-                     int          x, 
+-                     int          y, 
+-                     uint8        red,
+-                     uint8        green,
+-                     uint8        blue);
+-
+ void
+ psplash_fb_draw_rect (PSplashFB    *fb, 
+                     int          x, 
+-- 
+2.1.4
+
index 7f0dc7859fad3b986b7307453ca6353c5852f9b7..b3b64799ae2757e9d05486f68e29658e8bcf9b2f 100644 (file)
@@ -10,6 +10,7 @@ PV = "0.1+git${SRCPV}"
 PR = "r15"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN} \
+           file://0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch \
            file://psplash-init \
            ${SPLASH_IMAGES}"