All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: santosh prasad nayak <santoshprasadnayak@gmail.com>
Cc: Mark Salyzyn <mark_salyzyn@xyratex.com>,
	wharms@bfs.de, lindar_liu <lindar_liu@usish.com>,
	James Bottomley <JBottomley@parallels.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Jack Wang <jack_wang@usish.com>
Subject: Re: [PATCH] [SCSI] pm8001: fix endian issue with code optimization.
Date: Wed, 07 Mar 2012 17:37:52 +0000	[thread overview]
Message-ID: <20120307173751.GS22598@mwanda> (raw)
In-Reply-To: <CAOD=uF67VkUnqYQQpgP=+0ndw-x+c1uWqN3-JUAVN24bgV2c=w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

On Wed, Mar 07, 2012 at 10:54:17PM +0530, santosh prasad nayak wrote:
>  static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb)
>  {
> -       u32 pHeader = (u32)*(u32 *)piomb;
> -       u8 opc = (u8)(pHeader & 0xFFF);
> +       __le32 pHeader = (__le32)*(__le32 *)piomb;
                           ^^^^^^^^
You could drop this cast, "*(__le32 *)piomb" is already an __le32
data type.

regards,
dan carpenter



[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: santosh prasad nayak <santoshprasadnayak@gmail.com>
Cc: Mark Salyzyn <mark_salyzyn@xyratex.com>,
	wharms@bfs.de, lindar_liu <lindar_liu@usish.com>,
	James Bottomley <JBottomley@parallels.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Jack Wang <jack_wang@usish.com>
Subject: Re: [PATCH] [SCSI] pm8001: fix endian issue with code optimization.
Date: Wed, 7 Mar 2012 20:37:52 +0300	[thread overview]
Message-ID: <20120307173751.GS22598@mwanda> (raw)
In-Reply-To: <CAOD=uF67VkUnqYQQpgP=+0ndw-x+c1uWqN3-JUAVN24bgV2c=w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

On Wed, Mar 07, 2012 at 10:54:17PM +0530, santosh prasad nayak wrote:
>  static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb)
>  {
> -       u32 pHeader = (u32)*(u32 *)piomb;
> -       u8 opc = (u8)(pHeader & 0xFFF);
> +       __le32 pHeader = (__le32)*(__le32 *)piomb;
                           ^^^^^^^^
You could drop this cast, "*(__le32 *)piomb" is already an __le32
data type.

regards,
dan carpenter



[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2012-03-07 17:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-26 14:44 [PATCH] [SCSI] pm8001: fix endian issue with code optimization santoshprasadnayak
2012-02-26 14:56 ` santoshprasadnayak
2012-02-26 14:44 ` santoshprasadnayak
2012-02-27  4:51 ` Jack Wang
2012-02-27  4:51   ` Jack Wang
2012-02-27  4:51   ` Jack Wang
2012-03-07 14:58   ` Mark Salyzyn
2012-03-07 14:58     ` Mark Salyzyn
2012-03-07 15:11     ` Mark Salyzyn
2012-03-07 15:11       ` Mark Salyzyn
2012-03-07 15:22       ` santosh prasad nayak
2012-03-07 15:34         ` santosh prasad nayak
2012-03-07 15:58       ` walter harms
2012-03-07 15:58         ` walter harms
2012-03-07 16:10         ` Mark Salyzyn
2012-03-07 16:10           ` Mark Salyzyn
2012-03-07 17:24           ` santosh prasad nayak
2012-03-07 17:36             ` santosh prasad nayak
2012-03-07 17:25             ` Mark Salyzyn
2012-03-07 17:25               ` Mark Salyzyn
2012-03-07 17:37             ` Dan Carpenter [this message]
2012-03-07 17:37               ` Dan Carpenter

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=20120307173751.GS22598@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=JBottomley@parallels.com \
    --cc=jack_wang@usish.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lindar_liu@usish.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark_salyzyn@xyratex.com \
    --cc=santoshprasadnayak@gmail.com \
    --cc=wharms@bfs.de \
    /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.