From: Jani Nikula <jani.nikula@linux.intel.com>
To: Shobhit Kumar <shobhit.kumar@linux.intel.com>,
Gaurav K Singh <gaurav.k.singh@intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: Shobhit Kumar <shobhit.kumar@intel.com>
Subject: Re: [PATCH 5/9] drm/i915: SHUTDOWN & Turn ON packets to be sent for both MIPI Ports in case of dual link Configuration
Date: Thu, 25 Sep 2014 16:39:02 +0300 [thread overview]
Message-ID: <87tx3vvmyx.fsf@intel.com> (raw)
In-Reply-To: <54241078.6040508@linux.intel.com>
On Thu, 25 Sep 2014, Shobhit Kumar <shobhit.kumar@linux.intel.com> wrote:
> On Wednesday 24 September 2014 03:02 PM, Jani Nikula wrote:
>> On Wed, 24 Sep 2014, Gaurav K Singh <gaurav.k.singh@intel.com> wrote:
>>> + do {
>>
>> Please never use a do-while when a regular for loop will do.
>
> Hmm, ok but reasoning ? Point here is that anyway we have to do once for
> first port and do..while helps maintain that simple flow
Okay, this is subjective. It's my opinion that for doing things N times
in C, the basic for (i = 0; i < N; i++) *is* the paradigm to use. A
sub-second glance at that, and you know what it does. Not so with do {
... } while (--count > 0), particularly when the block has lots of
stuff.
So I'd go with something like:
for (i = 0; i < intel_dsi->dual_link ? 2 : 1; i++)
where it's immediately obvious that this stuff is done twice for dual
link. Makes sense, right?
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-09-25 13:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 8:46 [PATCH 0/9] BYT DSI Dual Link Support Gaurav K Singh
2014-09-24 8:46 ` [PATCH 1/9] drm/i915: New functions added for enabling & disabling MIPI Port Ctrl reg Gaurav K Singh
2014-09-24 8:46 ` [PATCH 2/9] drm/i915: MIPI Sequence to be sent to the DSI Controller based on the port no from VBT Gaurav K Singh
2014-09-24 8:46 ` [PATCH 3/9] drm/i915: MIPI Port Ctrl related changes for dual link configuration Gaurav K Singh
2014-09-24 9:27 ` Jani Nikula
2014-10-21 6:30 ` Singh, Gaurav K
2014-10-21 12:12 ` Daniel Vetter
2014-10-21 13:19 ` Jani Nikula
2014-09-24 8:46 ` [PATCH 4/9] drm/i915: Pixel Clock and pixel overlap related changes for dual link Configuration Gaurav K Singh
2014-09-24 9:23 ` Jani Nikula
2014-09-24 8:46 ` [PATCH 5/9] drm/i915: SHUTDOWN & Turn ON packets to be sent for both MIPI Ports in case of " Gaurav K Singh
2014-09-24 9:32 ` Jani Nikula
2014-09-25 12:54 ` Shobhit Kumar
2014-09-25 13:39 ` Jani Nikula [this message]
2014-09-25 14:22 ` Shobhit Kumar
2014-09-24 8:46 ` [PATCH 6/9] drm/i915: Dsipll clk to be enabled for DSI1 in case of dual link configuration Gaurav K Singh
2014-09-24 9:34 ` Jani Nikula
2014-09-24 8:46 ` [PATCH 7/9] drm/i915: MIPI Timings related changes for dual link Configuration Gaurav K Singh
2014-09-24 8:46 ` [PATCH 8/9] drm/i915: MIPI encoder disable " Gaurav K Singh
2014-09-24 8:46 ` [PATCH 9/9] drm/i915: MIPI Encoder enable related changes for dual link configuration Gaurav K Singh
2014-09-24 9:01 ` [PATCH 0/9] BYT DSI Dual Link Support Daniel Vetter
2014-09-25 12:47 ` Shobhit Kumar
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=87tx3vvmyx.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=gaurav.k.singh@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=shobhit.kumar@intel.com \
--cc=shobhit.kumar@linux.intel.com \
/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.