From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Thu, 20 Jun 2013 08:19:33 +0300 Subject: [U-Boot] [PATCH] gpio: omap_gpio: Remove check_gpio() function In-Reply-To: <1371690189.3940.1.camel@phoenix> References: <1371690189.3940.1.camel@phoenix> Message-ID: <51C290E5.50703@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Axel, On 06/20/2013 04:03 AM, Axel Lin wrote: > check_gpio() and gpio_is_valid() are both used to check if a gpio is valid or > not. It looks pointless to have both function because we can just call > gpio_is_valid() instead of check_gpio(). Thus remove check_gpio() function. I don't see the benefit in this patch. The functions clearly exist for different reasons: gpio_is_valid() is part of the gpio api, while check_gpio() exists to attach an error message to a failed validity check without causing code duplication all over omap_gpio.c. Essentially what you are doing is removing a helpful error message. -- Regards, Nikita.