Message ID | 20231129113825.2961913-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp274614vqn; Wed, 29 Nov 2023 03:38:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbSjvyhlkWfcMr4ZfFq5YYtZHI3MO+Nt7lZKinr1IzriqQ+gP1rLgJ/RBuJds9RtS6X24k X-Received: by 2002:a05:6808:2111:b0:3b8:3826:6dcd with SMTP id r17-20020a056808211100b003b838266dcdmr18558152oiw.25.1701257917586; Wed, 29 Nov 2023 03:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701257917; cv=none; d=google.com; s=arc-20160816; b=Of2bT2tvQVc/61F47ABgEER/ZUyl12vyQT3rbsiwxUCS6PIfDT5ColZe1akakt6Gr0 Svxy7nMgj9frdGAvOsg1n+I8dQJP73BiPQprUlr/OA24j0gtt9hKK1AjdJ6BDxOf/2tZ nU/mooHmTM8z4fkZVgJ+091InhwnyEkJSrVFY/ll9d/j3IUzeYml+tTMgqjxRwMngTuc NotSfC269AnsDvyOcnLZQXbmEqDj2tWB8un6svf1CnGm6ATG+1IIxshEZL8LUwt1W+bm wBDLiAZyNh/k1QZpmt7xv0jfy6t3I2XPsXgOoyp7ThH8ARE3C4LUYuA6e8YjbdTSQzq0 MBEQ== 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=9HXBE2iDI4kYSU24As1yzGTGdOoAFryAIS2tTPIA4SM=; fh=/z1cSSdQoBxn9ZLSC8xCe08V+9TT2I+eeWIMxd1NzCY=; b=zvL2hODKtI7fT/Jy8JwNRuB3HT8siJXDH9YRBKSz4KE21xVulmk24/2xzLXem/j+lH Wyjj/xtYM3J7k1oVJjCenBCNof+PWIgdkgxq0faMNjBT0w+nnL6RFQLXABU7cwWi5NSQ 4zpLmMvNixPLPKct8QNq1O3aG/eAgZrC1sowNwieQU0lACrnmqqFe+nlEsqgjTRGM84E Kw6X8TmDfRsw0vfyfIraOetBAQtUep15UsRD8/XYvgc4+Q2t+t38Wf3SSkig4YVvngil 3puPYAcgyWVuf0oC77emJHNRw7Zi6mZk/AHmaac47lhjeY1MCp4TF5VFVuw+gWOL8Vix wrnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VSoB2KAV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b17-20020a630c11000000b005b8ef498e2fsi14153188pgl.181.2023.11.29.03.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 03:38:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VSoB2KAV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0B1A28031C57; Wed, 29 Nov 2023 03:38:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233016AbjK2Li1 (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Wed, 29 Nov 2023 06:38:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232223AbjK2Li0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Nov 2023 06:38:26 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7851C84 for <linux-kernel@vger.kernel.org>; Wed, 29 Nov 2023 03:38:32 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16BDCC433C7; Wed, 29 Nov 2023 11:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701257912; bh=MaraAAbR77wuMHigpLQ9a033vE+F6BEBFhIO1I4KWAY=; h=From:To:Cc:Subject:Date:From; b=VSoB2KAVDCk+9Fcrt6jgLi/HJKmeNyRK92hzWpS/g4wFGrOytNtwdVOzYm6HedTDU uZhxrUOBcYPPS5TN1jBAVH97NeymLIGQPH5RysCgf3kZjNhjoTcJDXlm1/Mb28ixle mkOhxosewvvccPKOanB6sOWYyHr1eWf2n8Az4JEsWfO2VE0Q/+uxC5bmy4A1CrtIOL vboj7S5a45n253tiJsOxczk3znUpF4ab3V9zbTeTgGrxjt1yR9EmnpEUCV5RSWRwp0 f9shJH9pZ5eIx5IWYyYU/xcwfznxVONhQHb5whxWDUrxvVN7axzGbOlNfpVppLQQWG GRd4kxYI30/rA== From: Arnd Bergmann <arnd@kernel.org> To: Frank Binns <frank.binns@imgtec.com>, Donald Robson <donald.robson@imgtec.com>, Matt Coster <matt.coster@imgtec.com> Cc: Arnd Bergmann <arnd@arndb.de>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Sarah Walker <sarah.walker@imgtec.com>, Danilo Krummrich <dakr@redhat.com>, Boris Brezillon <boris.brezillon@collabora.com>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] drm/imagination: avoid -Wmissing-prototype warnings Date: Wed, 29 Nov 2023 12:33:07 +0100 Message-Id: <20231129113825.2961913-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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 03:38:36 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783898222406943884 X-GMAIL-MSGID: 1783898222406943884 |
Series |
[1/2] drm/imagination: avoid -Wmissing-prototype warnings
|
|
Commit Message
Arnd Bergmann
Nov. 29, 2023, 11:33 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> This warning option is now enabled by default, causing a few build regressions in combination with the newly added pvr driver: drivers/gpu/drm/imagination/pvr_device.c:130:6: error: no previous prototype for 'pvr_device_process_active_queues' [-Werror=missing-prototypes] 130 | void pvr_device_process_active_queues(struct pvr_device *pvr_dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/imagination/pvr_fw_meta.c:33:1: error: no previous prototype for 'pvr_meta_cr_read32' [-Werror=missing-prototypes] 33 | pvr_meta_cr_read32(struct pvr_device *pvr_dev, u32 reg_addr, u32 *reg_value_out) | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/imagination/pvr_vm.c:542:6: error: no previous prototype for 'pvr_gpuvm_free' [-Werror=missing-prototypes] 542 | void pvr_gpuvm_free(struct drm_gpuvm *gpuvm) Mark pvr_device_process_active_queues and pvr_gpuvm_free static as they are only used in the file they are defined in, and include the correct header for the pvr_meta_cr_read32 declaration. Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling") Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support") Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/gpu/drm/imagination/pvr_device.c | 2 +- drivers/gpu/drm/imagination/pvr_fw_meta.c | 1 + drivers/gpu/drm/imagination/pvr_vm.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-)
Comments
Hello Arnd, Thanks for this. However, I fixed these in a patch a few minutes before you sent yours. I'm not sure what normally happens in these circumstances, but as my patch has the kernel robot tags and a few additional fixes, I think we should probably use that one. Thanks, Donald On Wed, 2023-11-29 at 12:33 +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > This warning option is now enabled by default, causing a few build regressions > in combination with the newly added pvr driver: > > drivers/gpu/drm/imagination/pvr_device.c:130:6: error: no previous prototype for 'pvr_device_process_active_queues' [-Werror=missing-prototypes] > 130 | void pvr_device_process_active_queues(struct pvr_device *pvr_dev) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/gpu/drm/imagination/pvr_fw_meta.c:33:1: error: no previous prototype for 'pvr_meta_cr_read32' [-Werror=missing-prototypes] > 33 | pvr_meta_cr_read32(struct pvr_device *pvr_dev, u32 reg_addr, u32 *reg_value_out) > | ^~~~~~~~~~~~~~~~~~ > drivers/gpu/drm/imagination/pvr_vm.c:542:6: error: no previous prototype for 'pvr_gpuvm_free' [-Werror=missing-prototypes] > 542 | void pvr_gpuvm_free(struct drm_gpuvm *gpuvm) > > Mark pvr_device_process_active_queues and pvr_gpuvm_free static as they are only used > in the file they are defined in, and include the correct header for the pvr_meta_cr_read32 > declaration. > > Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling") > Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support") > Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/gpu/drm/imagination/pvr_device.c | 2 +- > drivers/gpu/drm/imagination/pvr_fw_meta.c | 1 + > drivers/gpu/drm/imagination/pvr_vm.c | 2 +- > 3 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/imagination/pvr_device.c b/drivers/gpu/drm/imagination/pvr_device.c > index 8499becf4fbb..048eba776cf2 100644 > --- a/drivers/gpu/drm/imagination/pvr_device.c > +++ b/drivers/gpu/drm/imagination/pvr_device.c > @@ -127,7 +127,7 @@ static int pvr_device_clk_init(struct pvr_device *pvr_dev) > * This is called any time we receive a FW event. It iterates over all > * active queues and calls pvr_queue_process() on them. > */ > -void pvr_device_process_active_queues(struct pvr_device *pvr_dev) > +static void pvr_device_process_active_queues(struct pvr_device *pvr_dev) > { > struct pvr_queue *queue, *tmp_queue; > LIST_HEAD(active_queues); > diff --git a/drivers/gpu/drm/imagination/pvr_fw_meta.c b/drivers/gpu/drm/imagination/pvr_fw_meta.c > index 119934c36184..c39beb70c317 100644 > --- a/drivers/gpu/drm/imagination/pvr_fw_meta.c > +++ b/drivers/gpu/drm/imagination/pvr_fw_meta.c > @@ -4,6 +4,7 @@ > #include "pvr_device.h" > #include "pvr_fw.h" > #include "pvr_fw_info.h" > +#include "pvr_fw_meta.h" > #include "pvr_gem.h" > #include "pvr_rogue_cr_defs.h" > #include "pvr_rogue_meta.h" > diff --git a/drivers/gpu/drm/imagination/pvr_vm.c b/drivers/gpu/drm/imagination/pvr_vm.c > index 2aab53594a77..30ecd7d7052e 100644 > --- a/drivers/gpu/drm/imagination/pvr_vm.c > +++ b/drivers/gpu/drm/imagination/pvr_vm.c > @@ -539,7 +539,7 @@ pvr_device_addr_and_size_are_valid(struct pvr_vm_context *vm_ctx, > (device_addr + size <= PVR_PAGE_TABLE_ADDR_SPACE_SIZE); > } > > -void pvr_gpuvm_free(struct drm_gpuvm *gpuvm) > +static void pvr_gpuvm_free(struct drm_gpuvm *gpuvm) > { > kfree(to_pvr_vm_context(gpuvm)); > }
On Wed, Nov 29, 2023, at 13:07, Donald Robson wrote: > Hello Arnd, > > Thanks for this. However, I fixed these in a patch a few minutes > before you sent > yours. I'm not sure what normally happens in these circumstances, but > as my patch has > the kernel robot tags and a few additional fixes, I think we should > probably use that > one. Sure, that's fine. If you don't mind rebasing, just add a "Reported-by: Arnd Bergmann <arnd@arndb.de>" line as well. I tend to create a bug fix for any build regressions I see as part of building randconfig kernels, but it's normal that the mainainers have already fixed the same bug before I send my patch, or that there is a better solution than what I come up with. Arnd
On Wed, 2023-11-29 at 13:16 +0100, Arnd Bergmann wrote: > *** CAUTION: This email originates from a source not known to Imagination Technologies. Think before you click a link or open an attachment *** > > On Wed, Nov 29, 2023, at 13:07, Donald Robson wrote: > > Hello Arnd, > > > > Thanks for this. However, I fixed these in a patch a few minutes > > before you sent > > yours. I'm not sure what normally happens in these circumstances, but > > as my patch has > > the kernel robot tags and a few additional fixes, I think we should > > probably use that > > one. > > Sure, that's fine. If you don't mind rebasing, just add a > "Reported-by: Arnd Bergmann <arnd@arndb.de>" line as well. > > I tend to create a bug fix for any build regressions I see as > part of building randconfig kernels, but it's normal that the > mainainers have already fixed the same bug before I send my > patch, or that there is a better solution than what I come up > with. > > Arnd Will do! In fact Maxime just told me to resubmit as a series anyway. Donald
diff --git a/drivers/gpu/drm/imagination/pvr_device.c b/drivers/gpu/drm/imagination/pvr_device.c index 8499becf4fbb..048eba776cf2 100644 --- a/drivers/gpu/drm/imagination/pvr_device.c +++ b/drivers/gpu/drm/imagination/pvr_device.c @@ -127,7 +127,7 @@ static int pvr_device_clk_init(struct pvr_device *pvr_dev) * This is called any time we receive a FW event. It iterates over all * active queues and calls pvr_queue_process() on them. */ -void pvr_device_process_active_queues(struct pvr_device *pvr_dev) +static void pvr_device_process_active_queues(struct pvr_device *pvr_dev) { struct pvr_queue *queue, *tmp_queue; LIST_HEAD(active_queues); diff --git a/drivers/gpu/drm/imagination/pvr_fw_meta.c b/drivers/gpu/drm/imagination/pvr_fw_meta.c index 119934c36184..c39beb70c317 100644 --- a/drivers/gpu/drm/imagination/pvr_fw_meta.c +++ b/drivers/gpu/drm/imagination/pvr_fw_meta.c @@ -4,6 +4,7 @@ #include "pvr_device.h" #include "pvr_fw.h" #include "pvr_fw_info.h" +#include "pvr_fw_meta.h" #include "pvr_gem.h" #include "pvr_rogue_cr_defs.h" #include "pvr_rogue_meta.h" diff --git a/drivers/gpu/drm/imagination/pvr_vm.c b/drivers/gpu/drm/imagination/pvr_vm.c index 2aab53594a77..30ecd7d7052e 100644 --- a/drivers/gpu/drm/imagination/pvr_vm.c +++ b/drivers/gpu/drm/imagination/pvr_vm.c @@ -539,7 +539,7 @@ pvr_device_addr_and_size_are_valid(struct pvr_vm_context *vm_ctx, (device_addr + size <= PVR_PAGE_TABLE_ADDR_SPACE_SIZE); } -void pvr_gpuvm_free(struct drm_gpuvm *gpuvm) +static void pvr_gpuvm_free(struct drm_gpuvm *gpuvm) { kfree(to_pvr_vm_context(gpuvm)); }