Re: [PATCH] staging: dgap: dgap.c: fixed whitespace error caused by my patch

2016-03-12 Thread Greg KH
On Sat, Mar 12, 2016 at 05:10:29PM -0800, Gavin O'Leary wrote: > Signed-off-by: Gavin O'Leary > --- > drivers/staging/dgap/dgap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c >

Re: [PATCH] staging: dgap: dgap.c: Fixed a comment warning

2016-03-12 Thread Greg KH
On Sat, Mar 12, 2016 at 05:03:01PM -0800, Gavin O'Leary wrote: > Signed-off-by: Gavin O'Leary I can't take a patch without a changelog entry. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/l

[PATCH] staging: dgap: dgap.c: fixed whitespace error caused by my patch

2016-03-12 Thread Gavin O'Leary
Signed-off-by: Gavin O'Leary --- drivers/staging/dgap/dgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 9e07a39..7845516 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -4

[PATCH] staging: dgap: dgap.c: Fixed a comment warning

2016-03-12 Thread Gavin O'Leary
Signed-off-by: Gavin O'Leary --- drivers/staging/dgap/dgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index bad3551..9e07a39 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -4

Re: [PATCH 2/2] Staging: dgap: modified the block comments

2016-03-10 Thread DaeSeok Youn
2016-03-10 17:21 GMT+09:00 Tanvi Surana : > I have modified the file dgap.c ,making changes to the multiline > comments,thus making them appear presentable > > Signed-Off-By: Tanvi Surana > --- > drivers/staging/dgap/dgap.c | 59 > +-

[PATCH 2/2] Staging: dgap: modified the block comments

2016-03-10 Thread Tanvi Surana
I have modified the file dgap.c ,making changes to the multiline comments,thus making them appear presentable Signed-Off-By: Tanvi Surana --- drivers/staging/dgap/dgap.c | 59 + 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/drivers

[PATCH 2/2] staging: dgap: use tty_alloc_driver instead of kcalloc

2016-02-28 Thread Daeseok Youn
>From 60b1e6e5d9401f10f584928d4feeb8a3b72b46a9 Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Mon, 29 Feb 2016 11:04:02 +0900 Subject: [PATCH 2/2] staging: dgap: use tty_alloc_driver instead of kcalloc the tty_alloc_driver() can allocate memory for ttys and termios. And also it can rele

Re: [PATCH v2] staging/dgap: move duplicated code from the dgap_cm.* functions

2016-02-07 Thread Greg Kroah-Hartman
. This patch introduces the wait_for_fep_cmds_limit() > function which is will be called from these functions to prevent > code duplication. > > Signed-off-by: Alexander Kuleshov > --- > Forgot Signed-off-by line > > drivers/staging/dgap/dgap.c | 103 > ---

Re: [PATCH] staging/dgap: move duplicated code from the dgap_cm.* functions

2015-11-26 Thread Alexander Kuleshov
On Thu, Nov 26, 2015 at 12:26 PM, Sudip Mukherjee wrote: > Signed-off-by ? Hello Sudip, I've put it in the v2 (https://lkml.org/lkml/2015/11/25/650) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/lis

Re: [PATCH] staging/dgap: move duplicated code from the dgap_cm.* functions

2015-11-25 Thread Sudip Mukherjee
On Wed, Nov 25, 2015 at 07:10:30PM +0600, Alexander Kuleshov wrote: > The dgap driver contains three functions: dgap_cmdb(), dgap_cmdw() > and dgap_cmdw_exit which are contain duplicated code which waits > if necessary before updating the pointer to limit outstanding > commands. This patch introduc

[PATCH v2] staging/dgap: move duplicated code from the dgap_cm.* functions

2015-11-25 Thread Alexander Kuleshov
these functions to prevent code duplication. Signed-off-by: Alexander Kuleshov --- Forgot Signed-off-by line drivers/staging/dgap/dgap.c | 103 1 file changed, 37 insertions(+), 66 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging

[PATCH] staging/dgap: move duplicated code from the dgap_cm.* functions

2015-11-25 Thread Alexander Kuleshov
these functions to prevent code duplication. --- drivers/staging/dgap/dgap.c | 103 1 file changed, 37 insertions(+), 66 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index bad3551..0a20253 100644 --- a/drivers/staging

Re: [PATCH] staging: dgap: remove unused configuration

2015-10-05 Thread Sudip Mukherjee
On Mon, Oct 05, 2015 at 12:46:43PM +0300, Dan Carpenter wrote: > On Sun, Oct 04, 2015 at 09:19:20PM +0530, Sudip Mukherjee wrote: > > The IO configuration was not used to configure the board. It was only > > read from the configuration file. Stop reading it and also remove the > > other related var

Re: [PATCH] staging: dgap: remove unused configuration

2015-10-05 Thread Dan Carpenter
On Sun, Oct 04, 2015 at 09:19:20PM +0530, Sudip Mukherjee wrote: > The IO configuration was not used to configure the board. It was only > read from the configuration file. Stop reading it and also remove the > other related variables defined for it. > > Signed-off-by: Sudip Mukherjee But say so

[PATCH] staging: dgap: remove unused configuration

2015-10-04 Thread Sudip Mukherjee
The IO configuration was not used to configure the board. It was only read from the configuration file. Stop reading it and also remove the other related variables defined for it. Signed-off-by: Sudip Mukherjee --- drivers/staging/dgap/dgap.c | 21 - drivers/staging/dgap

Re: [PATCH] staging: dgap: fix memory leak in dgap_parsefile()

2015-10-01 Thread Ronit Halder
> Why not just reject it earlier instead of allocating more data? I agree on your point. But we have to make different mechanism for that and my patch is only to fix the current code. regards ___ devel mailing list de...@linuxdriverproject.org http://dri

Re: [PATCH] staging: dgap: fix memory leak in dgap_parsefile()

2015-10-01 Thread Dan Carpenter
On Thu, Oct 01, 2015 at 09:11:31AM +0530, Ronit Halder wrote: > The existing dgap_parsefile() rejects invalid config file. > But before we know that config file is invalid a lot of memory leak > can happen. Removing the chances of memory leak won't heart anyone. > Why not just reject it earlier i

Re: [PATCH] staging: dgap: fix memory leak in dgap_parsefile()

2015-09-30 Thread Ronit Halder
The existing dgap_parsefile() rejects invalid config file. But before we know that config file is invalid a lot of memory leak can happen. Removing the chances of memory leak won't heart anyone. regards, Ronit Halder ___ devel mailing list de...@linuxdri

Re: [PATCH] staging: dgap: fix memory leak in dgap_parsefile()

2015-09-30 Thread Dan Carpenter
On Wed, Sep 30, 2015 at 11:39:45AM +0530, Ronit Halder wrote: > In dgap_parsefile() char pointers are set with kstrdup() > without checking that some string is allocated to that > char pointer before. Why would this happen? Wouldn't it be better to reject the invalid config file? regards, dan ca

[PATCH] staging: dgap: fix memory leak in dgap_parsefile()

2015-09-29 Thread Ronit Halder
In dgap_parsefile() char pointers are set with kstrdup() without checking that some string is allocated to that char pointer before. This patch frees the memory if already allocated and then set the poniter with kstrdup(). Signed-off-by: Ronit halder --- drivers/staging/dgap/dgap.c | 12

Re: [PATCH 2/2] staging: dgap: remove unused variable

2015-09-22 Thread Dan Carpenter
On Thu, Sep 10, 2015 at 05:24:59PM +0530, Sudip Mukherjee wrote: > Removed them but kept one call to ioread8() as it might affect the > hardware. Just leave the extra variable until someone has the hardware and can verify the right fix. Static checker warnings are good, don't silence them just to

Re: [PATCH] staging: dgap: fix returned errno code in dgap_parsefile()

2015-09-21 Thread Sudip Mukherjee
On Tue, Sep 22, 2015 at 08:38:43AM +0200, Javier Martinez Canillas wrote: > Hello Sudip, > > On 09/22/2015 06:52 AM, Sudip Mukherjee wrote: > > On Tue, Sep 22, 2015 at 02:39:36AM +0200, Javier Martinez Canillas wrote: > >> The driver is using -1 instead of the -ENOMEM defined macro to specify > >>

Re: [PATCH] staging: dgap: fix returned errno code in dgap_parsefile()

2015-09-21 Thread Javier Martinez Canillas
Hello Sudip, On 09/22/2015 06:52 AM, Sudip Mukherjee wrote: > On Tue, Sep 22, 2015 at 02:39:36AM +0200, Javier Martinez Canillas wrote: >> The driver is using -1 instead of the -ENOMEM defined macro to specify >> that a buffer allocation failed. Since the error number is propagated, >> the caller

Re: [PATCH] staging: dgap: fix returned errno code in dgap_parsefile()

2015-09-21 Thread Sudip Mukherjee
On Tue, Sep 22, 2015 at 02:39:36AM +0200, Javier Martinez Canillas wrote: > The driver is using -1 instead of the -ENOMEM defined macro to specify > that a buffer allocation failed. Since the error number is propagated, > the caller will get a -EPERM which is the wrong error condition. Just a littl

[PATCH] staging: dgap: fix returned errno code in dgap_parsefile()

2015-09-21 Thread Javier Martinez Canillas
: returning -1 instead of -ENOMEM is sloppy Signed-off-by: Javier Martinez Canillas --- drivers/staging/dgap/dgap.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 303d97023ccb

Re: [PATCH] staging: dgap: Remove myself from the MAINTAINERS file

2015-09-16 Thread Greg Kroah-Hartman
On Wed, Sep 16, 2015 at 10:30:37AM +0530, Sudip Mukherjee wrote: > On Tue, Sep 15, 2015 at 06:05:29AM -0700, Greg Kroah-Hartman wrote: > > On Tue, Sep 15, 2015 at 08:56:10AM -0400, Mark Hounschell wrote: > > > > > > > Signed-off-by: Mark Hounschell > > > Cc: Greg Kroah-Hartman > > > Cc: Ben Hut

Re: [PATCH] staging: dgap: Remove myself from the MAINTAINERS file

2015-09-15 Thread Sudip Mukherjee
On Tue, Sep 15, 2015 at 06:05:29AM -0700, Greg Kroah-Hartman wrote: > On Tue, Sep 15, 2015 at 08:56:10AM -0400, Mark Hounschell wrote: > > > > Signed-off-by: Mark Hounschell > > Cc: Greg Kroah-Hartman > > Cc: Ben Hutchings > > --- > > MAINTAINERS | 1 - > > 1 file changed, 1 deletion(-) > >

Re: [PATCH] staging: dgap: Remove myself from the MAINTAINERS file

2015-09-15 Thread Mark Hounschell
On 09/15/2015 09:05 AM, Greg Kroah-Hartman wrote: On Tue, Sep 15, 2015 at 08:56:10AM -0400, Mark Hounschell wrote: Removes myself from the MAINTAINERS file for the dgap driver. There appears to be no way to get the firmware files required by the dgap driver into the linux-firmware tree. The dgap

Re: [PATCH] staging: dgap: Remove myself from the MAINTAINERS file

2015-09-15 Thread Greg Kroah-Hartman
On Tue, Sep 15, 2015 at 08:56:10AM -0400, Mark Hounschell wrote: > Removes myself from the MAINTAINERS file for the dgap driver. > There appears to be no way to get the firmware files required > by the dgap driver into the linux-firmware tree. The dgap > driver is useless wihtout this firmware. Thi

[PATCH] staging: dgap: Remove myself from the MAINTAINERS file

2015-09-15 Thread Mark Hounschell
Removes myself from the MAINTAINERS file for the dgap driver. There appears to be no way to get the firmware files required by the dgap driver into the linux-firmware tree. The dgap driver is useless wihtout this firmware. This product is considered an obsolete product by Digi. They will not respon

Re: [PATCH 1/2] staging: dgap: fix possible NULL dereference

2015-09-11 Thread Greg Kroah-Hartman
gt; --- > drivers/staging/dgap/dgap.c | 2 ++ > 1 file changed, 2 insertions(+) While this change is all nice and fine, this driver is totally abusing the firmware kernel interface to read in a "configuration file" and then parse it within the driver. That's not ok at all, no tt

[PATCH] staging/dgap: Use strpbrk() instead of dgap_sindex()

2015-09-11 Thread Alexander Kuleshov
The provides strpbrk() function that does the same that the dgap_sindex(). Let's use already defined function instead of writing custom. Signed-off-by: Alexander Kuleshov --- drivers/staging/dgap/dgap.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff

[PATCH 1/2] staging: dgap: fix possible NULL dereference

2015-09-10 Thread Sudip Mukherjee
The return pointer from dgap_getword() is used in strcmp() where it is dereferenced. But dgap_getword() can return NULL. Lets put a check there and return 0 as error. Signed-off-by: Sudip Mukherjee --- drivers/staging/dgap/dgap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH 2/2] staging: dgap: remove unused variable

2015-09-10 Thread Sudip Mukherjee
These variables were assigned some values but they were never used. Removed them but kept one call to ioread8() as it might affect the hardware. Signed-off-by: Sudip Mukherjee --- drivers/staging/dgap/dgap.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers

[PATCH] drivers: staging: dgap: fixed all the block comments styling issues

2015-08-19 Thread Panos Vlachos
Signed-off-by: Panos Vlachos --- drivers/staging/dgap/dgap.c | 84 - 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 9112dd2..1cacd18 100644 --- a/drivers/staging/dgap

Re: [PATCH 1/4] staging: dgap: fix error path

2015-07-17 Thread Dan Carpenter
On Fri, Jul 17, 2015 at 03:57:21PM +0530, Sudip Mukherjee wrote: > On Fri, Jul 17, 2015 at 01:05:55PM +0300, Dan Carpenter wrote: > > On Fri, Jul 17, 2015 at 03:21:28PM +0530, Sudip Mukherjee wrote: > > > On Fri, Jul 17, 2015 at 12:30:03PM +0300, Dan Carpenter wrote: > > > > I don't think I like th

Re: [PATCH 1/4] staging: dgap: fix error path

2015-07-17 Thread Sudip Mukherjee
On Fri, Jul 17, 2015 at 01:05:55PM +0300, Dan Carpenter wrote: > On Fri, Jul 17, 2015 at 03:21:28PM +0530, Sudip Mukherjee wrote: > > On Fri, Jul 17, 2015 at 12:30:03PM +0300, Dan Carpenter wrote: > > > I don't think I like these at all. remove_one has always been buggy in > > > that it removes ev

Re: [PATCH 1/4] staging: dgap: fix error path

2015-07-17 Thread Dan Carpenter
On Fri, Jul 17, 2015 at 03:21:28PM +0530, Sudip Mukherjee wrote: > On Fri, Jul 17, 2015 at 12:30:03PM +0300, Dan Carpenter wrote: > > I don't think I like these at all. remove_one has always been buggy in > > that it removes everything. We should fix it to only remove one instead > > of formalizi

Re: [PATCH 1/4] staging: dgap: fix error path

2015-07-17 Thread Sudip Mukherjee
On Fri, Jul 17, 2015 at 12:30:03PM +0300, Dan Carpenter wrote: > I don't think I like these at all. remove_one has always been buggy in > that it removes everything. We should fix it to only remove one instead > of formalizing the currect terrible behavior. Its already applied. I thought after th

Re: [PATCH 1/4] staging: dgap: fix error path

2015-07-17 Thread Dan Carpenter
I don't think I like these at all. remove_one has always been buggy in that it removes everything. We should fix it to only remove one instead of formalizing the currect terrible behavior. regards, dan carpenter ___ devel mailing list de...@linuxdrive

[PATCH 3/4] staging: dgap: new arguments to dgap_stop

2015-07-16 Thread Sudip Mukherjee
Mukherjee --- drivers/staging/dgap/dgap.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 8956228..4f07a0c 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -7004,7 +7004,7 @@ static

[PATCH 4/4] staging: dgap: remove duplicate code

2015-07-16 Thread Sudip Mukherjee
Remove the duplicate code of dgap_remove_one() and dgap_stop(). Signed-off-by: Sudip Mukherjee --- drivers/staging/dgap/dgap.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 4f07a0c..b344e03

[PATCH 2/4] staging: dgap: rearrange function

2015-07-16 Thread Sudip Mukherjee
Relocate the function dgap_stop() so that in a later patch we can remove the duplicate codes between dgap_stop() and dgap_remove_one(). Signed-off-by: Sudip Mukherjee --- drivers/staging/dgap/dgap.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff

[PATCH 1/4] staging: dgap: fix error path

2015-07-16 Thread Sudip Mukherjee
was sent. I am not able to find that discussion in lkml.org drivers/staging/dgap/dgap.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 26b0446..3a783bf 100644 --- a/drivers/staging/dgap/dgap.c +++ b

Re: [PATCHv2 1/2] staging: dgap: cleanup driver module exit and remove function

2015-06-10 Thread Gujulan Elango, Hari Prasath (H.)
On Wed, Jun 10, 2015 at 10:11:37AM +0300, Dan Carpenter wrote: > I mean, yes, it doesn't seem to make much sense to continue polling > after all the hardware has been removed. The problem is that we pass a > pci_dev pointer to dgap_remove_one() and it ignores it and removes > everything. > > Othe

Re: [PATCHv2 1/2] staging: dgap: cleanup driver module exit and remove function

2015-06-10 Thread Sudip Mukherjee
On Wed, Jun 10, 2015 at 10:11:37AM +0300, Dan Carpenter wrote: > > Also this driver has active maintainers but somehow we have CC'd the > ATMEL people who maintain a different staging driver... The original patch had put the maintainers of WILC1000 WIFI DRIVER in the cc list. Now ccing the actual

Re: [PATCHv2 1/2] staging: dgap: cleanup driver module exit and remove function

2015-06-10 Thread Dan Carpenter
I mean, yes, it doesn't seem to make much sense to continue polling after all the hardware has been removed. The problem is that we pass a pci_dev pointer to dgap_remove_one() and it ignores it and removes everything. Otherwise, I would probably suggest that it start polling when the first hardwa

Re: [PATCHv2 1/2] staging: dgap: cleanup driver module exit and remove function

2015-06-09 Thread Sudip Mukherjee
On Wed, Jun 10, 2015 at 04:54:47AM +, Gujulan Elango, Hari Prasath (H.) wrote: > From: Hari Prasath Gujulan Elango > > @@ -7159,8 +7144,9 @@ err_stop: > */ > static void dgap_cleanup_module(void) > { > - if (dgap_numboards) > - pci_unregister_driver(&dgap_driver); > +

Re: [PATCH 2/2] staging: dgap: delete obvious comments

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
Gujulan Elango > > --- > > drivers/staging/dgap/dgap.c | 4 > > 1 file changed, 4 deletions(-) > > > > diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c > > index 185e9e5..03153d8 100644 > > --- a/drivers/staging/dgap/dgap

[PATCHv2 2/2] staging: dgap: delete obvious comments

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
From: Hari Prasath Gujulan Elango This patch deletes the comments secion which is obvious and outdated Signed-off-by: Hari Prasath Gujulan Elango --- v2:Addrressed Dan carpenter review comments to remove the entire comments section as its outdated and obvious. --- drivers/staging/dgap

[PATCHv2 1/2] staging: dgap: cleanup driver module exit and remove function

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
review comment on unregistering the driver based on dgap_numboards in the module exit routine.Registration of the PCI driver is not dependent on this and hence unregister also shouldn't depend on this varaible. --- drivers/staging/dgap/dgap.c | 20 +++- 1 file changed, 3 inser

Re: [PATCH 1/2] staging: dgap: cleanup driver module exit and remove function

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
; > allocated in the driver module init.The cleanup is moved from remove > > function to module exit as appropriate. > > > > Signed-off-by: Hari Prasath Gujulan Elango > > --- > > drivers/staging/dgap/dgap.c | 17 ++--- > > 1 file changed, 2 in

Re: [PATCH 2/2] staging: dgap: delete obvious comments

2015-06-09 Thread Dan Carpenter
On Tue, Jun 09, 2015 at 05:27:00PM +, Gujulan Elango, Hari Prasath (H.) wrote: > From: Hari Prasath Gujulan Elango > > Deleting obvious comments > > Signed-off-by: Hari Prasath Gujulan Elango > --- > drivers/staging/dgap/dgap.c | 4 > 1 file changed, 4 deleti

Re: [PATCH 1/2] staging: dgap: cleanup driver module exit and remove function

2015-06-09 Thread Dan Carpenter
module exit as appropriate. > > Signed-off-by: Hari Prasath Gujulan Elango > --- > drivers/staging/dgap/dgap.c | 17 ++--- > 1 file changed, 2 insertions(+), 15 deletions(-) > > diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c > index

[PATCH 2/2] staging: dgap: delete obvious comments

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
From: Hari Prasath Gujulan Elango Deleting obvious comments Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/dgap/dgap.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 185e9e5..03153d8 100644 --- a/drivers

[PATCH 1/2] staging: dgap: cleanup driver module exit and remove function

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
From: Hari Prasath Gujulan Elango The driver remove function is not the right place to cleanup resources allocated in the driver module init.The cleanup is moved from remove function to module exit as appropriate. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/dgap/dgap.c | 17

Re: [PATCH] staging: dgap: do cleanup on module exit

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
On Tue, Jun 09, 2015 at 04:41:33PM +0300, Dan Carpenter wrote: > On Tue, Jun 09, 2015 at 10:54:02AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > On Tue, Jun 09, 2015 at 03:32:20PM +0530, Sudip Mukherjee wrote: > > > On Tue, Jun 09, 2015 at 09:27:22AM +, Gujulan Elango, Hari Prasath >

Re: [PATCH] staging: dgap: move cleanup function to avoid redundancy

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
On Tue, Jun 09, 2015 at 04:51:02PM +0300, Dan Carpenter wrote: > No. See my other email. > > Also this is super ugly and your instinct should have told you that ugly > things are normally wrong. > > regards, > dan carpenter > Dan,I guess functionality wise this also does the job.Maybe this is

Re: [PATCH] staging: dgap: move cleanup function to avoid redundancy

2015-06-09 Thread Dan Carpenter
No. See my other email. Also this is super ugly and your instinct should have told you that ugly things are normally wrong. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/list

Re: [PATCH] staging: dgap: do cleanup on module exit

2015-06-09 Thread Dan Carpenter
On Tue, Jun 09, 2015 at 10:54:02AM +, Gujulan Elango, Hari Prasath (H.) wrote: > On Tue, Jun 09, 2015 at 03:32:20PM +0530, Sudip Mukherjee wrote: > > On Tue, Jun 09, 2015 at 09:27:22AM +, Gujulan Elango, Hari Prasath (H.) > > wrote: > > > From: Hari Prasath Gujulan Elango > > > > > > Cl

[PATCH] staging: dgap: move cleanup function to avoid redundancy

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
--- drivers/staging/dgap/dgap.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 26b0446..3a783bf 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -7133,8 +7133,10 @@ static int

Re: [PATCH] staging: dgap: do cleanup on module exit

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
better. But you just can not remove that as dgap_stop() has to be > called if pci_register_driver() fails. maybe something like this: > > diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c > index 26b0446..cbb971d 100644 > --- a/drivers/staging/d

Re: [PATCH] staging: dgap: do cleanup on module exit

2015-06-09 Thread Sudip Mukherjee
; dgap_stop() are invoked in succession.Going by your argument,should we > remove the redundant cleanup done in the dgap_stop() function. yes, better. But you just can not remove that as dgap_stop() has to be called if pci_register_driver() fails. maybe something like this: diff --git a/drivers/stag

Re: [PATCH] staging: dgap: do cleanup on module exit

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
On Tue, Jun 09, 2015 at 03:32:20PM +0530, Sudip Mukherjee wrote: > On Tue, Jun 09, 2015 at 09:27:22AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > From: Hari Prasath Gujulan Elango > > > > Cleanup the device entry,device class & unregister the character device > > in the module exit.All

Re: [PATCH] staging: dgap: do cleanup on module exit

2015-06-09 Thread Sudip Mukherjee
On Tue, Jun 09, 2015 at 09:27:22AM +, Gujulan Elango, Hari Prasath (H.) wrote: > From: Hari Prasath Gujulan Elango > > Cleanup the device entry,device class & unregister the character device > in the module exit.All this cleanup is done already in the dgap_stop() > function.We need to call t

[PATCH] staging: dgap: do cleanup on module exit

2015-06-09 Thread Gujulan Elango, Hari Prasath (H.)
ging/dgap/dgap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 26b0446..b6fa486 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -7161,6 +7161,7 @@ static void dgap_cleanup_module(void) {

[PATCH] Staging: dgap: dgap: Fixed spelling errors

2015-05-15 Thread Colin Cronin
Fixed comment spelling errors Signed-off-by: Colin Cronin --- drivers/staging/dgap/dgap.c | 2 +- drivers/staging/dgap/dgap.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 6766d5a..0691729 100644 --- a

Re: [PATCH] Staging: dgap: dgap: Fixed spelling errors

2015-05-15 Thread Sudip Mukherjee
On Fri, May 15, 2015 at 02:11:40AM -0700, Colin Cronin wrote: > Fixed comment spelling errors > > Signed-off-by Colin Cronin this is wrong. should be Signed-off-by: regards sudip > --- ___ devel mailing list de...@linuxdriverproject.org http://driverd

[PATCH] Staging: dgap: dgap: Fixed spelling errors

2015-05-15 Thread Colin Cronin
Fixed comment spelling errors Signed-off-by Colin Cronin --- drivers/staging/dgap/dgap.c | 2 +- drivers/staging/dgap/dgap.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 6766d5a..0691729 100644 --- a

[PATCH] staging: dgap: remove unused code

2015-05-09 Thread Sudip Mukherjee
dgap_sindex() is being only called from dgap_getword() which searches for either ' ' or '\t' or '\n'. this part of the code with '^' at the beginning is never used. Signed-off-by: Sudip Mukherjee --- drivers/staging/dgap/dgap.c | 21 --

[PATCH 2/2] staging: dgap: use remove function

2015-05-07 Thread Sudip Mukherjee
will be left in an inconsistent state. So moved the cleanups in the remove callback and since there was no reference of dgap_driver in remove_one(), so had to define the pci_driver in the function. Signed-off-by: Sudip Mukherjee --- drivers/staging/dgap/dgap.c | 49

[PATCH 1/2] staging: dgap: move function before remove

2015-05-07 Thread Sudip Mukherjee
move the cleanup function before the remove call as the next patch of the series is going to use that. Signed-off-by: Sudip Mukherjee --- drivers/staging/dgap/dgap.c | 61 ++--- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/drivers

[PATCH] staging: dgap: Avoid name collision

2015-03-03 Thread Fabio Estevam
Building for ARM64 leads to the following build warning: In file included from drivers/staging/dgap/dgap.c:66:0: drivers/staging/dgap/dgap.h:124:0: warning: "PCI_IO_SIZE" redefined #define PCI_IO_SIZE 0x0020 ^ In file included from ./arch/arm64/include/asm/p

[PATCH] staging: dgap: dgap: Removed variables that is never used

2015-01-28 Thread Rickard Strandqvist
Variable ar assigned a value that is never used. I have also removed all the code that thereby serves no purpose. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/staging/dgap/dgap.c |5 + 1 file changed, 1 insertion

[PATCH] staging: dgap: fix "if" statement that always evaluates to true

2015-01-23 Thread Daeseok Youn
cppcheck warning: (warnning) Logical disjunction always evaluates to true Reported-by: David Binderman Signed-off-by: Daeseok Youn --- drivers/staging/dgap/dgap.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap

Re: staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread DaeSeok Youn
Hi, 2015-01-22 19:14 GMT+09:00 Dan Carpenter : > > On Thu, Jan 22, 2015 at 10:05:53AM +, David Binderman wrote: >> Hello there, >> >> [linux-3.19-rc5/drivers/staging/dgap/dgap.c:981]: (warning) Logical >> disjunction always evaluates to true: conc_type != 65 ||

RE: staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread David Binderman
Hello there, > On Thu, Jan 22, 2015 at 10:20:44AM +, David Binderman wrote: >> I used the static analyser cppcheck to find these two bugs, but >> you might be able to find similar problems by using gcc compiler >> flag -Wlogical-op. > > I turned it on,

Re: staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread Dan Carpenter
On Thu, Jan 22, 2015 at 10:20:44AM +, David Binderman wrote: > I used the static analyser cppcheck to find these two bugs, but > you might be able to find similar problems by using gcc compiler > flag -Wlogical-op. I turned it on, but GCC 4.7.2 doesn't find anything for me. It complains about

RE: staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread David Binderman
Hello there, Thanks for the confirmation. More of the same in the same file: [linux-3.19-rc5/drivers/staging/dgap/dgap.c:1022]: (warning) Logical disjunction always evaluates to true: module_type != 68 || module_type != 73. Source code is     if (module_type == 0 || module_type

Re: staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread Dan Carpenter
On Thu, Jan 22, 2015 at 10:05:53AM +, David Binderman wrote: > Hello there, > > [linux-3.19-rc5/drivers/staging/dgap/dgap.c:981]: (warning) Logical > disjunction always evaluates to true: conc_type != 65 || conc_type != 66. > > Source code is > >   

staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread David Binderman
Hello there, [linux-3.19-rc5/drivers/staging/dgap/dgap.c:981]: (warning) Logical disjunction always evaluates to true: conc_type != 65 || conc_type != 66. Source code is     if (conc_type == 0 || conc_type != CX ||     conc_type != EPC) { Suggest code rework. Regards

[PATCH] staging: dgap: use gotos for handling error in dgap_remap()

2014-12-25 Thread Daeseok Youn
Signed-off-by: Daeseok Youn --- drivers/staging/dgap/dgap.c | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index bdb5317..518ab56 100644 --- a/drivers/staging/dgap/dgap.c +++ b

[PATCH 4/4] staging: dgap: introducing find_board_by_major()

2014-11-06 Thread Daeseok Youn
use find_board_by_major function instead of getting a brd from static arrary. Becasue tty's major number doesn't start zero and we can find a brd from dgap_board[]. Signed-off-by: Daeseok Youn --- drivers/staging/dgap/dgap.c | 28 +--- 1 files changed, 17

[PATCH 3/4] staging: dgap: remove useless variables for saving tty's major

2014-11-06 Thread Daeseok Youn
The board_t has a tty_struct(serial_driver and print_driver) that has a major number. When major number is compared in dgap_tty_open(), just use brd->serial_driver{print_driver}->major. Signed-off-by: Daeseok Youn --- drivers/staging/dgap/dgap.c |9 ++--- drivers/staging/dgap/

[PATCH 2/4] staging: dgap: fix memory leak caused by double allocation of tty_structs

2014-11-06 Thread Daeseok Youn
The tty_struct of serial_driver and print_driver were getting allocated twice. One is allocated in tty_alloc_driver(), the other is in dgap_tty_register(). So remove these in dgap_tty_register(). Signed-off-by: Daeseok Youn --- drivers/staging/dgap/dgap.c | 16 1 files

[PATCH 1/4] staging: dgap: set tty's flags by tty_alloc_driver()

2014-11-06 Thread Daeseok Youn
tty's flags can be set by calling tty_alloc_driver(). Signed-off-by: Daeseok Youn --- drivers/staging/dgap/dgap.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index aa393d2..6418cc5 100644

[PATCH] staging: dgap: remove unnecessary function

2014-11-05 Thread Daeseok Youn
The dgap_init_global() initialize the dgap_board that is a global variable as static and dgap_poll_timer. But init_timer() is called twice in dgap_start() and dgap_board doesn't need to be initialized to NULL. Signed-off-by: Daeseok Youn --- drivers/staging/dgap/dgap.c |

Re: [PATCH V3] staging: dgap: re-arrange functions for removing forward declarations

2014-11-03 Thread Greg KH
On Tue, Nov 04, 2014 at 08:07:01AM +0900, DaeSeok Youn wrote: > Greg, > > check this patch, please. > This patch was rebased on staging-testing tree. > > Thanks. > > regards, > Daeseok Youn > > > 2014-10-31 10:20 GMT+09:00 Daeseok Youn : 3 days after sending this? Please give me a chance, I

Re: [PATCH V2] staging: dgap: re-arrange functions for removing forward declarations

2014-10-30 Thread DaeSeok Youn
Hi, 2014-10-31 5:33 GMT+09:00 Greg KH : > On Thu, Oct 30, 2014 at 12:14:00PM +0900, Daeseok Youn wrote: >> Re-arrange the functions for removing forward declarations. >> >> Tested-by: Mark Hounschell >> Signed-off-by: Daeseok Youn >> Tested-by: Mark Hounschell >> --- >> V2: this patch is rebase

Re: [PATCH V2] staging: dgap: re-arrange functions for removing forward declarations

2014-10-30 Thread Greg KH
On Thu, Oct 30, 2014 at 12:14:00PM +0900, Daeseok Youn wrote: > Re-arrange the functions for removing forward declarations. > > Tested-by: Mark Hounschell > Signed-off-by: Daeseok Youn > Tested-by: Mark Hounschell > --- > V2: this patch is rebased on staging-next branch. Still doesn't apply :(

Re: [PATCH RESEND] staging: dgap: re-arrange functions for removing forward declarations

2014-10-29 Thread DaeSeok Youn
Hi, 2014-10-29 18:22 GMT+09:00 Greg KH : > On Sun, Oct 26, 2014 at 11:08:54AM +0900, Daeseok Youn wrote: >> Re-arrange the functions for removing forward declarations. >> >> Tested-by: Mark Hounschell >> Signed-off-by: Daeseok Youn >> --- >> RESEND: This patch is tested all by Mark. >> It is g

Re: [PATCH RESEND] staging: dgap: re-arrange functions for removing forward declarations

2014-10-29 Thread Mark Hounschell
On 10/29/2014 05:22 AM, Greg KH wrote: On Sun, Oct 26, 2014 at 11:08:54AM +0900, Daeseok Youn wrote: Re-arrange the functions for removing forward declarations. Tested-by: Mark Hounschell Signed-off-by: Daeseok Youn --- RESEND: This patch is tested all by Mark. It is good to merge. Greg, chec

Re: [PATCH RESEND] staging: dgap: re-arrange functions for removing forward declarations

2014-10-29 Thread Greg KH
On Sun, Oct 26, 2014 at 11:08:54AM +0900, Daeseok Youn wrote: > Re-arrange the functions for removing forward declarations. > > Tested-by: Mark Hounschell > Signed-off-by: Daeseok Youn > --- > RESEND: This patch is tested all by Mark. > It is good to merge. Greg, check please. It doesn't apply

Re: [PATCH] staging: dgap: re-arrange functions for removing forward declarations.

2014-10-21 Thread Mark Hounschell
On 10/14/2014 08:01 AM, Mark Hounschell wrote: On 10/13/2014 10:04 PM, Greg KH wrote: On Mon, Oct 13, 2014 at 07:56:38AM -0700, Joe Perches wrote: On Mon, 2014-10-13 at 17:01 +0900, DaeSeok Youn wrote: Hi, 2014-10-13 12:25 GMT+09:00 Greg KH : On Mon, Oct 13, 2014 at 11:34:25AM +0900, Daeseok

Re: [PATCH] staging: dgap: re-arrange functions for removing forward declarations.

2014-10-14 Thread Dan Carpenter
On Mon, Oct 13, 2014 at 07:19:38PM -0700, Joe Perches wrote: > I don't know of a way to compare objects when functions are > rearranged in the source file. > > Anyone else? I have a perl script that I use to review function movement. It barfed on the DaeSeok's original patch so I re-wrote it, bu

Re: [PATCH] staging: dgap: re-arrange functions for removing forward declarations.

2014-10-14 Thread Mark Hounschell
On 10/13/2014 10:04 PM, Greg KH wrote: On Mon, Oct 13, 2014 at 07:56:38AM -0700, Joe Perches wrote: On Mon, 2014-10-13 at 17:01 +0900, DaeSeok Youn wrote: Hi, 2014-10-13 12:25 GMT+09:00 Greg KH : On Mon, Oct 13, 2014 at 11:34:25AM +0900, Daeseok Youn wrote: Re-arrange the functions for remov

Re: [PATCH] staging: dgap: re-arrange functions for removing forward declarations.

2014-10-14 Thread DaeSeok Youn
Hi, 2014-10-14 11:19 GMT+09:00 Joe Perches : > On Tue, 2014-10-14 at 04:04 +0200, Greg KH wrote: >> On Mon, Oct 13, 2014 at 07:56:38AM -0700, Joe Perches wrote: >> > On Mon, 2014-10-13 at 17:01 +0900, DaeSeok Youn wrote: >> > > 2014-10-13 12:25 GMT+09:00 Greg KH : >> > > > On Mon, Oct 13, 2014 at

Re: [PATCH] staging: dgap: re-arrange functions for removing forward declarations.

2014-10-13 Thread Joe Perches
On Tue, 2014-10-14 at 04:04 +0200, Greg KH wrote: > On Mon, Oct 13, 2014 at 07:56:38AM -0700, Joe Perches wrote: > > On Mon, 2014-10-13 at 17:01 +0900, DaeSeok Youn wrote: > > > 2014-10-13 12:25 GMT+09:00 Greg KH : > > > > On Mon, Oct 13, 2014 at 11:34:25AM +0900, Daeseok Youn wrote: > > > >> Re-ar

Re: [PATCH] staging: dgap: re-arrange functions for removing forward declarations.

2014-10-13 Thread Greg KH
On Mon, Oct 13, 2014 at 07:56:38AM -0700, Joe Perches wrote: > On Mon, 2014-10-13 at 17:01 +0900, DaeSeok Youn wrote: > > Hi, > > > > 2014-10-13 12:25 GMT+09:00 Greg KH : > > > On Mon, Oct 13, 2014 at 11:34:25AM +0900, Daeseok Youn wrote: > > >> Re-arrange the functions for removing forward declar

Re: [PATCH] staging: dgap: re-arrange functions for removing forward declarations.

2014-10-13 Thread DaeSeok Youn
Hi, 2014-10-13 23:56 GMT+09:00 Joe Perches : > On Mon, 2014-10-13 at 17:01 +0900, DaeSeok Youn wrote: >> Hi, >> >> 2014-10-13 12:25 GMT+09:00 Greg KH : >> > On Mon, Oct 13, 2014 at 11:34:25AM +0900, Daeseok Youn wrote: >> >> Re-arrange the functions for removing forward declarations. >> >> >> >> S

  1   2   3   4   5   6   7   8   >