From: Bin Liu <b-liu@ti.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: musb: remove redundant stack buffers
Date: Mon, 12 Sep 2016 13:40:40 -0500 [thread overview]
Message-ID: <20160912184040.GK18340@uda0271908> (raw)
In-Reply-To: <1470337098-29111-1-git-send-email-linux@rasmusvillemoes.dk>
Hi,
On Thu, Aug 04, 2016 at 08:58:18PM +0200, Rasmus Villemoes wrote:
> aDate is always the empty string, so entirely pointless. The aRevision
> formatting might as well be done as part of the pr_debug() call - that
> also avoids it altogether if pr_debug is compiled out.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Bin Liu <b-liu@ti.com>
Regards,
-Bin.
> ---
> drivers/usb/musb/musb_core.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 74fc3069cb42..1724f1889c99 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -1448,7 +1448,7 @@ static int musb_core_init(u16 musb_type, struct musb *musb)
> {
> u8 reg;
> char *type;
> - char aInfo[90], aRevision[32], aDate[12];
> + char aInfo[90];
> void __iomem *mbase = musb->mregs;
> int status = 0;
> int i;
> @@ -1482,7 +1482,6 @@ static int musb_core_init(u16 musb_type, struct musb *musb)
>
> pr_debug("%s: ConfigData=0x%02x (%s)\n", musb_driver_name, reg, aInfo);
>
> - aDate[0] = 0;
> if (MUSB_CONTROLLER_MHDRC == musb_type) {
> musb->is_multipoint = 1;
> type = "M";
> @@ -1497,11 +1496,10 @@ static int musb_core_init(u16 musb_type, struct musb *musb)
>
> /* log release info */
> musb->hwvers = musb_read_hwvers(mbase);
> - snprintf(aRevision, 32, "%d.%d%s", MUSB_HWVERS_MAJOR(musb->hwvers),
> - MUSB_HWVERS_MINOR(musb->hwvers),
> - (musb->hwvers & MUSB_HWVERS_RC) ? "RC" : "");
> - pr_debug("%s: %sHDRC RTL version %s %s\n",
> - musb_driver_name, type, aRevision, aDate);
> + pr_debug("%s: %sHDRC RTL version %d.%d%s\n",
> + musb_driver_name, type, MUSB_HWVERS_MAJOR(musb->hwvers),
> + MUSB_HWVERS_MINOR(musb->hwvers),
> + (musb->hwvers & MUSB_HWVERS_RC) ? "RC" : "");
>
> /* configure ep0 */
> musb_configure_ep0(musb);
> --
> 2.1.4
>
prev parent reply other threads:[~2016-09-12 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 18:58 [PATCH] usb: musb: remove redundant stack buffers Rasmus Villemoes
2016-09-12 18:40 ` Bin Liu [this message]
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=20160912184040.GK18340@uda0271908 \
--to=b-liu@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/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