linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Timur Tabi" <timur@freescale.com>
To: "Li Yang" <leoli@freescale.com>
Cc: david-b@pacbell.net, linuxppc-dev@ozlabs.org, gregkh@suse.de,
	linux-usb@vger.kernel.org, Xie Xiaobo <X.Xie@freescale.com>
Subject: Re: [PATCH] usb: add Freescale QE/CPM USB peripheral controller driver
Date: Wed, 6 Aug 2008 10:47:53 -0500	[thread overview]
Message-ID: <ed82fe3e0808060847r227c298ey82f2c3e1ead40863@mail.gmail.com> (raw)
In-Reply-To: <1218007000-27320-1-git-send-email-leoli@freescale.com>

On Wed, Aug 6, 2008 at 2:16 AM, Li Yang <leoli@freescale.com> wrote:

> +/*---------------------------------------------------------------------
> + *             Mask definitions for usb BD                           *
> + *--------------------------------------------------------------------*/
> +#define QE_SIZEOF_BD       sizeof(struct qe_bd)
> +
> +#define BD_BUFFER_ARG(bd)                   (((struct qe_bd *)bd)->buf)
> +#define BD_BUFFER_CLEAR(bd)                 out_be32(&(BD_BUFFER_ARG(bd)), 0);
> +#define BD_BUFFER(bd)                       in_be32(&(BD_BUFFER_ARG(bd)))
> +#define BD_STATUS_AND_LENGTH_SET(bd, val)   out_be32((u32 *)bd, val)
> +#define BD_STATUS_AND_LENGTH(bd)            in_be32((u32 *)bd)
> +#define BD_BUFFER_SET(bd, buffer)           out_be32(&(BD_BUFFER_ARG(bd)), \
> +                                                       (u32)(buffer))

Delete all of these.  Don't use these silly macros at all.  Reference
the structure fields directly, and use the in_ and out_ functions
directly.

Using macros like these encourages unnecessary typecasts.  "struct
qe_bd" has been defined, so you should use it.

-- 
Timur Tabi
Linux kernel developer at Freescale

  parent reply	other threads:[~2008-08-06 15:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06  7:16 [PATCH] usb: add Freescale QE/CPM USB peripheral controller driver Li Yang
2008-08-06 15:15 ` Anton Vorontsov
2008-08-06 15:47 ` Timur Tabi [this message]
2008-08-15 14:16 ` Anton Vorontsov
  -- strict thread matches above, loose matches on Subject: below --
2008-08-28  9:43 Li Yang
2008-08-28 15:04 ` Arnd Bergmann
2008-08-28 17:22   ` Alan Stern
2008-08-28 17:53     ` Scott Wood
2008-08-28 20:16       ` Alan Stern
2008-08-28 22:27         ` Arnd Bergmann
2008-08-29 16:05           ` Alan Stern
2008-08-29 16:29             ` Arnd Bergmann
2008-08-29 17:19               ` Alan Stern
2008-08-29 17:38                 ` Arnd Bergmann
2008-08-29 21:22                   ` Alan Stern
2008-09-24 20:15           ` David Brownell
2008-08-29  8:57   ` Li Yang
2008-08-29  8:57     ` Arnd Bergmann
2008-09-24 20:10   ` David Brownell
2008-08-28 16:39 ` Scott Wood
2008-08-29  9:35   ` Li Yang
2008-09-01 13:52 ` Anton Vorontsov
2008-09-02  7:08   ` Li Yang
2008-09-01 16:34 ` Anton Vorontsov
2008-09-01 17:11 ` Anton Vorontsov
2008-09-02  7:35   ` Li Yang
2008-09-02  7:57     ` Joakim Tjernlund

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=ed82fe3e0808060847r227c298ey82f2c3e1ead40863@mail.gmail.com \
    --to=timur@freescale.com \
    --cc=X.Xie@freescale.com \
    --cc=david-b@pacbell.net \
    --cc=gregkh@suse.de \
    --cc=leoli@freescale.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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).