All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: jack wang <jack_wang@usish.com>
Cc: 'James Bottomley' <James.Bottomley@suse.de>,
	'Grant Grundler' <grundler@google.com>,
	'lindar_liu' <lindar_liu@usish.com>,
	matthew@wil.cx, linux-scsi@vger.kernel.org, tom_peng@usish.com,
	'aoqingy' <aoqingyun@usish.com>,
	roy_wang@usish.com
Subject: Re: [RFC][PATCH v3]Add pm8001 SAS/SATA HBA driver
Date: Tue, 13 Oct 2009 13:05:36 +0200	[thread overview]
Message-ID: <200910131305.41047.eike-kernel@sf-tec.de> (raw)
In-Reply-To: <D7F4135C8933429C8019D47D3DB5A7D0@usish.com.cn>

[-- Attachment #1: Type: Text/Plain, Size: 772 bytes --]

jack wang wrote:
> Hi James
> Here is an updated driver patch that incorporates all the latest review
> inputs from Grant and Eike.
> Best wishes,
> Jack

+static inline u32 pm8001_read_le_32(void *virt_addr)
+{
+	return *((u32 *)((u8 *)virt_addr));
+}

The cast to u8* isn't needed.

+static inline void pm8001_write_le_32(void *addr, u32 offset, u32 val)
+{
+	*((u32 *)(((u8 *)addr)+(offset))) = val;
+}

void* can be added, it's a gcc extension the Linux kernel uses just 
everywhere. So at the end this could boil down to:

*((u32 *)(addr + offset)) = val;

And if you have _le_32 the value passed in and returned from 
pm8001_read_le_32() should probably be le32 instead of u32 so you can get 
sparse checks for that.

Greetings,

Eike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2009-10-13 11:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15  3:10 [RFC][PATCH v2]Add pm8001 SAS/SATA HBA driver jack wang
2009-09-15  6:07 ` Rolf Eike Beer
2009-09-16  3:27   ` jack wang
2009-09-24 21:04     ` James Bottomley
2009-09-28  1:41       ` lindar_liu
2009-10-02 21:15         ` James Bottomley
2009-10-07 14:08           ` jack wang
2009-10-09 10:01             ` jack wang
2009-10-10  2:37               ` Grant Grundler
2009-10-10 19:27                 ` Rolf Eike Beer
2009-10-12  2:37                   ` jack wang
2009-10-12  2:35                 ` jack wang
2009-10-13  9:58                 ` [RFC][PATCH v3]Add " jack wang
2009-10-13 11:05                   ` Rolf Eike Beer [this message]
2009-10-14  8:19                     ` [RFC][PATCH v4]Add " jack 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=200910131305.41047.eike-kernel@sf-tec.de \
    --to=eike-kernel@sf-tec.de \
    --cc=James.Bottomley@suse.de \
    --cc=aoqingyun@usish.com \
    --cc=grundler@google.com \
    --cc=jack_wang@usish.com \
    --cc=lindar_liu@usish.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=roy_wang@usish.com \
    --cc=tom_peng@usish.com \
    /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.