From patchwork Mon Jun 8 19:03:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lockyer X-Patchwork-Id: 481990 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E60A81401F6 for ; Tue, 9 Jun 2015 05:03:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=0GbNWV6n; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752750AbbFHTDJ (ORCPT ); Mon, 8 Jun 2015 15:03:09 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:35658 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752408AbbFHTDH (ORCPT ); Mon, 8 Jun 2015 15:03:07 -0400 Received: by wiga1 with SMTP id a1so96450826wig.0 for ; Mon, 08 Jun 2015 12:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=vyWfSiLhKkmUv0J8s+VRMTahzbbsX1ya3E5egt8nOM8=; b=0GbNWV6n0oC1H37HxBwBNKEMmXUOEq+VNin+jDZsgScZN/p8DNBz3xDZFXn+bue7DI MoxhAGbIT05txb7MZQp+nPNTM/ax8dPlmjHLbGM8G6NnaM+fo+WkAGQVpDWRYRPuelw/ llmTqQl/nazlO6sFoFYsV2Y6Dkg8rYf90Hxdn7QrkU1DpwxH627mVzDXLtzcAqcXISTC QJV0NOD0xVzO8YIZXAAZcmxrcTohIYrUYB3lkxjHTuvNcu8Z0oEixM2BTU3woDcpirAd EKcWOQ9BfvaQskWVF8EI6pRiHcfgwC+QllxZESVuwO0zm+4i9soUjHkoHexPriO9IHfg temA== X-Received: by 10.180.20.12 with SMTP id j12mr1112672wie.4.1433790186452; Mon, 08 Jun 2015 12:03:06 -0700 (PDT) Received: from eve ([152.78.168.81]) by mx.google.com with ESMTPSA id fa8sm2427561wib.14.2015.06.08.12.03.06 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Jun 2015 12:03:06 -0700 (PDT) Date: Mon, 8 Jun 2015 20:03:05 +0100 From: Daniel Lockyer To: linus.walleij@linaro.org Cc: gnurou@gmail.com, linux-gpio@vger.kernel.org Subject: [PATCH] GPIO: Fix checkpatch.pl issues Message-ID: <20150608190305.GA11525@eve.soton.ac.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Fixed issues include indenting and spacing. Nothing particularly notable. Signed-off-by: Daniel Lockyer --- drivers/gpio/gpio-altera.c | 3 ++- drivers/gpio/gpio-crystalcove.c | 3 +-- drivers/gpio/gpio-f7188x.c | 4 ++-- drivers/gpio/gpio-it8761e.c | 2 +- drivers/gpio/gpiolib.c | 19 ++++++++----------- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c index 449fb46..0f3d336 100644 --- a/drivers/gpio/gpio-altera.c +++ b/drivers/gpio/gpio-altera.c @@ -107,7 +107,8 @@ static int altera_gpio_irq_set_type(struct irq_data *d, return -EINVAL; } -static unsigned int altera_gpio_irq_startup(struct irq_data *d) { +static unsigned int altera_gpio_irq_startup(struct irq_data *d) +{ altera_gpio_irq_unmask(d); return 0; diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c index 91a7ffe..326f27b 100644 --- a/drivers/gpio/gpio-crystalcove.c +++ b/drivers/gpio/gpio-crystalcove.c @@ -94,9 +94,8 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type) { int reg; - if (gpio == 94) { + if (gpio == 94) return GPIOPANELCTL; - } if (reg_type == CTRL_IN) { if (gpio < 8) diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c index dbda843..5e3c4fa 100644 --- a/drivers/gpio/gpio-f7188x.c +++ b/drivers/gpio/gpio-f7188x.c @@ -172,7 +172,7 @@ static struct f7188x_gpio_bank f71869a_gpio_bank[] = { }; static struct f7188x_gpio_bank f71882_gpio_bank[] = { - F7188X_GPIO_BANK(0 , 8, 0xF0), + F7188X_GPIO_BANK(0, 8, 0xF0), F7188X_GPIO_BANK(10, 8, 0xE0), F7188X_GPIO_BANK(20, 8, 0xD0), F7188X_GPIO_BANK(30, 4, 0xC0), @@ -180,7 +180,7 @@ static struct f7188x_gpio_bank f71882_gpio_bank[] = { }; static struct f7188x_gpio_bank f71889_gpio_bank[] = { - F7188X_GPIO_BANK(0 , 7, 0xF0), + F7188X_GPIO_BANK(0, 7, 0xF0), F7188X_GPIO_BANK(10, 7, 0xE0), F7188X_GPIO_BANK(20, 8, 0xD0), F7188X_GPIO_BANK(30, 8, 0xC0), diff --git a/drivers/gpio/gpio-it8761e.c b/drivers/gpio/gpio-it8761e.c index dadfc24..30a8f24 100644 --- a/drivers/gpio/gpio-it8761e.c +++ b/drivers/gpio/gpio-it8761e.c @@ -123,7 +123,7 @@ static void it8761e_gpio_set(struct gpio_chip *gc, curr_vals = inb(reg); if (val) - outb(curr_vals | (1 << bit) , reg); + outb(curr_vals | (1 << bit), reg); else outb(curr_vals & ~(1 << bit), reg); diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 6bc612b..f2cab60 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1300,9 +1300,8 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip, continue; } /* set outputs if the corresponding mask bit is set */ - if (__test_and_clear_bit(i, mask)) { - chip->set(chip, i, test_bit(i, bits)); - } + if (__test_and_clear_bit(i, mask)) + chip->set(chip, i, test_bit(i, bits));} } } } @@ -1320,9 +1319,9 @@ static void gpiod_set_array_priv(bool raw, bool can_sleep, unsigned long bits[BITS_TO_LONGS(chip->ngpio)]; int count = 0; - if (!can_sleep) { + if (!can_sleep) WARN_ON(chip->can_sleep); - } + memset(mask, 0, sizeof(mask)); do { struct gpio_desc *desc = desc_array[i]; @@ -1337,24 +1336,22 @@ static void gpiod_set_array_priv(bool raw, bool can_sleep, * open drain and open source outputs are set individually */ if (test_bit(FLAG_OPEN_DRAIN, &desc->flags)) { - _gpio_set_open_drain_value(desc,value); + _gpio_set_open_drain_value(desc, value); } else if (test_bit(FLAG_OPEN_SOURCE, &desc->flags)) { _gpio_set_open_source_value(desc, value); } else { __set_bit(hwgpio, mask); - if (value) { + if (value) __set_bit(hwgpio, bits); - } else { + else __clear_bit(hwgpio, bits); - } count++; } i++; } while ((i < array_size) && (desc_array[i]->chip == chip)); /* push collected bits to outputs */ - if (count != 0) { + if (count != 0) gpio_chip_set_multiple(chip, mask, bits); - } } }