All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Brownell <david-b@pacbell.net>,
	linux-usb-devel@lists.sourceforge.net,
	linux-arm-kernel@lists.arm.linux.org.uk,
	linux-kernel@vger.kernel.org,
	Li Yang-r58472 <LeoLi@freescale.com>
Subject: Re: [PATCH] PXA27x UDC driver.
Date: Tue, 10 Jul 2007 17:49:35 +0200	[thread overview]
Message-ID: <20070710154935.GA3445@enneenne.com> (raw)
In-Reply-To: <20070628142949.02ca9eab.akpm@linux-foundation.org>

On Thu, Jun 28, 2007 at 02:29:49PM -0700, Andrew Morton wrote:
> >
> > +
> > +static int
> > +write_packet(volatile u32 * uddr, struct pxa27x_request *req, unsigned max)
> 
> Please review Documentation/volatile-considered-harmful.txt

The attibute volatile here is necessary in order to avoid getting the
following warnings from the compiler:

     CC      drivers/usb/gadget/pxa27x_udc.o
   drivers/usb/gadget/pxa27x_udc.c: In function `write_ep0_fifo':
   drivers/usb/gadget/pxa27x_udc.c:512: warning: passing arg 1 of `write_packet' discards qualifiers from pointer target type
   drivers/usb/gadget/pxa27x_udc.c: In function `pxa27x_ep_alloc':
   drivers/usb/gadget/pxa27x_udc.c:1206: warning: assignment discards qualifiers from pointer target type
   drivers/usb/gadget/pxa27x_udc.c:1207: warning: assignment discards qualifiers from pointer target type
   drivers/usb/gadget/pxa27x_udc.c:1208: warning: assignment discards qualifiers from pointer target type
   drivers/usb/gadget/pxa27x_udc.c:1209: warning: assignment discards qualifiers from pointer target type
   drivers/usb/gadget/pxa27x_udc.c: At top level:
   drivers/usb/gadget/pxa27x_udc.c:2159: warning: initialization discards qualifiers from pointer target type
   drivers/usb/gadget/pxa27x_udc.c:2160: warning: initialization discards qualifiers from pointer target type

This because the variables reg_* are assigned as:

   .reg_udccsr = &UDCCSR0

where UDCCSR0 are defined as:

   #define UDCCSR0         __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */

and:

   define __REG(x)	(*((volatile u32 *)io_p2v(x)))

Do you know how I can resolve this?

Thanks in advance,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@enneenne.com
Linux Device Driver                             giometti@gnudd.com
Embedded Systems                     		giometti@linux.it
UNIX programming                     phone:     +39 349 2432127

  parent reply	other threads:[~2007-07-10 15:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 10:36 [PATCH] PXA27x UDC driver Rodolfo Giometti
2007-06-28 11:15 ` Li Yang-r58472
2007-06-28 14:12   ` Rodolfo Giometti
2007-06-28 21:29     ` Andrew Morton
2007-06-28 22:44       ` David Brownell
2007-06-30 14:28       ` [linux-usb-devel] " David Brownell
2007-07-10 15:49       ` Rodolfo Giometti [this message]
2007-07-10 16:16         ` Lothar Wassmann
2007-06-28 21:53     ` David Brownell
2007-06-29  8:58       ` Rodolfo Giometti
2007-06-29  9:33         ` [linux-usb-devel] " Dmitry Krivoschekov
2007-06-30 14:25         ` David Brownell
2007-06-29  9:03       ` [linux-usb-devel] " Dmitry Krivoschekov
2007-06-30 13:46         ` David Brownell
2007-07-02 11:42           ` Dmitry Krivoschekov
2007-07-09 13:51           ` Rodolfo Giometti
2007-07-10 14:50             ` Vernon Sauder
2007-07-10 18:16             ` David Brownell
2007-06-29 17:04 ` Andy Isaacson
2007-07-01 14:55 ` Lennert Buytenhek
2007-07-01 15:00 ` Russell King - ARM Linux
2007-07-01 17:49   ` David Brownell

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=20070710154935.GA3445@enneenne.com \
    --to=giometti@enneenne.com \
    --cc=LeoLi@freescale.com \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.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 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.