[PATCH 21/22] fbdev/fsl-diu-fb: mark wr_reg_wa() static

Arnd Bergmann posted 22 patches 1 year, 10 months ago
[PATCH 21/22] fbdev/fsl-diu-fb: mark wr_reg_wa() static
Posted by Arnd Bergmann 1 year, 10 months ago
From: Arnd Bergmann <arnd@arndb.de>

wr_reg_wa() is not an appropriate name for a global function, and doesn't need
to be global anyway, so mark it static and avoid the warning:

drivers/video/fbdev/fsl-diu-fb.c:493:6: error: no previous prototype for 'wr_reg_wa' [-Werror=missing-prototypes]

Fixes: 0d9dab39fbbe ("powerpc/5121: fsl-diu-fb: fix issue with re-enabling DIU area descriptor")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/video/fbdev/fsl-diu-fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index 7fbd9f069ac2..0bced82fa494 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -490,7 +490,7 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s)
  * Workaround for failed writing desc register of planes.
  * Needed with MPC5121 DIU rev 2.0 silicon.
  */
-void wr_reg_wa(u32 *reg, u32 val)
+static void wr_reg_wa(u32 *reg, u32 val)
 {
 	do {
 		out_be32(reg, val);
-- 
2.39.2
Re: [PATCH 21/22] fbdev/fsl-diu-fb: mark wr_reg_wa() static
Posted by Helge Deller 1 year, 10 months ago
On 11/8/23 13:58, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> wr_reg_wa() is not an appropriate name for a global function, and doesn't need
> to be global anyway, so mark it static and avoid the warning:
>
> drivers/video/fbdev/fsl-diu-fb.c:493:6: error: no previous prototype for 'wr_reg_wa' [-Werror=missing-prototypes]
>
> Fixes: 0d9dab39fbbe ("powerpc/5121: fsl-diu-fb: fix issue with re-enabling DIU area descriptor")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

applied this patch to the fbdev git tree.

Thanks!
Helge


> ---
>   drivers/video/fbdev/fsl-diu-fb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
> index 7fbd9f069ac2..0bced82fa494 100644
> --- a/drivers/video/fbdev/fsl-diu-fb.c
> +++ b/drivers/video/fbdev/fsl-diu-fb.c
> @@ -490,7 +490,7 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s)
>    * Workaround for failed writing desc register of planes.
>    * Needed with MPC5121 DIU rev 2.0 silicon.
>    */
> -void wr_reg_wa(u32 *reg, u32 val)
> +static void wr_reg_wa(u32 *reg, u32 val)
>   {
>   	do {
>   		out_be32(reg, val);