Re: [PATCH 10/28] Staging: comedi: kcomedilib: kcomedilib_main.c: Edit file so that checkpatch.pl has 0 errors and warnings

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

 



On Tue, Oct 05, 2010 at 09:00:25PM -0400, Tracey Dent wrote:
> @@ -50,7 +50,7 @@ struct comedi_device *comedi_open(const char *filename)
>  	if (strncmp(filename, "/dev/comedi", 11) != 0)
>  		return NULL;
>  
> -	minor = simple_strtoul(filename + 11, NULL, 0);
> +	minor = strict_strtoul(filename + 11, NULL, 0);
>  

No, this doesn't work.  strict_strtoul() only returns zero and -EINVAL.
It doesn't return the number.

GCC even warns about this change:
drivers/staging/comedi/kcomedilib/kcomedilib_main.c: In function âcomedi_openâ:
drivers/staging/comedi/kcomedilib/kcomedilib_main.c:53: warning:
passing argument 2 of âstrict_strtoulâ makes integer from pointer without a cast

Please at least compile these before sending.  :(

>  	if (minor >= COMEDI_NUM_BOARD_MINORS)
>  		return NULL;

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


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux