All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Dongchun Zhu <dongchun.zhu@mediatek.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	mchehab@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
	drinkcat@chromium.org, tfiga@chromium.org,
	matthias.bgg@gmail.com, bingbu.cao@intel.com,
	srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, sj.huang@mediatek.com,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	louis.kuo@mediatek.com, shengnan.wang@mediatek.com
Subject: Re: [V2, 2/2] media: i2c: Add more sensor modes for ov8856 camera sensor
Date: Wed, 30 Oct 2019 15:55:27 +0200	[thread overview]
Message-ID: <20191030135527.GH10211@paasikivi.fi.intel.com> (raw)
In-Reply-To: <1572440653.21623.272.camel@mhfsdcap03>

On Wed, Oct 30, 2019 at 09:04:13PM +0800, Dongchun Zhu wrote:
> > > +	ov8856->is_1B_revision = (val == OV8856_1B_MODULE) ? 1 : 0;
> > 
> > !! will give same result without using ternary operator.
> > 
> 
> Fixed in next release.

But casting to bool will have the same effect. Integers are also not
needed. I.e. this can be written as:

	ov8856->is_1B_revision = val == OV8856_1B_MODULE;

-- 
Sakari Ailus

WARNING: multiple messages have this Message-ID (diff)
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Dongchun Zhu <dongchun.zhu@mediatek.com>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	drinkcat@chromium.org, srv_heupstream@mediatek.com,
	shengnan.wang@mediatek.com,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	tfiga@chromium.org, louis.kuo@mediatek.com,
	sj.huang@mediatek.com, robh+dt@kernel.org,
	linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com,
	bingbu.cao@intel.com, mchehab@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [V2, 2/2] media: i2c: Add more sensor modes for ov8856 camera sensor
Date: Wed, 30 Oct 2019 15:55:27 +0200	[thread overview]
Message-ID: <20191030135527.GH10211@paasikivi.fi.intel.com> (raw)
In-Reply-To: <1572440653.21623.272.camel@mhfsdcap03>

On Wed, Oct 30, 2019 at 09:04:13PM +0800, Dongchun Zhu wrote:
> > > +	ov8856->is_1B_revision = (val == OV8856_1B_MODULE) ? 1 : 0;
> > 
> > !! will give same result without using ternary operator.
> > 
> 
> Fixed in next release.

But casting to bool will have the same effect. Integers are also not
needed. I.e. this can be written as:

	ov8856->is_1B_revision = val == OV8856_1B_MODULE;

-- 
Sakari Ailus

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Dongchun Zhu <dongchun.zhu@mediatek.com>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	drinkcat@chromium.org, srv_heupstream@mediatek.com,
	shengnan.wang@mediatek.com,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	tfiga@chromium.org, louis.kuo@mediatek.com,
	sj.huang@mediatek.com, robh+dt@kernel.org,
	linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com,
	bingbu.cao@intel.com, mchehab@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [V2, 2/2] media: i2c: Add more sensor modes for ov8856 camera sensor
Date: Wed, 30 Oct 2019 15:55:27 +0200	[thread overview]
Message-ID: <20191030135527.GH10211@paasikivi.fi.intel.com> (raw)
In-Reply-To: <1572440653.21623.272.camel@mhfsdcap03>

On Wed, Oct 30, 2019 at 09:04:13PM +0800, Dongchun Zhu wrote:
> > > +	ov8856->is_1B_revision = (val == OV8856_1B_MODULE) ? 1 : 0;
> > 
> > !! will give same result without using ternary operator.
> > 
> 
> Fixed in next release.

But casting to bool will have the same effect. Integers are also not
needed. I.e. this can be written as:

	ov8856->is_1B_revision = val == OV8856_1B_MODULE;

-- 
Sakari Ailus

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-10-30 13:56 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <media: ov8856: DT bindings and sensor mode improvements>
2019-09-10 13:04 ` [V2, 0/2] media: ov8856: DT bindings and sensor mode improvements dongchun.zhu
2019-09-10 13:04   ` dongchun.zhu
2019-09-10 13:04   ` dongchun.zhu
2019-09-10 13:04   ` [V2, 1/2] media: dt-bindings: media: i2c: Add bindings for ov8856 dongchun.zhu
2019-09-10 13:04     ` dongchun.zhu
2019-09-10 13:04     ` dongchun.zhu
2019-09-10 17:37     ` Andy Shevchenko
2019-09-10 17:37       ` Andy Shevchenko
2019-09-10 17:37       ` Andy Shevchenko
2019-09-17 12:02       ` Sakari Ailus
2019-09-17 12:02         ` Sakari Ailus
2019-09-17 12:02         ` Sakari Ailus
     [not found]         ` <20190917120205.GO5781-z7MJbOB4PBP+e+fPlCVrcFDQ4js95KgL@public.gmane.org>
2019-09-17 14:44           ` Rob Herring
2019-09-17 14:44             ` Rob Herring
2019-09-17 14:44             ` Rob Herring
2019-10-30  9:00             ` Dongchun Zhu
2019-10-30  9:00               ` Dongchun Zhu
2019-10-30  9:00               ` Dongchun Zhu
2019-10-30  9:08               ` Sakari Ailus
2019-10-30  9:08                 ` Sakari Ailus
2019-10-30  9:08                 ` Sakari Ailus
2019-09-10 13:04   ` [V2, 2/2] media: i2c: Add more sensor modes for ov8856 camera sensor dongchun.zhu
2019-09-10 13:04     ` dongchun.zhu
2019-09-10 13:04     ` dongchun.zhu
2019-09-10 17:44     ` Andy Shevchenko
2019-09-10 17:44       ` Andy Shevchenko
2019-09-10 17:44       ` Andy Shevchenko
2019-10-30 13:04       ` Dongchun Zhu
2019-10-30 13:04         ` Dongchun Zhu
2019-10-30 13:04         ` Dongchun Zhu
2019-10-30 13:55         ` Sakari Ailus [this message]
2019-10-30 13:55           ` Sakari Ailus
2019-10-30 13:55           ` Sakari Ailus
2019-09-11 10:12     ` Tomasz Figa
2019-09-11 10:12       ` Tomasz Figa
2019-09-11 10:12       ` Tomasz Figa
2019-09-11 11:43       ` Sakari Ailus
2019-09-11 11:43         ` Sakari Ailus
2019-09-11 11:43         ` Sakari Ailus
2019-09-13  7:55     ` Sakari Ailus
2019-09-13  7:55       ` Sakari Ailus
2019-09-13  7:55       ` Sakari Ailus
2019-10-30 13:02       ` Dongchun Zhu
2019-10-30 13:02         ` Dongchun Zhu
2019-10-30 13:02         ` Dongchun Zhu
2019-11-06 14:22         ` Sakari Ailus
2019-11-06 14:22           ` Sakari Ailus
2019-11-06 14:22           ` Sakari Ailus

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=20191030135527.GH10211@paasikivi.fi.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dongchun.zhu@mediatek.com \
    --cc=drinkcat@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=louis.kuo@mediatek.com \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shengnan.wang@mediatek.com \
    --cc=sj.huang@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=tfiga@chromium.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.