[PATCH] staging/rtl8188eu/core/rtw_cmd: Fixes semaphore locking

2016-08-09 Thread Lidza Louina
The code did not lock the &pcmdpriv->terminate_cmdthread_sema before using it. The code had an up() where a down() should've been. This patch fixes that. Signed-off-by: Lidza Louina ---  drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +-  1 file changed, 1 insertion(+), 1 deletion(-)

Re: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment

2016-06-23 Thread Lidza Louina
/lustre/lnet: changes value to correct type for assignment On Jun 23, 2016, at 3:27 PM, Lidza Louina wrote: > > - Original Message - > From: oleg.dro...@intel.com > To: lidza.lou...@oracle.com > Cc: gre...@linuxfoundation.org, lustre-de...@lists.lustre.org, > de...@dr

Re: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment

2016-06-23 Thread Lidza Louina
-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment On Jun 23, 2016, at 2:56 PM, Lidza Louina wrote: > The code attempted to add an unsigned int to a an unsigned 64-bit > integer. This patch makes the code use the correct type of int to > suppress a smatc

[PATCH v2] staging/lustre/lnet: changes value to correct type for assignment

2016-06-23 Thread Lidza Louina
The code attempted to add an unsigned int to a an unsigned 64-bit integer. This patch makes the code use the correct type of int to suppress a smatch warning. Signed-off-by: Lidza Louina --- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic

2016-06-23 Thread Lidza Louina
-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic On Jun 23, 2016, at 2:07 PM, Lidza Louina wrote: > The smatch warning was "drivers/staging/lustre/lnet/lnet/api-ni.c:516 > lnet_res_lh_initialize() warn: should '1 << ibits' be a 64 bit type?"

Re: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic

2016-06-23 Thread Lidza Louina
-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic NAK. On Jun 23, 2016, at 1:24 PM, Lidza Louina wrote: > The code attempted to add an unsigned int to a an unsigned 64-bit > integer. This patch casts the unsigned regular int to suppress > smatch warnings. > >

[PATCH] staging/lustre/lnet: correctly casts value for arithmetic

2016-06-23 Thread Lidza Louina
The code attempted to add an unsigned int to a an unsigned 64-bit integer. This patch casts the unsigned regular int to suppress smatch warnings. Signed-off-by: Lidza Louina --- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH] staging/wilc1000: fixes kzalloc call

2016-05-27 Thread Lidza Louina
On 05/27/2016 02:07 PM, Joe Perches wrote: On Fri, 2016-05-27 at 13:51 -0400, Lidza Louina wrote: The wl pointer was initialized as a pointer to a struct wilc and assigned to a piece of memory the size of the pointer. It should be the size of struct wilc. This isn't necessary. The co

[PATCH] staging/wilc1000: fixes kzalloc call

2016-05-27 Thread Lidza Louina
The wl pointer was initialized as a pointer to a struct wilc and assigned to a piece of memory the size of the pointer. It should be the size of struct wilc. Signed-off-by: Lidza Louina --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-17 Thread Lidza Louina
On 05/17/2016 02:53 AM, Dan Carpenter wrote: When I read the code, I just assumed desc was a pointer and it should have been: if (!desc) return NULL; For me, "if (rc) " is way more readable than "if (rc != 0) ". So readability could go either way depending on what you

[PATCH v3] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Lidza Louina
The lustre_msg_buf method could return NULL. Subsequent code didn't check if it's null before using it. This patch adds two checks. Signed-off-by: Lidza Louina --- drivers/staging/lustre/lustre/ptlrpc/sec.c | 3 +++ drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 8 ++-

Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Lidza Louina
_udesc)" block instead of at the top of the function, since it isn't used anywhere else. Cheers, Andreas Definitely, will do. I'll change desc to rc and update the if statement and send another patch now. Lidza - Patrick On 05/16/2016 09:17 AM, Lidza Louina wrote: The lustre_m

[PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Lidza Louina
The lustre_msg_buf method could return NULL. Subsequent code didn't check if it's null before using it. This patch adds two checks. Signed-off-by: Lidza Louina --- drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 ++ drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 9 +++-

Re: [PATCH] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Lidza Louina
On 05/13/2016 12:43 PM, Drokin, Oleg wrote: On May 12, 2016, at 6:33 PM, Lidza Louina wrote: The lustre_msg_buf method could return NULL. Subsequent code didn't check if it's null before using it. This patch adds two checks. Thank you for the patch, it looks good code-wise, but

[PATCH] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-12 Thread Lidza Louina
The lustre_msg_buf method could return NULL. Subsequent code didn't check if it's null before using it. This patch adds two checks. Signed-off-by: Lidza Louina diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index 187fd1d..e6fe

Re: [PATCH 1/2] staging: dgap: removes KERNEL_VERSION conditionals

2014-01-17 Thread Lidza Louina
I'll try this patchset again after Masanari Iida's patches are accepted after the merge window. Lidza On Fri, Jan 17, 2014 at 11:01 AM, Lidza Louina wrote: > This patch removes the KERNEL_VERSION conditionals. > The driver is built for this kernel version, so the > conditio

Re: [PATCH 1/8] staging: dgap: Fix trailing whitespace in digi.h

2014-01-17 Thread Lidza Louina
Acked-by: Lidza Louina On Tue, Jan 14, 2014 at 10:40 AM, Masanari Iida wrote: > This patch fixed trailing whitespace error found by > checkpatch.pl in dgap/digi.h > > Signed-off-by: Masanari Iida > --- > drivers/staging/dgap/digi.h | 24 >

[PATCH] staging: dgap: uses kzalloc for allocating memory

2013-12-19 Thread Lidza Louina
Originally, this driver created it's own allocating function. This patch removes that function and calls kzalloc directly. This patch affects: - driver.c - driver.h - fep5.c - tty.c Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_driver.c | 18 ++ dr

[PATCH] staging: dgnc: changes arguments in sizeof

2013-10-04 Thread Lidza Louina
The arguments that were passed into sizeof were generic. This patch changes this by putting the actual item that we need a size of instead. For example: - kzalloc(sizeof(struct dgnc_board), GFP_KERNEL); + kzalloc(sizeof(*brd), GFP_KERNEL); Signed-off-by: Lidza Louina --- drivers/staging

Re: [PATCH v4 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-03 Thread Lidza Louina
On Thu, Oct 3, 2013 at 1:23 AM, Greg KH wrote: > On Tue, Oct 01, 2013 at 12:54:20PM -0400, Lidza Louina wrote: >> + return 0; >> + >> +err_unregister_serial: >> +tty_unregister_driver(brd->SerialDriver); >> +err_free_print_ttys: >

Re: [PATCH v3 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-02 Thread Lidza Louina
On Tue, Oct 1, 2013 at 1:59 PM, Dan Carpenter wrote: > On Tue, Oct 01, 2013 at 12:32:06PM -0400, Lidza Louina wrote: >> On Tue, Oct 1, 2013 at 12:09 PM, Dan Carpenter >> wrote: >> > On Tue, Oct 01, 2013 at 12:00:23PM -0400, Lidza Louina wrote: >> >> @@ -30

Re: [PATCH 1/1] staging: dgnc: Remove KERNEL_VERSION check

2013-10-01 Thread Lidza Louina
On Mon, Sep 30, 2013 at 9:46 PM, Greg KH wrote: > On Fri, Sep 27, 2013 at 07:11:47AM -0400, Lidza Louina wrote: >> On Fri, Sep 27, 2013 at 5:50 AM, Sachin Kamat >> wrote: >> > This check is not required. >> > >> > Signed-off-by: Sachin Kamat >

[PATCH v4 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-01 Thread Lidza Louina
This patch adds error handling to the tty_driver allocations in dgap_tty_register. Now the code handles the possibility of an alloc_tty_driver, a tty_register_driver, and a brd->SerialDriver->ttys or brd->PrintDriver->ttys allocation failure. Signed-off-by: Lidza Louina --- dri

[PATCH v4 2/2] staging: dgap: tty.c: removes smatch warning "unsigned '--un->un_open_count' is never less than zero"

2013-10-01 Thread Lidza Louina
This patch removes this smatch warning: unsigned '--un->un_open_count' is never less than zero The code decremented the un_open_count variable and tested to see if it was less than zero. Because un_open_count is unsigned and can't be below zero, this test didn't work. Sign

Re: [PATCH v3 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-01 Thread Lidza Louina
On Tue, Oct 1, 2013 at 12:09 PM, Dan Carpenter wrote: > On Tue, Oct 01, 2013 at 12:00:23PM -0400, Lidza Louina wrote: >> @@ -306,7 +316,16 @@ int dgap_tty_register(struct board_t *brd) >> >> DPR_INIT(("DGAP REGISTER TTY: MAJORS: %d %d\n", >> brd->S

[PATCH v3 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-01 Thread Lidza Louina
This patch adds error handling to the tty_driver allocations in dgap_tty_register. Now the code handles the possibility of an alloc_tty_driver, a tty_register_driver, and a brd->SerialDriver->ttys or brd->PrintDriver->ttys allocation failure. Signed-off-by: Lidza Louina --- dri

[PATCH v3 2/2] staging: dgap: tty.c: removes smatch warning "unsigned '--un->un_open_count' is never less than zero"

2013-10-01 Thread Lidza Louina
This patch removes this smatch warning: unsigned '--un->un_open_count' is never less than zero The code decremented the un_open_count variable and tested to see if it was less than zero. Because un_open_count is unsigned and can't be below zero, this test didn't work. Sign

Re: [PATCH 1/1] staging: dgnc: Remove KERNEL_VERSION check

2013-09-27 Thread Lidza Louina
On Fri, Sep 27, 2013 at 5:50 AM, Sachin Kamat wrote: > This check is not required. > > Signed-off-by: Sachin Kamat > Cc: Lidza Louina > --- > drivers/staging/dgnc/dgnc_kcompat.h |5 - > 1 file changed, 5 deletions(-) > > diff --git a/drivers/staging/dgnc/

Re: [PATCH v2 5/5] staging: dgap: tty.c: removes smatch warning "unsigned '--un->un_open_count' is never less than zero"

2013-09-26 Thread Lidza Louina
On Thu, Sep 26, 2013 at 6:22 AM, Dan Carpenter wrote: > On Wed, Sep 25, 2013 at 07:08:54PM -0400, Lidza Louina wrote: >> This patch removes this smatch warning: >> unsigned '--un->un_open_count' is never less than zero >> >> The code decremented the un_ope

Re: [PATCH v2 4/5] staging: dgap: tty.c: changes error handing to tty driver allocations

2013-09-26 Thread Lidza Louina
On Thu, Sep 26, 2013 at 6:19 AM, Dan Carpenter wrote: > This one is not right. > > On Wed, Sep 25, 2013 at 07:08:53PM -0400, Lidza Louina wrote: >> This patch changes error handling to the >> tty_driver allocations in dgap_tty_register. >> >> Before, it di

[PATCH v2 5/5] staging: dgap: tty.c: removes smatch warning "unsigned '--un->un_open_count' is never less than zero"

2013-09-25 Thread Lidza Louina
This patch removes this smatch warning: unsigned '--un->un_open_count' is never less than zero The code decremented the un_open_count variable and tested to see if it was less than zero. Because un_open_count is unsigned and can't be below zero, this test didn't work. Sign

[PATCH v2 3/5] staging: dgap: tty.c: removes smatch warnings "redundant null check"

2013-09-25 Thread Lidza Louina
fore freeing. This check isn't needed. Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_tty.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c index 0b3c039..59fda2e 100644 --- a/dri

Re: [PATCH v3 6/7] staging: dgnc: changes arguments in sizeof

2013-09-25 Thread Lidza Louina
On Wed, Sep 25, 2013 at 7:08 PM, Greg KH wrote: > On Mon, Sep 09, 2013 at 03:01:27PM -0400, Lidza Louina wrote: >> The arguments that were passed into sizeof were >> generic. This patch changes this by putting >> the actual item that we need a size of instead. >> >

[PATCH v2 2/5] staging: dgap: tty.c: removes smatch warning "ignoring unreachable code"

2013-09-25 Thread Lidza Louina
d-off-by: Lidza Louina --- drivers/staging/dgap/dgap_tty.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c index 2b26152..0b3c039 100644 --- a/drivers/staging/dgap/dgap_tty.c +++ b/drivers/staging/dgap/dgap_

[PATCH v2 4/5] staging: dgap: tty.c: changes error handing to tty driver allocations

2013-09-25 Thread Lidza Louina
e brd->SerialDriver->ttys or brd->PrintDriver->ttys allocation will fail. It now calls put_tty_driver on that driver after it fails and returns -ENOMEM. Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_tty.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletio

[PATCH v2 1/5] staging: dgap: driver.c: removes smatch warning "redundant null check"

2013-09-25 Thread Lidza Louina
This patch removes these smatch warnings from dgap_driver.c: redundant null check on dgap_config_buf calling kfree() redundant null check on brd->flipbuf calling kfree() redundant null check on brd->flipflagbuf calling kfree() Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_dr

Re: [PATCH 5/6] staging: dgap: tty.c: removes smatch warnings "potential null dereference"

2013-09-25 Thread Lidza Louina
On Wed, Sep 25, 2013 at 6:29 PM, Dan Carpenter wrote: > On Wed, Sep 25, 2013 at 06:13:47PM -0400, Lidza Louina wrote: >> On Wed, Sep 25, 2013 at 2:34 PM, Dan Carpenter >> wrote: >> > On Wed, Sep 25, 2013 at 01:22:08PM -0400, Lidza Louina wrote: >> >> >>

Re: [PATCH 5/6] staging: dgap: tty.c: removes smatch warnings "potential null dereference"

2013-09-25 Thread Lidza Louina
On Wed, Sep 25, 2013 at 2:34 PM, Dan Carpenter wrote: > On Wed, Sep 25, 2013 at 01:22:08PM -0400, Lidza Louina wrote: >> >> I looked at other uses of the function alloc_tty_driver() in >> the kernel and none of them seem to follow up with a >> call to kfree(). > >

Re: [PATCH 5/6] staging: dgap: tty.c: removes smatch warnings "potential null dereference"

2013-09-25 Thread Lidza Louina
On Tue, Sep 24, 2013 at 3:20 PM, Dan Carpenter wrote: > On Tue, Sep 24, 2013 at 02:40:10PM -0400, Lidza Louina wrote: >> Instead of writing: >> brd->SerialDriver = alloc_tty_driver(MAXPORTS); >> if (!brd->SerialDriver){ >> goto free

Re: [PATCH 5/6] staging: dgap: tty.c: removes smatch warnings "potential null dereference"

2013-09-24 Thread Lidza Louina
On Mon, Sep 23, 2013 at 8:27 PM, Dan Carpenter wrote: > On Mon, Sep 23, 2013 at 06:47:16PM -0400, Lidza Louina wrote: >> This patch removes these warnings: >> potential null dereference 'brd->SerialDriver'. (alloc_tty_driver returns >> null) >> pote

Re: [PATCH 2/6] staging: dgap: fep5.c: removes smatch warning "missing break? reassigning 'ch->pscan_state'"

2013-09-24 Thread Lidza Louina
On Mon, Sep 23, 2013 at 8:10 PM, Dan Carpenter wrote: > On Tue, Sep 24, 2013 at 03:06:06AM +0300, Dan Carpenter wrote: >> On Mon, Sep 23, 2013 at 06:47:13PM -0400, Lidza Louina wrote: >> > This patch removes this smatch warning: >> > warn: missing break? reassignin

Re: [PATCH 6/6] staging: dgap: tty.c: removes smatch warning "unsigned '--un->un_open_count' is never less than zero"

2013-09-24 Thread Lidza Louina
On Mon, Sep 23, 2013 at 8:00 PM, Dan Carpenter wrote: > On Mon, Sep 23, 2013 at 06:47:17PM -0400, Lidza Louina wrote: >> This patch removes this smatch warning: >> unsigned '--un->un_open_count' is never less than zero >> >> The code decremented the un_ope

Re: [PATCH] MAINTAINERS: staging: dgnc and dgap drivers: add maintainer

2013-09-23 Thread Lidza Louina
On Mon, Sep 23, 2013 at 6:16 PM, Dan Carpenter wrote: > On Mon, Sep 23, 2013 at 04:22:10PM -0400, Lidza Louina wrote: >> Awesome, thanks. >> >> Btw, are will still in the merge window? Do you need me to send out >> fixes for warnings (sparse or smatch) or can I send thi

[PATCH 5/6] staging: dgap: tty.c: removes smatch warnings "potential null dereference"

2013-09-23 Thread Lidza Louina
e serial and print drivers were allocated and not null before being initialized. This patch adds that check. Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_tty.c | 103 +--- 1 file changed, 54 insertions(+), 49 deletions(-) diff --git a/drivers/st

[PATCH 3/6] staging: dgap: tty.c: removes smatch warning "ignoring unreachable code"

2013-09-23 Thread Lidza Louina
d-off-by: Lidza Louina --- drivers/staging/dgap/dgap_tty.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c index 2b26152..7f909b8 100644 --- a/drivers/staging/dgap/dgap_tty.c +++ b/drivers/staging/dgap/dgap_

[PATCH 6/6] staging: dgap: tty.c: removes smatch warning "unsigned '--un->un_open_count' is never less than zero"

2013-09-23 Thread Lidza Louina
work. This patch tests un_open_count against 0 without decrementing it. Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c index 8f0a824..f496710 100644 ---

[PATCH 1/6] staging: dgap: driver.c: removes smatch warning "redundant null check"

2013-09-23 Thread Lidza Louina
This patch removes these smatch warnings from dgap_driver.c: redundant null check on dgap_config_buf calling kfree() redundant null check on brd->flipbuf calling kfree() redundant null check on brd->flipflagbuf calling kfree() Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_dr

[PATCH 2/6] staging: dgap: fep5.c: removes smatch warning "missing break? reassigning 'ch->pscan_state'"

2013-09-23 Thread Lidza Louina
This patch removes this smatch warning: warn: missing break? reassigning 'ch->pscan_state' Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_fep5.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgap/dgap_fep5.c b/drivers

[PATCH 4/6] staging: dgap: tty.c: removes smatch warnings "redundant null check"

2013-09-23 Thread Lidza Louina
fore freeing. This check isn't needed. Signed-off-by: Lidza Louina --- drivers/staging/dgap/dgap_tty.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c index 7f909b8..924e2bf 100644 --- a/dri

Re: [PATCH] MAINTAINERS: staging: dgnc and dgap drivers: add maintainer

2013-09-23 Thread Lidza Louina
On Mon, Sep 23, 2013 at 4:16 PM, Greg KH wrote: > On Mon, Sep 23, 2013 at 04:13:15PM -0400, Lidza Louina wrote: >> This patch adds the staging/dgnc [DIGI NEO AND CLASSIC >> PCI PRODUCTS] and staging/dgap [DIGI EPCA PCI PRODUCTS] >> drivers to the MAINTAINERS file. I am listed

[PATCH] MAINTAINERS: staging: dgnc and dgap drivers: add maintainer

2013-09-23 Thread Lidza Louina
This patch adds the staging/dgnc [DIGI NEO AND CLASSIC PCI PRODUCTS] and staging/dgap [DIGI EPCA PCI PRODUCTS] drivers to the MAINTAINERS file. I am listed as the maintainer and the driverdev-devel list is the mailing list for these drivers. Signed-off-by: Lidza Louina --- MAINTAINERS | 12

Re: [PATCH v3 3/7] staging: dgnc: removes casting around kzalloc

2013-09-12 Thread Lidza Louina
On Thu, Sep 12, 2013 at 6:00 PM, Greg KH wrote: > On Mon, Sep 09, 2013 at 03:01:24PM -0400, Lidza Louina wrote: >> This patch removes casting around kzalloc calls. >> The casts aren't needed because kzalloc returns >> a void pointer. >> >> Signed-off-by: Li

Re: [PATCH v3 7/7] staging: dgnc: tty.c: replaces kzalloc with kcalloc for arrays

2013-09-12 Thread Lidza Louina
On Tue, Sep 10, 2013 at 6:05 PM, Dan Carpenter wrote: > This one is not right. > > On Mon, Sep 09, 2013 at 03:01:28PM -0400, Lidza Louina wrote: >> This patch replaces kzalloc with kcalloc when using >> arrays. kcalloc is better suited for arrays because >>

Re: [PATCH v3 1/7] staging: dgnc: renames board_t to dgnc_board

2013-09-12 Thread Lidza Louina
On Tue, Sep 10, 2013 at 6:12 PM, Dan Carpenter wrote: > On Mon, Sep 09, 2013 at 03:01:22PM -0400, Lidza Louina wrote: >> This patch renames the struct board_t to dgnc_board. board_t >> wasn't a good name for it since the _t suffix is for typedefs. >> >> Signed-off-

[PATCH v3 2/7] staging: dgnc: removes parentheses around return statements

2013-09-10 Thread Lidza Louina
This patch removes parentheses around return statements. They aren't needed. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_cls.c| 8 +- drivers/staging/dgnc/dgnc_driver.c | 106 +-- drivers/staging/dgnc/dgnc_mgmt.c | 22 ++-- drivers/staging/dgnc/dgnc_

[PATCH v3 4/7] staging: dgnc: removes kzalloc error messages

2013-09-10 Thread Lidza Louina
This patch removes the error messages associated with errors in kzalloc. The driver doesn't need to add the error message because kzalloc already prints a more useful message. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 2 -- drivers/staging/dgnc/dgnc_tty.c

[PATCH v3 5/7] staging: dgnc: removes LINUX_VERSION_CODE conditionals

2013-09-10 Thread Lidza Louina
This patch removes the conditionals that make sure the driver supports various versions of the kernel. They aren't needed. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 12 drivers/staging/dgnc/dgnc_kcompat.h | 24 --- drivers/staging/dgnc/dgnc_

[PATCH v3 3/7] staging: dgnc: removes casting around kzalloc

2013-09-10 Thread Lidza Louina
This patch removes casting around kzalloc calls. The casts aren't needed because kzalloc returns a void pointer. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver

[PATCH v3 6/7] staging: dgnc: changes arguments in sizeof

2013-09-10 Thread Lidza Louina
The arguments that were passed into sizeof were generic. This patch changes this by putting the actual item that we need a size of instead. For example: - kzalloc(sizeof(struct dgnc_board), GFP_KERNEL); + kzalloc(sizeof(*brd), GFP_KERNEL); Signed-off-by: Lidza Louina --- drivers/staging

[PATCH v3 1/7] staging: dgnc: renames board_t to dgnc_board

2013-09-10 Thread Lidza Louina
This patch renames the struct board_t to dgnc_board. board_t wasn't a good name for it since the _t suffix is for typedefs. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_cls.c| 14 +-- drivers/staging/dgnc/dgnc_driver.c | 20 +++ drivers/staging

[PATCH v3 7/7] staging: dgnc: tty.c: replaces kzalloc with kcalloc for arrays

2013-09-10 Thread Lidza Louina
This patch replaces kzalloc with kcalloc when using arrays. kcalloc is better suited for arrays because it has overflow protection. Reported-by: Dan Carpenter Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_tty.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

Re: [PATCH v2 4/6] staging: dgnc: removes kzalloc error messages

2013-09-10 Thread Lidza Louina
On Fri, Sep 6, 2013 at 5:50 PM, Dan Carpenter wrote: > On Fri, Sep 06, 2013 at 04:48:30PM -0400, Lidza Louina wrote: >> This patch removes the error messages associated >> with errors in kzalloc. The driver doesn't need to >> add the error message because kzalloc alrea

Re: [PATCH v2 6/6] staging: dgnc: changes arguments in sizeof

2013-09-10 Thread Lidza Louina
On Fri, Sep 6, 2013 at 5:45 PM, Dan Carpenter wrote: > On Fri, Sep 06, 2013 at 04:48:32PM -0400, Lidza Louina wrote: >> The arguments that are passed into sizeof were >> generic. This patch changes this by putting >> the actual item that we need a size of inste

[PATCH v2 5/6] staging: dgnc: removes LINUX_VERSION_CODE conditionals

2013-09-06 Thread Lidza Louina
This patch removes the conditionals that make sure the driver supports various versions of the kernel. They aren't needed. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 12 drivers/staging/dgnc/dgnc_kcompat.h | 24 --- drivers/staging/dgnc/dgnc_

[PATCH v2 2/6] staging: dgnc: removes parentheses around return statements

2013-09-06 Thread Lidza Louina
This patch removes parentheses around return statements. They aren't needed. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_cls.c| 8 +- drivers/staging/dgnc/dgnc_driver.c | 106 +-- drivers/staging/dgnc/dgnc_mgmt.c | 22 ++-- drivers/staging/dgnc/dgnc_

[PATCH v2 3/6] staging: dgnc: removes casting around kzalloc

2013-09-06 Thread Lidza Louina
This patch removes casting around kzalloc calls. The casts aren't needed because kzalloc returns a void pointer. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver

[PATCH v2 4/6] staging: dgnc: removes kzalloc error messages

2013-09-06 Thread Lidza Louina
This patch removes the error messages associated with errors in kzalloc. The driver doesn't need to add the error message because kzalloc already prints a more useful message. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 2 -- drivers/staging/dgnc/dgnc_tty.c

[PATCH v2 6/6] staging: dgnc: changes arguments in sizeof

2013-09-06 Thread Lidza Louina
The arguments that are passed into sizeof were generic. This patch changes this by putting the actual item that we need a size of instead. For example: - kzalloc(sizeof(struct dgnc_board), GFP_KERNEL); + kzalloc(sizeof(brd), GFP_KERNEL); Signed-off-by: Lidza Louina --- drivers/staging/dgnc

[PATCH v2 1/6] staging: dgnc: renames board_t to dgnc_board

2013-09-06 Thread Lidza Louina
This patch renames the struct board_t to dgnc_board. board_t wasn't a good name for it since the _t suffix is for typedefs. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_cls.c| 14 +-- drivers/staging/dgnc/dgnc_driver.c | 20 +++ drivers/staging

Re: [PATCH 02/12] staging: dgnc: replaces generic struct from sizeof calls

2013-09-03 Thread Lidza Louina
On Sun, Sep 1, 2013 at 7:50 PM, Dan Carpenter wrote: > On Sat, Aug 31, 2013 at 06:19:10PM -0400, Lidza Louina wrote: >> This patch replaces all instances of "sizeof(struct" >> with actual instances of the struct. For example >> "sizeof(struct tty_str

Re: [PATCH 06/12] staging: dgnc: removes kzalloc error statements

2013-09-03 Thread Lidza Louina
On Sun, Sep 1, 2013 at 8:14 PM, Dan Carpenter wrote: > The point I was trying to make earlier was that I don't like knee jerk > error messages. Some people put an error message after every line > without thinking about it. It's a very common source of bugs is to > have a NULL dereference like: >

Re: [PATCH 03/12] staging: dgnc: driver.h: adds struct dgnc_board

2013-09-03 Thread Lidza Louina
On Sun, Sep 1, 2013 at 8:07 PM, Dan Carpenter wrote: > On Sat, Aug 31, 2013 at 06:19:11PM -0400, Lidza Louina wrote: >> This patch adds the dgnc_board struct to driver.h. >> This struct will replace board_t in this driver. >> > > So on this one patches 3, 4 and 5 sh

[PATCH 05/12] staging: dgnc: driver.h: removes struct board_t

2013-08-31 Thread Lidza Louina
This patch removes the struct board_t. This struct was replaced with dgnc_board in a previous patch. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.h | 85 -- 1 file changed, 85 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.h

[PATCH 10/12] staging: dgnc: neo.c: checkpatch: removes parentheses around return statements

2013-08-31 Thread Lidza Louina
This patch removes this checkpatch warning: ERROR: return is not a function, parentheses are not required. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_neo.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers

[PATCH 06/12] staging: dgnc: removes kzalloc error statements

2013-08-31 Thread Lidza Louina
This patch removes the error statements that follow kzalloc. These are useless because kzalloc has its own error statement and the driver's error handling would never actually happen. Reported-by: Dan Carpenter Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c

[PATCH 02/12] staging: dgnc: replaces generic struct from sizeof calls

2013-08-31 Thread Lidza Louina
This patch replaces all instances of "sizeof(struct" with actual instances of the struct. For example "sizeof(struct tty_struct" is replaced with "sizeof(brd->SerialDriver.ttys". This patch affects driver.c, mgmt.c and tty.c. Signed-off-by: Lidza Louina --- d

[PATCH 09/12] staging: dgnc: mgmt.c: checkpatch: removes parentheses around return statements

2013-08-31 Thread Lidza Louina
This patch removes this checkpatch warning: ERROR: return is not a function, parentheses are not required. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_mgmt.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/dgnc

[PATCH 11/12] staging: dgnc: sysfs.c: checkpatch: removes parentheses around return statements

2013-08-31 Thread Lidza Louina
This patch removes this checkpatch warning: ERROR: return is not a function, parentheses are not required. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_sysfs.c | 116 +++--- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers

[PATCH 12/12] staging: dgnc: tty.c: checkpatch: removes parentheses around return statements

2013-08-31 Thread Lidza Louina
This patch removes this checkpatch warning: ERROR: return is not a function, parentheses are not required. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_tty.c | 200 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/drivers

[PATCH 04/12] staging: dgnc: replaces struct board_t with dgnc_board

2013-08-31 Thread Lidza Louina
This patch replaces struct board_t with dgnc_board. It contains the exact same information as board_t. This change was made because board_t isn't descriptive and the _t denotes a typedef, which it is not. Reported-by: Dan Carpenter Signed-off-by: Lidza Louina --- drivers/staging

[PATCH 08/12] staging: dgnc: driver.c: checkpatch: removes parentheses around return statements

2013-08-31 Thread Lidza Louina
This patch removes this checkpatch warning: ERROR: return is not a function, parentheses are not required. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 102 ++--- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/drivers

[PATCH 03/12] staging: dgnc: driver.h: adds struct dgnc_board

2013-08-31 Thread Lidza Louina
This patch adds the dgnc_board struct to driver.h. This struct will replace board_t in this driver. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.h | 85 ++ 1 file changed, 85 insertions(+) diff --git a/drivers/staging/dgnc/dgnc_driver.h

[PATCH 07/12] staging: dgnc: cls.c: checkpatch: removes parentheses around return statements

2013-08-31 Thread Lidza Louina
This patch removes this checkpatch warning: ERROR: return is not a function, parentheses are not required. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_cls.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers

[PATCH 01/12] staging: dgnc: removes casting when using kzalloc

2013-08-31 Thread Lidza Louina
This patch removes casting that is used when kzalloc is called. Casting isn't needed because kzalloc returns a void pointer. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging

Re: [PATCH] staging: dgnc: adds TODO

2013-08-31 Thread Lidza Louina
On Fri, Aug 30, 2013 at 2:28 PM, Greg KH wrote: > On Thu, Aug 29, 2013 at 07:00:37PM -0400, Lidza Louina wrote: >> This patchs adds a TODO for the driver. >> >> Signed-off-by: Lidza Louina >> --- >> drivers/staging/dgnc/TODO | 17 + >> 1 fi

[PATCH] staging: dgnc: adds TODO

2013-08-29 Thread Lidza Louina
This patchs adds a TODO for the driver. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/TODO | 17 + 1 file changed, 17 insertions(+) create mode 100644 drivers/staging/dgnc/TODO diff --git a/drivers/staging/dgnc/TODO b/drivers/staging/dgnc/TODO new file mode 100644 index

Re: [PATCH v2 2/3] staging: dgnc: driver.c and tty.c: replaces dgnc_driver_kzmalloc with kzalloc

2013-08-28 Thread Lidza Louina
On Wed, Aug 28, 2013 at 4:30 AM, Dan Carpenter wrote: > On Tue, Aug 27, 2013 at 10:13:27PM -0400, Lidza Louina wrote: >> @@ -501,7 +501,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) >> >> /* get the board structure and prep it */ >> brd

Re: [PATCH v2 2/3] staging: dgnc: driver.c and tty.c: replaces dgnc_driver_kzmalloc with kzalloc

2013-08-28 Thread Lidza Louina
On Wed, Aug 28, 2013 at 4:30 AM, Dan Carpenter wrote: > On Tue, Aug 27, 2013 at 10:13:27PM -0400, Lidza Louina wrote: >> @@ -501,7 +501,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) >> >> /* get the board structure and prep it */ >> brd

Re: [PATCH v2 2/3] staging: dgnc: driver.c and tty.c: replaces dgnc_driver_kzmalloc with kzalloc

2013-08-28 Thread Lidza Louina
On Wed, Aug 28, 2013 at 12:54 AM, Greg KH wrote: > I'll take this for now, but all of these casts of the kzalloc() call > need to go away, as they are pointless (kzalloc() returns a void *, > which automatically can be assigned to any pointer type, no need to be > explicit about it.) > > So that m

Re: [PATCH v2 3/3] staging: dgnc: driver.c and .h: removes dgnc_driver_kzmalloc func

2013-08-28 Thread Lidza Louina
On Wed, Aug 28, 2013 at 6:34 PM, Lidza Louina wrote: > On Wed, Aug 28, 2013 at 12:57 AM, Greg KH wrote: >> On Tue, Aug 27, 2013 at 10:13:28PM -0400, Lidza Louina wrote: >>> This patch removes the dgnc_driver_kzmalloc function from >>> driver.c and driver.h. A

Re: [PATCH v2 3/3] staging: dgnc: driver.c and .h: removes dgnc_driver_kzmalloc func

2013-08-28 Thread Lidza Louina
On Wed, Aug 28, 2013 at 12:57 AM, Greg KH wrote: > On Tue, Aug 27, 2013 at 10:13:28PM -0400, Lidza Louina wrote: >> This patch removes the dgnc_driver_kzmalloc function from >> driver.c and driver.h. A previous patch replaced all >> dgnc_driver_kzmalloc function calls with

[PATCH v2 1/3] staging: dgnc: tty.c: updates uart_struct declaration for sparse

2013-08-27 Thread Lidza Louina
) expected struct neo_uart_struct [noderef] *ch_neo_uart got struct neo_uart_struct * warning: incorrect type in assignment (different address spaces) expected struct cls_uart_struct [noderef] *ch_cls_uart got struct cls_uart_struct * Signed-off-by: Lidza Louina --- drivers/staging/dgnc

[PATCH v2 3/3] staging: dgnc: driver.c and .h: removes dgnc_driver_kzmalloc func

2013-08-27 Thread Lidza Louina
This patch removes the dgnc_driver_kzmalloc function from driver.c and driver.h. A previous patch replaced all dgnc_driver_kzmalloc function calls with kzalloc. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 15 --- drivers/staging/dgnc/dgnc_driver.h | 1 - 2

[PATCH v2 2/3] staging: dgnc: driver.c and tty.c: replaces dgnc_driver_kzmalloc with kzalloc

2013-08-27 Thread Lidza Louina
This patch replaces dgnc_driver_kzmalloc with kzalloc. A patch that follows removes the dgnc_driver_kzmalloc function. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 6 +++--- drivers/staging/dgnc/dgnc_tty.c| 20 ++-- 2 files changed, 13 insertions

Re: [PATCH 1/2] staging: dgnc: driver.c: removes dgnc_driver_kzmalloc func

2013-08-27 Thread Lidza Louina
On Tue, Aug 27, 2013 at 7:48 PM, Greg KH wrote: > On Tue, Aug 27, 2013 at 06:19:43PM -0400, Lidza Louina wrote: >> This patch removes the dgnc_driver_kzmalloc function from >> driver.c. The patch that follows replaces all >> dgnc_driver_kzmalloc functions calls with kzall

Re: [PATCH 1/2] staging: dgnc: driver.c: removes dgnc_driver_kzmalloc func

2013-08-27 Thread Lidza Louina
On Tue, Aug 27, 2013 at 7:29 PM, Dan Carpenter wrote: > On Tue, Aug 27, 2013 at 06:19:43PM -0400, Lidza Louina wrote: >> This patch removes the dgnc_driver_kzmalloc function from >> driver.c. The patch that follows replaces all >> dgnc_driver_kzmalloc functions calls wit

[PATCH 1/2] staging: dgnc: driver.c: removes dgnc_driver_kzmalloc func

2013-08-27 Thread Lidza Louina
This patch removes the dgnc_driver_kzmalloc function from driver.c. The patch that follows replaces all dgnc_driver_kzmalloc functions calls with kzalloc. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 15 --- 1 file changed, 15 deletions(-) diff --git a

[PATCH 2/2] staging: dgnc: driver.c and tty.c: replaces dgnc_driver_kzmalloc with kzalloc

2013-08-27 Thread Lidza Louina
This patch replaces dgnc_driver_kzmalloc with kzalloc. A previous patch removed that function from the code. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 6 +++--- drivers/staging/dgnc/dgnc_tty.c| 20 ++-- 2 files changed, 13 insertions(+), 13

Re: [PATCH] staging: dgnc: driver.c and .h: changes kzmalloc param for sparse

2013-08-27 Thread Lidza Louina
On Tue, Aug 27, 2013 at 2:46 PM, Dan Carpenter wrote: > On Tue, Aug 27, 2013 at 11:20:06AM -0400, Lidza Louina wrote: >> This patch changes the dgnc_driver_kzmalloc declaration. >> The kernel's kmalloc function previously took an int >> priority. That's been repla

[PATCH] staging: dgnc: tty.c: updates uart_struct declaration for sparse

2013-08-27 Thread Lidza Louina
) expected struct neo_uart_struct [noderef] *ch_neo_uart got struct neo_uart_struct * warning: incorrect type in assignment (different address spaces) expected struct cls_uart_struct [noderef] *ch_cls_uart got struct cls_uart_struct * Signed-off-by: Lidza Louina --- drivers/staging/dgnc

  1   2   3   >