Re: [PATCH 01/03] fbdev: maxine: make functions static
| Newsgroups | org.freedesktop.lists.dri-devel |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Making the entirely unused function `maxinefb_ims332_read_register` static introduces a new `-Wunused-function` compiler warning. -- --- Patch [1]: [PATCH 01/03] fbdev: maxine: make functions static --- commit dbf41183475fd7e7f21a5345da1fcb01f0239170 Author: Randy Dunlap <[email protected]> fbdev: maxine: make functions static This commit makes three functions static in the maxinefb driver to resolve missing prototype warnings since they are not exposed via a header file. > diff --git a/drivers/video/fbdev/maxinefb.c b/drivers/video/fbdev/maxinefb.c > index 52528eb4dfb41..a9410a553113d 100644 > --- a/drivers/video/fbdev/maxinefb.c > +++ b/drivers/video/fbdev/maxinefb.c [ ... ] > @@ -71,7 +71,7 @@ void maxinefb_ims332_write_register(int regno, register unsigned int val) > *((volatile unsigned short *) (wptr)) = val; > } > > -unsigned int maxinefb_ims332_read_register(int regno) > +static unsigned int maxinefb_ims332_read_register(int regno) [Severity: Low] Does making this function static introduce a new -Wunused-function compiler warning? It appears maxinefb_ims332_read_register() is never called anywhere in the codebase. Adding the static keyword to an unused function transforms the previous missing prototype warning into an unused function warning, which can break builds that enable CONFIG_WERROR. Would it be better to remove this unused code entirely rather than marking it static? > { > register unsigned char *regs = (char *) MAXINEFB_IMS332_ADDRESS; > unsigned char *rptr; -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1