Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1717213

Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines

From Rishabh Hardas <rishabhhardas@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines
Date 2017-08-22 11:30 +0200
Message-ID <uhdFv-ng-1@gated-at.bofh.it> (permalink)
References <uamXg-7T1-3@gated-at.bofh.it> <uamXh-7T1-21@gated-at.bofh.it> <uf15M-498-29@gated-at.bofh.it> <ugqlr-2f4-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Regards
Rishabh Hardas

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-16 09:40 +0200
  Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines Joe Perches <joe@perches.com> - 2017-08-20 06:50 +0200
    Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines Rishabh Hardas <rishabhhardas@gmail.com> - 2017-08-22 11:30 +0200
      Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-22 12:10 +0200
        Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines Marcus Wolf <marcus.wolf@wolf-entwicklungen.de> - 2017-08-22 12:40 +0200
          Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-22 12:50 +0200

csiph-web