public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Shobhit Kumar <shobhit.kumar@linux.intel.com>
To: Jani Nikula <jani.nikula@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 19:52:24 +0530	[thread overview]
Message-ID: <54242520.1010306@linux.intel.com> (raw)
In-Reply-To: <87tx3vvmyx.fsf@intel.com>

On Thursday 25 September 2014 07:09 PM, Jani Nikula wrote:
> 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.

Well the do..while I felt makes it obvious that the first iteration has 
to be always done anyways and second is optional depeding on the panel 
and thats why I used it,

>
> 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?

but the way you put across your for loop does make me feel that it makes 
the whole logic much more clear. Will do the change. Thanks.

Regards
Shobhit

  reply	other threads:[~2014-09-25 14:22 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
2014-09-25 14:22         ` Shobhit Kumar [this message]
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=54242520.1010306@linux.intel.com \
    --to=shobhit.kumar@linux.intel.com \
    --cc=gaurav.k.singh@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=shobhit.kumar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox