From: Dan Carpenter <dan.carpenter@oracle.com>
To: wei_wang@realsil.com.cn
Cc: gregkh@linuxfoundation.org, devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] drivers/misc: Add realtek card reader core driver
Date: Mon, 23 Jul 2012 14:17:57 +0300 [thread overview]
Message-ID: <20120723111757.GC4352@mwanda> (raw)
In-Reply-To: <1343036558-8189-1-git-send-email-wei_wang@realsil.com.cn>
On Mon, Jul 23, 2012 at 05:42:38PM +0800, wei_wang@realsil.com.cn wrote:
> +
> +#define wait_timeout_x(task_state, msecs) \
> +do { \
> + set_current_state((task_state)); \
> + schedule_timeout(msecs_to_jiffies(msecs)); \
> +} while (0)
> +
> +#define wait_timeout(msecs) wait_timeout_x(TASK_INTERRUPTIBLE, (msecs))
> +
> +#define GET_BE32(ptr) (((u32)((ptr)[0]) << 24) | ((u32)((ptr)[1]) << 16) | \
> + ((u32)((ptr)[2]) << 8) | (ptr)[3])
> +
This will break on big endian systems. Use be32_to_cpu().
Use Sparse to check your work:
http://lwn.net/Articles/205624/
regards,
dan carpenter
next prev parent reply other threads:[~2012-07-23 11:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 9:42 [PATCH 1/3] drivers/misc: Add realtek card reader core driver wei_wang
2012-07-23 11:17 ` Dan Carpenter [this message]
2012-07-26 3:11 ` wwang
2012-07-26 3:59 ` gregkh
2012-07-23 11:24 ` [PATCH 1/3] drivers/misc: Add " Borislav Petkov
2012-07-23 15:14 ` Matthew Garrett
2012-07-23 16:33 ` Borislav Petkov
2012-07-24 1:21 ` wwang
2012-07-24 6:44 ` Borislav Petkov
2012-07-24 8:47 ` wwang
2012-07-24 14:07 ` Borislav Petkov
[not found] ` <500F59D7.2050508@realsil.com.cn>
2012-07-25 8:04 ` Borislav Petkov
2012-07-25 10:16 ` Aaron Lu
2012-07-26 1:34 ` wwang
2012-07-26 8:43 ` Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2012-07-31 7:42 wei_wang
2012-07-31 11:23 ` Arnd Bergmann
2012-08-01 6:19 ` wwang
2012-08-01 14:31 ` Arnd Bergmann
2012-08-03 2:31 ` wwang
2012-08-03 14:39 ` Arnd Bergmann
2012-08-13 20:59 ` Maxim Levitsky
2012-07-25 3:02 wei_wang
2012-07-20 10:09 wei_wang
2012-07-19 9:54 wei_wang
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=20120723111757.GC4352@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wei_wang@realsil.com.cn \
/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