devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Andreas Larsson <andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
	Robert Baldyga
	<r.baldyga-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	software-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH v5] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC
Date: Mon, 23 Dec 2013 11:11:22 -0600	[thread overview]
Message-ID: <20131223171122.GI28679@saruman.home> (raw)
In-Reply-To: <1387799858-11036-1-git-send-email-andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>

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

Hi,

On Mon, Dec 23, 2013 at 12:57:38PM +0100, Andreas Larsson wrote:
> This adds an UDC driver for GRUSBDC USB Device Controller cores available in the
> GRLIB VHDL IP core library. The driver only supports DMA mode.
> 
> Signed-off-by: Andreas Larsson <andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>

You have a few Sparse Warnings:

drivers/usb/gadget/gr_udc.c:1255:13: warning: incorrect type in argument 1 (different address spaces)
drivers/usb/gadget/gr_udc.c:1255:13:    expected void [noderef] <asn:2>*<noident>
drivers/usb/gadget/gr_udc.c:1255:13:    got unsigned int *<noident>
drivers/usb/gadget/gr_udc.c:1284:16: warning: incorrect type in argument 1 (different address spaces)
drivers/usb/gadget/gr_udc.c:1284:16:    expected void [noderef] <asn:2>*<noident>
drivers/usb/gadget/gr_udc.c:1284:16:    got unsigned int *<noident>
drivers/usb/gadget/gr_udc.c:1136:28: warning: context imbalance in 'gr_ep0_setup' - unexpected unlock
drivers/usb/gadget/gr_udc.c:1052:1: warning: "/*" within comment [-Wcomment]
 /* Must be called with dev->lock held and irqs disabled

Two of them I fixed below:

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index ee220f3..5eb36af 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -218,7 +218,7 @@ config USB_FOTG210_UDC
 
 config USB_GR_UDC
        tristate "Aeroflex Gaisler GRUSBDC USB Peripheral Controller Driver"
-       depends on OF && HAS_DMA
+       depends on HAS_DMA
        help
           Select this to support Aeroflex Gaisler GRUSBDC cores from the GRLIB
 	  VHDL IP core library.
diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c
index 4f99a61..9ac378a 100644
--- a/drivers/usb/gadget/gr_udc.c
+++ b/drivers/usb/gadget/gr_udc.c
@@ -1049,9 +1049,11 @@ static void gr_ep0out_requeue(struct gr_udc *dev)
 /*
  * The main function dealing with setup requests on ep0.
  *
-/* Must be called with dev->lock held and irqs disabled
+ * Must be called with dev->lock held and irqs disabled
  */
 static void gr_ep0_setup(struct gr_udc *dev, struct gr_request *req)
+	__releases(&dev->lock)
+	__acquires(&dev->lock)
 {
 	union {
 		struct usb_ctrlrequest ctrl;

The other two are seem like they would require a much larger code
change. Why are you passing integers as arguments to IO access
functions ? You should be passing void __iomem *.

Dropping for now.

-- 
balbi

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

      parent reply	other threads:[~2013-12-23 17:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-23 11:57 [PATCH v5] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC Andreas Larsson
     [not found] ` <1387799858-11036-1-git-send-email-andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2013-12-23 17:11   ` Felipe Balbi [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=20131223171122.GI28679@saruman.home \
    --to=balbi-l0cymroini0@public.gmane.org \
    --cc=andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=r.baldyga-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=software-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).