diff mbox

[v2,3/5] drm/bridge: squash lines for simple wrapper functions

Message ID 1473863952-7658-4-git-send-email-yamada.masahiro@socionext.com (mailing list archive)
State New, archived
Headers show

Commit Message

Masahiro Yamada Sept. 14, 2016, 2:39 p.m. UTC
Remove unneeded variables and assignments.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

Comments

Sean Paul Sept. 15, 2016, 1:51 p.m. UTC | #1
On Wed, Sep 14, 2016 at 10:39 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
>
>  drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> index 52c1b6b..fae0293 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> @@ -1073,34 +1073,22 @@ void analogix_dp_set_lane3_link_training(struct analogix_dp_device *dp,
>
>  u32 analogix_dp_get_lane0_link_training(struct analogix_dp_device *dp)
>  {
> -       u32 reg;
> -
> -       reg = readl(dp->reg_base + ANALOGIX_DP_LN0_LINK_TRAINING_CTL);
> -       return reg;
> +       return readl(dp->reg_base + ANALOGIX_DP_LN0_LINK_TRAINING_CTL);
>  }
>
>  u32 analogix_dp_get_lane1_link_training(struct analogix_dp_device *dp)
>  {
> -       u32 reg;
> -
> -       reg = readl(dp->reg_base + ANALOGIX_DP_LN1_LINK_TRAINING_CTL);
> -       return reg;
> +       return readl(dp->reg_base + ANALOGIX_DP_LN1_LINK_TRAINING_CTL);
>  }
>
>  u32 analogix_dp_get_lane2_link_training(struct analogix_dp_device *dp)
>  {
> -       u32 reg;
> -
> -       reg = readl(dp->reg_base + ANALOGIX_DP_LN2_LINK_TRAINING_CTL);
> -       return reg;
> +       return readl(dp->reg_base + ANALOGIX_DP_LN2_LINK_TRAINING_CTL);
>  }
>
>  u32 analogix_dp_get_lane3_link_training(struct analogix_dp_device *dp)
>  {
> -       u32 reg;
> -
> -       reg = readl(dp->reg_base + ANALOGIX_DP_LN3_LINK_TRAINING_CTL);
> -       return reg;
> +       return readl(dp->reg_base + ANALOGIX_DP_LN3_LINK_TRAINING_CTL);
>  }
>
>  void analogix_dp_reset_macro(struct analogix_dp_device *dp)
> --
> 1.9.1
>
Sean Paul Sept. 15, 2016, 2:46 p.m. UTC | #2
On Thu, Sep 15, 2016 at 9:51 AM, Sean Paul <seanpaul@chromium.org> wrote:
> On Wed, Sep 14, 2016 at 10:39 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>> Remove unneeded variables and assignments.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>

Decided to apply patches 1-4 to drm-misc

Thanks,

Sean

>> ---
>>
>>  drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 20 ++++----------------
>>  1 file changed, 4 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
>> index 52c1b6b..fae0293 100644
>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
>> @@ -1073,34 +1073,22 @@ void analogix_dp_set_lane3_link_training(struct analogix_dp_device *dp,
>>
>>  u32 analogix_dp_get_lane0_link_training(struct analogix_dp_device *dp)
>>  {
>> -       u32 reg;
>> -
>> -       reg = readl(dp->reg_base + ANALOGIX_DP_LN0_LINK_TRAINING_CTL);
>> -       return reg;
>> +       return readl(dp->reg_base + ANALOGIX_DP_LN0_LINK_TRAINING_CTL);
>>  }
>>
>>  u32 analogix_dp_get_lane1_link_training(struct analogix_dp_device *dp)
>>  {
>> -       u32 reg;
>> -
>> -       reg = readl(dp->reg_base + ANALOGIX_DP_LN1_LINK_TRAINING_CTL);
>> -       return reg;
>> +       return readl(dp->reg_base + ANALOGIX_DP_LN1_LINK_TRAINING_CTL);
>>  }
>>
>>  u32 analogix_dp_get_lane2_link_training(struct analogix_dp_device *dp)
>>  {
>> -       u32 reg;
>> -
>> -       reg = readl(dp->reg_base + ANALOGIX_DP_LN2_LINK_TRAINING_CTL);
>> -       return reg;
>> +       return readl(dp->reg_base + ANALOGIX_DP_LN2_LINK_TRAINING_CTL);
>>  }
>>
>>  u32 analogix_dp_get_lane3_link_training(struct analogix_dp_device *dp)
>>  {
>> -       u32 reg;
>> -
>> -       reg = readl(dp->reg_base + ANALOGIX_DP_LN3_LINK_TRAINING_CTL);
>> -       return reg;
>> +       return readl(dp->reg_base + ANALOGIX_DP_LN3_LINK_TRAINING_CTL);
>>  }
>>
>>  void analogix_dp_reset_macro(struct analogix_dp_device *dp)
>> --
>> 1.9.1
>>
Masahiro Yamada Sept. 16, 2016, 1:41 a.m. UTC | #3
Hi Sean,

2016-09-15 23:46 GMT+09:00 Sean Paul <seanpaul@chromium.org>:
> On Thu, Sep 15, 2016 at 9:51 AM, Sean Paul <seanpaul@chromium.org> wrote:
>> On Wed, Sep 14, 2016 at 10:39 AM, Masahiro Yamada
>> <yamada.masahiro@socionext.com> wrote:
>>> Remove unneeded variables and assignments.
>>>
>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>
>> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>>
>
> Decided to apply patches 1-4 to drm-misc
>
> Thanks,
>
> Sean


Thanks.

I've just updated [5/5 drm/i915]
and posted v3.
diff mbox

Patch

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
index 52c1b6b..fae0293 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
@@ -1073,34 +1073,22 @@  void analogix_dp_set_lane3_link_training(struct analogix_dp_device *dp,
 
 u32 analogix_dp_get_lane0_link_training(struct analogix_dp_device *dp)
 {
-	u32 reg;
-
-	reg = readl(dp->reg_base + ANALOGIX_DP_LN0_LINK_TRAINING_CTL);
-	return reg;
+	return readl(dp->reg_base + ANALOGIX_DP_LN0_LINK_TRAINING_CTL);
 }
 
 u32 analogix_dp_get_lane1_link_training(struct analogix_dp_device *dp)
 {
-	u32 reg;
-
-	reg = readl(dp->reg_base + ANALOGIX_DP_LN1_LINK_TRAINING_CTL);
-	return reg;
+	return readl(dp->reg_base + ANALOGIX_DP_LN1_LINK_TRAINING_CTL);
 }
 
 u32 analogix_dp_get_lane2_link_training(struct analogix_dp_device *dp)
 {
-	u32 reg;
-
-	reg = readl(dp->reg_base + ANALOGIX_DP_LN2_LINK_TRAINING_CTL);
-	return reg;
+	return readl(dp->reg_base + ANALOGIX_DP_LN2_LINK_TRAINING_CTL);
 }
 
 u32 analogix_dp_get_lane3_link_training(struct analogix_dp_device *dp)
 {
-	u32 reg;
-
-	reg = readl(dp->reg_base + ANALOGIX_DP_LN3_LINK_TRAINING_CTL);
-	return reg;
+	return readl(dp->reg_base + ANALOGIX_DP_LN3_LINK_TRAINING_CTL);
 }
 
 void analogix_dp_reset_macro(struct analogix_dp_device *dp)