Re: [PATCH 2/2] arm, fbdev, omap2, LLVMLinux: Remove nested function from omapfb

2014-09-27 Thread Felipe Balbi
On Fri, Sep 26, 2014 at 06:10:53PM -0700, Behan Webster wrote:
> Replace the use of nested functions where a normal function will suffice.
> 
> Nested functions are not liked by upstream kernel developers in general. Their
> use breaks the use of clang as a compiler, and doesn't make the code any
> better.
> 
> This code now works for both gcc and clang.
> 
> Signed-off-by: Behan Webster 
> Suggested-by: Arnd Bergmann 
> Cc: Arnd Bergmann 

Reviewed-by: Felipe Balbi 

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 2/2] arm, fbdev, omap2, LLVMLinux: Remove nested function from omapfb

2014-09-27 Thread Felipe Balbi
On Fri, Sep 26, 2014 at 06:10:53PM -0700, Behan Webster wrote:
 Replace the use of nested functions where a normal function will suffice.
 
 Nested functions are not liked by upstream kernel developers in general. Their
 use breaks the use of clang as a compiler, and doesn't make the code any
 better.
 
 This code now works for both gcc and clang.
 
 Signed-off-by: Behan Webster beh...@converseincode.com
 Suggested-by: Arnd Bergmann a...@arndb.de
 Cc: Arnd Bergmann a...@arndb.de

Reviewed-by: Felipe Balbi ba...@ti.com

-- 
balbi


signature.asc
Description: Digital signature


[PATCH 2/2] arm, fbdev, omap2, LLVMLinux: Remove nested function from omapfb

2014-09-26 Thread Behan Webster
Replace the use of nested functions where a normal function will suffice.

Nested functions are not liked by upstream kernel developers in general. Their
use breaks the use of clang as a compiler, and doesn't make the code any
better.

This code now works for both gcc and clang.

Signed-off-by: Behan Webster 
Suggested-by: Arnd Bergmann 
Cc: Arnd Bergmann 
---
 drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c 
b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
index ec2d132..1587243 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
@@ -273,16 +273,16 @@ static struct omapfb_colormode omapfb_colormodes[] = {
},
 };
 
+static bool cmp_component(struct fb_bitfield *f1, struct fb_bitfield *f2)
+{
+   return f1->length == f2->length &&
+   f1->offset == f2->offset &&
+   f1->msb_right == f2->msb_right;
+}
+
 static bool cmp_var_to_colormode(struct fb_var_screeninfo *var,
struct omapfb_colormode *color)
 {
-   bool cmp_component(struct fb_bitfield *f1, struct fb_bitfield *f2)
-   {
-   return f1->length == f2->length &&
-   f1->offset == f2->offset &&
-   f1->msb_right == f2->msb_right;
-   }
-
if (var->bits_per_pixel == 0 ||
var->red.length == 0 ||
var->blue.length == 0 ||
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] arm, fbdev, omap2, LLVMLinux: Remove nested function from omapfb

2014-09-26 Thread Behan Webster
Replace the use of nested functions where a normal function will suffice.

Nested functions are not liked by upstream kernel developers in general. Their
use breaks the use of clang as a compiler, and doesn't make the code any
better.

This code now works for both gcc and clang.

Signed-off-by: Behan Webster beh...@converseincode.com
Suggested-by: Arnd Bergmann a...@arndb.de
Cc: Arnd Bergmann a...@arndb.de
---
 drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c 
b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
index ec2d132..1587243 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
@@ -273,16 +273,16 @@ static struct omapfb_colormode omapfb_colormodes[] = {
},
 };
 
+static bool cmp_component(struct fb_bitfield *f1, struct fb_bitfield *f2)
+{
+   return f1-length == f2-length 
+   f1-offset == f2-offset 
+   f1-msb_right == f2-msb_right;
+}
+
 static bool cmp_var_to_colormode(struct fb_var_screeninfo *var,
struct omapfb_colormode *color)
 {
-   bool cmp_component(struct fb_bitfield *f1, struct fb_bitfield *f2)
-   {
-   return f1-length == f2-length 
-   f1-offset == f2-offset 
-   f1-msb_right == f2-msb_right;
-   }
-
if (var-bits_per_pixel == 0 ||
var-red.length == 0 ||
var-blue.length == 0 ||
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/