Re: [bug report] usb: core: Add "quirks" parameter for usbcore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 23, 2018 at 02:16:23PM +0800, Kai-Heng Feng wrote:
> Hi Dan,
> 
> Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> 
> > Hello Kai-Heng Feng,
> > 
> > This is a semi-automatic email about new static checker warnings.
> 
> I ran Smatch but didn't see the error message:
> $ make -j`nproc` CHECK="~/smatch/smatch -p=kernel" C=1 bzImage modules | tee
> warns.txt`"
> 

You need to have the cross function database built.  It takes forever.
smatch_scripts/build_kernel_data.sh

> Also, "val" will never get passed as null in quirks_param_set() by the
> .set() caller, so it's actually superfluous.

Smatch tries not to warn about these if it's superfluous, but here it
thinks that val can be NULL from parse_one().  It's non-NULL from the
other two callers.

     kernel/params.c |            parse_one | (struct kernel_param_ops)->set |  PARAM_VALUE |  0 | val | 0,4096-2117777777777777778
     kernel/params.c |     param_attr_store | (struct kernel_param_ops)->set |  PARAM_VALUE |  0 | val | 500000000-577777777
     kernel/params.c |          param_array |  param_array param 7 |  PARAM_VALUE |  0 | val | 4096-2117777777777777777

Anwyway, we should probably remove the NULL check just for consistency.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux