LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/6] staging: sm750fb: fixed all build warnings
@ 2015-03-10 17:16 Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 1/6] staging: sm750fb: remove unused functions Sudip Mukherjee
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-10 17:16 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-fbdev, devel, linux-kernel, Sudip Mukherjee
Hi Greg,
all the build warnings have been taken care of in this series.
some of the patches will generate a few checkpatch warning and for some I tried
to address few of the chcekpatch warnings while modifying them.
regards
sudip
Sudip Mukherjee (6):
staging: sm750fb: remove unused functions
staging: sm750fb: remove unused variables
staging: sm750fb: correct function return
staging: sm750fb: correct incompatible pointer type
staging: sm750fb: fix mixed declarations
staging: sm750fb: correct integer comparison
drivers/staging/sm750fb/ddk750_display.c | 11 -----
drivers/staging/sm750fb/ddk750_swi2c.c | 8 ----
drivers/staging/sm750fb/sm750.c | 70 ++------------------------------
drivers/staging/sm750fb/sm750.h | 11 ++---
drivers/staging/sm750fb/sm750_accel.c | 4 +-
drivers/staging/sm750fb/sm750_accel.h | 4 +-
drivers/staging/sm750fb/sm750_cursor.c | 5 +--
7 files changed, 14 insertions(+), 99 deletions(-)
--
1.8.1.2
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/6] staging: sm750fb: remove unused functions
2015-03-10 17:16 [PATCH 0/6] staging: sm750fb: fixed all build warnings Sudip Mukherjee
@ 2015-03-10 17:16 ` Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 2/6] staging: sm750fb: remove unused variables Sudip Mukherjee
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-10 17:16 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-fbdev, devel, linux-kernel, Sudip Mukherjee
removed the functions which were not used anywhere.
it has been build tested also confirmed with git grep that there is
no other reference of these functions.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm750fb/ddk750_display.c | 11 ------
drivers/staging/sm750fb/ddk750_swi2c.c | 8 ----
drivers/staging/sm750fb/sm750.c | 65 --------------------------------
3 files changed, 84 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index 57192e5..a282a94 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -201,17 +201,6 @@ static void waitNextVerticalSync(int ctrl,int delay)
}
}
-static void swPanelPowerSequence_sm750le(int disp,int delay)
-{
- unsigned int reg;
- reg = PEEK32(DISPLAY_CONTROL_750LE);
- if(disp)
- reg |= 0xf;
- else
- reg &= ~0xf;
- POKE32(DISPLAY_CONTROL_750LE,reg);
-}
-
static void swPanelPowerSequence(int disp,int delay)
{
unsigned int reg;
diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
index cae6b9b..1249759 100644
--- a/drivers/staging/sm750fb/ddk750_swi2c.c
+++ b/drivers/staging/sm750fb/ddk750_swi2c.c
@@ -79,14 +79,6 @@ static unsigned long g_i2cDataGPIOMuxReg = GPIO_MUX;
static unsigned long g_i2cDataGPIODataReg = GPIO_DATA;
static unsigned long g_i2cDataGPIODataDirReg = GPIO_DATA_DIRECTION;
-static unsigned char peekIO(unsigned short port,unsigned short index)
-{
-#if defined(__i386__) || defined( __x86_64__)
- outb_p(index,port);
- return inb_p(port+1);
-#endif
-}
-
/*
* This function puts a delay between command
*/
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 8c260ee..87029b6 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -510,69 +510,6 @@ static int lynxfb_resume(struct pci_dev* pdev)
}
#endif
-static int lynxfb_ops_mmap(struct fb_info * info, struct vm_area_struct * vma)
-{
- unsigned long off;
- unsigned long start;
- u32 len;
- struct file *file;
-
- file = vma->vm_file;
-
- if (!info)
- return -ENODEV;
- if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
- return -EINVAL;
- off = vma->vm_pgoff << PAGE_SHIFT;
- printk("lynxfb mmap pgoff: %lx\n", vma->vm_pgoff);
- printk("lynxfb mmap off 1: %lx\n", off);
-
- /* frame buffer memory */
- start = info->fix.smem_start;
- len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.smem_len);
-
- printk("lynxfb mmap start 1: %lx\n", start);
- printk("lynxfb mmap len 1: %x\n", len);
-
- if (off >= len) {
- /* memory mapped io */
- off -= len;
- printk("lynxfb mmap off 2: %lx\n", off);
- if (info->var.accel_flags) {
- printk("lynxfb mmap accel flags true");
- return -EINVAL;
- }
- start = info->fix.mmio_start;
- len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.mmio_len);
-
- printk("lynxfb mmap start 2: %lx\n", start);
- printk("lynxfb mmap len 2: %x\n", len);
- }
- start &= PAGE_MASK;
- printk("lynxfb mmap start 3: %lx\n", start);
- printk("lynxfb mmap vm start: %lx\n", vma->vm_start);
- printk("lynxfb mmap vm end: %lx\n", vma->vm_end);
- printk("lynxfb mmap len: %x\n", len);
- printk("lynxfb mmap off: %lx\n", off);
- if ((vma->vm_end - vma->vm_start + off) > len)
- {
- return -EINVAL;
- }
- off += start;
- printk("lynxfb mmap off 3: %lx\n", off);
- vma->vm_pgoff = off >> PAGE_SHIFT;
- /* This is an IO map - tell maydump to skip this VMA */
- vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
- vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
- fb_pgprotect(file, vma, off);
- printk("lynxfb mmap off 4: %lx\n", off);
- printk("lynxfb mmap pgprot: %lx\n", (unsigned long) pgprot_val(vma->vm_page_prot));
- if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
- vma->vm_end - vma->vm_start, vma->vm_page_prot))
- return -EAGAIN;
- return 0;
-}
-
static int lynxfb_ops_check_var(struct fb_var_screeninfo* var,struct fb_info* info)
{
struct lynxfb_par * par;
@@ -824,8 +761,6 @@ static struct fb_ops lynxfb_ops={
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
- /*.fb_mmap = lynxfb_ops_mmap,*/
- /* will be hooked by hardware */
.fb_fillrect = cfb_fillrect,
.fb_imageblit = cfb_imageblit,
.fb_copyarea = cfb_copyarea,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/6] staging: sm750fb: remove unused variables
2015-03-10 17:16 [PATCH 0/6] staging: sm750fb: fixed all build warnings Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 1/6] staging: sm750fb: remove unused functions Sudip Mukherjee
@ 2015-03-10 17:16 ` Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 3/6] staging: sm750fb: correct function return Sudip Mukherjee
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-10 17:16 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-fbdev, devel, linux-kernel, Sudip Mukherjee
removed some variables which were only declared but were never used.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm750fb/sm750_cursor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
index 480615c..76b6029 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -99,7 +99,6 @@ void hw_cursor_setData(struct lynx_cursor * cursor,
u8 color,mask,opr;
u16 data;
u16 * pbuffer,*pstart;
- static ulong odd = 0;
/* in byte*/
pitch = cursor->w >> 3;
@@ -188,7 +187,7 @@ void hw_cursor_setData2(struct lynx_cursor * cursor,
u16 rop,const u8* pcol,const u8* pmsk)
{
int i,j,count,pitch,offset;
- u8 color,mask,opr;
+ u8 color, mask;
u16 data;
u16 * pbuffer,*pstart;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/6] staging: sm750fb: correct function return
2015-03-10 17:16 [PATCH 0/6] staging: sm750fb: fixed all build warnings Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 1/6] staging: sm750fb: remove unused functions Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 2/6] staging: sm750fb: remove unused variables Sudip Mukherjee
@ 2015-03-10 17:16 ` Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 4/6] staging: sm750fb: correct incompatible pointer type Sudip Mukherjee
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-10 17:16 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-fbdev, devel, linux-kernel, Sudip Mukherjee
hw_cursor_setData2() is a function with void return type but it was
returning an integer.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm750fb/sm750_cursor.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
index 76b6029..7bd17d1 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -248,6 +248,4 @@ void hw_cursor_setData2(struct lynx_cursor * cursor,
}
}
- return 0;
-
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/6] staging: sm750fb: correct incompatible pointer type
2015-03-10 17:16 [PATCH 0/6] staging: sm750fb: fixed all build warnings Sudip Mukherjee
` (2 preceding siblings ...)
2015-03-10 17:16 ` [PATCH 3/6] staging: sm750fb: correct function return Sudip Mukherjee
@ 2015-03-10 17:16 ` Sudip Mukherjee
2015-03-10 20:11 ` Greg Kroah-Hartman
2015-03-10 17:16 ` [PATCH 5/6] staging: sm750fb: fix mixed declarations Sudip Mukherjee
` (2 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-10 17:16 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-fbdev, devel, linux-kernel, Sudip Mukherjee
we were getting build warnings about assignment of incompatible
pointer types. some of the function definitions were having wrong
return type or arguments.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm750fb/sm750.h | 11 ++++++-----
drivers/staging/sm750fb/sm750_accel.c | 4 ++--
drivers/staging/sm750fb/sm750_accel.h | 4 ++--
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index d39968c..edb955a 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -23,7 +23,7 @@ struct lynx_accel{
volatile unsigned char __iomem * dpPortBase;
/* function fointers */
- int (*de_init)(struct lynx_accel *);
+ void (*de_init)(struct lynx_accel *);
int (*de_wait)(void);/* see if hardware ready to work */
@@ -34,8 +34,8 @@ struct lynx_accel{
u32,u32,u32,u32,
u32,u32,u32,u32);
- int (*de_imageblit)(struct lynx_accel *,const char *,u32,u32,u32,
- u32,u32,u32,u32,u32,u32,u32,u32,u32);
+ int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32,
+ u32, u32, u32, u32, u32, u32, u32, u32, u32);
};
@@ -120,8 +120,9 @@ struct lynxfb_crtc{
int(*proc_setColReg)(struct lynxfb_crtc*,ushort,ushort,ushort,ushort);
void (*clear)(struct lynxfb_crtc*);
/* pan display */
- int(*proc_panDisplay)(struct lynxfb_crtc*, struct fb_var_screeninfo*,
- struct fb_info*);
+ int (*proc_panDisplay)(struct lynxfb_crtc*,
+ const struct fb_var_screeninfo*,
+ const struct fb_info*);
/* cursor information */
struct lynx_cursor cursor;
};
diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index ee211de..421adef 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -397,8 +397,8 @@ static unsigned int deGetTransparency(struct lynx_accel * accel)
int hw_imageblit(
struct lynx_accel * accel,
-unsigned char *pSrcbuf, /* pointer to start of source buffer in system memory */
-int srcDelta, /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
+const char *pSrcbuf, /* pointer to start of source buffer in system memory */
+unsigned int srcDelta, /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
unsigned int startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
unsigned int dBase, /* Address of destination: offset in frame buffer */
unsigned int dPitch, /* Pitch value of destination surface in BYTE */
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index 575f4a7..9c16618 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -260,8 +260,8 @@ unsigned int rop2);
int hw_imageblit(
struct lynx_accel * accel,
-unsigned char *pSrcbuf, /* pointer to start of source buffer in system memory */
-int srcDelta, /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
+const char *pSrcbuf, /* pointer to start of source buffer in system memory */
+unsigned int srcDelta, /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
unsigned int startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
unsigned int dBase, /* Address of destination: offset in frame buffer */
unsigned int dPitch, /* Pitch value of destination surface in BYTE */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/6] staging: sm750fb: fix mixed declarations
2015-03-10 17:16 [PATCH 0/6] staging: sm750fb: fixed all build warnings Sudip Mukherjee
` (3 preceding siblings ...)
2015-03-10 17:16 ` [PATCH 4/6] staging: sm750fb: correct incompatible pointer type Sudip Mukherjee
@ 2015-03-10 17:16 ` Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 6/6] staging: sm750fb: correct integer comparison Sudip Mukherjee
2015-03-10 20:13 ` [PATCH 0/6] staging: sm750fb: fixed all build warnings Greg Kroah-Hartman
6 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-10 17:16 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-fbdev, devel, linux-kernel, Sudip Mukherjee
we were getting build warning about mixed declaration. the variable
is now declared at the beginning of the block.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm750fb/sm750.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 87029b6..021b863 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -1175,6 +1175,7 @@ ALLOC_FB:
else
{
struct lynxfb_par * par;
+ int errno;
pr_info("framebuffer #%d alloc okay\n",fbidx);
share->fbinfo[fbidx] = info[fbidx];
par = info[fbidx]->par;
@@ -1191,7 +1192,7 @@ ALLOC_FB:
/* register frame buffer*/
pr_info("Ready to register framebuffer #%d.\n",fbidx);
- int errno = register_framebuffer(info[fbidx]);
+ errno = register_framebuffer(info[fbidx]);
if (errno < 0) {
pr_err("Failed to register fb_info #%d. err %d\n",fbidx, errno);
if(fbidx == 0)
--
1.8.1.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/6] staging: sm750fb: correct integer comparison
2015-03-10 17:16 [PATCH 0/6] staging: sm750fb: fixed all build warnings Sudip Mukherjee
` (4 preceding siblings ...)
2015-03-10 17:16 ` [PATCH 5/6] staging: sm750fb: fix mixed declarations Sudip Mukherjee
@ 2015-03-10 17:16 ` Sudip Mukherjee
2015-03-11 7:57 ` Dan Carpenter
2015-03-10 20:13 ` [PATCH 0/6] staging: sm750fb: fixed all build warnings Greg Kroah-Hartman
6 siblings, 1 reply; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-10 17:16 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-fbdev, devel, linux-kernel, Sudip Mukherjee
fixed the build warning about comparison of pointer and integer.
end of string was being compared to NULL.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm750fb/sm750.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 021b863..5532a28 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -1000,7 +1000,7 @@ static void sm750fb_setup(struct lynx_share * share,char * src)
goto NO_PARAM;
}
- while((opt = strsep(&src,":")) != NULL && *opt != NULL){
+ while((opt = strsep(&src,":")) != NULL && *opt != 0){
pr_err("opt=%s\n",opt);
pr_err("src=%s\n",src);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 4/6] staging: sm750fb: correct incompatible pointer type
2015-03-10 17:16 ` [PATCH 4/6] staging: sm750fb: correct incompatible pointer type Sudip Mukherjee
@ 2015-03-10 20:11 ` Greg Kroah-Hartman
2015-03-10 20:17 ` Greg Kroah-Hartman
0 siblings, 1 reply; 14+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-10 20:11 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel
On Tue, Mar 10, 2015 at 10:46:55PM +0530, Sudip Mukherjee wrote:
> we were getting build warnings about assignment of incompatible
> pointer types. some of the function definitions were having wrong
> return type or arguments.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> drivers/staging/sm750fb/sm750.h | 11 ++++++-----
> drivers/staging/sm750fb/sm750_accel.c | 4 ++--
> drivers/staging/sm750fb/sm750_accel.h | 4 ++--
> 3 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
> index d39968c..edb955a 100644
> --- a/drivers/staging/sm750fb/sm750.h
> +++ b/drivers/staging/sm750fb/sm750.h
> @@ -23,7 +23,7 @@ struct lynx_accel{
> volatile unsigned char __iomem * dpPortBase;
>
> /* function fointers */
> - int (*de_init)(struct lynx_accel *);
> + void (*de_init)(struct lynx_accel *);
That's ok, but:
>
> int (*de_wait)(void);/* see if hardware ready to work */
>
> @@ -34,8 +34,8 @@ struct lynx_accel{
> u32,u32,u32,u32,
> u32,u32,u32,u32);
>
> - int (*de_imageblit)(struct lynx_accel *,const char *,u32,u32,u32,
> - u32,u32,u32,u32,u32,u32,u32,u32,u32);
> + int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32,
> + u32, u32, u32, u32, u32, u32, u32, u32, u32);
>
This isn't fixing an error.
> };
>
> @@ -120,8 +120,9 @@ struct lynxfb_crtc{
> int(*proc_setColReg)(struct lynxfb_crtc*,ushort,ushort,ushort,ushort);
> void (*clear)(struct lynxfb_crtc*);
> /* pan display */
> - int(*proc_panDisplay)(struct lynxfb_crtc*, struct fb_var_screeninfo*,
> - struct fb_info*);
> + int (*proc_panDisplay)(struct lynxfb_crtc*,
> + const struct fb_var_screeninfo*,
> + const struct fb_info*);
That's a nice cleanup, but it's not even the correct cleanup.
Please just fix the specific warning, don't mix what you are doing in
one patch. You aren't documenting this in the changelog information, so
I have to reject it, sorry.
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/6] staging: sm750fb: fixed all build warnings
2015-03-10 17:16 [PATCH 0/6] staging: sm750fb: fixed all build warnings Sudip Mukherjee
` (5 preceding siblings ...)
2015-03-10 17:16 ` [PATCH 6/6] staging: sm750fb: correct integer comparison Sudip Mukherjee
@ 2015-03-10 20:13 ` Greg Kroah-Hartman
6 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-10 20:13 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel
On Tue, Mar 10, 2015 at 10:46:51PM +0530, Sudip Mukherjee wrote:
> Hi Greg,
> all the build warnings have been taken care of in this series.
> some of the patches will generate a few checkpatch warning and for some I tried
> to address few of the chcekpatch warnings while modifying them.
Don't mix what you do in a single patch please.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/6] staging: sm750fb: correct incompatible pointer type
2015-03-10 20:11 ` Greg Kroah-Hartman
@ 2015-03-10 20:17 ` Greg Kroah-Hartman
2015-03-11 7:28 ` Sudip Mukherjee
0 siblings, 1 reply; 14+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-10 20:17 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel
On Tue, Mar 10, 2015 at 09:11:00PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 10, 2015 at 10:46:55PM +0530, Sudip Mukherjee wrote:
> > we were getting build warnings about assignment of incompatible
> > pointer types. some of the function definitions were having wrong
> > return type or arguments.
> >
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > ---
> > drivers/staging/sm750fb/sm750.h | 11 ++++++-----
> > drivers/staging/sm750fb/sm750_accel.c | 4 ++--
> > drivers/staging/sm750fb/sm750_accel.h | 4 ++--
> > 3 files changed, 10 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
> > index d39968c..edb955a 100644
> > --- a/drivers/staging/sm750fb/sm750.h
> > +++ b/drivers/staging/sm750fb/sm750.h
> > @@ -23,7 +23,7 @@ struct lynx_accel{
> > volatile unsigned char __iomem * dpPortBase;
> >
> > /* function fointers */
> > - int (*de_init)(struct lynx_accel *);
> > + void (*de_init)(struct lynx_accel *);
>
> That's ok, but:
>
> >
> > int (*de_wait)(void);/* see if hardware ready to work */
> >
> > @@ -34,8 +34,8 @@ struct lynx_accel{
> > u32,u32,u32,u32,
> > u32,u32,u32,u32);
> >
> > - int (*de_imageblit)(struct lynx_accel *,const char *,u32,u32,u32,
> > - u32,u32,u32,u32,u32,u32,u32,u32,u32);
> > + int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32,
> > + u32, u32, u32, u32, u32, u32, u32, u32, u32);
> >
>
>
> This isn't fixing an error.
>
> > };
> >
> > @@ -120,8 +120,9 @@ struct lynxfb_crtc{
> > int(*proc_setColReg)(struct lynxfb_crtc*,ushort,ushort,ushort,ushort);
> > void (*clear)(struct lynxfb_crtc*);
> > /* pan display */
> > - int(*proc_panDisplay)(struct lynxfb_crtc*, struct fb_var_screeninfo*,
> > - struct fb_info*);
> > + int (*proc_panDisplay)(struct lynxfb_crtc*,
> > + const struct fb_var_screeninfo*,
> > + const struct fb_info*);
>
> That's a nice cleanup, but it's not even the correct cleanup.
Oops, sorry, it is the correct cleanup, I was looking at the '*'
placement, not the const part.
but the patch needs to be redone, I'll just go fix up the build warnings
for now...
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/6] staging: sm750fb: correct incompatible pointer type
2015-03-10 20:17 ` Greg Kroah-Hartman
@ 2015-03-11 7:28 ` Sudip Mukherjee
2015-03-11 7:43 ` Greg Kroah-Hartman
0 siblings, 1 reply; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-11 7:28 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-fbdev, linux-kernel
On Tue, Mar 10, 2015 at 09:17:54PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 10, 2015 at 09:11:00PM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 10, 2015 at 10:46:55PM +0530, Sudip Mukherjee wrote:
> > > we were getting build warnings about assignment of incompatible
<snip>
> >
> > That's a nice cleanup, but it's not even the correct cleanup.
>
> Oops, sorry, it is the correct cleanup, I was looking at the '*'
> placement, not the const part.
>
> but the patch needs to be redone, I'll just go fix up the build warnings
> for now...
thanks Greg for your patience and time to redo this patch. I saw you broke it into two - three different patches.
But just one doubt, was your compiler showing any warning for the patch - "Staging: sm750fb: provide error path for
hw_sm750le_setBLANK()" , commit id - e74ac550298ec4635cc32e99f966568a808fd370 . my compiler didnot show any warning for that.
mine is gcc 4.7.3, is it time to update?
thanks again, and sorry that you had to do fix this. I should have made the patches in a more proper way.
regards
sudip
>
> greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/6] staging: sm750fb: correct incompatible pointer type
2015-03-11 7:28 ` Sudip Mukherjee
@ 2015-03-11 7:43 ` Greg Kroah-Hartman
0 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-11 7:43 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel
On Wed, Mar 11, 2015 at 12:58:42PM +0530, Sudip Mukherjee wrote:
> On Tue, Mar 10, 2015 at 09:17:54PM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 10, 2015 at 09:11:00PM +0100, Greg Kroah-Hartman wrote:
> > > On Tue, Mar 10, 2015 at 10:46:55PM +0530, Sudip Mukherjee wrote:
> > > > we were getting build warnings about assignment of incompatible
> <snip>
> > >
> > > That's a nice cleanup, but it's not even the correct cleanup.
> >
> > Oops, sorry, it is the correct cleanup, I was looking at the '*'
> > placement, not the const part.
> >
> > but the patch needs to be redone, I'll just go fix up the build warnings
> > for now...
>
> thanks Greg for your patience and time to redo this patch. I saw you
> broke it into two - three different patches.
> But just one doubt, was your compiler showing any warning for the
> patch - "Staging: sm750fb: provide error path for
> hw_sm750le_setBLANK()" , commit id -
> e74ac550298ec4635cc32e99f966568a808fd370 . my compiler didnot show
> any warning for that.
> mine is gcc 4.7.3, is it time to update?
Yes it is, that's a really old version of gcc. Also please wrap your
email lines at 72 columns :)
> thanks again, and sorry that you had to do fix this. I should have
> made the patches in a more proper way.
Not a problem, it's part of the learning process.
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 6/6] staging: sm750fb: correct integer comparison
2015-03-10 17:16 ` [PATCH 6/6] staging: sm750fb: correct integer comparison Sudip Mukherjee
@ 2015-03-11 7:57 ` Dan Carpenter
2015-03-11 8:55 ` Sudip Mukherjee
0 siblings, 1 reply; 14+ messages in thread
From: Dan Carpenter @ 2015-03-11 7:57 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: Greg Kroah-Hartman, devel, linux-fbdev, linux-kernel
On Tue, Mar 10, 2015 at 10:46:57PM +0530, Sudip Mukherjee wrote:
> fixed the build warning about comparison of pointer and integer.
> end of string was being compared to NULL.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> drivers/staging/sm750fb/sm750.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 021b863..5532a28 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -1000,7 +1000,7 @@ static void sm750fb_setup(struct lynx_share * share,char * src)
> goto NO_PARAM;
> }
>
> - while((opt = strsep(&src,":")) != NULL && *opt != NULL){
> + while((opt = strsep(&src,":")) != NULL && *opt != 0){
Use '\0' for the NUL char.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 6/6] staging: sm750fb: correct integer comparison
2015-03-11 7:57 ` Dan Carpenter
@ 2015-03-11 8:55 ` Sudip Mukherjee
0 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2015-03-11 8:55 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Greg Kroah-Hartman, devel, linux-fbdev, linux-kernel
On Wed, Mar 11, 2015 at 10:57:43AM +0300, Dan Carpenter wrote:
> On Tue, Mar 10, 2015 at 10:46:57PM +0530, Sudip Mukherjee wrote:
> >
> > - while((opt = strsep(&src,":")) != NULL && *opt != NULL){
> > + while((opt = strsep(&src,":")) != NULL && *opt != 0){
>
> Use '\0' for the NUL char.
i got a doubt while making that patch, so i checked lib/string.c and
saw both 0 and '\0' are used.
regards
sudip
>
> regards,
> dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-03-11 8:56 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 17:16 [PATCH 0/6] staging: sm750fb: fixed all build warnings Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 1/6] staging: sm750fb: remove unused functions Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 2/6] staging: sm750fb: remove unused variables Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 3/6] staging: sm750fb: correct function return Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 4/6] staging: sm750fb: correct incompatible pointer type Sudip Mukherjee
2015-03-10 20:11 ` Greg Kroah-Hartman
2015-03-10 20:17 ` Greg Kroah-Hartman
2015-03-11 7:28 ` Sudip Mukherjee
2015-03-11 7:43 ` Greg Kroah-Hartman
2015-03-10 17:16 ` [PATCH 5/6] staging: sm750fb: fix mixed declarations Sudip Mukherjee
2015-03-10 17:16 ` [PATCH 6/6] staging: sm750fb: correct integer comparison Sudip Mukherjee
2015-03-11 7:57 ` Dan Carpenter
2015-03-11 8:55 ` Sudip Mukherjee
2015-03-10 20:13 ` [PATCH 0/6] staging: sm750fb: fixed all build warnings Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).