linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: linux-scsi <linux-scsi@vger.kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [SCSI] libsas: fix endianness bug in sas_ata
Date: Fri, 18 Apr 2008 16:50:44 -0400	[thread overview]
Message-ID: <480909A4.7000906@garzik.org> (raw)
In-Reply-To: <200804181917.m3IJHbLk032765@hera.kernel.org>

Linux Kernel Mailing List wrote:
> --- a/drivers/scsi/libsas/sas_ata.c
> +++ b/drivers/scsi/libsas/sas_ata.c
> @@ -698,7 +698,7 @@ static int sas_discover_sata_dev(struct domain_device *dev)
>  		/* incomplete response */
>  		SAS_DPRINTK("sending SET FEATURE/PUP_STBY_SPIN_UP to "
>  			    "dev %llx\n", SAS_ADDR(dev->sas_addr));
> -		if (!le16_to_cpu(identify_x[83] & (1<<6)))
> +		if (!(identify_x[83] & cpu_to_le16(1<<6)))
>  			goto cont1;
>  		res = sas_issue_ata_cmd(dev, ATA_SET_FEATURES,
>  					ATA_FEATURE_PUP_STBY_SPIN_UP,

Note that this code (not the patch, the code itself) duplicates libata 
code performing the same task...

We really need to get libsas going on the new EH.  We don't need this 
sort of needless code duplication.

	Jeff



           reply	other threads:[~2008-04-18 20:50 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200804181917.m3IJHbLk032765@hera.kernel.org>]

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=480909A4.7000906@garzik.org \
    --to=jeff@garzik.org \
    --cc=James.Bottomley@HansenPartnership.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;
as well as URLs for NNTP newsgroup(s).