Re: [PATCH] Staging/comedi: Fixes static analysis warning raised by sparse

2014-06-30 Thread Christopher Li
On Mon, Jun 30, 2014 at 10:49 AM, Christopher Li wrote: > The warning should be trivial in instruction level. We are looking > for an instruction has larger than type size constant shift > value. Actually, just try it. Not as trivial as I thought. The problem is that, in the instruct

Re: [PATCH] Staging/comedi: Fixes static analysis warning raised by sparse

2014-06-30 Thread Christopher Li
On Sat, Jun 28, 2014 at 8:09 PM, Christopher Li wrote: > So if there is a bug, It is sparse did not know exactly which part > of the code is dead on AST level. If you enable the "#if 0" inside I am thinking about how to fix the dead code issue. Try to do more than trivial dead

Re: [PATCH] Staging/comedi: Fixes static analysis warning raised by sparse

2014-06-28 Thread Christopher Li
On Sat, Jun 28, 2014 at 12:20 PM, Josh Triplett wrote: > Except that "filter" has an "int channel" (signed), so it can > successfully test "channel < 0" and return early; it'll never call > ni_stc_dma_channel_select_bitfield(channel) with a negative number. > > I do agree that this code should sor

Re: [PATCH] Staging/comedi: Fixes static analysis warning raised by sparse

2014-06-28 Thread Christopher Li
Sorry for the late reply. On Wed, Jun 11, 2014 at 2:45 PM, wrote: > On Thu, Jun 12, 2014 at 12:24:25AM +0300, Dan Carpenter wrote: >> Let's forward this to the Sparse mailing list. >> >> We're seeing a Sparse false positive testing No, this is a valid complain. See my point follows. >> drivers

Re: [PATCH] staging: rtl8192u: initialize array in C compliant way

2014-05-10 Thread Christopher Li
On Tue, May 6, 2014 at 1:47 AM, Dan Carpenter wrote: >> diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c >> b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c >> index 426f223..c96dbab 100644 >> --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c >> +++ b/drivers/staging/

Re: [PATCH] staging: rtl8192u: initialize array in C compliant way

2014-05-06 Thread Christopher Li
On Tue, May 6, 2014 at 1:47 AM, Dan Carpenter wrote: >> - boolsearch_dir[4] = {0, 0, 0, 0}; >> + boolsearch_dir[4] = {0}; > > That's weird. The original code is valid but it generates a sparse > warning. > > drivers/staging/rtl8192u/