Message ID | 20230516202814.561262-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp689250vqo; Tue, 16 May 2023 13:42:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45ul0JQdS5uHFPTK/34rp0yesjSl11IWf+6zvb7MuQwxVq2VnKxTg6IQB7+HtHktK0nVO8 X-Received: by 2002:a05:6a00:1a06:b0:62a:4503:53ba with SMTP id g6-20020a056a001a0600b0062a450353bamr44525686pfv.26.1684269777006; Tue, 16 May 2023 13:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684269776; cv=none; d=google.com; s=arc-20160816; b=DSG0ZrqGRMgWwDO7gy7eT0v5U+3rY2WRoEG84KERV+ga618lXZ+1KxGrUjcwUFurrO VTrwuh3WIMOhjv8zI4N5FeuYaI78STA9T7gk1uV4empObhQ0f0Rfq6LyZeSNnfMfz0ri XQen79EzFAIWeAKLoD7HavdZRW6HAa9LhuGVHdCuSiIKg6PEocNB0BPW8zEWVh5MPeUu jaVpv+ELQP3QP4zr1t8ny9fCF/1vRfMly5fxCi0isMUuF/RAcf+awdSccYPHvVuNkErk JoezBzhQAyeQlFp+2YHdBbHSLkNcDquUK0PI/DqP8bV5YpqaSxCssJ0mFFgQ4jiU2b53 napA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7iXF+CsBC0RqoPoOIGnvE7CzDvxdHZsNb+naY8M715E=; b=hv17uNNUU5+s5RhcT83EOKr18vdt7u0eYVZiQuEuqrRRksRhvoadFxUxwWiNsVfx6S B70CLlIVP37iCbIR1Um6S3Vl0b0iWgtxQs1nTasm2jDX1VU4+K70q5C8vaoE+9yLq+iP fuLEu465jINal9G+O60EzpKby6+UdZQtoXTDkbY9mn+BG/r6xJHEvhQzG9kkMaaeGi/9 nv547bA1ztLHgM5HIrrvAjYUfZKAkpy7RQTlLSLfL/17lfFQlbTHPA8doTtigW81uiK8 IpCxZMVU08qXzk3yjm7VJV4rzCvuyI3KTD45fYZt8mBENTQ5+g7FsSVdKMrn0ziVKMXV qLYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qm+bILKu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s128-20020a625e86000000b0064608438fefsi20536809pfb.38.2023.05.16.13.42.42; Tue, 16 May 2023 13:42:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qm+bILKu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229457AbjEPU2Z (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Tue, 16 May 2023 16:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjEPU2X (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 16 May 2023 16:28:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 806C21720; Tue, 16 May 2023 13:28:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 012F46323D; Tue, 16 May 2023 20:28:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA0F1C433D2; Tue, 16 May 2023 20:28:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684268899; bh=NY3pXFEnN0WJe0yBQU+o0uO1sA0r+4fxb6XsPtlNtYk=; h=From:To:Cc:Subject:Date:From; b=Qm+bILKu/42MWX6Rgro5G2hcqvVaVeIw9nyiFm9tO1KaDXBbDvnjOaN/CO4KPIbt4 L01u/BgdYMuqo3Ksqyk2uQ2nhDfubznD78gf+NgZCPhgMbexgXVOYXg68tBy8vNEUG hnow4jUmrdvJ+htOJbOh2GfReHHT3vx8qVCvX08MM5A4uYzTM77f4hnU1iOXWbsGiI Rkexv8XuPs7SHi/Q5aMUi++XCrs9HE9KStM5F18mQLyGchjtix6Nvk9vrzYNNhnubZ VQCI9ZyDRrj2ulzjpIqBhsxM6CRxfFeJD93WVHwqVRlOm0GZYX96QBQ9Zf7WGTNVgP DuWKOWrX9Rn2g== From: Arnd Bergmann <arnd@kernel.org> To: Antonino Daplas <adaplas@gmail.com>, Helge Deller <deller@gmx.de> Cc: Arnd Bergmann <arnd@arndb.de>, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev: i810: include i810_main.h in i810_dvt.c Date: Tue, 16 May 2023 22:28:09 +0200 Message-Id: <20230516202814.561262-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766084865656960574?= X-GMAIL-MSGID: =?utf-8?q?1766084865656960574?= |
Series |
fbdev: i810: include i810_main.h in i810_dvt.c
|
|
Commit Message
Arnd Bergmann
May 16, 2023, 8:28 p.m. UTC
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(-)
Comments
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;
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
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
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
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;