All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>Jose Abreu
	<Jose.Abreu@synopsys.com>,
	Shashank Sharma <shashank.sharma@intel.com>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	ville.syrjala@linux.intel.com, treding@nvidia.com
Cc: daniel.vetter@intel.com
Subject: Re: [PATCH v2 4/6] drm: scrambling support in drm layer
Date: Tue, 07 Feb 2017 17:09:34 +0200	[thread overview]
Message-ID: <87fujqujf5.fsf@intel.com> (raw)
In-Reply-To: <4567def0-ab54-b0ff-9e38-66a2177e5dfd@synopsys.com>

On Tue, 07 Feb 2017, Jose Abreu <Jose.Abreu@synopsys.com> wrote:
> Hi Jani,
>
>
> On 07-02-2017 13:35, Jani Nikula wrote:
>> On Tue, 07 Feb 2017, Jose Abreu <Jose.Abreu@synopsys.com> wrote:
>>>> +bool drm_scdc_check_scrambling_status(struct i2c_adapter *adapter)
>>>> +{
>>>> +	u8 status;
>>>> +	int ret;
>>>> +
>>>> +	ret = drm_scdc_readb(adapter, SCDC_SCRAMBLER_STATUS, &status);
>>>> +	if (ret < 0) {
>>>> +		DRM_ERROR("Failed to read scrambling status, error %d\n", ret);
>>>> +		return false;
>>>> +	}
>>>> +
>>>> +	return status & SCDC_SCRAMBLING_STATUS;
>>> "return (status & SCDC_SCRAMBLING_STATUS) > 0;" ?
>> What's the point in that?
>>
>> BR,
>> Jani.
>>
>>
>
> Sorry, I didn't see the SCDC_SCRAMBLING_STATUS is BIT(0). Anyway,
> my intention was to return either 1 or 0 or else the value of the
> "and" would be returned. I think in x86 the bool is char, what
> could happen if SCDC_SCRAMBLING_STATUS was BIT(>7)? Does the cast
> work as expected?

The implicit type conversion works just fine.

BR,
Jani.

>
> Best regards,
> Jose Miguel Abreu
>

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-02-07 15:09 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 13:59 [PATCH v2 0/6] HDMI 2.0: Scrambling in DRM layer Shashank Sharma
2017-02-06 13:59 ` [PATCH v2 1/6] drm: Add SCDC helpers Shashank Sharma
2017-02-07 10:54   ` Jose Abreu
2017-02-07 16:09     ` Sharma, Shashank
2017-02-08 11:27       ` Jose Abreu
2017-02-08 12:59         ` Sharma, Shashank
2017-02-08 14:26           ` Jose Abreu
2017-02-06 13:59 ` [PATCH v2 2/6] drm/edid: check for HF-VSDB block Shashank Sharma
2017-02-07 10:56   ` Jose Abreu
2017-02-06 13:59 ` [PATCH v2 3/6] drm/edid: detect SCDC support in HF-VSDB Shashank Sharma
2017-02-07 11:01   ` Jose Abreu
2017-02-07 16:13     ` Sharma, Shashank
2017-02-07 16:36       ` Thierry Reding
2017-02-08 11:36         ` Jose Abreu
2017-02-08 13:03           ` Sharma, Shashank
2017-02-06 13:59 ` [PATCH v2 4/6] drm: scrambling support in drm layer Shashank Sharma
2017-02-07 11:14   ` Jose Abreu
2017-02-07 13:35     ` Jani Nikula
2017-02-07 14:58       ` Jose Abreu
2017-02-07 15:09         ` Jani Nikula [this message]
2017-02-08 12:27           ` Jose Abreu
2017-02-08 12:34             ` Jani Nikula
2017-02-07 16:19     ` Sharma, Shashank
2017-02-08 11:31       ` Jose Abreu
2017-02-08 13:01         ` Sharma, Shashank
2017-02-06 13:59 ` [PATCH v2 5/6] drm/i915: enable scrambling Shashank Sharma
2017-02-07 10:21   ` Jani Nikula
2017-02-07 16:05     ` Sharma, Shashank
2017-02-06 13:59 ` [PATCH v2 6/6] drm/i915: allow HDMI 2.0 clock rates Shashank Sharma
2017-02-06 19:22 ` ✓ Fi.CI.BAT: success for HDMI 2.0: Scrambling in DRM layer Patchwork

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=87fujqujf5.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=daniel.vetter@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.