From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?=22St=E9phane_Viau=22?= Subject: Re: [PATCH 1/7] drm: add atomic fxns Date: Thu, 24 Jul 2014 13:31:24 -0500 Message-ID: References: <1406144300-4995-1-git-send-email-robdclark@gmail.com> <1406144300-4995-2-git-send-email-robdclark@gmail.com> <20140724100207.GC3811@ulmo.nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.11.231]) by gabe.freedesktop.org (Postfix) with ESMTP id 209A36E3DF for ; Thu, 24 Jul 2014 11:31:25 -0700 (PDT) In-Reply-To: <20140724100207.GC3811@ulmo.nvidia.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Thierry Reding Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hi, >> { >> int ret =3D -EINVAL; >> - struct drm_connector *connector =3D obj_to_connector(obj); >> >> /* Do DPMS ourselves */ >> if (property =3D=3D connector->dev->mode_config.dpms_property) { >> if (connector->funcs->dpms) >> (*connector->funcs->dpms)(connector, (int)value); >> ret =3D 0; >> - } else if (connector->funcs->set_property) >> - ret =3D connector->funcs->set_property(connector, property, > value); >> + } else if (connector->funcs->set_property) { >> + ret =3D 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 sing= le statement; in the latter case use braces in both branches: if (condition) { do_this(); do_that(); } else { otherwise(); } " St=E9phane. >> /** >> - * 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