The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Olof Johansson <olof@lixom.net>
Cc: Felipe Balbi <balbi@ti.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: gadget: at91_udc: Check gpio lookup results
Date: Fri, 26 Jul 2013 23:30:12 +0300	[thread overview]
Message-ID: <20130726203012.GB14077@radagast> (raw)
In-Reply-To: <CAOesGMgJsSjf7McOMTHd4E2yoxuxEjqp+DE-CxB4nuEY0gMOzg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2688 bytes --]

On Fri, Jul 26, 2013 at 09:23:35AM -0700, Olof Johansson wrote:
> On Fri, Jul 26, 2013 at 2:54 AM, Felipe Balbi <balbi@ti.com> wrote:
> > On Thu, Jul 25, 2013 at 01:59:51PM -0700, Olof Johansson wrote:
> >> On Thu, Jul 25, 2013 at 10:19 AM, Felipe Balbi <balbi@ti.com> wrote:
> >> > On Thu, Jul 25, 2013 at 09:18:39AM -0700, Olof Johansson wrote:
> >> >> That's what the code does today, and I wasn't trying to second-guess
> >> >> their decisions on that. Chances are firmware, in some instances, have
> >> >> left power on so continuing might do no harm.
> >> >
> >> > fair enough, then let's just decrease the error message level to debug
> >> > or info.
> >>
> >> Fair enough. info seems appropriate (or warn). Want me to respin, or
> >> can you edit when you apply?
> >
> > please respin
> 
> An older patch from Arnd that accomplishes the same warning removal
> has mysteriously showed up in -next in the last couple of days
> (ae40d64b1f2db93d7b092e6425a2f716289fbd09), even though commit date
> was July 15.
> 
> So, might as well, drop this one.

doesn't look like the same thing:

commit ae40d64b1f2db93d7b092e6425a2f716289fbd09
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Wed Jun 19 13:27:27 2013 +0200

    usb: gadget: at91_udc: call at91udc_of_init only when needed
    
    This avoids a build error in at91sam9261_9g10_defconfig:
    
    drivers/usb/gadget/at91_udc.c: In function 'at91udc_probe':
    drivers/usb/gadget/at91_udc.c:1685:34: warning: 'flags' may be used uninitialized in this
    function [-Wmaybe-uninitialized]
      board->vbus_active_low = (flags & OF_GPIO_ACTIVE_LOW) ? 1 : 0;
                                      ^
    drivers/usb/gadget/at91_udc.c:1678:21: note: 'flags' was declared here
      enum of_gpio_flags flags;
                         ^
    
    Making the call to at91udc_of_init conditinal also reduces
    the object code size without sacrificing build coverage.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Cc: Felipe Balbi <balbi@ti.com>
    Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
    Signed-off-by: Felipe Balbi <balbi@ti.com>

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 073b938..2cbab1c 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1725,7 +1725,7 @@ static int at91udc_probe(struct platform_device *pdev)
 	/* init software state */
 	udc = &controller;
 	udc->gadget.dev.parent = dev;
-	if (pdev->dev.of_node)
+	if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node)
 		at91udc_of_init(udc, pdev->dev.of_node);
 	else
 		memcpy(&udc->board, dev->platform_data,

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-07-26 20:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 18:55 [PATCH] usb: gadget: at91_udc: Check gpio lookup results Olof Johansson
2013-07-25 16:14 ` Felipe Balbi
2013-07-25 16:18   ` Olof Johansson
2013-07-25 17:19     ` Felipe Balbi
2013-07-25 20:59       ` Olof Johansson
2013-07-26  9:54         ` Felipe Balbi
2013-07-26 16:23           ` Olof Johansson
2013-07-26 20:30             ` Felipe Balbi [this message]
2013-07-26 20:47               ` Olof Johansson

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=20130726203012.GB14077@radagast \
    --to=balbi@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=olof@lixom.net \
    /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