[PATCH] [media] exynos4-is: fix a format string bug

2015-12-08 Thread Rasmus Villemoes
Ironically, 7d4020c3c400 ("[media] exynos4-is: fix some warnings when
compiling on arm64") fixed some format string bugs but introduced a
new one. buf_index is a simple int, so it should be printed with %d,
not %pad (which is correctly used for dma_addr_t).

Fixes: 7d4020c3c400 ("[media] exynos4-is: fix some warnings when compiling on 
arm64")
Signed-off-by: Rasmus Villemoes 
---
 drivers/media/platform/exynos4-is/fimc-isp-video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c 
b/drivers/media/platform/exynos4-is/fimc-isp-video.c
index 6e6648446f00..337d49b4d103 100644
--- a/drivers/media/platform/exynos4-is/fimc-isp-video.c
+++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c
@@ -221,8 +221,8 @@ static void isp_video_capture_buffer_queue(struct 
vb2_buffer *vb)
ivb->dma_addr[i];
 
isp_dbg(2, &video->ve.vdev,
-   "dma_buf %pad (%d/%d/%d) addr: %pad\n",
-   &buf_index, ivb->index, i, vb->index,
+   "dma_buf %d (%d/%d/%d) addr: %pad\n",
+   buf_index, ivb->index, i, vb->index,
&ivb->dma_addr[i]);
}
 
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 04/22] video: fbdev: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
The kernel used to contain two functions for length-delimited,
case-insensitive string comparison, strnicmp with correct semantics
and a slightly buggy strncasecmp. The latter is the POSIX name, so
strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper
for the new strncasecmp to avoid breaking existing users.

To allow the compat wrapper strnicmp to be removed at some point in
the future, and to avoid the extra indirection cost, do
s/strnicmp/strncasecmp/g.

Cc: Jean-Christophe Plagniol-Villard 
Cc: Tomi Valkeinen 
Cc: linux-fb...@vger.kernel.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Rasmus Villemoes 
---
 drivers/video/fbdev/pvr2fb.c   |  2 +-
 drivers/video/fbdev/s3c2410fb.c|  8 ++---
 drivers/video/fbdev/sis/sis_main.c | 66 +++---
 drivers/video/fbdev/sm501fb.c  |  4 +--
 4 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
index 167cfff..7c74f58 100644
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -1001,7 +1001,7 @@ static int pvr2_get_param(const struct pvr2_params *p, 
const char *s, int val,
 
for (i = 0 ; i < size ; i++ ) {
if (s != NULL) {
-   if (!strnicmp(p[i].name, s, strlen(s)))
+   if (!strncasecmp(p[i].name, s, strlen(s)))
return p[i].val;
} else {
if (p[i].val == val)
diff --git a/drivers/video/fbdev/s3c2410fb.c b/drivers/video/fbdev/s3c2410fb.c
index 43c63a4..e350eb5 100644
--- a/drivers/video/fbdev/s3c2410fb.c
+++ b/drivers/video/fbdev/s3c2410fb.c
@@ -601,12 +601,12 @@ static int s3c2410fb_debug_store(struct device *dev,
if (len < 1)
return -EINVAL;
 
-   if (strnicmp(buf, "on", 2) == 0 ||
-   strnicmp(buf, "1", 1) == 0) {
+   if (strncasecmp(buf, "on", 2) == 0 ||
+   strncasecmp(buf, "1", 1) == 0) {
debug = 1;
dev_dbg(dev, "s3c2410fb: Debug On");
-   } else if (strnicmp(buf, "off", 3) == 0 ||
-  strnicmp(buf, "0", 1) == 0) {
+   } else if (strncasecmp(buf, "off", 3) == 0 ||
+  strncasecmp(buf, "0", 1) == 0) {
debug = 0;
dev_dbg(dev, "s3c2410fb: Debug Off");
} else {
diff --git a/drivers/video/fbdev/sis/sis_main.c 
b/drivers/video/fbdev/sis/sis_main.c
index 3f12a2d..4f5cf03 100644
--- a/drivers/video/fbdev/sis/sis_main.c
+++ b/drivers/video/fbdev/sis/sis_main.c
@@ -162,7 +162,7 @@ static void sisfb_search_mode(char *name, bool quiet)
return;
}
 
-   if(!strnicmp(name, sisbios_mode[MODE_INDEX_NONE].name, strlen(name))) {
+   if(!strncasecmp(name, sisbios_mode[MODE_INDEX_NONE].name, 
strlen(name))) {
if(!quiet)
printk(KERN_ERR "sisfb: Mode 'none' not supported 
anymore. Using default.\n");
 
@@ -201,7 +201,7 @@ static void sisfb_search_mode(char *name, bool quiet)
 
i = 0; j = 0;
while(sisbios_mode[i].mode_no[0] != 0) {
-   if(!strnicmp(nameptr, sisbios_mode[i++].name, strlen(nameptr))) 
{
+   if(!strncasecmp(nameptr, sisbios_mode[i++].name, 
strlen(nameptr))) {
if(sisfb_fstn) {
if(sisbios_mode[i-1].mode_no[1] == 0x50 ||
   sisbios_mode[i-1].mode_no[1] == 0x56 ||
@@ -262,7 +262,7 @@ sisfb_search_crt2type(const char *name)
if(name == NULL) return;
 
while(sis_crt2type[i].type_no != -1) {
-   if(!strnicmp(name, sis_crt2type[i].name, 
strlen(sis_crt2type[i].name))) {
+   if(!strncasecmp(name, sis_crt2type[i].name, 
strlen(sis_crt2type[i].name))) {
sisfb_crt2type = sis_crt2type[i].type_no;
sisfb_tvplug = sis_crt2type[i].tvplug_no;
sisfb_crt2flags = sis_crt2type[i].flags;
@@ -289,7 +289,7 @@ sisfb_search_tvstd(const char *name)
return;
 
while(sis_tvtype[i].type_no != -1) {
-   if(!strnicmp(name, sis_tvtype[i].name, 
strlen(sis_tvtype[i].name))) {
+   if(!strncasecmp(name, sis_tvtype[i].name, 
strlen(sis_tvtype[i].name))) {
sisfb_tvstd = sis_tvtype[i].type_no;
break;
}
@@ -308,12 +308,12 @@ sisfb_search_specialtiming(const char *name)
if(name == NULL)
return;
 
-   if(!strnicmp(name, "none", 4)) {
+   if(!strncasecmp(name, "none", 4)) {
sisfb_specialtiming = CUT_FORCENONE;
printk(KERN_DEBUG "sisfb: Special timing disabled\n");
} else {
   

[PATCH 1/2] drivers/gpu/drm/exynos/exynos_drm_fb.h: Fix typo in include guard

2014-08-22 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes 
---
 drivers/gpu/drm/exynos/exynos_drm_fb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h 
b/drivers/gpu/drm/exynos/exynos_drm_fb.h
index 517471b..09ce2bc 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h
@@ -12,7 +12,7 @@
  */
 
 #ifndef _EXYNOS_DRM_FB_H_
-#define _EXYNOS_DRM_FB_H
+#define _EXYNOS_DRM_FB_H_
 
 struct drm_framebuffer *
 exynos_drm_framebuffer_init(struct drm_device *dev,
-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] drivers/gpu/drm/vmwgfx/vmwgfx_fence.h: Add missing #define

2014-08-22 Thread Rasmus Villemoes
The name of the macro suggests that the include guard idiom was meant,
but the #define was missing.

Signed-off-by: Rasmus Villemoes 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
index faf2e78..1b48a22 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
@@ -26,6 +26,7 @@
  **/
 
 #ifndef _VMWGFX_FENCE_H_
+#define _VMWGFX_FENCE_H_
 
 #define VMW_FENCE_WAIT_TIMEOUT (5*HZ)
 
-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/3] mfd: Add irq domain support for max8998 interrupts

2013-06-21 Thread Rasmus Villemoes
Tomasz Figa  writes:

> All uses of irq_base in platform data and max8997 driver private data
> are removed.
>
[...]
> +static int max8998_irq_domain_map(struct irq_domain *d, unsigned int irq,
> + irq_hw_number_t hw)
> +{
> + struct max8997_dev *max8998 = d->host_data;

I may be wrong, but this sure looks like a typo (or copy-pasto).

-- 
Rasmus Villemoes
<http://rasmusvillemoes.dk/>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html