Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2957638imc; Wed, 13 Mar 2019 05:36:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwodlwImp5WUxqLByuo59f81u8OkyGZDR4M2UCVNcbAN/hSu293RshvtnHD2vZ30IV2jzNN X-Received: by 2002:a63:4826:: with SMTP id v38mr11568114pga.370.1552480604417; Wed, 13 Mar 2019 05:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552480604; cv=none; d=google.com; s=arc-20160816; b=gn+B6f8ZBE3/XkMAFO/iev+NNyN3JEvxYkNZXnKndNzWvreAiX/tznqetp9su2GQSm fF67ELXpQCoKi0J2KvuMcmN5RPLXyNnWc+ucTzB1bIO/8crx/KpxJ9vnv7HRz3jZewEL u5CpkC7ky2K38YE3koy8sp0qAaR0xZc+YZ0Wy9h+87GFBoJ8SiZHzW0GC814roH6ODHH 1itUpNaqB2HiL64LDWGXF7r8Y+T59zVf4nUPrZQ+FR1z9DvYiwDTOV/EIey83q0hkmok 0TNzMWKqRNBebXd3h0pTQfPExNmS1zXgWQ6zNPvB7nZdSIHLYjKncTjroHjaSVOD9ba2 BfiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yqXXhLKBXv+VD6/efvt5pYadwc3/H5MeWffrineRJTw=; b=lQQ21jekWiy/ZNrfUfwsFNWnRmhCjFHldrN0cABOQGGQCBFO1d217A8rCrSQlGgnGn gK0R9B2QkZfjCn7jmdxqOIdgEN2Rw1ocVNW+MUz1TUT8L7mVeM7+5HYqHYCXWeDHLek5 fIQcobNqznCKVr8bVb3OQuRgd4mENx22qRgAT79d1UfHCQdIxJJyX0L+vdEfVOEQXR/5 t9WM+yU32HXR1pCGBSlHDNu5eciULhGy1s6Nn6uGdiAtjY3pJo2vtKv4xmVt9jRpsbKD 6LGL/x49eAbgB1t9fNG+3kORgsttJx2eAlx1WkJJl3uB6Xyx3bWANm9Y59XnaHgCux2U 0Qnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=mXUWvgFp; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d32si11205975pla.117.2019.03.13.05.36.27; Wed, 13 Mar 2019 05:36:44 -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=@oracle.com header.s=corp-2018-07-02 header.b=mXUWvgFp; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726330AbfCMMfZ (ORCPT + 99 others); Wed, 13 Mar 2019 08:35:25 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:59320 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725856AbfCMMfZ (ORCPT ); Wed, 13 Mar 2019 08:35:25 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2DCT6YO043920; Wed, 13 Mar 2019 12:35:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=yqXXhLKBXv+VD6/efvt5pYadwc3/H5MeWffrineRJTw=; b=mXUWvgFpIj8ZLWL53j7GpZzd+UcaZHYGSMRQBojwZoLP/xXT21I9+8vzOBKWV36nDR56 Noho5QwB0+jq29LjxTOkj8JxBTbMUIBbv/4qO3kF3zz96FSHY7NFbMEGsGhM78gTyL9v hDyidco7YmUN0jrXcGkwZH8LuOEsSfeBX2vrKMTn0l0rSJorcFp6jT78lndyxwb6QTZQ /in6Dr24DPVv/IBA0LX3x2/nGvvDR1zTuOchG3M210nzoPfEyZ4ZiiGy15Puwbuu9Mok Fz8wlO7zSaGVuAuIn/JWXebNjkfOrkp6JLHZvT/+SX7YWs7OvJjePBqDovjqk1T1Us3W bA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2r44wuakc6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Mar 2019 12:35:10 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2DCZA0W011277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Mar 2019 12:35:10 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2DCZ9oK009741; Wed, 13 Mar 2019 12:35:09 GMT Received: from kadam (/197.157.0.23) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Mar 2019 05:35:08 -0700 Date: Wed, 13 Mar 2019 15:34:54 +0300 From: Dan Carpenter To: Armando Miraglia Cc: neil@brown.name, devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Armando Miraglia , linux-mediatek@lists.infradead.org, sankalpnegi2310@gmail.com, matthias.bgg@gmail.com, sr@denx.de, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] spi: mediatek: Attempt to address style issues in spi-mt7621.c Message-ID: <20190313123454.GB2202@kadam> References: <20190313122403.248873-1-armax@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190313122403.248873-1-armax@google.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9193 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903130091 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 13, 2019 at 01:24:04PM +0100, Armando Miraglia wrote: > Running Lindent on the mt7621-spi.c file in drivers/staging I noticed that the > file contained style issues. This change attempts to address such style > problems. > Don't run lindent. I think checkpatch.pl has a --fix option that might be better, but once the code is merged then our standard become much higher for follow up patches. > Signed-off-by: Armando Miraglia > --- > NOTE: resend this patch to include all mainteners listed by get_mantainers.pl. > drivers/staging/mt7621-spi/spi-mt7621.c | 27 +++++++++++++------------ > 1 file changed, 14 insertions(+), 13 deletions(-) > > diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c > index b509f9fe3346..03d53845f8c5 100644 > --- a/drivers/staging/mt7621-spi/spi-mt7621.c > +++ b/drivers/staging/mt7621-spi/spi-mt7621.c > @@ -52,14 +52,14 @@ > #define MT7621_LSB_FIRST BIT(3) > > struct mt7621_spi { > - struct spi_master *master; > - void __iomem *base; > - unsigned int sys_freq; > - unsigned int speed; > - struct clk *clk; > - int pending_write; > - > - struct mt7621_spi_ops *ops; > + struct spi_master *master; > + void __iomem *base; > + unsigned int sys_freq; > + unsigned int speed; > + struct clk *clk; > + int pending_write; > + > + struct mt7621_spi_ops *ops; The original is fine. I don't encourage people to do fancy indenting with their local variable declarations inside functions but for a struct the declarations aren't going to change a lot so people can get fancy if they want. The problem with a local is if you need to add a new variable then you have to re-indent a bunch of unrelated lines or have one out of alignment line. Most people know this intuitively so they don't get fancy. > }; > > static inline struct mt7621_spi *spidev_to_mt7621_spi(struct spi_device *spi) > @@ -303,7 +303,7 @@ static int mt7621_spi_setup(struct spi_device *spi) > struct mt7621_spi *rs = spidev_to_mt7621_spi(spi); > > if ((spi->max_speed_hz == 0) || > - (spi->max_speed_hz > (rs->sys_freq / 2))) > + (spi->max_speed_hz > (rs->sys_freq / 2))) Yeah. Lindent is correct here. > spi->max_speed_hz = (rs->sys_freq / 2); > > if (spi->max_speed_hz < (rs->sys_freq / 4097)) { > @@ -316,9 +316,10 @@ static int mt7621_spi_setup(struct spi_device *spi) > } > > static const struct of_device_id mt7621_spi_match[] = { > - { .compatible = "ralink,mt7621-spi" }, > + {.compatible = "ralink,mt7621-spi"}, The original was better. > {}, > }; > + > MODULE_DEVICE_TABLE(of, mt7621_spi_match); No need for a blank. These are closely related. > > static int mt7621_spi_probe(struct platform_device *pdev) > @@ -408,9 +409,9 @@ MODULE_ALIAS("platform:" DRIVER_NAME); > > static struct platform_driver mt7621_spi_driver = { > .driver = { > - .name = DRIVER_NAME, > - .of_match_table = mt7621_spi_match, > - }, > + .name = DRIVER_NAME, > + .of_match_table = mt7621_spi_match, > + }, The new indenting is very wrong. regards, dan carpenter