diff mbox series

drm: apple: mark local functions static

Message ID 20240117104448.6852-1-arnd@kernel.org (mailing list archive)
State New, archived
Headers show
Series drm: apple: mark local functions static | expand

Commit Message

Arnd Bergmann Jan. 17, 2024, 10:44 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

With linux-6.8, the kernel warns about functions that have no
extern declaration, so mark both of these static.

Fixes: 2d782b0d007d ("gpu: drm: apple: Add sound mode parsing")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
This is for the bits/200-dcp branch in https://github.com/AsahiLinux/linux,
the code is not yet upstream.
---
 drivers/gpu/drm/apple/parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Janne Grunau Jan. 22, 2024, 8:50 p.m. UTC | #1
Hej,

On Wed, Jan 17, 2024, at 11:44, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> With linux-6.8, the kernel warns about functions that have no
> extern declaration, so mark both of these static.
>
> Fixes: 2d782b0d007d ("gpu: drm: apple: Add sound mode parsing")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> This is for the bits/200-dcp branch in https://github.com/AsahiLinux/linux,
> the code is not yet upstream.
> ---
>  drivers/gpu/drm/apple/parser.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/apple/parser.c 
> b/drivers/gpu/drm/apple/parser.c
> index 44aad9a64f9a..ea9f40bb7de2 100644
> --- a/drivers/gpu/drm/apple/parser.c
> +++ b/drivers/gpu/drm/apple/parser.c
> @@ -694,7 +694,7 @@ int parse_epic_service_init(struct dcp_parse_ctx 
> *handle, const char **name,
>  	return ret;
>  }
> 
> -int parse_sample_rate_bit(struct dcp_parse_ctx *handle, unsigned int 
> *ratebit)
> +static int parse_sample_rate_bit(struct dcp_parse_ctx *handle, 
> unsigned int *ratebit)
>  {
>  	s64 rate;
>  	int ret = parse_int(handle, &rate);
> @@ -715,7 +715,7 @@ int parse_sample_rate_bit(struct dcp_parse_ctx 
> *handle, unsigned int *ratebit)
>  	return 0;
>  }
> 
> -int parse_sample_fmtbit(struct dcp_parse_ctx *handle, u64 *fmtbit)
> +static int parse_sample_fmtbit(struct dcp_parse_ctx *handle, u64 *fmtbit)
>  {
>  	s64 sample_size;
>  	int ret = parse_int(handle, &sample_size);

thanks, patch included in my dev branch and will be in the next pull request I'll send to Hector.

I suppose the recipients are generated by an automated get_maintainers.pl invocation. Is that desired for out of tree drivers?

best regards,
Janne
Arnd Bergmann Jan. 23, 2024, 7:34 a.m. UTC | #2
On Mon, Jan 22, 2024, at 21:50, Janne Grunau wrote:
> On Wed, Jan 17, 2024, at 11:44, Arnd Bergmann wrote:
>> 
>> -int parse_sample_rate_bit(struct dcp_parse_ctx *handle, unsigned int 
>> *ratebit)
>> +static int parse_sample_rate_bit(struct dcp_parse_ctx *handle, 
>> unsigned int *ratebit)
>>  {
>>  	s64 rate;
>>  	int ret = parse_int(handle, &rate);
>> @@ -715,7 +715,7 @@ int parse_sample_rate_bit(struct dcp_parse_ctx 
>> *handle, unsigned int *ratebit)
>>  	return 0;
>>  }
>> 
>> -int parse_sample_fmtbit(struct dcp_parse_ctx *handle, u64 *fmtbit)
>> +static int parse_sample_fmtbit(struct dcp_parse_ctx *handle, u64 *fmtbit)
>>  {
>>  	s64 sample_size;
>>  	int ret = parse_int(handle, &sample_size);
>
> thanks, patch included in my dev branch and will be in the next pull 
> request I'll send to Hector.
>
> I suppose the recipients are generated by an automated 
> get_maintainers.pl invocation. Is that desired for out of tree drivers?

I was wondering about that as well, as I don't usually send
patches for code that isn't at least in linux-next yet.

I ended up using what is in the MAINTAINERS file for this driver
in the branch as that is is all I have at this point:

APPLE DRM DISPLAY DRIVER
M:      Alyssa Rosenzweig <alyssa@rosenzweig.io>
L:      dri-devel@lists.freedesktop.org
S:      Maintained
T:      git git://anongit.freedesktop.org/drm/drm-misc
F:      drivers/gpu/drm/apple/

I left out the drivers/gpu/ maintainer addresses though. 

     Arnd
Janne Grunau Jan. 23, 2024, 6:51 p.m. UTC | #3
Hej Arnd,

On Tue, Jan 23, 2024, at 08:34, Arnd Bergmann wrote:
> On Mon, Jan 22, 2024, at 21:50, Janne Grunau wrote:
>> On Wed, Jan 17, 2024, at 11:44, Arnd Bergmann wrote:
>>> 
>>> -int parse_sample_rate_bit(struct dcp_parse_ctx *handle, unsigned int 
>>> *ratebit)
>>> +static int parse_sample_rate_bit(struct dcp_parse_ctx *handle, 
>>> unsigned int *ratebit)
>>>  {
>>>  	s64 rate;
>>>  	int ret = parse_int(handle, &rate);
>>> @@ -715,7 +715,7 @@ int parse_sample_rate_bit(struct dcp_parse_ctx 
>>> *handle, unsigned int *ratebit)
>>>  	return 0;
>>>  }
>>> 
>>> -int parse_sample_fmtbit(struct dcp_parse_ctx *handle, u64 *fmtbit)
>>> +static int parse_sample_fmtbit(struct dcp_parse_ctx *handle, u64 *fmtbit)
>>>  {
>>>  	s64 sample_size;
>>>  	int ret = parse_int(handle, &sample_size);
>>
>> thanks, patch included in my dev branch and will be in the next pull 
>> request I'll send to Hector.
>>
>> I suppose the recipients are generated by an automated 
>> get_maintainers.pl invocation. Is that desired for out of tree drivers?
>
> I was wondering about that as well, as I don't usually send
> patches for code that isn't at least in linux-next yet.
>
> I ended up using what is in the MAINTAINERS file for this driver
> in the branch as that is is all I have at this point:
>
> APPLE DRM DISPLAY DRIVER
> M:      Alyssa Rosenzweig <alyssa@rosenzweig.io>
> L:      dri-devel@lists.freedesktop.org
> S:      Maintained
> T:      git git://anongit.freedesktop.org/drm/drm-misc
> F:      drivers/gpu/drm/apple/
>
> I left out the drivers/gpu/ maintainer addresses though.

oops, answered to the wrong patch. The strscpy one has the drivers/gpu/ maintainers and the question. I replied here first assuming it has the same recipient list. I'd consider the recipients for this mail reasonable.

Janne
diff mbox series

Patch

diff --git a/drivers/gpu/drm/apple/parser.c b/drivers/gpu/drm/apple/parser.c
index 44aad9a64f9a..ea9f40bb7de2 100644
--- a/drivers/gpu/drm/apple/parser.c
+++ b/drivers/gpu/drm/apple/parser.c
@@ -694,7 +694,7 @@  int parse_epic_service_init(struct dcp_parse_ctx *handle, const char **name,
 	return ret;
 }
 
-int parse_sample_rate_bit(struct dcp_parse_ctx *handle, unsigned int *ratebit)
+static int parse_sample_rate_bit(struct dcp_parse_ctx *handle, unsigned int *ratebit)
 {
 	s64 rate;
 	int ret = parse_int(handle, &rate);
@@ -715,7 +715,7 @@  int parse_sample_rate_bit(struct dcp_parse_ctx *handle, unsigned int *ratebit)
 	return 0;
 }
 
-int parse_sample_fmtbit(struct dcp_parse_ctx *handle, u64 *fmtbit)
+static int parse_sample_fmtbit(struct dcp_parse_ctx *handle, u64 *fmtbit)
 {
 	s64 sample_size;
 	int ret = parse_int(handle, &sample_size);