Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbdHARZy (ORCPT ); Tue, 1 Aug 2017 13:25:54 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37625 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbdHARZx (ORCPT ); Tue, 1 Aug 2017 13:25:53 -0400 From: Ashish Kalra To: gregkh@linuxfoundation.org, wsa@the-dreams.de, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, joe@perches.com, eashishkalra@gmail.com Subject: [PATCH v2]staging: ks7010: fix styling WARNINGs Date: Tue, 1 Aug 2017 18:25:36 +0100 Message-Id: <1501608336-9426-1-git-send-email-eashishkalra@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501604576.7190.7.camel@perches.com> References: <1501604576.7190.7.camel@perches.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2371 Lines: 65 Signed-off-by: Ashish Kalra Trivial style changes. There are still "line over 80 characters" checkpatch.pl warnings, but I think they are best left alone as breaking these could hurt readability v2: Updated Patch as per review comments recievd --- drivers/staging/ks7010/ks7010_sdio.c | 42 +++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 9b28ee1..091dedd 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -32,19 +32,35 @@ }; MODULE_DEVICE_TABLE(sdio, ks7010_sdio_ids); -#define inc_txqhead(priv) \ - (priv->tx_dev.qhead = (priv->tx_dev.qhead + 1) % TX_DEVICE_BUFF_SIZE) -#define inc_txqtail(priv) \ - (priv->tx_dev.qtail = (priv->tx_dev.qtail + 1) % TX_DEVICE_BUFF_SIZE) -#define cnt_txqbody(priv) \ - (((priv->tx_dev.qtail + TX_DEVICE_BUFF_SIZE) - (priv->tx_dev.qhead)) % TX_DEVICE_BUFF_SIZE) - -#define inc_rxqhead(priv) \ - (priv->rx_dev.qhead = (priv->rx_dev.qhead + 1) % RX_DEVICE_BUFF_SIZE) -#define inc_rxqtail(priv) \ - (priv->rx_dev.qtail = (priv->rx_dev.qtail + 1) % RX_DEVICE_BUFF_SIZE) -#define cnt_rxqbody(priv) \ - (((priv->rx_dev.qtail + RX_DEVICE_BUFF_SIZE) - (priv->rx_dev.qhead)) % RX_DEVICE_BUFF_SIZE) +static void inc_txqhead(struct ks_wlan_private *priv) +{ + priv->tx_dev.qhead = (priv->tx_dev.qhead + 1) % TX_DEVICE_BUFF_SIZE; +} + +static void inc_txqtail(struct ks_wlan_private *priv) +{ + priv->tx_dev.qtail = (priv->tx_dev.qtail + 1) % TX_DEVICE_BUFF_SIZE; +} + +static void inc_rxqtail(struct ks_wlan_private *priv) +{ + priv->rx_dev.qtail = (priv->rx_dev.qtail + 1) % RX_DEVICE_BUFF_SIZE; +} + +static void inc_rxqhead(struct ks_wlan_private *priv) +{ + priv->rx_dev.qhead = (priv->rx_dev.qhead + 1) % RX_DEVICE_BUFF_SIZE; +} + +static unsigned int cnt_rxqbody(struct ks_wlan_private *priv) +{ + return (((priv->rx_dev.qtail + RX_DEVICE_BUFF_SIZE) - (priv->rx_dev.qhead)) % RX_DEVICE_BUFF_SIZE); +} + +static unsigned int cnt_txqbody(struct ks_wlan_private *priv) +{ + return (((priv->tx_dev.qtail + TX_DEVICE_BUFF_SIZE) - (priv->tx_dev.qhead)) % TX_DEVICE_BUFF_SIZE); +} /* Read single byte from device address into byte (CMD52) */ static int ks7010_sdio_readb(struct ks_wlan_private *priv, unsigned int address, -- 1.9.1