From: Simon Horman <horms@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Nathan Chancellor <nathan@kernel.org>, Tom Rix <trix@redhat.com>,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-staging@lists.linux.dev, llvm@lists.linux.dev
Subject: Re: [PATCH] staging: vchiq_arm: Make vchiq_platform_init() static
Date: Wed, 19 Apr 2023 07:39:47 +0200 [thread overview]
Message-ID: <ZD9+o7dUheMZgPAx@kernel.org> (raw)
In-Reply-To: <CAKwvOdmuwuSn+4csSCwsNXM01ohsp+ZzcWQ1WfM_kgj_NRugZA@mail.gmail.com>
On Tue, Apr 18, 2023 at 11:39:58AM -0700, Nick Desaulniers wrote:
> On Tue, Apr 18, 2023 at 4:23 AM Simon Horman <horms@kernel.org> wrote:
> >
> > vchiq_platform_init() is only used in this file so it can be static.
> >
> > clang-16 with W=1 reports:
> >
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:465:5: error: no previous prototype for function 'vchiq_platform_init' [-Werror,-Wmissing-prototypes]
> > int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
> > ^
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:465:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >
> > Signed-off-by: Simon Horman <horms@kernel.org>
>
> I would have kept the return type on the original line and just added
> the explicit linkage on top, but it's fine and checkpatch doesn't
> complain. Thanks for the patch!
Thanks, I wasn't sure which was the best way to to on that.
I'll keep this in mind in future.
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> > ---
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++-
> > 1 file changed, 2 insertions(+), 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 40dd62cf7399..59312b9f2058 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,8 @@ 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);
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers
>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Nathan Chancellor <nathan@kernel.org>, Tom Rix <trix@redhat.com>,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-staging@lists.linux.dev, llvm@lists.linux.dev
Subject: Re: [PATCH] staging: vchiq_arm: Make vchiq_platform_init() static
Date: Wed, 19 Apr 2023 07:39:47 +0200 [thread overview]
Message-ID: <ZD9+o7dUheMZgPAx@kernel.org> (raw)
In-Reply-To: <CAKwvOdmuwuSn+4csSCwsNXM01ohsp+ZzcWQ1WfM_kgj_NRugZA@mail.gmail.com>
On Tue, Apr 18, 2023 at 11:39:58AM -0700, Nick Desaulniers wrote:
> On Tue, Apr 18, 2023 at 4:23 AM Simon Horman <horms@kernel.org> wrote:
> >
> > vchiq_platform_init() is only used in this file so it can be static.
> >
> > clang-16 with W=1 reports:
> >
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:465:5: error: no previous prototype for function 'vchiq_platform_init' [-Werror,-Wmissing-prototypes]
> > int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
> > ^
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:465:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >
> > Signed-off-by: Simon Horman <horms@kernel.org>
>
> I would have kept the return type on the original line and just added
> the explicit linkage on top, but it's fine and checkpatch doesn't
> complain. Thanks for the patch!
Thanks, I wasn't sure which was the best way to to on that.
I'll keep this in mind in future.
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> > ---
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++-
> > 1 file changed, 2 insertions(+), 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 40dd62cf7399..59312b9f2058 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,8 @@ 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);
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-04-19 5:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 11:23 [PATCH] staging: vchiq_arm: Make vchiq_platform_init() static Simon Horman
2023-04-18 11:23 ` Simon Horman
2023-04-18 18:39 ` Nick Desaulniers
2023-04-18 18:39 ` Nick Desaulniers
2023-04-19 5:39 ` Simon Horman [this message]
2023-04-19 5:39 ` Simon Horman
2023-04-18 18:44 ` Nathan Chancellor
2023-04-18 18:44 ` Nathan Chancellor
2023-04-19 5:42 ` Simon Horman
2023-04-19 5:42 ` Simon Horman
2023-04-19 6:37 ` Stefan Wahren
2023-04-19 6:37 ` Stefan Wahren
2023-04-19 8:51 ` Simon Horman
2023-04-19 8:51 ` Simon Horman
2023-04-19 21:21 ` Nick Desaulniers
2023-04-19 21:21 ` Nick Desaulniers
2023-04-19 21:35 ` Arnd Bergmann
2023-04-19 21:35 ` Arnd Bergmann
2023-04-19 21:38 ` Nick Desaulniers
2023-04-19 21:38 ` Nick Desaulniers
2023-04-19 21:41 ` Arnd Bergmann
2023-04-19 21:41 ` Arnd Bergmann
2023-04-19 21:48 ` Nick Desaulniers
2023-04-19 21:48 ` Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZD9+o7dUheMZgPAx@kernel.org \
--to=horms@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.