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] [day] [month] [year] [list]
Message-ID: <20141204020449.GA2939@jack-ThinkPad-T520>
Date:	Thu, 4 Dec 2014 11:04:49 +0900
From:	Gyungoh Yoo <gyungoh@...il.com>
To:	Oliver Neukum <oneukum@...e.de>
Cc:	sameo@...ux.intel.com, lee.jones@...aro.org,
	grant.likely@...aro.org, robh+dt@...nel.org, jg1.han@...sung.com,
	cooloney@...il.com, pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	trivial@...nel.org, akpm@...ux-foundation.org, jic23@...nel.org,
	thomas.petazzoni@...e-electrons.com, ktsai@...ellamicro.com,
	hs@...x.de, stwiss.opensource@...semi.com, matti.vaittinen@....com,
	broonie@...nel.org, jason@...edaemon.net, heiko@...ech.de,
	shawn.guo@...escale.com, florian.vaussard@...l.ch, andrew@...n.ch,
	antonynpavlov@...il.com, hytszk@...il.com, plagnioj@...osoft.com,
	tomi.valkeinen@...com, jack.yoo@...worksinc.com,
	linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: Re: [PATCH v10 2/6] backlight: Add support Skyworks SKY81452
 backlight driver

On Wed, Dec 03, 2014 at 11:02:29AM +0100, Oliver Neukum wrote:
> On Wed, 2014-12-03 at 16:05 +0900, gyungoh@...il.com wrote:
> > +static ssize_t sky81452_bl_store_enable(struct device *dev,
> > +               struct device_attribute *attr, const char *buf, size_t
> > count)
> > +{
> > +       struct regmap *regmap = bl_get_data(to_backlight_device(dev));
> > +       unsigned long value;
> > +       int ret;
> > +
> > +       ret = kstrtoul(buf, 16, &value);
> > +       if (IS_ERR_VALUE(ret))
> > +               return ret;
> > +
> > +       ret = regmap_update_bits(regmap, SKY81452_REG1, SKY81452_EN,
> > +                                       value << CTZ(SKY81452_EN));
> 
> No range checking for value?

Avaiable range is from 0 to SKY81452_EN.
regmap_update_bits() is masking the value.

> 
> > +       if (IS_ERR_VALUE(ret))
> > +               return ret;
> > +
> > +       return count;
> > +}
> 
> 	Regards
> 		Oliver
> 
> -- 
> Oliver Neukum <oneukum@...e.de>
> 
--
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