[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070710154935.GA3445@enneenne.com>
Date: Tue, 10 Jul 2007 17:49:35 +0200
From: Rodolfo Giometti <giometti@...eenne.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Brownell <david-b@...bell.net>,
linux-usb-devel@...ts.sourceforge.net,
linux-arm-kernel@...ts.arm.linux.org.uk,
linux-kernel@...r.kernel.org, Li Yang-r58472 <LeoLi@...escale.com>
Subject: Re: [PATCH] PXA27x UDC driver.
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@...eenne.com
Linux Device Driver giometti@...dd.com
Embedded Systems giometti@...ux.it
UNIX programming phone: +39 349 2432127
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists