From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Subject: Re: [PATCH 2/4] simplefb: Add support for enumerating simplefb dt nodes in /chosen Date: Thu, 13 Nov 2014 09:28:25 +0100 Message-ID: <54646BA9.10909@redhat.com> References: <1415830124-28787-1-git-send-email-hdegoede@redhat.com> <1415830124-28787-2-git-send-email-hdegoede@redhat.com> Reply-To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Geert Uytterhoeven Cc: Tomi Valkeinen , Stephen Warren , Jean-Christophe Plagniol-Villard , Grant Likely , Rob Herring , Luc Verhaegen , Maxime Ripard , Mike Turquette , David Herrmann , Linux Fbdev development list , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , devicetree , linux-sunxi List-Id: devicetree@vger.kernel.org Hi Geert, On 11/13/2014 09:16 AM, Geert Uytterhoeven wrote: > On Thu, Nov 13, 2014 at 9:15 AM, Geert Uytterhoeven > wrote: >> On Wed, Nov 12, 2014 at 11:08 PM, Hans de Goede wrote: >>> --- a/drivers/video/fbdev/simplefb.c >>> +++ b/drivers/video/fbdev/simplefb.c >> >>> @@ -385,7 +386,37 @@ static struct platform_driver simplefb_driver = { >>> .probe = simplefb_probe, >>> .remove = simplefb_remove, >>> }; >>> -module_platform_driver(simplefb_driver); >>> + >>> +static int __init simplefb_init(void) >>> +{ >>> + int i, ret; >> >> unsigned int i; Although you're right that it will never become negative, making this unsigned really gains us nothing, and it is normal C programming practice to use signed ints to loop over arrays even if the array index never becomes negative. So I see no reason to change this. Regards, Hans