lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Mar 2019 09:00:55 +0000
From:   Jeremy Sowden <jeremy@...zel.net>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Alexandru Ardelean <ardeleanalex@...il.com>,
        devel@...verdev.osuosl.org,
        Karen Palacio <karen.palacio.1994@...il.com>, lars@...afoo.de,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        linux-iio@...r.kernel.org, gregkh@...uxfoundation.org,
        LKML <linux-kernel@...r.kernel.org>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>, knaack.h@....de,
        Mircea Caprioru <mircea.caprioru@...log.com>,
        Jonathan Cameron <jic23@...nel.org>
Subject: Re: [PATCH] staging: iio: adc: ad7192: Add spaces around minus
 operator

On 2019-03-11, at 11:31:59 +0300, Dan Carpenter wrote:
> On Mon, Mar 11, 2019 at 10:12:48AM +0200, Alexandru Ardelean wrote:
> > On Sun, Mar 10, 2019 at 11:23 PM Karen Palacio
> > <karen.palacio.1994@...il.com> wrote:
> > >
> > > Add spaces around minus operator to fix readibility.
> > >
> > > Signed-off-by: Karen Palacio <karen.palacio.1994@...il.com>
> > > ---
> > >  drivers/staging/iio/adc/ad7192.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
> > > index acdbc07..7c632cf 100644
> > > --- a/drivers/staging/iio/adc/ad7192.c
> > > +++ b/drivers/staging/iio/adc/ad7192.c
> > > @@ -355,7 +355,7 @@ ad7192_show_scale_available(struct device *dev,
> > >  }
> > >
> > >  static IIO_DEVICE_ATTR_NAMED(in_v_m_v_scale_available,
> > > -                            in_voltage-voltage_scale_available,
> > > +                            in_voltage - voltage_scale_available,
> >
> > This isn't broken, but I do agree it should be addressed.  I think
> > it's the second time I see a similar patch trying to fix this.  So,
> > obviously the code is a bit misleading.
> >
>
> It's got to be more than that.  I did a simple grep of my inbox and it
> says that this is the 13th time someone has tried to do this.  It's
> possible that my grep is wrong, 13 seems high but not totaly
> impossible.

The second parameter of IIO_DEVICE_ATTR_NAMED is a name which is
eventually stringified, not an arithmetic expression.

  #define IIO_DEVICE_ATTR_NAMED(_vname, _name, _mode, _show, _store, \
				_addr) \
	struct iio_dev_attr iio_dev_attr_##_vname \
	= IIO_ATTR(_name, _mode, _show, _store, _addr)

which is defined as:

  #define IIO_ATTR(_name, _mode, _show, _store, _addr)		\
	{ .dev_attr = __ATTR(_name, _mode, _show, _store),	\
	  .address = _addr }

which is defined as:

  #define __ATTR(_name, _mode, _show, _store) {             \
	.attr = {.name = __stringify(_name),                \
		 .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
	.show	= _show,                                    \
	.store	= _store,                                   \
  }

J.

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ