* [PATCH] fbdev: i810: include i810_main.h in i810_dvt.c
@ 2023-05-16 20:28 Arnd Bergmann
2023-05-17 8:46 ` Jani Nikula
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2023-05-16 20:28 UTC (permalink / raw)
To: Antonino Daplas, Helge Deller
Cc: Arnd Bergmann, linux-fbdev, dri-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Building with W=1 shows that a header needs to be included to
make the prototypes visible:
drivers/video/fbdev/i810/i810_dvt.c:194:6: error: no previous prototype for 'round_off_xres' [-Werror=missing-prototypes]
drivers/video/fbdev/i810/i810_dvt.c:233:6: error: no previous prototype for 'i810fb_encode_registers' [-Werror=missing-prototypes]
drivers/video/fbdev/i810/i810_dvt.c:245:6: error: no previous prototype for 'i810fb_fill_var_timings' [-Werror=missing-prototypes]
drivers/video/fbdev/i810/i810_dvt.c:279:5: error: no previous prototype for 'i810_get_watermark' [-Werror=missing-prototypes]
Adding the header leads to another warning from a mismatched
prototype, so fix this as well:
drivers/video/fbdev/i810/i810_dvt.c:280:5: error: conflicting types for 'i810_get_watermark'; have 'u32(struct fb_var_screeninfo *,
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/video/fbdev/i810/i810_dvt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/i810/i810_dvt.c b/drivers/video/fbdev/i810/i810_dvt.c
index b4b3670667ab..2082b5c92e8f 100644
--- a/drivers/video/fbdev/i810/i810_dvt.c
+++ b/drivers/video/fbdev/i810/i810_dvt.c
@@ -14,6 +14,7 @@
#include "i810_regs.h"
#include "i810.h"
+#include "i810_main.h"
struct mode_registers std_modes[] = {
/* 640x480 @ 60Hz */
@@ -276,7 +277,7 @@ void i810fb_fill_var_timings(struct fb_var_screeninfo *var)
var->upper_margin = total - (yres + var->lower_margin + var->vsync_len);
}
-u32 i810_get_watermark(struct fb_var_screeninfo *var,
+u32 i810_get_watermark(const struct fb_var_screeninfo *var,
struct i810fb_par *par)
{
struct mode_registers *params = &par->regs;
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fbdev: i810: include i810_main.h in i810_dvt.c
2023-05-16 20:28 [PATCH] fbdev: i810: include i810_main.h in i810_dvt.c Arnd Bergmann
@ 2023-05-17 8:46 ` Jani Nikula
2023-05-17 8:50 ` Arnd Bergmann
2023-05-19 14:33 ` Helge Deller
0 siblings, 2 replies; 5+ messages in thread
From: Jani Nikula @ 2023-05-17 8:46 UTC (permalink / raw)
To: Arnd Bergmann, Antonino Daplas, Helge Deller
Cc: linux-fbdev, dri-devel, Arnd Bergmann, linux-kernel
On Tue, 16 May 2023, Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Building with W=1 shows that a header needs to be included to
> make the prototypes visible:
>
> drivers/video/fbdev/i810/i810_dvt.c:194:6: error: no previous prototype for 'round_off_xres' [-Werror=missing-prototypes]
> drivers/video/fbdev/i810/i810_dvt.c:233:6: error: no previous prototype for 'i810fb_encode_registers' [-Werror=missing-prototypes]
> drivers/video/fbdev/i810/i810_dvt.c:245:6: error: no previous prototype for 'i810fb_fill_var_timings' [-Werror=missing-prototypes]
> drivers/video/fbdev/i810/i810_dvt.c:279:5: error: no previous prototype for 'i810_get_watermark' [-Werror=missing-prototypes]
>
> Adding the header leads to another warning from a mismatched
> prototype, so fix this as well:
>
> drivers/video/fbdev/i810/i810_dvt.c:280:5: error: conflicting types for 'i810_get_watermark'; have 'u32(struct fb_var_screeninfo *,
Changes here look fine,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
but I think you should try CONFIG_FB_I810_GTF=y to get the same
mismatched prototype error for i810_get_watermark() in i810_gtf.c, and
add the const there while at it. R-b stands for that addition as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/video/fbdev/i810/i810_dvt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/i810/i810_dvt.c b/drivers/video/fbdev/i810/i810_dvt.c
> index b4b3670667ab..2082b5c92e8f 100644
> --- a/drivers/video/fbdev/i810/i810_dvt.c
> +++ b/drivers/video/fbdev/i810/i810_dvt.c
> @@ -14,6 +14,7 @@
>
> #include "i810_regs.h"
> #include "i810.h"
> +#include "i810_main.h"
>
> struct mode_registers std_modes[] = {
> /* 640x480 @ 60Hz */
> @@ -276,7 +277,7 @@ void i810fb_fill_var_timings(struct fb_var_screeninfo *var)
> var->upper_margin = total - (yres + var->lower_margin + var->vsync_len);
> }
>
> -u32 i810_get_watermark(struct fb_var_screeninfo *var,
> +u32 i810_get_watermark(const struct fb_var_screeninfo *var,
> struct i810fb_par *par)
> {
> struct mode_registers *params = &par->regs;
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fbdev: i810: include i810_main.h in i810_dvt.c
2023-05-17 8:46 ` Jani Nikula
@ 2023-05-17 8:50 ` Arnd Bergmann
2023-05-17 8:57 ` Jani Nikula
2023-05-19 14:33 ` Helge Deller
1 sibling, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2023-05-17 8:50 UTC (permalink / raw)
To: Jani Nikula, Arnd Bergmann, Antonino Daplas, Helge Deller
Cc: linux-fbdev, dri-devel, linux-kernel
On Wed, May 17, 2023, at 10:46, Jani Nikula wrote:
> On Tue, 16 May 2023, Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> drivers/video/fbdev/i810/i810_dvt.c:280:5: error: conflicting types for 'i810_get_watermark'; have 'u32(struct fb_var_screeninfo *,
>
> Changes here look fine,
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Thanks!
> but I think you should try CONFIG_FB_I810_GTF=y to get the same
> mismatched prototype error for i810_get_watermark() in i810_gtf.c, and
> add the const there while at it. R-b stands for that addition as well.
I'm fairly sure I looked at that and did not see a problem as
i810_main.h is already included in that file, it was added
in 2006 with commit a0aa7d063927 ("[PATCH] drivers/video/: possible
cleanups").
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fbdev: i810: include i810_main.h in i810_dvt.c
2023-05-17 8:50 ` Arnd Bergmann
@ 2023-05-17 8:57 ` Jani Nikula
0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2023-05-17 8:57 UTC (permalink / raw)
To: Arnd Bergmann, Arnd Bergmann, Antonino Daplas, Helge Deller
Cc: linux-fbdev, dri-devel, linux-kernel
On Wed, 17 May 2023, "Arnd Bergmann" <arnd@arndb.de> wrote:
> On Wed, May 17, 2023, at 10:46, Jani Nikula wrote:
>> On Tue, 16 May 2023, Arnd Bergmann <arnd@kernel.org> wrote:
>
>>>
>>> drivers/video/fbdev/i810/i810_dvt.c:280:5: error: conflicting types for 'i810_get_watermark'; have 'u32(struct fb_var_screeninfo *,
>>
>> Changes here look fine,
>>
>> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
> Thanks!
>
>> but I think you should try CONFIG_FB_I810_GTF=y to get the same
>> mismatched prototype error for i810_get_watermark() in i810_gtf.c, and
>> add the const there while at it. R-b stands for that addition as well.
>
> I'm fairly sure I looked at that and did not see a problem as
> i810_main.h is already included in that file, it was added
> in 2006 with commit a0aa7d063927 ("[PATCH] drivers/video/: possible
> cleanups").
True that, my bad. (Which kind of puts the R-b above in doubt, but hey,
at least I looked at it. ;)
BR,
Jani.
>
> Arnd
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fbdev: i810: include i810_main.h in i810_dvt.c
2023-05-17 8:46 ` Jani Nikula
2023-05-17 8:50 ` Arnd Bergmann
@ 2023-05-19 14:33 ` Helge Deller
1 sibling, 0 replies; 5+ messages in thread
From: Helge Deller @ 2023-05-19 14:33 UTC (permalink / raw)
To: Jani Nikula, Arnd Bergmann, Antonino Daplas
Cc: linux-fbdev, dri-devel, Arnd Bergmann, linux-kernel
On 5/17/23 10:46, Jani Nikula wrote:
> On Tue, 16 May 2023, Arnd Bergmann <arnd@kernel.org> wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> Building with W=1 shows that a header needs to be included to
>> make the prototypes visible:
>>
>> drivers/video/fbdev/i810/i810_dvt.c:194:6: error: no previous prototype for 'round_off_xres' [-Werror=missing-prototypes]
>> drivers/video/fbdev/i810/i810_dvt.c:233:6: error: no previous prototype for 'i810fb_encode_registers' [-Werror=missing-prototypes]
>> drivers/video/fbdev/i810/i810_dvt.c:245:6: error: no previous prototype for 'i810fb_fill_var_timings' [-Werror=missing-prototypes]
>> drivers/video/fbdev/i810/i810_dvt.c:279:5: error: no previous prototype for 'i810_get_watermark' [-Werror=missing-prototypes]
>>
>> Adding the header leads to another warning from a mismatched
>> prototype, so fix this as well:
>>
>> drivers/video/fbdev/i810/i810_dvt.c:280:5: error: conflicting types for 'i810_get_watermark'; have 'u32(struct fb_var_screeninfo *,
>
> Changes here look fine,
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
applied to fbdev tree.
Thanks!
Helge
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-19 14:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16 20:28 [PATCH] fbdev: i810: include i810_main.h in i810_dvt.c Arnd Bergmann
2023-05-17 8:46 ` Jani Nikula
2023-05-17 8:50 ` Arnd Bergmann
2023-05-17 8:57 ` Jani Nikula
2023-05-19 14:33 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).