From: "\"Stéphane Viau\"" <sviau@codeaurora.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/7] drm: add atomic fxns
Date: Thu, 24 Jul 2014 13:31:24 -0500 [thread overview]
Message-ID: <c2056f5b3f78d4055d73d3f6cffc8f66.squirrel@www.codeaurora.org> (raw)
In-Reply-To: <20140724100207.GC3811@ulmo.nvidia.com>
Hi,
>> {
>> int ret = -EINVAL;
>> - struct drm_connector *connector = obj_to_connector(obj);
>>
>> /* Do DPMS ourselves */
>> if (property == connector->dev->mode_config.dpms_property) {
>> if (connector->funcs->dpms)
>> (*connector->funcs->dpms)(connector, (int)value);
>> ret = 0;
>> - } else if (connector->funcs->set_property)
>> - ret = connector->funcs->set_property(connector, property,
> value);
>> + } else if (connector->funcs->set_property) {
>> + ret = connector->funcs->set_property(connector, state,
>> + property, value, blob_data);
>> + }
>
> Why the extra braces here? There's still only one statement in the
> block.
>
According to Documentation/kernel-doc-nano-HOWTO.txt, these extra braces are
supposed to be present:
"
Chapter 3: Placing Braces and Spaces
[...]
Do not unnecessarily use braces where a single statement will do.
[...]
This does not apply if only one branch of a conditional statement is a single
statement; in the latter case use braces in both branches:
if (condition) {
do_this();
do_that();
} else {
otherwise();
}
"
Stéphane.
>> /**
>> - * drm_mode_getproperty_ioctl - get the current value of a object's
> property
>> + * drm_mode_obj_get_properties_ioctl - get the current value of a
> object's property
>> * @dev: DRM device
>> * @data: ioctl data
>> * @file_priv: DRM file info
>
> This isn't really introduced by this patch, but isn't this kerneldoc
> comment wrong? drm_mode_obj_get_properties_ioctl() seems to return the
> values of all properties of an object rather than just one.
>
> Thierry
>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2014-07-24 18:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 19:38 [PATCH 0/7] prepare for atomic.. the great propertyification Rob Clark
2014-07-23 19:38 ` [PATCH 1/7] drm: add atomic fxns Rob Clark
2014-07-23 21:34 ` Daniel Vetter
2014-07-23 21:38 ` Daniel Vetter
2014-07-24 10:02 ` Thierry Reding
2014-07-24 18:31 ` "Stéphane Viau" [this message]
2014-07-23 19:38 ` [PATCH 2/7] drm: split propvals out and blob property support Rob Clark
2014-07-23 19:38 ` [PATCH 3/7] drm: Refactor object property check code Rob Clark
2014-07-23 19:38 ` [PATCH 4/7] drm: convert plane to properties/state Rob Clark
2014-07-24 0:42 ` Matt Roper
2014-07-23 19:38 ` [PATCH 5/7] drm: convert crtc " Rob Clark
2014-07-23 19:38 ` [PATCH 6/7] drm/msm: add atomic support Rob Clark
2014-07-23 19:38 ` [PATCH 7/7] drm: Fix up the atomic legacy paths so they work Rob Clark
2014-07-24 12:25 ` [PATCH 0/7] prepare for atomic.. the great propertyification Daniel Vetter
2014-07-24 13:36 ` Rob Clark
2014-07-24 14:00 ` Daniel Vetter
2014-07-24 14:56 ` Rob Clark
2014-07-25 8:15 ` Daniel Vetter
2014-07-25 12:13 ` Rob Clark
-- strict thread matches above, loose matches on Subject: below --
2014-05-30 17:23 [PATCH 0/7] prepare for atomic/nuclear modeset/pageflip (vN+1) Rob Clark
2014-05-30 17:23 ` [PATCH 1/7] drm: add atomic fxns Rob Clark
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=c2056f5b3f78d4055d73d3f6cffc8f66.squirrel@www.codeaurora.org \
--to=sviau@codeaurora.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=thierry.reding@gmail.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