Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp928670imm; Thu, 31 May 2018 11:56:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLTmLle6ui4tQ9nc8tPI7vR8xoiagI0cFsiNDwOAOSOyO3FhU0x+UON1rOur+FGUdGxHYxH X-Received: by 2002:a63:7341:: with SMTP id d1-v6mr6328325pgn.404.1527793008898; Thu, 31 May 2018 11:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527793008; cv=none; d=google.com; s=arc-20160816; b=fIyBIQb7CtRLAYwRXidvf87VUWS7wvhhD7ByeCt+SZpxSBYhqUBP8iEK/dvIBGusmV bN24GyIPYmQG0pOJTWncRH6mDaagBtzNU/2d5d/XqJ+0Zbo8VIR7vOaxS/CVBIW+aZOF irbGiW2n16avRl8nOcAJoNt19YjwSHMALv7rf94yR6j47faJEiHrHhXavR4r/dsyfkQh n3aw25a8qW32YMgUkn+s1+F0WHFlJRHVWEnoP3uGq6QbkGo3LRKvHdjukWTtcLUtZnNU +2TsyVihpU1m7fGHzxQvB4jhR11qBdEV86Dzra6YHx9Kls1uG4s8LgGatwFhlyhwu6HJ uruw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=QO5DifyGw9NiiZt2b2Y25RH6g2QBWOtVNp4fpmnGc2E=; b=D7tS/MN4v3mRjIg/VBvIE4VprHPELABETsKUK/23sER6tMaOlYtD2g+SUWELANCLrv dGh6fpXufz0GFDEjPVt7GYaQQT0YruhMPi/9WaNrBlN+0hGHwhBHQ+eaHTXI5JWMqOWQ Tsxyt5xGU/vQ866EA5GEeKhp9qai6UH3Iw6PS5dKnw12NDGVF4luiVlQI2JDckYBIL8m qaEKLaXXi1nJ3iC2amsqAr5cqBX0PoKJcxF6XzyH4+t+FHBT1QhgSxIJee6O8PPVisv2 3UfqdQTdFJNhbSTxtx2jEd9ldz3DQkKRn7aKWtnlrsBRqAzn94PB0E33yw+pL5BLGZV7 rFHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z7sO320Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1-v6si37082461plb.558.2018.05.31.11.56.30; Thu, 31 May 2018 11:56:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z7sO320Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756032AbeEaSzv (ORCPT + 99 others); Thu, 31 May 2018 14:55:51 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:41833 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755955AbeEaSzt (ORCPT ); Thu, 31 May 2018 14:55:49 -0400 Received: by mail-pg0-f67.google.com with SMTP id d14-v6so10107388pgv.8 for ; Thu, 31 May 2018 11:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=QO5DifyGw9NiiZt2b2Y25RH6g2QBWOtVNp4fpmnGc2E=; b=Z7sO320ZZPBLJFjmNejZZU1H4AadiEZehaQk/O38sPzOu8TJzT243wSzT4OalQNdnA wD9hRyX5nzdcu9NnXjHpnOU/wNy87FEGyPDSFGYeiozu4y8XmHXzVP3IAM41/0b+11Ox dmJ3M+C7Tn03nS2ElyEBlGdhMNl3ioWM8rha7jvAoPw0cuihvItGjcy8YrZ5Tb7Hjw1E jJUJe7K4LRkys3Ybp1TyYO93wjhW8bV44erWh89QMglRT1qGjZv+sDvkdyaqYlS8S1oG xjL+QOWlXVfjuiLLqolS5ziPhUTDi1G5ibYu+isaI0hlEhONmwJ/vnbP2jaHxlkGijak G4XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=QO5DifyGw9NiiZt2b2Y25RH6g2QBWOtVNp4fpmnGc2E=; b=b9W+g6C+02IaAyjEcMOJU3gZXaF/e64VI/t5O7F+Ra8fK6CV7wfY15GQ8ysyWCGsr+ 7vneRXv4dRzMjqlOYi2cHe2gYADmQqCQhTTpHjVI+bvI8mdtT4QAGbIBhKjKRvc3rb2D dYi0zItjfyKZXOMfIy/+yVVfBRZHRYleJOQzPWqaYwNYKV9IOpWfvzHUt00Kq6gH6aD3 w4slzg25ofUMkNtijQKqa7pwf67H74sDqQyLfu2xt7Fce46Z+NtCn8CD8X51bRIpofDy IBRP5Qmf62IATz7tqrhmnXYH601pN81SN8TShQVp6gM2SYClsGKJx61pc2hT4+pPLNuO 66tw== X-Gm-Message-State: ALKqPwfLRxwLUdCPVJZOLoGVRKagrrcRRvcaQATa4rFcKkS65W0eoVBM i8rGNzoNRjyvMdZivz4/5Ss= X-Received: by 2002:a63:7848:: with SMTP id t69-v6mr6448925pgc.380.1527792949036; Thu, 31 May 2018 11:55:49 -0700 (PDT) Received: from localhost ([47.30.117.32]) by smtp.gmail.com with ESMTPSA id z4-v6sm30542434pfm.28.2018.05.31.11.55.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 May 2018 11:55:47 -0700 (PDT) Date: Fri, 1 Jun 2018 00:25:43 +0530 From: Sankalp Negi To: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, NeilBrown , Sankalp Negi Subject: [PATCH] staging: mt7621-spi: Fix Coding style issues reported by checkpatch.pl. Message-ID: <20180531185542.phhu2rkdoq2czkav@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes following checkpatch.pl issues: WARNING : line over 80 characters ERROR : code indent should use tabs where possible WARNING : no spaces at the start of a line ERROR : switch and case should be at the same indent ERROR : space required before the open parenthesis WARNING : braces {} are not necessary for single statement blocks Signed-off-by: Sankalp Negi --- drivers/staging/mt7621-spi/spi-mt7621.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c index 37f299080410..cd94f5f569df 100644 --- a/drivers/staging/mt7621-spi/spi-mt7621.c +++ b/drivers/staging/mt7621-spi/spi-mt7621.c @@ -55,7 +55,8 @@ #define MT7621_CPOL BIT(4) #define MT7621_LSB_FIRST BIT(3) -#define RT2880_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST | SPI_CS_HIGH) +#define RT2880_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | \ + SPI_LSB_FIRST | SPI_CS_HIGH) struct mt7621_spi; @@ -104,7 +105,7 @@ static void mt7621_spi_set_cs(struct spi_device *spi, int enable) int cs = spi->chip_select; u32 polar = 0; - mt7621_spi_reset(rs, cs); + mt7621_spi_reset(rs, cs); if (enable) polar = BIT(cs); mt7621_spi_write(rs, MT7621_SPI_POLAR, polar); @@ -137,18 +138,18 @@ static int mt7621_spi_prepare(struct spi_device *spi, unsigned int speed) reg |= MT7621_LSB_FIRST; reg &= ~(MT7621_CPHA | MT7621_CPOL); - switch(spi->mode & (SPI_CPOL | SPI_CPHA)) { - case SPI_MODE_0: - break; - case SPI_MODE_1: - reg |= MT7621_CPHA; - break; - case SPI_MODE_2: - reg |= MT7621_CPOL; - break; - case SPI_MODE_3: - reg |= MT7621_CPOL | MT7621_CPHA; - break; + switch (spi->mode & (SPI_CPOL | SPI_CPHA)) { + case SPI_MODE_0: + break; + case SPI_MODE_1: + reg |= MT7621_CPHA; + break; + case SPI_MODE_2: + reg |= MT7621_CPOL; + break; + case SPI_MODE_3: + reg |= MT7621_CPOL | MT7621_CPHA; + break; } mt7621_spi_write(rs, MT7621_SPI_MASTER, reg); @@ -164,9 +165,8 @@ static inline int mt7621_spi_wait_till_ready(struct spi_device *spi) u32 status; status = mt7621_spi_read(rs, MT7621_SPI_TRANS); - if ((status & SPITRANS_BUSY) == 0) { + if ((status & SPITRANS_BUSY) == 0) return 0; - } cpu_relax(); udelay(1); } -- 2.11.0