From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 175C7C43381 for ; Wed, 13 Mar 2019 12:35:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D69F7214AE for ; Wed, 13 Mar 2019 12:35:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="S8YEb/YF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="mXUWvgFp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D69F7214AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=li1thxP9//G+ecptGATQo1KBhrTbWeMVuX2jmL3ZR5E=; b=S8YEb/YFYN6WWh cv8T+HC9zkDSE0RJbBM29ASYEipvjkXwPfkuTrsO+PYz9deBO6bKf1gb6zvL/DBWXDozeJo2rdjSe 95OLgYATBaLvlO4hrTrEZWUKuzqPJ1xK5wTpZ493Cy/hXVu3gNUsSQKowSJytNk5ernmWx3gyLKOj Yd8ji3chMh6UxBOnX1o6VZ/9o9NN8A8+PNJ58wygVIksSUMf9pyhejFaLFqckXlBBp8NxRS6jka2V ggM8ZzAqZ/1MDe6tDtd/oWed/KvNbhubgaT1xZ3nlnO/7StP0L8tM8kyTKo/Dsrnb4bopLa4Mr0VV Yu00ppPPVrBG7U79EI+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h436T-0007pS-Na; Wed, 13 Mar 2019 12:35:25 +0000 Received: from userp2130.oracle.com ([156.151.31.86]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h436P-0007oU-Vw; Wed, 13 Mar 2019 12:35:23 +0000 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 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-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_053522_160621_22960D58 X-CRM114-Status: GOOD ( 22.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, matthias.bgg@gmail.com, Armando Miraglia , linux-mediatek@lists.infradead.org, sankalpnegi2310@gmail.com, neil@brown.name, sr@denx.de, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel