public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi: replace uses of __constant_{endian}
Date: Thu, 29 Jan 2009 15:09:26 -0800	[thread overview]
Message-ID: <20090129230926.GB37589@plap4-2.local> (raw)
In-Reply-To: <1233265895.5594.3.camel@brick>

On Thu, 29 Jan 2009, Harvey Harrison wrote:

> The base versions handle constant folding now.  Almost entirely
> in qla2xxx/qla4xxx.

Do the same semantics apply to htonl()?  As, I'd rather see the
changes from __constant_htonl() -> cpu_to_be32() be __constant_htonl()
-> htonl():

...
> diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
> index 34760f8..21a8fe8 100644
> --- a/drivers/scsi/qla2xxx/qla_dbg.c
> +++ b/drivers/scsi/qla2xxx/qla_dbg.c
> @@ -331,7 +331,7 @@ qla25xx_copy_fce(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain)
>                 return ptr;
> 
>         *last_chain = &fcec->type;
> -       fcec->type = __constant_htonl(DUMP_CHAIN_FCE);
> +       fcec->type = cpu_to_be32(DUMP_CHAIN_FCE);
>         fcec->chain_size = htonl(sizeof(struct qla2xxx_fce_chain) +
>             fce_calc_size(ha->fce_bufs));
>         fcec->size = htonl(fce_calc_size(ha->fce_bufs));

	...
	fcec->type = htonl(DUMP_CHAIN_FCE);
	fcec->chain_size = htonl(sizeof(struct qla2xxx_fce_chain) +
	    fce_calc_size(ha->fce_bufs));

As it lends itself to a greater level of consistency with the other
assignments in the code regions...

--
av

  reply	other threads:[~2009-01-29 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 21:51 [PATCH] scsi: replace uses of __constant_{endian} Harvey Harrison
2009-01-29 23:09 ` Andrew Vasquez [this message]
2009-01-29 23:13   ` Harvey Harrison

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=20090129230926.GB37589@plap4-2.local \
    --to=andrew.vasquez@qlogic.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-scsi@vger.kernel.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