Skip to contentSkip to conversation

drm: apple: mark local functions static

PATCH In review Arnd Bergmann 3 participants 4 messages Jan 17, 2024 – Jan 23, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: apple: mark local functions static

From: Arnd Bergmann <[email protected]>

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")

---
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(-)
drivers/gpu/drm/apple/parser.c +2 -2
index 44aad9a64f9a..ea9f40bb7de2 100644
@@ -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);
Signature · 1 line
2.39.2
#1 lore raw

Hej,

Quoted 40 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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")

---
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(-)
drivers/gpu/drm/apple/parser.c +1 -1
index 44aad9a64f9a..ea9f40bb7de2 100644
@@ -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)

{

drivers/gpu/drm/apple/parser.c +1 -1
 	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;
Quoted 1 line

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

#2 lore raw
Quoted 23 lines · Janne Grunau
Quoted 17 lines · Arnd Bergmann

-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)
{

drivers/gpu/drm/apple/parser.c +1 -1
 	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;
Quoted 1 line

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.

Quoted 2 lines

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 <[email protected]>
L:      [email protected]
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

#3 lore raw

Hej Arnd,

Quoted 33 lines · Arnd Bergmann
Quoted 23 lines · Janne Grunau
Quoted 17 lines · Arnd Bergmann

-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)
{

drivers/gpu/drm/apple/parser.c +1 -1
 	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;
Quoted 1 line

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.

Quoted 2 lines

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:

Quoted 8 lines

APPLE DRM DISPLAY DRIVER

M:      Alyssa Rosenzweig <[email protected]>
L:      [email protected]
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