diff mbox series

drm/bridge: analogix_dp: Fix misleading indentation reported by smatch

Message ID 20181013111844.22183-1-enric.balletbo@collabora.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge: analogix_dp: Fix misleading indentation reported by smatch | expand

Commit Message

Enric Balletbo i Serra Oct. 13, 2018, 11:18 a.m. UTC
This patch avoids that building the bridge/analogix source code with
smatch triggers complaints about inconsistent indenting.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Laurent Pinchart Oct. 15, 2018, 11:11 p.m. UTC | #1
Hi Enric,

Thank you for the patch.

On Saturday, 13 October 2018 14:18:44 EEST Enric Balletbo i Serra wrote:
> This patch avoids that building the bridge/analogix source code with
> smatch triggers complaints about inconsistent indenting.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> 
>  drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index
> d68986cea132..75e2649d7515 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -1219,12 +1219,12 @@ static int analogix_dp_bridge_attach(struct
> drm_bridge *bridge) * plat_data->attch return, that's why we record the
> connector
>  	 * point after plat attached.
>  	 */
> -	 if (dp->plat_data->attach) {
> -		 ret = dp->plat_data->attach(dp->plat_data, bridge, connector);
> -		 if (ret) {
> -			 DRM_ERROR("Failed at platform attch func\n");
> -			 return ret;
> -		 }
> +	if (dp->plat_data->attach) {
> +		ret = dp->plat_data->attach(dp->plat_data, bridge, connector);
> +		if (ret) {
> +			DRM_ERROR("Failed at platform attch func\n");
> +			return ret;
> +		}
>  	}

This looks good to me. While at it, could you s/attch/attach/ ? With that 
fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	if (dp->plat_data->panel) {
Enric Balletbo i Serra Oct. 16, 2018, 9:43 a.m. UTC | #2
Ho Laurent,

On 16/10/18 01:11, Laurent Pinchart wrote:
> Hi Enric,
> 
> Thank you for the patch.
> 
> On Saturday, 13 October 2018 14:18:44 EEST Enric Balletbo i Serra wrote:
>> This patch avoids that building the bridge/analogix source code with
>> smatch triggers complaints about inconsistent indenting.
>>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>> ---
>>
>>  drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index
>> d68986cea132..75e2649d7515 100644
>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> @@ -1219,12 +1219,12 @@ static int analogix_dp_bridge_attach(struct
>> drm_bridge *bridge) * plat_data->attch return, that's why we record the
>> connector
>>  	 * point after plat attached.
>>  	 */
>> -	 if (dp->plat_data->attach) {
>> -		 ret = dp->plat_data->attach(dp->plat_data, bridge, connector);
>> -		 if (ret) {
>> -			 DRM_ERROR("Failed at platform attch func\n");
>> -			 return ret;
>> -		 }
>> +	if (dp->plat_data->attach) {
>> +		ret = dp->plat_data->attach(dp->plat_data, bridge, connector);
>> +		if (ret) {
>> +			DRM_ERROR("Failed at platform attch func\n");
>> +			return ret;
>> +		}
>>  	}
> 
> This looks good to me. While at it, could you s/attch/attach/ ? With that 
> fixed,

Sure, will do now, just preparing v2.

> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
>>  	if (dp->plat_data->panel) {
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index d68986cea132..75e2649d7515 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1219,12 +1219,12 @@  static int analogix_dp_bridge_attach(struct drm_bridge *bridge)
 	 * plat_data->attch return, that's why we record the connector
 	 * point after plat attached.
 	 */
-	 if (dp->plat_data->attach) {
-		 ret = dp->plat_data->attach(dp->plat_data, bridge, connector);
-		 if (ret) {
-			 DRM_ERROR("Failed at platform attch func\n");
-			 return ret;
-		 }
+	if (dp->plat_data->attach) {
+		ret = dp->plat_data->attach(dp->plat_data, bridge, connector);
+		if (ret) {
+			DRM_ERROR("Failed at platform attch func\n");
+			return ret;
+		}
 	}
 
 	if (dp->plat_data->panel) {