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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Jun 2015 09:56:53 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	"Opensource [Steve Twiss]" <stwiss.opensource@...semi.com>
Cc:	LINUXKERNEL <linux-kernel@...r.kernel.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	DEVICETREE <devicetree@...r.kernel.org>,
	David Dajun Chen <david.chen@...semi.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	LINUXINPUT <linux-input@...r.kernel.org>,
	LINUXWATCHDOG <linux-watchdog@...r.kernel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Pawel Moll <pawel.moll@....com>,
	RTCLINUX <rtc-linux@...glegroups.com>,
	Rob Herring <robh+dt@...nel.org>,
	Support Opensource <Support.Opensource@...semi.com>,
	Wim Van Sebroeck <wim@...ana.be>
Subject: Re: [PATCH V3 1/4] mfd: da9062: DA9062 MFD core driver

> > > > diff --git a/include/linux/mfd/da9062/registers.h
> > > b/include/linux/mfd/da9062/registers.h
> > > > new file mode 100644
> > > > index 0000000..d07c2bc
> > > > --- /dev/null
> > > > +++ b/include/linux/mfd/da9062/registers.h
> > 
> > [...]
> > 
> > > > +/*
> > > > + * Registers
> > > > + */
> > >
> > > Really? ;)
> > >
> > > > +#define DA9062AA_PAGE_CON		0x000
> > > > +#define DA9062AA_STATUS_A		0x001
> > > > +#define DA9062AA_STATUS_B		0x002
> > 
> > [...]
> > 
> > > > +
> > > > +/*
> > > > + * Bit fields
> > > > + */
> > > > +
> > > > +/* DA9062AA_PAGE_CON = 0x000 */
> > > > +#define DA9062AA_PAGE_SHIFT		0
> > > > +#define DA9062AA_PAGE_MASK		(0x3f << 0)
> > > > +#define DA9062AA_WRITE_MODE_SHIFT	6
> > > > +#define DA9062AA_WRITE_MODE_MASK	(0x01 << 6)
> > >
> > > For 1 << X, you should use BIT(X).
> > >
> > 
> > For the two comments above "Registers" and "Bit fields" and the (1<<x)
> > definitions ...
> > 
> > The whole of this file is automatically generated by our hardware designers
> > I would prefer it if the register definitions and bit fields are not altered using
> > the #define BIT(nr) (1UL<<(nr)) macro and the comments removed because
> > we have scripts that can be used to check this file automatically.
> > 
> > Also if the register map is ever updated, then it will be easier for me to diff
> > the new delivered register and bit field definitions with the old one.
> > 
> > My preference would be not to change this header file.
> > 
> > [...]
>  
> If these last two things are a problem can you please let me know.

I'm still not particularly happy with this.  Can yo speak to your H/W
guys and get them to change their scripts to output sensible header
files?

To be honest, it's probably not a blocker for acceptance, but if someone
writes a patch next week to change all of the (0x01 << X) lines to
start using the BIT() macro, I will accept it.  Better to influenced
your guys so you are not overly inconvenienced.

FWIW, when upstreaming code, the excuse "someone else wrote it", has
never been a good one to use on the lists.   Believe me, I've
tried. ;)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ