From: Sascha Hauer <sha@pengutronix.de>
To: Jules Maselbas <jmaselbas@kalray.eu>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/4] usb: dwc2: Move static function prototypes into core.c
Date: Thu, 10 Dec 2020 11:05:09 +0100 [thread overview]
Message-ID: <20201210100509.GV3977@pengutronix.de> (raw)
In-Reply-To: <20201209145547.22655-2-jmaselbas@kalray.eu>
Hi Jules,
On Wed, Dec 09, 2020 at 03:55:45PM +0100, Jules Maselbas wrote:
> Theses functions were only used in dwc2/core.c and where defined as
> static.
>
> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
> ---
> drivers/usb/dwc2/core.c | 5 +++++
> drivers/usb/dwc2/dwc2.h | 6 +-----
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
> index c4a3cc789..a61acf553 100644
> --- a/drivers/usb/dwc2/core.c
> +++ b/drivers/usb/dwc2/core.c
> @@ -1,6 +1,11 @@
> // SPDX-License-Identifier: GPL-2.0+
> #include "dwc2.h"
>
> +static void dwc2_set_param_otg_cap(struct dwc2 *dwc2);
> +static void dwc2_set_param_phy_type(struct dwc2 *dwc2);
> +static void dwc2_set_param_speed(struct dwc2 *dwc2);
> +static void dwc2_set_param_phy_utmi_width(struct dwc2 *dwc2);
> +
There should be a forward declaration necessary for static functions.
You are changing the declarations to static here, but not the
implementations further down in this file, so this shouldn't compile.
> /* Returns the controller's GHWCFG2.OTG_MODE. */
> static unsigned int dwc2_op_mode(struct dwc2 *dwc2)
> {
> diff --git a/drivers/usb/dwc2/dwc2.h b/drivers/usb/dwc2/dwc2.h
> index 196f4a07f..70a747302 100644
> --- a/drivers/usb/dwc2/dwc2.h
> +++ b/drivers/usb/dwc2/dwc2.h
> @@ -8,13 +8,9 @@
> #include "core.h"
>
> /* Core functions */
> -void dwc2_set_param_otg_cap(struct dwc2 *dwc2);
> -void dwc2_set_param_phy_type(struct dwc2 *dwc2);
> -void dwc2_set_param_speed(struct dwc2 *dwc2);
> -void dwc2_set_param_phy_utmi_width(struct dwc2 *dwc2);
> -void dwc2_set_default_params(struct dwc2 *dwc2);
> int dwc2_core_snpsid(struct dwc2 *dwc2);
> void dwc2_get_hwparams(struct dwc2 *dwc2);
> +void dwc2_set_default_params(struct dwc2 *dwc2);
No need to move this declaration.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-12-10 10:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 14:55 [PATCH 1/4] usb: dwc2: Add support for optional usb phy Jules Maselbas
2020-12-09 14:55 ` [PATCH 2/4] usb: dwc2: Move static function prototypes into core.c Jules Maselbas
2020-12-10 10:05 ` Sascha Hauer [this message]
2020-12-10 10:18 ` Jules Maselbas
2020-12-09 14:55 ` [PATCH 3/4] usb: dwc2: Fix mode check in dwc2_get_dr_mode Jules Maselbas
2020-12-09 14:55 ` [PATCH 4/4] usb: dwc2: Rename dwc2_core_snpsid to dwc2_check_core_version Jules Maselbas
2020-12-09 19:14 ` [PATCH 1/4] usb: dwc2: Add support for optional usb phy Michael Grzeschik
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=20201210100509.GV3977@pengutronix.de \
--to=sha@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jmaselbas@kalray.eu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox