[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101006044400.GB5409@bicker>
Date:	Wed, 6 Oct 2010 06:44:00 +0200
From:	Dan Carpenter <error27@...il.com>
To:	Tracey Dent <tdent48227@...il.com>
Cc:	greg@...ah.com, abbotti@....co.uk, fmhess@...rs.sourceforge.net,
	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/28] Staging: comedi: kcomedilib: kcomedilib_main.c:
	Edit file so that checkpatch.pl has 0 errors and warnings
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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
