Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754056Ab2EXIx5 (ORCPT ); Thu, 24 May 2012 04:53:57 -0400 Received: from mail.mev.co.uk ([62.49.15.74]:33896 "EHLO mail.mev.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753381Ab2EXIxy (ORCPT ); Thu, 24 May 2012 04:53:54 -0400 Message-ID: <4FBDF715.4050808@mev.co.uk> Date: Thu, 24 May 2012 09:53:41 +0100 From: Ian Abbott User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120516 Thunderbird/12.0.1 MIME-Version: 1.0 To: Dan Carpenter CC: H Hartley Sweeten , Ian Abbott , Linux Kernel , "devel@driverdev.osuosl.org" , "fmhess@users.sourceforge.net" , "gregkh@linuxfoundation.org" Subject: Re: [PATCH] staging: comedi: remove this_board macro in the s526 driver References: <201205221820.10770.hartleys@visionengravers.com> <20120523054849.GK4637@mwanda> <4FBCAB50.5000907@mev.co.uk> <20120523190715.GP4629@mwanda> In-Reply-To: <20120523190715.GP4629@mwanda> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1015 Lines: 22 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: )=- -=( 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/