Skip to contentSkip to conversation

drm/amd/display: cleanup extern usage in function definition

PATCH Applied Tom Rix 3 participants 5 messages Apr 3, 2022 – Apr 7, 2022

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 drm/amd/display: cleanup extern usage in function definition

Smatch reports this issue hdcp1_execution.c:500:29: warning: function
'mod_hdcp_hdcp1_dp_execution' with external linkage has definition

The storage-class-specifier extern is not needed in a definition, so remove it.

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c +3 -3
index 6ec918af3bff..1ddb4f5eac8e 100644
@@ -497,9 +497,9 @@ enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp,
 	return status;
 }
 
-extern enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
-		struct mod_hdcp_event_context *event_ctx,
-		struct mod_hdcp_transition_input_hdcp1 *input)
+enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
+						 struct mod_hdcp_event_context *event_ctx,
+						 struct mod_hdcp_transition_input_hdcp1 *input)
 {
 	enum mod_hdcp_status status = MOD_HDCP_STATUS_SUCCESS;
 
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 5 lines · Tom Rix

Smatch reports this issue hdcp1_execution.c:500:29: warning: function
'mod_hdcp_hdcp1_dp_execution' with external linkage has definition

Which branch are you using?

I don't see the 'extern' on
https://gitlab.freedesktop.org/agd5f/linux/-/blob/amd-staging-drm-next/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c

Harry

Quoted 25 lines

The storage-class-specifier extern is not needed in a definition, so remove it.

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c +3 -3
index 6ec918af3bff..1ddb4f5eac8e 100644
@@ -497,9 +497,9 @@ enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp,
 	return status;
 }
 
-extern enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
-		struct mod_hdcp_event_context *event_ctx,
-		struct mod_hdcp_transition_input_hdcp1 *input)
+enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
+						 struct mod_hdcp_event_context *event_ctx,
+						 struct mod_hdcp_transition_input_hdcp1 *input)
 {
 	enum mod_hdcp_status status = MOD_HDCP_STATUS_SUCCESS;
 
author
#2 lore raw
Quoted 8 lines · Harry Wentland
Quoted 5 lines · Tom Rix

Smatch reports this issue hdcp1_execution.c:500:29: warning: function
'mod_hdcp_hdcp1_dp_execution' with external linkage has definition

Which branch are you using?

linux-next from 4/1

Tom

Quoted 32 lines

I don't see the 'extern' on
https://gitlab.freedesktop.org/agd5f/linux/-/blob/amd-staging-drm-next/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c

Harry

Quoted 25 lines

The storage-class-specifier extern is not needed in a definition, so remove it.

---
  drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c +3 -3
index 6ec918af3bff..1ddb4f5eac8e 100644
@@ -497,9 +497,9 @@ enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp,
  	return status;
  }
 
-extern enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
-		struct mod_hdcp_event_context *event_ctx,
-		struct mod_hdcp_transition_input_hdcp1 *input)
+enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
+						 struct mod_hdcp_event_context *event_ctx,
+						 struct mod_hdcp_transition_input_hdcp1 *input)
  {
  	enum mod_hdcp_status status = MOD_HDCP_STATUS_SUCCESS;
 
maintainer Reviewed-by
#3 lore raw
Quoted 4 lines · Tom Rix
Quoted 2 lines · Harry Wentland

On 2022-04-03 10:21, Tom Rix wrote:

Quoted 9 lines
Quoted 6 lines
Quoted 5 lines

Smatch reports this issue hdcp1_execution.c:500:29: warning: function 'mod_hdcp_hdcp1_dp_execution' with external linkage has definition

Which branch are you using?

linux-next from 4/1

Apologies. I was looking at the wrong function.

Harry

Quoted 33 lines

Tom

Quoted 30 lines

I don't see the 'extern' on
https://gitlab.freedesktop.org/agd5f/linux/-/blob/amd-staging-drm-next/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c>>>
Harry

Quoted 24 lines

The storage-class-specifier extern is not needed in a definition, so remove it.

---
  drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---

  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c +3 -2
index 6ec918af3bff..1ddb4f5eac8e 100644
@@ -497,9 +497,9 @@ enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp,
       return status;
   }
   -extern enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
-        struct mod_hdcp_event_context *event_ctx,
-        struct mod_hdcp_transition_input_hdcp1 *input)
+enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
+                         struct mod_hdcp_event_context *event_ctx,
+                         struct mod_hdcp_transition_input_hdcp1 *input)
   {
       enum mod_hdcp_status status = MOD_HDCP_STATUS_SUCCESS;

Applied
#4 lore raw

Applied. Thanks!

Alex

Quoted 58 lines · Harry Wentland
Quoted 4 lines · Tom Rix
Quoted 2 lines · Harry Wentland

On 2022-04-03 10:21, Tom Rix wrote:

Quoted 9 lines
Quoted 6 lines
Quoted 5 lines

Smatch reports this issue hdcp1_execution.c:500:29: warning: function
'mod_hdcp_hdcp1_dp_execution' with external linkage has definition

Which branch are you using?

linux-next from 4/1

Apologies. I was looking at the wrong function.

Harry

Quoted 33 lines

Tom

Quoted 30 lines

I don't see the 'extern' on
https://gitlab.freedesktop.org/agd5f/linux/-/blob/amd-staging-drm-next/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c>>>
Harry

Quoted 24 lines

The storage-class-specifier extern is not needed in a definition, so remove it.

---
  drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c +3 -2
index 6ec918af3bff..1ddb4f5eac8e 100644
@@ -497,9 +497,9 @@ enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp,
      return status;
  }
  -extern enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
-        struct mod_hdcp_event_context *event_ctx,
-        struct mod_hdcp_transition_input_hdcp1 *input)
+enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
+                         struct mod_hdcp_event_context *event_ctx,
+                         struct mod_hdcp_transition_input_hdcp1 *input)
  {
      enum mod_hdcp_status status = MOD_HDCP_STATUS_SUCCESS;