* [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt
@ 2012-07-07 12:05 Devendra Naga
2012-07-07 12:05 ` [PATCH 2/8] staging/ft1000: fix the spaces issue at the start of line Devendra Naga
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Devendra Naga @ 2012-07-07 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Devendra Naga
as the if statement encloses only one line braces around it are not
needed.
The following warn fixed,
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index c4a8a0a..0bd080c 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -1998,9 +1998,8 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
// Make sure we process all interrupt before leaving the ISR due to the edge trigger interrupt type
while (inttype) {
- if (inttype & ISR_DOORBELL_PEND) {
- ft1000_parse_dpram_msg(dev);
- }
+ if (inttype & ISR_DOORBELL_PEND)
+ ft1000_parse_dpram_msg(dev);
if (inttype & ISR_RCV) {
DEBUG(1, "Data in FIFO\n");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/8] staging/ft1000: fix the spaces issue at the start of line
2012-07-07 12:05 [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt Devendra Naga
@ 2012-07-07 12:05 ` Devendra Naga
2012-07-09 19:25 ` Greg KH
2012-07-07 12:05 ` [PATCH 3/8] staging/ft1000: fix sparse warning Devendra Naga
` (5 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Devendra Naga @ 2012-07-07 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Devendra Naga
The following warns fixed
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2032: ERROR: code indent should use tabs where possible
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2032: WARNING: please, no spaces at the start of a line
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index 0bd080c..c709671 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -2029,7 +2029,7 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
ft1000_write_reg(dev, FT1000_REG_SUP_ISR, tempword);
// Read interrupt type
- inttype = ft1000_read_reg (dev, FT1000_REG_SUP_ISR);
+ inttype = ft1000_read_reg (dev, FT1000_REG_SUP_ISR);
DEBUG(1,"ft1000_hw: interrupt status register after clear = 0x%x\n",inttype);
}
ft1000_enable_interrupts(dev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/8] staging/ft1000: fix sparse warning
2012-07-07 12:05 [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt Devendra Naga
2012-07-07 12:05 ` [PATCH 2/8] staging/ft1000: fix the spaces issue at the start of line Devendra Naga
@ 2012-07-07 12:05 ` Devendra Naga
2012-07-07 12:05 ` [PATCH 4/8] staging/ft1000: fix sparse warning about the kernel thread handler function Devendra Naga
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Devendra Naga @ 2012-07-07 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Devendra Naga
sparse warns about having 0 assigned to a pointer,
fix it up by using NULL.
The following sparse warning is fixed
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c:170:52: warning: Using plain integer as NULL pointer
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index 19db23f..6d911fd 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -167,7 +167,7 @@ int ft1000_create_dev(struct ft1000_device *dev)
goto fail;
}
- dir = debugfs_create_dir(info->DeviceName, 0);
+ dir = debugfs_create_dir(info->DeviceName, NULL);
if (IS_ERR(dir)) {
result = PTR_ERR(dir);
goto debug_dir_fail;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/8] staging/ft1000: fix sparse warning about the kernel thread handler function
2012-07-07 12:05 [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt Devendra Naga
2012-07-07 12:05 ` [PATCH 2/8] staging/ft1000: fix the spaces issue at the start of line Devendra Naga
2012-07-07 12:05 ` [PATCH 3/8] staging/ft1000: fix sparse warning Devendra Naga
@ 2012-07-07 12:05 ` Devendra Naga
2012-07-07 12:05 ` [PATCH 5/8] staging/ft1000: fix the no brace needed warning in ft1000_read_fifo_len Devendra Naga
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Devendra Naga @ 2012-07-07 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Devendra Naga
sparse throws warning about the ft1000_poll_thread as
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:40:5: warning: symbol 'ft1000_poll_thread' was not declared. Should it be static?
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index bfead67..e434d33 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -37,7 +37,7 @@ static struct usb_device_id id_table[] = {
MODULE_DEVICE_TABLE(usb, id_table);
static bool gPollingfailed = FALSE;
-int ft1000_poll_thread(void *arg)
+static int ft1000_poll_thread(void *arg)
{
int ret = STATUS_SUCCESS;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/8] staging/ft1000: fix the no brace needed warning in ft1000_read_fifo_len
2012-07-07 12:05 [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt Devendra Naga
` (2 preceding siblings ...)
2012-07-07 12:05 ` [PATCH 4/8] staging/ft1000: fix sparse warning about the kernel thread handler function Devendra Naga
@ 2012-07-07 12:05 ` Devendra Naga
2012-07-07 12:05 ` [PATCH 6/8] staging/ft1000: fix the foo * bar warning Devendra Naga
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Devendra Naga @ 2012-07-07 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Devendra Naga
as the if else statements enclose only one line, so braces around them are not
needed.
The following warning is fixed
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:100: WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index c709671..67ad7ee 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -97,11 +97,10 @@ static inline u16 ft1000_read_fifo_len(struct net_device *dev)
{
struct ft1000_info *info = netdev_priv(dev);
- if (info->AsicID == ELECTRABUZZ_ID) {
+ if (info->AsicID == ELECTRABUZZ_ID)
return (ft1000_read_reg(dev, FT1000_REG_UFIFO_STAT) - 16);
- } else {
+ else
return (ft1000_read_reg(dev, FT1000_REG_MAG_UFSR) - 16);
- }
}
//---------------------------------------------------------------------------
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/8] staging/ft1000: fix the foo * bar warning
2012-07-07 12:05 [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt Devendra Naga
` (3 preceding siblings ...)
2012-07-07 12:05 ` [PATCH 5/8] staging/ft1000: fix the no brace needed warning in ft1000_read_fifo_len Devendra Naga
@ 2012-07-07 12:05 ` Devendra Naga
2012-07-07 12:05 ` [PATCH 7/8] staging/ft1000-pcmcia: fix checkpatch warnings Devendra Naga
2012-07-07 12:05 ` [PATCH 8/8] staging/ft1000: remove unnecessary assignment of ret with STATUS_SUCCESS Devendra Naga
6 siblings, 0 replies; 9+ messages in thread
From: Devendra Naga @ 2012-07-07 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Devendra Naga
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index 67ad7ee..9a5ba07 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -115,7 +115,7 @@ static inline u16 ft1000_read_fifo_len(struct net_device *dev)
// value - value of dpram
//
//---------------------------------------------------------------------------
-u16 ft1000_read_dpram(struct net_device * dev, int offset)
+u16 ft1000_read_dpram(struct net_device *dev, int offset)
{
struct ft1000_info *info = netdev_priv(dev);
unsigned long flags;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/8] staging/ft1000-pcmcia: fix checkpatch warnings
2012-07-07 12:05 [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt Devendra Naga
` (4 preceding siblings ...)
2012-07-07 12:05 ` [PATCH 6/8] staging/ft1000: fix the foo * bar warning Devendra Naga
@ 2012-07-07 12:05 ` Devendra Naga
2012-07-07 12:05 ` [PATCH 8/8] staging/ft1000: remove unnecessary assignment of ret with STATUS_SUCCESS Devendra Naga
6 siblings, 0 replies; 9+ messages in thread
From: Devendra Naga @ 2012-07-07 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Devendra Naga
The below checkpatch warns fixed,
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:38: ERROR: that open brace { should be on the previous line
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:45: ERROR: that open brace { should be on the previous line
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:57: ERROR: that open brace { should be on the previous line
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c
index 71aaad3..72727c6 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c
@@ -34,16 +34,14 @@
#define PUTX_TO_PAGE(len, page, message, size, var) \
len += snprintf(page+len, PAGE_SIZE - len, message); \
- for(i = 0; i < (size - 1); i++) \
- { \
+ for(i = 0; i < (size - 1); i++) { \
len += snprintf(page+len, PAGE_SIZE - len, "%02x:", var[i]); \
} \
len += snprintf(page+len, PAGE_SIZE - len, "%02x\n", var[i])
#define PUTD_TO_PAGE(len, page, message, size, var) \
len += snprintf(page+len, PAGE_SIZE - len, message); \
- for(i = 0; i < (size - 1); i++) \
- { \
+ for(i = 0; i < (size - 1); i++) { \
len += snprintf(page+len, PAGE_SIZE - len, "%d.", var[i]); \
} \
len += snprintf(page+len, PAGE_SIZE - len, "%d\n", var[i])
@@ -55,8 +53,8 @@ static int ft1000ReadProc(char *page, char **start, off_t off,
int len;
int i;
struct ft1000_info *info;
- char *status[] =
- { "Idle (Disconnect)", "Searching", "Active (Connected)",
+ char *status[] = {
+ "Idle (Disconnect)", "Searching", "Active (Connected)",
"Waiting for L2", "Sleep", "No Coverage", "", ""
};
char *signal[] = { "", "*", "**", "***", "****" };
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 8/8] staging/ft1000: remove unnecessary assignment of ret with STATUS_SUCCESS
2012-07-07 12:05 [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt Devendra Naga
` (5 preceding siblings ...)
2012-07-07 12:05 ` [PATCH 7/8] staging/ft1000-pcmcia: fix checkpatch warnings Devendra Naga
@ 2012-07-07 12:05 ` Devendra Naga
6 siblings, 0 replies; 9+ messages in thread
From: Devendra Naga @ 2012-07-07 12:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Marek Belisko, devel, linux-kernel; +Cc: Devendra Naga
as ret is assigned to the return of ft1000_poll, we dont need to
initialise ret with STATUS_SUCCESS.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index e434d33..7bd7fb2 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -39,7 +39,7 @@ MODULE_DEVICE_TABLE(usb, id_table);
static bool gPollingfailed = FALSE;
static int ft1000_poll_thread(void *arg)
{
- int ret = STATUS_SUCCESS;
+ int ret;
while (!kthread_should_stop()) {
msleep(10);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/8] staging/ft1000: fix the spaces issue at the start of line
2012-07-07 12:05 ` [PATCH 2/8] staging/ft1000: fix the spaces issue at the start of line Devendra Naga
@ 2012-07-09 19:25 ` Greg KH
0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2012-07-09 19:25 UTC (permalink / raw)
To: Devendra Naga; +Cc: Marek Belisko, devel, linux-kernel
On Sat, Jul 07, 2012 at 05:35:13PM +0530, Devendra Naga wrote:
> The following warns fixed
>
> drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2032: ERROR: code indent should use tabs where possible
> drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2032: WARNING: please, no spaces at the start of a line
>
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
> ---
> drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
> index 0bd080c..c709671 100644
> --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
> +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
> @@ -2029,7 +2029,7 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
> ft1000_write_reg(dev, FT1000_REG_SUP_ISR, tempword);
>
> // Read interrupt type
> - inttype = ft1000_read_reg (dev, FT1000_REG_SUP_ISR);
> + inttype = ft1000_read_reg (dev, FT1000_REG_SUP_ISR);
Did you just indent this one too many tabs? Remember, a tab is 8
spaces, this should have lined up wit the line above it. Which, for
some odd reason, is also using spaces, so why didn't that get fixed
also?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-07-09 19:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-07 12:05 [PATCH 1/8] staging/ft1000: fix the no brace needed warning in ft1000_interrupt Devendra Naga
2012-07-07 12:05 ` [PATCH 2/8] staging/ft1000: fix the spaces issue at the start of line Devendra Naga
2012-07-09 19:25 ` Greg KH
2012-07-07 12:05 ` [PATCH 3/8] staging/ft1000: fix sparse warning Devendra Naga
2012-07-07 12:05 ` [PATCH 4/8] staging/ft1000: fix sparse warning about the kernel thread handler function Devendra Naga
2012-07-07 12:05 ` [PATCH 5/8] staging/ft1000: fix the no brace needed warning in ft1000_read_fifo_len Devendra Naga
2012-07-07 12:05 ` [PATCH 6/8] staging/ft1000: fix the foo * bar warning Devendra Naga
2012-07-07 12:05 ` [PATCH 7/8] staging/ft1000-pcmcia: fix checkpatch warnings Devendra Naga
2012-07-07 12:05 ` [PATCH 8/8] staging/ft1000: remove unnecessary assignment of ret with STATUS_SUCCESS Devendra Naga
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.