Message ID | 20221022043548.1671644-1-scottjcrouch@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1045779wrr; Fri, 21 Oct 2022 22:01:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7xVC9VGaEiYcid5UsgkCIS9ynAniioKisG/NaVXQVYVSiUsBFUU08SoNDxW5TPYhjr0Vo9 X-Received: by 2002:a05:6402:3806:b0:450:bad8:8cd5 with SMTP id es6-20020a056402380600b00450bad88cd5mr21301810edb.305.1666414916938; Fri, 21 Oct 2022 22:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666414916; cv=none; d=google.com; s=arc-20160816; b=QSlWwSdG6j5KcMFoOqIqacSG036cwfKQZ2jNhI8Q/YToQl22pxogtOG7MntJOBFB6m tbNJUHWqTvaZYVHE58a70vuwCRzPw6p/aHvRyTNob/lOMAsnC5Qolata/bMIsfZ8Yniz RYef3NfLpUDfzUusFCDGuIeZ5OrXk9wcRaB8Zax1MdyeGJCArCkB4Nzwbq7J48gWfAqu gnU8fcOATfoKKpba2ydux0FXCgs3MnBYJs3AUz5hZMkkaVkLZPa0ok8CmvSf9cKfxNvW 10NikT54H8N9jQtHrYv+HJQI1f274Uh/8laKbNNYEaRkYqoUYDj6amEorVpmA7lhgV0n e5Eg== 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=wQYm5LqzX57uwWQZcQgQcLEzWEXhv56KAAGUn4/bM1s=; b=FPXj7VETU7t16YMadA/+mO5lxoBwuj39XDuPBIkP7llVtiZXxLjcAHDUBT9qaCiscP O0CpiZJZY0CMg7VqCDmn6wSVT3tLF1xoSbYE1v07XT1um9ky067K+oKTGGQRjYsWO5CO Ag9UMLYNfjW1VN5vEFBFlWNQpQbQTPL/pLkl+SOS6xC6ldpMPFVZo4MC81jSoVaSQTxF VdxtsBvzklWmnBTbAauYjA6u4/Bcl/KyrL8o1PSqdCYdKojRo5FQ4yxI9nUm8EcXNMN2 E4AcOkAqQuhFyhMntPSUdhCavV+I+5rxOlDV4hCp8wXEjAPeiFMxJzHLUg7dkD84g7Xa pS1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pQvvard2; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020a50e713000000b00458d23f9fd5si20401805edn.242.2022.10.21.22.01.31; Fri, 21 Oct 2022 22:01: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=@gmail.com header.s=20210112 header.b=pQvvard2; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbiJVEgD (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Sat, 22 Oct 2022 00:36:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229760AbiJVEgA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 22 Oct 2022 00:36:00 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDCAA16CA54; Fri, 21 Oct 2022 21:35:57 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so4756712pjl.3; Fri, 21 Oct 2022 21:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wQYm5LqzX57uwWQZcQgQcLEzWEXhv56KAAGUn4/bM1s=; b=pQvvard2nxmZEuToHQCoxqKq7E+NyOPozW/OVGgcTjUXIuXUtthCc7761Sz21nK1Ck Q+8eGKtasc1vPLudAPwPMPJPFstelL3PbyCrl0dSQq+DvXA8k6SlKFDmHUn/5M+b/RGz W+CDlMrwQrXwHTjgmA5AfhFRGHL8ZLzIxI/QXty7DHZLWsYMOkGwH+UcfoN7vPB1wmo9 6WlrXsoTcwNMG3I7REK8U4MpPMoGsafYEh/PUKmO2Qi36ARLc7tQ+Eb/BUQ1buaLGjs1 FnX4Wplsz7wWStPIBsq/tcdrieUbUWspX769DNftAFHlJRNSrsSUjnHE9mdJl6RwN5YA OR0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wQYm5LqzX57uwWQZcQgQcLEzWEXhv56KAAGUn4/bM1s=; b=dd3BB8eeAO1dPh7oHz+F2Pq0FSBTsxDNYsgVLibcFxdJr34xNSEy0qXfXFOL8gnlIw OFmJTzYMIKZVJo0BUDZtnyw7rvsPT9UxjBryUGk9t1ByqCJvTVJgiJHL/Hzj6Bz2DWhr qcdRL0CbTj789Gec795xrGPnMnzO0xiybOjqlVtDLfXtsWZrJRGlegs9d/V0FT8J2wIK UXP116x/5JDnjaKeLBoGSDcUQ4ewV0a+bwEi68GXqkRKJ4VugfMlAt7bDH2PMgXpkcIf IJhOPZsGn+W7ZW9BgiM0j4Ip1aI51yh8vrAetWVnNgobaFoqoDQnbblwmYKG0KjcN410 Jt7w== X-Gm-Message-State: ACrzQf0/1yR0hY13mpslBM/w16am8vIjk/tVjyjGM1ghmZU1MRgpKiCC s+JhzCyM63lmaaYxgXaOQ1k= X-Received: by 2002:a17:903:40d2:b0:186:6f1d:608c with SMTP id t18-20020a17090340d200b001866f1d608cmr9815540pld.52.1666413357291; Fri, 21 Oct 2022 21:35:57 -0700 (PDT) Received: from localhost.localdomain ([2001:8003:d90f:f801:7164:b4e6:b90b:c4d5]) by smtp.gmail.com with ESMTPSA id u4-20020a17090341c400b0017eb2d62bbesm402812ple.99.2022.10.21.21.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 21:35:56 -0700 (PDT) From: "Scott J. Crouch" <scottjcrouch@gmail.com> To: Florian Fainelli <f.fainelli@gmail.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: kernel-janitors@vger.kernel.org, "Scott J. Crouch" <scottjcrouch@gmail.com>, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: vchiq: add 'static' to function definition Date: Sat, 22 Oct 2022 15:35:48 +1100 Message-Id: <20221022043548.1671644-1-scottjcrouch@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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?1747362687973429535?= X-GMAIL-MSGID: =?utf-8?q?1747362687973429535?= |
Series |
staging: vchiq: add 'static' to function definition
|
|
Commit Message
Scott J. Crouch
Oct. 22, 2022, 4:35 a.m. UTC
This fixes the following sparse error:
warning: symbol 'vchiq_platform_init' was not declared. Should it be static?
Signed-off-by: Scott J. Crouch <scottjcrouch@gmail.com>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Sat, Oct 22, 2022 at 03:35:48PM +1100, Scott J. Crouch wrote: > This fixes the following sparse error: > > warning: symbol 'vchiq_platform_init' was not declared. Should it be static? > > Signed-off-by: Scott J. Crouch <scottjcrouch@gmail.com> > --- > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > index dc33490ba7fb..ffa517077b80 100644 > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > @@ -462,7 +462,7 @@ free_pagelist(struct vchiq_instance *instance, struct vchiq_pagelist_info *pagel > cleanup_pagelistinfo(instance, pagelistinfo); > } > > -int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state) > +static int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state) > { > struct device *dev = &pdev->dev; > struct vchiq_drvdata *drvdata = platform_get_drvdata(pdev); > -- > 2.37.3 > > Nice try, but this breaks the build in a very horrible and strange way that no one has been able to figure out yet: CC [M] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.o In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:16: In function ‘memcpy_to_page’, inlined from ‘free_pagelist’ at drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:433:4, inlined from ‘vchiq_complete_bulk’ at drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:648:3: ./include/linux/highmem.h:377:9: error: argument 2 null where non-null expected [-Werror=nonnull] 377 | memcpy(to + offset, from, len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./arch/x86/include/asm/string.h:5, from ./include/linux/string.h:20, from ./include/linux/bitmap.h:11, from ./include/linux/cpumask.h:12, from ./arch/x86/include/asm/cpumask.h:5, from ./arch/x86/include/asm/msr.h:11, from ./arch/x86/include/asm/processor.h:22, from ./arch/x86/include/asm/timex.h:5, from ./include/linux/timex.h:67, from ./include/linux/time32.h:13, from ./include/linux/time.h:60, from ./include/linux/stat.h:19, from ./include/linux/module.h:13, from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:8: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: In function ‘vchiq_complete_bulk’: ./arch/x86/include/asm/string_64.h:19:14: note: in a call to function ‘memcpy’ declared ‘nonnull’ 19 | extern void *memcpy(void *to, const void *from, size_t len); | ^~~~~~ In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:16: In function ‘memcpy_to_page’, inlined from ‘free_pagelist’ at drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:440:4, inlined from ‘vchiq_complete_bulk’ at drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:648:3: ./include/linux/highmem.h:377:9: error: ‘memcpy’ offset 0 is out of the bounds [0, 0] [-Werror=array-bounds] 377 | memcpy(to + offset, from, len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors So we can't take this patch. Also remember to always test-build your patches before sending them. thanks, greg k-h
Hi Scott, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] url: https://github.com/intel-lab-lkp/linux/commits/Scott-J-Crouch/staging-vchiq-add-static-to-function-definition/20221022-123712 patch link: https://lore.kernel.org/r/20221022043548.1671644-1-scottjcrouch%40gmail.com patch subject: [PATCH] staging: vchiq: add 'static' to function definition config: ia64-randconfig-s043-20221019 compiler: ia64-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://github.com/intel-lab-lkp/linux/commit/212f23023953af62f30dfa46cae6ed350f72e798 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Scott-J-Crouch/staging-vchiq-add-static-to-function-definition/20221022-123712 git checkout 212f23023953af62f30dfa46cae6ed350f72e798 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/staging/vc04_services/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:16: In function 'memcpy_to_page', inlined from 'free_pagelist' at drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:433:4: >> include/linux/highmem.h:377:9: warning: argument 2 null where non-null expected [-Wnonnull] 377 | memcpy(to + offset, from, len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/string.h:20, from include/linux/bitmap.h:11, from include/linux/cpumask.h:12, from include/linux/mm_types_task.h:14, from include/linux/mm_types.h:5, from include/linux/buildid.h:5, from include/linux/module.h:14, from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:8: arch/ia64/include/asm/string.h: In function 'free_pagelist': arch/ia64/include/asm/string.h:19:14: note: in a call to function 'memcpy' declared 'nonnull' 19 | extern void *memcpy (void *, const void *, __kernel_size_t); | ^~~~~~ In function 'memcpy_to_page', inlined from 'free_pagelist' at drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:440:4: >> include/linux/highmem.h:377:9: warning: 'memcpy' reading between 1 and 31 bytes from a region of size 0 [-Wstringop-overread] 377 | memcpy(to + offset, from, len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +377 include/linux/highmem.h bb90d4bc7b6a53 Ira Weiny 2021-02-09 370 bb90d4bc7b6a53 Ira Weiny 2021-02-09 371 static inline void memcpy_to_page(struct page *page, size_t offset, bb90d4bc7b6a53 Ira Weiny 2021-02-09 372 const char *from, size_t len) bb90d4bc7b6a53 Ira Weiny 2021-02-09 373 { 61b205f579911a Ira Weiny 2021-02-09 374 char *to = kmap_local_page(page); bb90d4bc7b6a53 Ira Weiny 2021-02-09 375 ca18f6ea012bf3 Ira Weiny 2021-02-10 376 VM_BUG_ON(offset + len > PAGE_SIZE); bb90d4bc7b6a53 Ira Weiny 2021-02-09 @377 memcpy(to + offset, from, len); 8dad53a11f8d94 Christoph Hellwig 2021-07-23 378 flush_dcache_page(page); 61b205f579911a Ira Weiny 2021-02-09 379 kunmap_local(to); bb90d4bc7b6a53 Ira Weiny 2021-02-09 380 } bb90d4bc7b6a53 Ira Weiny 2021-02-09 381
On Sat, Oct 22, 2022, at 10:07, Greg Kroah-Hartman wrote: > On Sat, Oct 22, 2022 at 03:35:48PM +1100, Scott J. Crouch wrote: > Nice try, but this breaks the build in a very horrible and strange way > that no one has been able to figure out yet: I got curious and figured out what happens: Without CONFIG_OF, of_match_node() always returns NULL, so vchiq_probe() returns -EINVAL unconditionally before calling vchiq_platform_init(). If vchiq_platform_init() is marked 'static', gcc's dead code elimination then eliminates it, which in turn means that 'g_fragments_base' is never initialized and gets replaced with a NULL pointer. I think the easiest workaround is to take this otherwise correct patch but at the same time add 'depends on OF' to BCM2835_VCHIQ. This is a correct dependency as shown by gcc above, and it still allows compile testing this driver on x86 allmodconfig, which enables CONFIG_OF. Arnd
On 28/10/22 01:08, Arnd Bergmann wrote: > On Sat, Oct 22, 2022, at 10:07, Greg Kroah-Hartman wrote: >> On Sat, Oct 22, 2022 at 03:35:48PM +1100, Scott J. Crouch wrote: > >> Nice try, but this breaks the build in a very horrible and strange way >> that no one has been able to figure out yet: > > I got curious and figured out what happens: > > Without CONFIG_OF, of_match_node() always returns NULL, so > vchiq_probe() returns -EINVAL unconditionally before calling > vchiq_platform_init(). > > If vchiq_platform_init() is marked 'static', gcc's dead code > elimination then eliminates it, which in turn means that > 'g_fragments_base' is never initialized and gets replaced > with a NULL pointer. Good spotting. Actually, I was clumsily learning how to run sparse on the staging directory and wasn't sure what config to use that didn't involve enabling everything manually. But from what I can tell, it's OF_OVERLAY (or something downstream of that) that gets rid of the warning. BCM2835_VCHIQ requires BCM_VIDEOCORE which already depends on OF. I'm confused because I don't actually know how to reproduce the gcc warning without manually enabling the module such that OF is enabled but OF_OVERLAY isn't, since allmodconfig enables both -- maybe there's a way to do that. I'm also confused why devm_rpi_firmware_get() doesn't have the same problem as of_match_node() just above it -- it returns NULL when RASPBERRYPI_FIRMWARE is unset, but gcc still builds without the warning. Scott.
On Sun, Oct 30, 2022, at 03:43, Scott J. Crouch wrote: > On 28/10/22 01:08, Arnd Bergmann wrote: >> On Sat, Oct 22, 2022, at 10:07, Greg Kroah-Hartman wrote: >>> On Sat, Oct 22, 2022 at 03:35:48PM +1100, Scott J. Crouch wrote: >> >>> Nice try, but this breaks the build in a very horrible and strange way >>> that no one has been able to figure out yet: >> >> I got curious and figured out what happens: >> >> Without CONFIG_OF, of_match_node() always returns NULL, so >> vchiq_probe() returns -EINVAL unconditionally before calling >> vchiq_platform_init(). >> >> If vchiq_platform_init() is marked 'static', gcc's dead code >> elimination then eliminates it, which in turn means that >> 'g_fragments_base' is never initialized and gets replaced >> with a NULL pointer. > > Good spotting. Actually, I was clumsily learning how to run sparse on the > staging directory and wasn't sure what config to use that didn't involve > enabling everything manually. But from what I can tell, it's OF_OVERLAY (or > something downstream of that) that gets rid of the warning. BCM2835_VCHIQ > requires BCM_VIDEOCORE which already depends on OF. Ok, I see. My best guess would be OF_DYNAMIC in this case, but I don't actually see how that changes anything in this file (I only looked at the sources, did not build) > I'm also confused why devm_rpi_firmware_get() doesn't have the same problem as > of_match_node() just above it -- it returns NULL when RASPBERRYPI_FIRMWARE is > unset, but gcc still builds without the warning. Hmm, I see an of_node_put() between devm_rpi_firmware_get() and the error check. With OF_DYNAMIC=y, this is an external function call, so I guess gcc can no longer assume that drvdata->fw is NULL after that, so it doesn't make this optimization. This would mean you only get a warning when both RASPBERRYPI_FIRMWARE and OF_DYNAMIC are disabled. If you can confirm that, adding a dependency on RASPBERRYPI_FIRMWARE is still the correct fix. Arnd
On 30/10/22 21:46, Arnd Bergmann wrote: > Hmm, I see an of_node_put() between devm_rpi_firmware_get() and the > error check. With OF_DYNAMIC=y, this is an external function call, so > I guess gcc can no longer assume that drvdata->fw is NULL after that, > so it doesn't make this optimization. Ah, of course, you're right. > Ok, I see. My best guess would be OF_DYNAMIC I checked and you are correct. > but I don't actually see how that changes anything in this file Yeah. I had a look as well and I'm similarly puzzled. > This would mean you only get a warning when both RASPBERRYPI_FIRMWARE > and OF_DYNAMIC are disabled. If you can confirm that, adding a dependency > on RASPBERRYPI_FIRMWARE is still the correct fix. It builds ok as long as OF_DYNAMIC is set; RASPBERRYPI_FIRMWARE doesn't need setting (maybe since devm_rpi_firmware_get() is a static inline it's optimized differently?). Perhaps RASPBERRYPI_FIRMWARE ought to be made a dependency in any case, but since it depends on ARCH_BCM2835, doing so will mean one is unable to test-compile/run sparse on x86. Which is fine; I wouldn't expect to be able to; I'm not really sure what accommodations (if any) are usually made in this regard with respect to drivers. Scott.
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index dc33490ba7fb..ffa517077b80 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -462,7 +462,7 @@ free_pagelist(struct vchiq_instance *instance, struct vchiq_pagelist_info *pagel cleanup_pagelistinfo(instance, pagelistinfo); } -int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state) +static int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state) { struct device *dev = &pdev->dev; struct vchiq_drvdata *drvdata = platform_get_drvdata(pdev);