From: Gyungoh Yoo <gyungoh@gmail.com>
To: Oliver Neukum <oneukum@suse.de>
Cc: sameo@linux.intel.com, lee.jones@linaro.org, robh+dt@kernel.org,
jg1.han@samsung.com, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
trivial@kernel.org, broonie@kernel.org, florian.vaussard@epfl.ch,
andrew@lunn.ch, antonynpavlov@gmail.com, hytszk@gmail.com,
plagnioj@jcrosoft.com, tomi.valkeinen@ti.com,
jack.yoo@skyworksinc.com, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
treding@nvidia.com, p.zabel@pengutronix.de, arno@natisbad.org,
kuninori.morimoto.gx@renesas.com
Subject: Re: [PATCH v11 2/6] backlight: Add support Skyworks SKY81452 backlight driver
Date: Fri, 27 Feb 2015 09:03:45 +0000 [thread overview]
Message-ID: <20150227090345.GA4891@jack-ThinkPad-T520> (raw)
In-Reply-To: <1425027518.12236.5.camel@linux-0dmf.site>
On Fri, Feb 27, 2015 at 09:58:38AM +0100, Oliver Neukum wrote:
> On Fri, 2015-02-27 at 15:42 +0900, gyungoh@gmail.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;
>
> No range checking?
It doesn't need it. below regmap_update_bits() is masking the value.
>
> > +
> > + ret = regmap_update_bits(regmap, SKY81452_REG1, SKY81452_EN,
> > + value << CTZ(SKY81452_EN));
> > + if (IS_ERR_VALUE(ret))
> > + return ret;
> > +
> > + return count;
> > +}
>
> Regards
> Oliver
>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Gyungoh Yoo <gyungoh@gmail.com>
To: Oliver Neukum <oneukum@suse.de>
Cc: sameo@linux.intel.com, lee.jones@linaro.org, robh+dt@kernel.org,
jg1.han@samsung.com, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
trivial@kernel.org, broonie@kernel.org, florian.vaussard@epfl.ch,
andrew@lunn.ch, antonynpavlov@gmail.com, hytszk@gmail.com,
plagnioj@jcrosoft.com, tomi.valkeinen@ti.com,
jack.yoo@skyworksinc.com, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
treding@nvidia.com, p.zabel@pengutronix.de, arno@natisbad.org,
kuninori.morimoto.gx@renesas.com
Subject: Re: [PATCH v11 2/6] backlight: Add support Skyworks SKY81452 backlight driver
Date: Fri, 27 Feb 2015 18:03:45 +0900 [thread overview]
Message-ID: <20150227090345.GA4891@jack-ThinkPad-T520> (raw)
In-Reply-To: <1425027518.12236.5.camel@linux-0dmf.site>
On Fri, Feb 27, 2015 at 09:58:38AM +0100, Oliver Neukum wrote:
> On Fri, 2015-02-27 at 15:42 +0900, gyungoh@gmail.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;
>
> No range checking?
It doesn't need it. below regmap_update_bits() is masking the value.
>
> > +
> > + ret = regmap_update_bits(regmap, SKY81452_REG1, SKY81452_EN,
> > + value << CTZ(SKY81452_EN));
> > + if (IS_ERR_VALUE(ret))
> > + return ret;
> > +
> > + return count;
> > +}
>
> Regards
> Oliver
>
>
>
next prev parent reply other threads:[~2015-02-27 9:03 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 6:31 [PATCH v11 0/6] Add Skyworks SKY81452 device drivers gyungoh
2015-02-05 6:31 ` gyungoh
2015-02-05 6:31 ` [PATCH v11 1/6] mfd: Add support for Skyworks SKY81452 driver gyungoh
2015-02-05 6:31 ` gyungoh
2015-02-05 6:31 ` [PATCH v11 2/6] backlight: Add support Skyworks SKY81452 backlight driver gyungoh
2015-02-05 6:31 ` gyungoh
2015-02-05 6:31 ` [PATCH v11 3/6] devicetree: Add new SKY81452 mfd binding gyungoh
2015-02-05 6:31 ` gyungoh
2015-02-05 6:31 ` [PATCH v11 4/6] devicetree: Add new SKY81452 backlight binding gyungoh
2015-02-05 6:31 ` gyungoh
[not found] ` <1423117877-30667-1-git-send-email-jack.yoo-tjhQNA90jdKqndwCJWfcng@public.gmane.org>
2015-02-05 6:31 ` [PATCH v11 5/6] devicetree: Add vendor prefix for Skyworks Solutions, Inc gyungoh
2015-02-05 6:31 ` gyungoh
2015-02-05 6:31 ` gyungoh-Re5JQEeQqe8AvxtiuMwx3w
2015-02-05 6:31 ` [PATCH v11 6/6] devicetree: Add SKY81452 to the Trivial Devices list gyungoh
2015-02-05 6:31 ` gyungoh
2015-02-27 6:42 ` [PATCH v11 0/6] Add Skyworks SKY81452 device drivers gyungoh
2015-02-27 6:42 ` gyungoh
2015-02-27 6:42 ` [PATCH v11 1/6] mfd: Add support for Skyworks SKY81452 driver gyungoh
2015-02-27 6:42 ` gyungoh
[not found] ` <1425019346-4559-2-git-send-email-jack.yoo-tjhQNA90jdKqndwCJWfcng@public.gmane.org>
2015-03-09 9:40 ` Lee Jones
2015-03-09 9:40 ` Lee Jones
2015-03-09 9:40 ` Lee Jones
2015-02-27 6:42 ` [PATCH v11 2/6] backlight: Add support Skyworks SKY81452 backlight driver gyungoh
2015-02-27 6:42 ` gyungoh
2015-02-27 8:58 ` Oliver Neukum
2015-02-27 8:58 ` Oliver Neukum
2015-02-27 9:03 ` Gyungoh Yoo [this message]
2015-02-27 9:03 ` Gyungoh Yoo
2015-03-09 9:40 ` Lee Jones
2015-03-09 9:40 ` Lee Jones
2015-02-27 6:42 ` [PATCH v11 3/6] devicetree: Add new SKY81452 mfd binding gyungoh
2015-02-27 6:42 ` gyungoh
[not found] ` <1425019346-4559-4-git-send-email-jack.yoo-tjhQNA90jdKqndwCJWfcng@public.gmane.org>
2015-03-09 9:40 ` Lee Jones
2015-03-09 9:40 ` Lee Jones
2015-03-09 9:40 ` Lee Jones
2015-02-27 6:42 ` [PATCH v11 4/6] devicetree: Add new SKY81452 backlight binding gyungoh
2015-02-27 6:42 ` gyungoh
2015-03-09 9:40 ` Lee Jones
2015-03-09 9:40 ` Lee Jones
2015-02-27 6:42 ` [PATCH v11 5/6] devicetree: Add vendor prefix for Skyworks Solutions, Inc gyungoh
2015-02-27 6:42 ` gyungoh
2015-03-09 9:41 ` Lee Jones
2015-03-09 9:41 ` Lee Jones
2015-02-27 6:42 ` [PATCH v11 6/6] devicetree: Add SKY81452 to the Trivial Devices list gyungoh
2015-02-27 6:42 ` gyungoh
2015-03-09 9:41 ` Lee Jones
2015-03-09 9:41 ` Lee Jones
2015-02-27 20:39 ` [PATCH v11 0/6] Add Skyworks SKY81452 device drivers Lee Jones
2015-02-27 20:39 ` Lee Jones
2015-03-03 2:24 ` Gyungoh Yoo
2015-03-03 2:24 ` Gyungoh Yoo
2015-03-03 7:42 ` Lee Jones
2015-03-03 7:42 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150227090345.GA4891@jack-ThinkPad-T520 \
--to=gyungoh@gmail.com \
--cc=andrew@lunn.ch \
--cc=antonynpavlov@gmail.com \
--cc=arno@natisbad.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=florian.vaussard@epfl.ch \
--cc=galak@codeaurora.org \
--cc=hytszk@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jack.yoo@skyworksinc.com \
--cc=jg1.han@samsung.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=oneukum@suse.de \
--cc=p.zabel@pengutronix.de \
--cc=pawel.moll@arm.com \
--cc=plagnioj@jcrosoft.com \
--cc=robh+dt@kernel.org \
--cc=sameo@linux.intel.com \
--cc=tomi.valkeinen@ti.com \
--cc=treding@nvidia.com \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.