diff mbox series

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

Message ID 20220403142137.2234322-1-trix@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm/amd/display: cleanup extern usage in function definition | expand

Commit Message

Tom Rix April 3, 2022, 2:21 p.m. UTC
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.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Harry Wentland April 4, 2022, 3:22 p.m. UTC | #1
On 2022-04-03 10:21, Tom Rix wrote:
> 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


> The storage-class-specifier extern is not needed in a
> definition, so remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
> index 6ec918af3bff..1ddb4f5eac8e 100644
> --- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
> +++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
> @@ -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;
>
Tom Rix April 4, 2022, 3:43 p.m. UTC | #2
On 4/4/22 8:22 AM, Harry Wentland wrote:
>
> On 2022-04-03 10:21, Tom Rix wrote:
>> 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

>
> 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
>
>
>> The storage-class-specifier extern is not needed in a
>> definition, so remove it.
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
>> ---
>>   drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
>> index 6ec918af3bff..1ddb4f5eac8e 100644
>> --- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
>> +++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
>> @@ -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;
>>
Harry Wentland April 4, 2022, 3:57 p.m. UTC | #3
On 2022-04-04 11:43, Tom Rix wrote:
> 
> On 4/4/22 8:22 AM, Harry Wentland wrote:
>>
>> On 2022-04-03 10:21, Tom Rix wrote:
>>> 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.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> Tom
> 
>>
>> 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
>>
>>
>>> The storage-class-specifier extern is not needed in a
>>> definition, so remove it.
>>>
>>> Signed-off-by: Tom Rix <trix@redhat.com>
>>> ---
>>>   drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
>>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
>>> index 6ec918af3bff..1ddb4f5eac8e 100644
>>> --- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
>>> +++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
>>> @@ -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;
>>>   
>
Alex Deucher April 7, 2022, 5:28 p.m. UTC | #4
Applied.  Thanks!

Alex

On Mon, Apr 4, 2022 at 11:57 AM Harry Wentland <harry.wentland@amd.com> wrote:
>
>
>
> On 2022-04-04 11:43, Tom Rix wrote:
> >
> > On 4/4/22 8:22 AM, Harry Wentland wrote:
> >>
> >> On 2022-04-03 10:21, Tom Rix wrote:
> >>> 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.
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > Tom
> >
> >>
> >> 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
> >>
> >>
> >>> The storage-class-specifier extern is not needed in a
> >>> definition, so remove it.
> >>>
> >>> Signed-off-by: Tom Rix <trix@redhat.com>
> >>> ---
> >>>   drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 6 +++---
> >>>   1 file changed, 3 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
> >>> index 6ec918af3bff..1ddb4f5eac8e 100644
> >>> --- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
> >>> +++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
> >>> @@ -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;
> >>>
> >
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
index 6ec918af3bff..1ddb4f5eac8e 100644
--- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
+++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c
@@ -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;