RE: Time for a code audit?

2016-05-02 Thread Sell, Timothy C
hony > Subject: Re: Time for a code audit? > > Reviewing drivers/staging/unisys/visornic/visornic_main.c > >212 static int >213 visor_copy_fragsinfo_from_skb(struct sk_buff *skb, unsigned int > firstfraglen, >214

Re: Time for a code audit?

2016-05-02 Thread Dan Carpenter
Reviewing drivers/staging/unisys/visorinput/visorinput.c 465 case KEY_NUMLOCK: 466 led = LED_NUML; 467 break; 468 default: 469 led = -1; Just make this a direct return. 470 break; 471

Re: Time for a code audit?

2016-05-02 Thread Dan Carpenter
Reviewing drivers/staging/unisys/visornic/visornic_main.c 212 static int 213 visor_copy_fragsinfo_from_skb(struct sk_buff *skb, unsigned int firstfraglen, 214unsigned int frags_max, 215struct phys_info frags[]) 216

Re: Time for a code audit?

2016-05-02 Thread Dan Carpenter
Reviewing drivers/staging/unisys/visorhba/visorhba_main.c visor_thread_start() I'm nervous about the error handling here. Is setting ->id to zero really sufficient to prevent dereferencing ->task? Still a lot of return -1; grep "return -1;" drivers/staging/unisys/ -R del_scsipending_ent() flip

RE: Time for a code audit?

2016-04-29 Thread Kershner, David A
sys.com>; *S-Par-Maintainer > <sparmaintai...@unisys.com> > Subject: Re: Time for a code audit? > ... > > Hi Dan, > > Thank you for this list! We'll get started on fixing these issues > immediately. I've run Smatch using the make options > > O=../builds/testbuild CC=gc

RE: Time for a code audit?

2016-02-23 Thread Kershner, David A
oundation.org; driverdev-devel@linuxdriverproject.org; Sell, > Timothy C <timothy.s...@unisys.com>; *S-Par-Maintainer > <sparmaintai...@unisys.com> > Subject: Re: Time for a code audit? > > On Tue, Feb 23, 2016 at 05:45:55PM +, Kershner, David A wrote: > > > > > >

Re: Time for a code audit?

2016-02-23 Thread Dan Carpenter
; > > Cc: gre...@linuxfoundation.org; driverdev-devel@linuxdriverproject.org; > > Sell, Timothy C <timothy.s...@unisys.com>; *S-Par-Maintainer > > <sparmaintai...@unisys.com> > > Subject: Re: Time for a code audit? > > > > I looked at the Smatch warni

RE: Time for a code audit?

2016-02-23 Thread Kershner, David A
<timothy.s...@unisys.com>; *S-Par-Maintainer > <sparmaintai...@unisys.com> > Subject: Re: Time for a code audit? > > I looked at the Smatch warnings, plus some bonus stuff I'm still working > on. > > drivers/staging/unisys/include/iochannel.h:592 add_physinfo_e

Re: Time for a code audit?

2016-02-16 Thread Ben Romer
On Sat, 2016-02-13 at 01:01 +0300, Dan Carpenter wrote: > I looked at the Smatch warnings, plus some bonus stuff I'm still > working > on. > > drivers/staging/unisys/include/iochannel.h:592 add_physinfo_entries() > warn: inconsistent indenting > drivers/staging/unisys/include/iochannel.h:596

Re: Time for a code audit?

2016-02-15 Thread Dan Carpenter
On Mon, Feb 15, 2016 at 05:35:01PM +, Sell, Timothy C wrote: > Re spaghetti: > > I certainly agree that most uses of 'goto' are evil. > But I've found that when 'goto' is used to provide a single common > exit-point for a function (e.g., "goto away"), it can lead to code > that is much more

RE: Time for a code audit?

2016-02-15 Thread Sell, Timothy C
> Sell, Timothy C; *S-Par-Maintainer > Subject: Re: Time for a code audit? > > I looked at the Smatch warnings, plus some bonus stuff I'm still working > on. > > drivers/staging/unisys/include/iochannel.h:592 add_physinfo_entries() > warn: inconsistent indenting

Re: Time for a code audit?

2016-02-13 Thread Greg KH
On Fri, Feb 12, 2016 at 02:01:06PM -0500, Ben Romer wrote: > Greg, > > Thank you very much for taking our patches. All of us here appreciate > it a lot. :) > > It looks to me like our driver set is clean as far as > checkpatch.pl is concerned - there's one error, which was said to be >

Re: Time for a code audit?

2016-02-12 Thread Dan Carpenter
I looked at the Smatch warnings, plus some bonus stuff I'm still working on. drivers/staging/unisys/include/iochannel.h:592 add_physinfo_entries() warn: inconsistent indenting drivers/staging/unisys/include/iochannel.h:596 add_physinfo_entries() warn: inconsistent indenting