Received: by 10.223.185.116 with SMTP id b49csp2391966wrg; Mon, 12 Feb 2018 08:50:48 -0800 (PST) X-Google-Smtp-Source: AH8x2257x46Nr9ZucxkvmMEwbJKnAhJ/SVhqoz2YHKxBQaKJCoQST2SVRd2tABTf7giXEZOiZFLC X-Received: by 2002:a17:902:20c8:: with SMTP id v8-v6mr11218431plg.226.1518454248110; Mon, 12 Feb 2018 08:50:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518454248; cv=none; d=google.com; s=arc-20160816; b=IzB6XjgzuDhBaV7bpXOdUb5IpQoz6sSsoqmzfNyZ+XisXstcGKssHwtpKkiC2B9Mga RwySdrCPBqUcEwcl3uyviusAkkf/lyMHIKMb2vqH8eOsu5/YCe1flo/DLPDvIA/vqbyI M8vVF6f90gUVSUmPRPZXAMfwoMdDHjAzHjsuKg023/YSGCzbiQQIAoNLqek8OiR25en4 ExVGlv9k6Tp83jtKr+IpD/jWH2fhp55ZcM62Ars/0jpvxwI07d34ZHeUgo8cOQJD0D+T 5g53/wugvH6Ta/EmMnbX+LKZOGIj5e9kFgbwW3gKy4fO/ZkLWRRcOCR9CDSVVdkJ2cf/ zIaA== 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:arc-authentication-results; bh=hy+cT9Yb3eexpEWITtQ0RXsct4UOoyXch0gA4b3BXbA=; b=VvPHbt/jPco1/t/wb2YsvgG6gdUQSVZUwzCkse5YmL1SdidcmgrgRgJrt1wr6PIHLL HpQ+x5Eq9OQY6/VF7GQRdqeOzQPKZuhYn+PatSWO8EcOrNIssFx+KwNSxt+xbx2FaEM6 g/WWlUoQWtGFljEtTMD3vqLU5oj+aASTyqudVIOM6Y9usGHtWPvrxXlLCtVVRQ231Qh/ zcF2azUmeZfzQK+Dfbpi8iQ9TkB/ZThtCHDh44cIjap1Yf9wr7qebZxNuriTePRNirh+ JcN02sdIorH1Qoz7f4nB1ivxE4AcD4aQwCnIovZYSxpoCwLtm046uEomNluTffWZVrqk 73lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=BrFz2Yiy; 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 j13si4152965pfh.78.2018.02.12.08.50.33; Mon, 12 Feb 2018 08:50:48 -0800 (PST) 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-2017-10-26 header.b=BrFz2Yiy; 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 S934835AbeBLMxs (ORCPT + 99 others); Mon, 12 Feb 2018 07:53:48 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:55388 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933089AbeBLMxq (ORCPT ); Mon, 12 Feb 2018 07:53:46 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1CCqNxP084765; Mon, 12 Feb 2018 12:53:25 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-2017-10-26; bh=hy+cT9Yb3eexpEWITtQ0RXsct4UOoyXch0gA4b3BXbA=; b=BrFz2Yiyg/U+zy2dr4Gezc5WS9BBDVEjMuzZmydpd/FRUwCYJzdmdTq7bSW859yPV5DK QGj5pkGAn8oXhSRU31hw/UXra0wXNE9FgxnmKFVm4PFkK+IkzyA6sEWYxD/iL6uZyLa1 tudPyEnol7nepbfXV7eCALygOQvanF5PZK6Uwizv9X0Xw2TcyfrHgriyyNwf+AwsShsw w24KnWT1PbLjLBzZ2JtKvcVXBS9jraFW2VXaCvfa42yACVFeUhHKUl/kVAlkv8nAHdHY zCDgpWqbjMwVte9KMZ9byMSF3FmsPXhUZ5/OdjXVq1ItJKdsd8FU4uLv/Z5SgS/QGnnV jA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2g3ad909h3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Feb 2018 12:53:25 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1CCrNT6019353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Feb 2018 12:53:24 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w1CCrMp7013313; Mon, 12 Feb 2018 12:53:22 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 12 Feb 2018 04:53:21 -0800 Date: Mon, 12 Feb 2018 15:53:12 +0300 From: Dan Carpenter To: Himanshu Jha Cc: 21cnbao@gmail.com, jic23@kernel.org, devel@driverdev.osuosl.org, lars@metafoo.de, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de Subject: Re: [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix Message-ID: <20180212125312.cjo76spuu6agjawc@mwanda> References: <1518436499-8584-1-git-send-email-himanshujha199640@gmail.com> <1518436499-8584-3-git-send-email-himanshujha199640@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1518436499-8584-3-git-send-email-himanshujha199640@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8802 signatures=668668 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802120167 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 12, 2018 at 05:24:57PM +0530, Himanshu Jha wrote: > Remove some unnecessary comments by giving appropriate name to macros. > Therefore, add _REG suffix for control registers. Also, align function > arguments to match open parentheses using tabs. > Group the control register and register field macros together. > > Blank line before some returns improves code readability. > > Signed-off-by: Himanshu Jha The most obvious response is that this needs to be broken up into multiple patches. I think I liked almost all the comments... > -/* Output, power supply */ > -#define ADIS16201_SUPPLY_OUT 0x02 > +#define ADIS16201_SUPPLY_OUT_REG 0x02 To me it seems useful to know that we're talking about the power supply. Adding _REG to the name seems not terribly useful and it makes the name longer so we're going to run into the 80 character limit. I just checked and this patch does add some checkpatch warnings. But aligning the arguments is fine, deleting unused macros is fine, adding blank lines is fine. > static int adis16201_probe(struct spi_device *spi) > { > - int ret; > - struct adis *st; > struct iio_dev *indio_dev; > + struct adis *st; > + int ret; Making this reverse Christmas tree is fine. But these things should all be done in separate patches. regards, dan carpenter