All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] drm/amd/display: Fix link_detect_sink()
@ 2020-04-06  9:19 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2020-04-06  9:19 UTC (permalink / raw)
  To: Harry Wentland, Melissa Wen
  Cc: David (ChunMing) Zhou, kernel-janitors, Chris Park, Zhan Liu,
	Leo Li, Wenjing Liu, Rodrigo Siqueira, Roman Li, amd-gfx,
	Nikola Cornij, David Airlie, Lucy Li, Daniel Vetter,
	Alex Deucher, David Galiffi, Bhawanpreet Lakha,
	Christian König, Anthony Koo

This TODO stub originally had curly braces but we deleted them as part
of a clean up.  Unfortunately that changes the behavior of the code
because now the switch statement is part of the if statement.  Smatch
complains that the indenting doesn't make sense.

    drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:425
    link_detect_sink() warn: if statement not indented

Also I changed "ZAZTODO" to just "TODO".  The ZAZ isn't used anywhere
else.

Fixes: 621514aa4140 ("drm/amd/display: codestyle cleanup on dc_link file until detect_dp func")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Another idea is we should just delete this stub.  Stub code is generally
against kernel style.  I can send a V2 if people want.

 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index a93997ff0419..188670d374a3 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -423,7 +423,7 @@ static enum signal_type link_detect_sink(struct dc_link *link,
 
 	/* PCIE detects the actual connector on add-on board */
 	if (link->link_id.id = CONNECTOR_ID_PCIE)
-		/* ZAZTODO implement PCIE add-on card detection */
+		; /* TODO implement PCIE add-on card detection */
 
 	switch (link->link_id.id) {
 	case CONNECTOR_ID_HDMI_TYPE_A: {
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next] drm/amd/display: Fix link_detect_sink()
@ 2020-04-06  9:19 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2020-04-06  9:19 UTC (permalink / raw)
  To: Harry Wentland, Melissa Wen
  Cc: David (ChunMing) Zhou, kernel-janitors, Chris Park, Zhan Liu,
	Leo Li, Wenjing Liu, Rodrigo Siqueira, Roman Li, amd-gfx,
	Nikola Cornij, David Airlie, Lucy Li, Daniel Vetter,
	Alex Deucher, David Galiffi, Bhawanpreet Lakha,
	Christian König, Anthony Koo

This TODO stub originally had curly braces but we deleted them as part
of a clean up.  Unfortunately that changes the behavior of the code
because now the switch statement is part of the if statement.  Smatch
complains that the indenting doesn't make sense.

    drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:425
    link_detect_sink() warn: if statement not indented

Also I changed "ZAZTODO" to just "TODO".  The ZAZ isn't used anywhere
else.

Fixes: 621514aa4140 ("drm/amd/display: codestyle cleanup on dc_link file until detect_dp func")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Another idea is we should just delete this stub.  Stub code is generally
against kernel style.  I can send a V2 if people want.

 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index a93997ff0419..188670d374a3 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -423,7 +423,7 @@ static enum signal_type link_detect_sink(struct dc_link *link,
 
 	/* PCIE detects the actual connector on add-on board */
 	if (link->link_id.id == CONNECTOR_ID_PCIE)
-		/* ZAZTODO implement PCIE add-on card detection */
+		; /* TODO implement PCIE add-on card detection */
 
 	switch (link->link_id.id) {
 	case CONNECTOR_ID_HDMI_TYPE_A: {
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] drm/amd/display: Fix link_detect_sink()
  2020-04-06  9:19 ` Dan Carpenter
@ 2020-04-06 16:22   ` Kazlauskas, Nicholas
  -1 siblings, 0 replies; 6+ messages in thread
From: Kazlauskas, Nicholas @ 2020-04-06 16:22 UTC (permalink / raw)
  To: Dan Carpenter, Harry Wentland, Melissa Wen
  Cc: David (ChunMing) Zhou, Chris Park, Leo Li, Zhan Liu,
	kernel-janitors, Roman Li, amd-gfx, Wenjing Liu, David Airlie,
	Nikola Cornij, Lucy Li, Daniel Vetter, Alex Deucher,
	David Galiffi, Rodrigo Siqueira, Bhawanpreet Lakha,
	Christian König, Anthony Koo

On 2020-04-06 5:19 a.m., Dan Carpenter wrote:
> This TODO stub originally had curly braces but we deleted them as part
> of a clean up.  Unfortunately that changes the behavior of the code
> because now the switch statement is part of the if statement.  Smatch
> complains that the indenting doesn't make sense.
> 
>      drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:425
>      link_detect_sink() warn: if statement not indented
> 
> Also I changed "ZAZTODO" to just "TODO".  The ZAZ isn't used anywhere
> else.
> 
> Fixes: 621514aa4140 ("drm/amd/display: codestyle cleanup on dc_link file until detect_dp func")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

I'd prefer just dropping the block, but either method is:

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Since that previous patch broke most sink detection...

Regards,
Nicholas Kazlauskas

> ---
> Another idea is we should just delete this stub.  Stub code is generally
> against kernel style.  I can send a V2 if people want.
> 
>   drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> index a93997ff0419..188670d374a3 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> @@ -423,7 +423,7 @@ static enum signal_type link_detect_sink(struct dc_link *link,
>   
>   	/* PCIE detects the actual connector on add-on board */
>   	if (link->link_id.id = CONNECTOR_ID_PCIE)
> -		/* ZAZTODO implement PCIE add-on card detection */
> +		; /* TODO implement PCIE add-on card detection */
>   
>   	switch (link->link_id.id) {
>   	case CONNECTOR_ID_HDMI_TYPE_A: {
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] drm/amd/display: Fix link_detect_sink()
@ 2020-04-06 16:22   ` Kazlauskas, Nicholas
  0 siblings, 0 replies; 6+ messages in thread
From: Kazlauskas, Nicholas @ 2020-04-06 16:22 UTC (permalink / raw)
  To: Dan Carpenter, Harry Wentland, Melissa Wen
  Cc: David (ChunMing) Zhou, Chris Park, Leo Li, Zhan Liu,
	kernel-janitors, Roman Li, amd-gfx, Wenjing Liu, David Airlie,
	Nikola Cornij, Lucy Li, Daniel Vetter, Alex Deucher,
	David Galiffi, Rodrigo Siqueira, Bhawanpreet Lakha,
	Christian König, Anthony Koo

On 2020-04-06 5:19 a.m., Dan Carpenter wrote:
> This TODO stub originally had curly braces but we deleted them as part
> of a clean up.  Unfortunately that changes the behavior of the code
> because now the switch statement is part of the if statement.  Smatch
> complains that the indenting doesn't make sense.
> 
>      drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:425
>      link_detect_sink() warn: if statement not indented
> 
> Also I changed "ZAZTODO" to just "TODO".  The ZAZ isn't used anywhere
> else.
> 
> Fixes: 621514aa4140 ("drm/amd/display: codestyle cleanup on dc_link file until detect_dp func")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

I'd prefer just dropping the block, but either method is:

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Since that previous patch broke most sink detection...

Regards,
Nicholas Kazlauskas

> ---
> Another idea is we should just delete this stub.  Stub code is generally
> against kernel style.  I can send a V2 if people want.
> 
>   drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> index a93997ff0419..188670d374a3 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> @@ -423,7 +423,7 @@ static enum signal_type link_detect_sink(struct dc_link *link,
>   
>   	/* PCIE detects the actual connector on add-on board */
>   	if (link->link_id.id == CONNECTOR_ID_PCIE)
> -		/* ZAZTODO implement PCIE add-on card detection */
> +		; /* TODO implement PCIE add-on card detection */
>   
>   	switch (link->link_id.id) {
>   	case CONNECTOR_ID_HDMI_TYPE_A: {
> 

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] drm/amd/display: Fix link_detect_sink()
  2020-04-06 16:22   ` Kazlauskas, Nicholas
@ 2020-04-07 12:58     ` Dan Carpenter
  -1 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2020-04-07 12:58 UTC (permalink / raw)
  To: Kazlauskas, Nicholas
  Cc: David (ChunMing) Zhou, Chris Park, Leo Li, Zhan Liu,
	kernel-janitors, Roman Li, amd-gfx, Wenjing Liu, Melissa Wen,
	David Airlie, Nikola Cornij, Bhawanpreet Lakha, Lucy Li,
	Daniel Vetter, Alex Deucher, David Galiffi, Rodrigo Siqueira,
	Harry Wentland, Christian König, Anthony Koo

On Mon, Apr 06, 2020 at 12:22:51PM -0400, Kazlauskas, Nicholas wrote:
> On 2020-04-06 5:19 a.m., Dan Carpenter wrote:
> > This TODO stub originally had curly braces but we deleted them as part
> > of a clean up.  Unfortunately that changes the behavior of the code
> > because now the switch statement is part of the if statement.  Smatch
> > complains that the indenting doesn't make sense.
> > 
> >      drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:425
> >      link_detect_sink() warn: if statement not indented
> > 
> > Also I changed "ZAZTODO" to just "TODO".  The ZAZ isn't used anywhere
> > else.
> > 
> > Fixes: 621514aa4140 ("drm/amd/display: codestyle cleanup on dc_link file until detect_dp func")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> I'd prefer just dropping the block, but either method is:
> 
> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> 
> Since that previous patch broke most sink detection...
> 

Sorry for the net-next in the subject.  Anyway, this was fixed in
commit 50dc581a8f43 ("drm/amd/display: fix the broken logic in dc_link.c")
so no need for me to resend.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] drm/amd/display: Fix link_detect_sink()
@ 2020-04-07 12:58     ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2020-04-07 12:58 UTC (permalink / raw)
  To: Kazlauskas, Nicholas
  Cc: David (ChunMing) Zhou, Chris Park, Leo Li, Zhan Liu,
	kernel-janitors, Roman Li, amd-gfx, Wenjing Liu, Melissa Wen,
	David Airlie, Nikola Cornij, Bhawanpreet Lakha, Lucy Li,
	Daniel Vetter, Alex Deucher, David Galiffi, Rodrigo Siqueira,
	Harry Wentland, Christian König, Anthony Koo

On Mon, Apr 06, 2020 at 12:22:51PM -0400, Kazlauskas, Nicholas wrote:
> On 2020-04-06 5:19 a.m., Dan Carpenter wrote:
> > This TODO stub originally had curly braces but we deleted them as part
> > of a clean up.  Unfortunately that changes the behavior of the code
> > because now the switch statement is part of the if statement.  Smatch
> > complains that the indenting doesn't make sense.
> > 
> >      drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:425
> >      link_detect_sink() warn: if statement not indented
> > 
> > Also I changed "ZAZTODO" to just "TODO".  The ZAZ isn't used anywhere
> > else.
> > 
> > Fixes: 621514aa4140 ("drm/amd/display: codestyle cleanup on dc_link file until detect_dp func")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> I'd prefer just dropping the block, but either method is:
> 
> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> 
> Since that previous patch broke most sink detection...
> 

Sorry for the net-next in the subject.  Anyway, this was fixed in
commit 50dc581a8f43 ("drm/amd/display: fix the broken logic in dc_link.c")
so no need for me to resend.

regards,
dan carpenter

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-07 12:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06  9:19 [PATCH net-next] drm/amd/display: Fix link_detect_sink() Dan Carpenter
2020-04-06  9:19 ` Dan Carpenter
2020-04-06 16:22 ` Kazlauskas, Nicholas
2020-04-06 16:22   ` Kazlauskas, Nicholas
2020-04-07 12:58   ` Dan Carpenter
2020-04-07 12:58     ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.