Re: [PATCH] staging: comedi: remove this_board macro in the s526driver

From: Ian Abbott
Date: Thu May 24 2012 - 04:53:54 EST


On 2012-05-23 20:07, Dan Carpenter wrote:
On Wed, May 23, 2012 at 11:28:32AM -0500, H Hartley Sweeten wrote:
This would allow comedi_recognize() to walk the boardinfo
to find the match without all the ugly casts.

That function wouldn't be so bad if we just removed all the consts.
There is no point because we drop all of them anyway when we return
the struct.

Well maybe some of the consts. We could use const char **name_ptr instead of const char *const *name_ptr. *name_ptr is never modified, but as name_ptr is just a local variable, the compiler can figure that out for itself without the extra const.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/