Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932579AbdHVKD4 (ORCPT ); Tue, 22 Aug 2017 06:03:56 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:38392 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932306AbdHVKDz (ORCPT ); Tue, 22 Aug 2017 06:03:55 -0400 Date: Tue, 22 Aug 2017 13:03:20 +0300 From: Dan Carpenter To: Rishabh Hardas Cc: Joe Perches , devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, rjosephwright@gmail.com, linux@Wolf-Entwicklungen.de, colin.king@canonical.com Subject: Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines Message-ID: <20170822100319.hgmhmhj45twwxb2w@mwanda> References: <2adda87146ff5161e33f0379c662908ecc1f3e0a.1501759442.git.rishabhhardas@gmail.com> <20170816073106.vyhezn7f2recdarp@mwanda> <1503204448.6933.1.camel@perches.com> <20170822092749.GC19988@rishabh-linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170822092749.GC19988@rishabh-linux> User-Agent: NeoMutt/20170113 (1.7.2) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1840 Lines: 40 On Tue, Aug 22, 2017 at 02:57:49PM +0530, Rishabh Hardas wrote: > On Sat, Aug 19, 2017 at 09:47:28PM -0700, Joe Perches wrote: > > On Wed, 2017-08-16 at 10:31 +0300, Dan Carpenter wrote: > > > On Wed, Aug 16, 2017 at 10:53:18AM +0530, Rishabh Hardas wrote: > > > > @@ -143,10 +142,13 @@ struct pi433_rx_cfg { > > > > > > > > #define PI433_IOC_MAGIC 'r' > > > > > > > > -#define PI433_IOC_RD_TX_CFG _IOR(PI433_IOC_MAGIC, PI433_TX_CFG_IOCTL_NR, char[sizeof(struct pi433_tx_cfg)]) > > > > -#define PI433_IOC_WR_TX_CFG _IOW(PI433_IOC_MAGIC, PI433_TX_CFG_IOCTL_NR, char[sizeof(struct pi433_tx_cfg)]) > > > > - > > > > -#define PI433_IOC_RD_RX_CFG _IOR(PI433_IOC_MAGIC, PI433_RX_CFG_IOCTL_NR, char[sizeof(struct pi433_rx_cfg)]) > > > > -#define PI433_IOC_WR_RX_CFG _IOW(PI433_IOC_MAGIC, PI433_RX_CFG_IOCTL_NR, char[sizeof(struct pi433_rx_cfg)]) > > > > +#define PI433_IOC_RD_TX_CFG _IOR(PI433_IOC_MAGIC, PI433_TX_CFG_IOCTL_NR,\ > > > > + char[sizeof(struct pi433_tx_cfg)]) > > > > +#define PI433_IOC_WR_TX_CFG _IOW(PI433_IOC_MAGIC, PI433_TX_CFG_IOCTL_NR,\ > > > > + char[sizeof(struct pi433_tx_cfg)]) > > > > +#define PI433_IOC_RD_RX_CFG _IOR(PI433_IOC_MAGIC, PI433_RX_CFG_IOCTL_NR,\ > > > > + char[sizeof(struct pi433_rx_cfg)]) > > > > +#define PI433_IOC_WR_RX_CFG _IOW(PI433_IOC_MAGIC, PI433_RX_CFG_IOCTL_NR,\ > > > > + char[sizeof(struct pi433_rx_cfg)]) > > > > > > > > > These don't help readability. The original was better. > > > > The original wasn't any good either. > > > > It'd be better to avoid the macros altogether > > as almost all are use-once. > > > > > So should I keep this as it is or remove the macros ? > Because as Dan said the corrections that I made aren't goo either. > Find a way to correct it which makes the code more readable than it was before. regards, dan carpenter