* [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock
@ 2023-06-08 3:34 Wang Jianzheng
2023-06-08 7:30 ` Neil Armstrong
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Wang Jianzheng @ 2023-06-08 3:34 UTC (permalink / raw)
To: Artur Weber, Neil Armstrong, Sam Ravnborg, David Airlie,
Daniel Vetter, open list:DRM PANEL DRIVERS, open list
Cc: opensource.kernel, wangjianzheng
Remove unneeded variable and directly return 0.
Signed-off-by: Wang Jianzheng <wangjianzheng@vivo.com>
---
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
index 102e1fc7ee38..fec0d014fd0e 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
@@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)
static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
{
struct mipi_dsi_device *dsi = ctx->dsi;
- int ret = 0;
if (lock) {
mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5);
@@ -80,7 +79,7 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5);
}
- return ret;
+ return 0;
}
static int s6d7aa0_on(struct s6d7aa0 *ctx)
--
2.39.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock
2023-06-08 3:34 [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock Wang Jianzheng
@ 2023-06-08 7:30 ` Neil Armstrong
2023-06-08 9:36 ` Andi Shyti
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2023-06-08 7:30 UTC (permalink / raw)
To: Wang Jianzheng, Artur Weber, Sam Ravnborg, David Airlie,
Daniel Vetter, open list:DRM PANEL DRIVERS, open list
Cc: opensource.kernel
On 08/06/2023 05:34, Wang Jianzheng wrote:
> Remove unneeded variable and directly return 0.
>
> Signed-off-by: Wang Jianzheng <wangjianzheng@vivo.com>
> ---
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> index 102e1fc7ee38..fec0d014fd0e 100644
> --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> @@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)
> static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
> {
> struct mipi_dsi_device *dsi = ctx->dsi;
> - int ret = 0;
>
> if (lock) {
> mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5);
> @@ -80,7 +79,7 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
> mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5);
> }
>
> - return ret;
> + return 0;
> }
>
> static int s6d7aa0_on(struct s6d7aa0 *ctx)
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock
2023-06-08 3:34 [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock Wang Jianzheng
2023-06-08 7:30 ` Neil Armstrong
@ 2023-06-08 9:36 ` Andi Shyti
2023-06-08 9:52 ` Artur Weber
2023-06-08 10:10 ` Artur Weber
2023-06-08 12:51 ` Neil Armstrong
3 siblings, 1 reply; 6+ messages in thread
From: Andi Shyti @ 2023-06-08 9:36 UTC (permalink / raw)
To: Wang Jianzheng
Cc: Artur Weber, Neil Armstrong, Sam Ravnborg, David Airlie,
Daniel Vetter, open list:DRM PANEL DRIVERS, open list,
opensource.kernel
Hi Jianzheng,
On Thu, Jun 08, 2023 at 11:34:46AM +0800, Wang Jianzheng wrote:
> Remove unneeded variable and directly return 0.
>
> Signed-off-by: Wang Jianzheng <wangjianzheng@vivo.com>
> ---
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> index 102e1fc7ee38..fec0d014fd0e 100644
> --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> @@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)
> static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
actually this function can completely made void.
> {
> struct mipi_dsi_device *dsi = ctx->dsi;
> - int ret = 0;
>
> if (lock) {
> mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5);
> @@ -80,7 +79,7 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
> mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5);
> }
>
> - return ret;
> + return 0;
Anyway the patch is fine:
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Andi
> }
>
> static int s6d7aa0_on(struct s6d7aa0 *ctx)
> --
> 2.39.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock
2023-06-08 9:36 ` Andi Shyti
@ 2023-06-08 9:52 ` Artur Weber
0 siblings, 0 replies; 6+ messages in thread
From: Artur Weber @ 2023-06-08 9:52 UTC (permalink / raw)
To: Andi Shyti, Wang Jianzheng
Cc: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
open list:DRM PANEL DRIVERS, open list, opensource.kernel
On 08/06/2023 11:36, Andi Shyti wrote:
> Hi Jianzheng,
>
> On Thu, Jun 08, 2023 at 11:34:46AM +0800, Wang Jianzheng wrote:
>> Remove unneeded variable and directly return 0.
>>
>> Signed-off-by: Wang Jianzheng <wangjianzheng@vivo.com>
>> ---
>> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
>> index 102e1fc7ee38..fec0d014fd0e 100644
>> --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
>> +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
>> @@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)
>> static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
>
> actually this function can completely made void.
It can't be made void, as the mipi_dsi_dcs_write_seq() macro calls
return with an int[1].
Best regards
Artur
[1] https://github.com/torvalds/linux/blob/v6.4-rc5/include/drm/drm_mipi_dsi.h#L319-L337
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock
2023-06-08 3:34 [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock Wang Jianzheng
2023-06-08 7:30 ` Neil Armstrong
2023-06-08 9:36 ` Andi Shyti
@ 2023-06-08 10:10 ` Artur Weber
2023-06-08 12:51 ` Neil Armstrong
3 siblings, 0 replies; 6+ messages in thread
From: Artur Weber @ 2023-06-08 10:10 UTC (permalink / raw)
To: Wang Jianzheng, Neil Armstrong, Sam Ravnborg, David Airlie,
Daniel Vetter, open list:DRM PANEL DRIVERS, open list
Cc: opensource.kernel
On 08/06/2023 05:34, Wang Jianzheng wrote:
> Remove unneeded variable and directly return 0.
>
> Signed-off-by: Wang Jianzheng <wangjianzheng@vivo.com>
> ---
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> index 102e1fc7ee38..fec0d014fd0e 100644
> --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> @@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)
> static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
> {
> struct mipi_dsi_device *dsi = ctx->dsi;
> - int ret = 0;
>
> if (lock) {
> mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5);
> @@ -80,7 +79,7 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
> mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5);
> }
>
> - return ret;
> + return 0;
> }
>
> static int s6d7aa0_on(struct s6d7aa0 *ctx)
Reviewed-by: Artur Weber <aweber.kernel@gmail.com>
Best regards
Artur
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock
2023-06-08 3:34 [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock Wang Jianzheng
` (2 preceding siblings ...)
2023-06-08 10:10 ` Artur Weber
@ 2023-06-08 12:51 ` Neil Armstrong
3 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2023-06-08 12:51 UTC (permalink / raw)
To: Artur Weber, Sam Ravnborg, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, Wang Jianzheng
Cc: opensource.kernel
Hi,
On Thu, 08 Jun 2023 11:34:46 +0800, Wang Jianzheng wrote:
> Remove unneeded variable and directly return 0.
>
>
Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)
[1/1] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=c5dacfe2e6c1251276e29b4cdac771f504593523
--
Neil
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-08 12:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 3:34 [PATCH] drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock Wang Jianzheng
2023-06-08 7:30 ` Neil Armstrong
2023-06-08 9:36 ` Andi Shyti
2023-06-08 9:52 ` Artur Weber
2023-06-08 10:10 ` Artur Weber
2023-06-08 12:51 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).