public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [SCSI] qla1280: endianess annotations
       [not found] <200509080111.j881BbNm032480@hera.kernel.org>
@ 2005-09-08  2:13 ` Jeff Garzik
  2005-09-08 10:44   ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Garzik @ 2005-09-08  2:13 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Linux Kernel Mailing List, SCSI Mailing List

Linux Kernel Mailing List wrote:
> diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
> --- a/drivers/scsi/qla1280.c
> +++ b/drivers/scsi/qla1280.c
> @@ -1546,7 +1546,7 @@ qla1280_return_status(struct response * 
>  	int host_status = DID_ERROR;
>  	uint16_t comp_status = le16_to_cpu(sts->comp_status);
>  	uint16_t state_flags = le16_to_cpu(sts->state_flags);
> -	uint16_t residual_length = le16_to_cpu(sts->residual_length);
> +	uint16_t residual_length = le32_to_cpu(sts->residual_length);
>  	uint16_t scsi_status = le16_to_cpu(sts->scsi_status);
[...]
> +	__le16 status_flags;	/* Status flags. */
> +	__le16 time;		/* Time. */
> +	__le16 req_sense_length;/* Request sense data length. */
> +	__le32 residual_length;	/* Residual transfer length. */
> +	__le16 reserved[4];
>  	uint8_t req_sense_data[32];	/* Request sense data. */

This isn't merely an endian annotation.

Is this a size fix, from 16 to 32, or a typo?  If its not a typo, 
shouldn't the variable be declared 'uint32_t residual_length'?

	Jeff



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [SCSI] qla1280: endianess annotations
  2005-09-08  2:13 ` [SCSI] qla1280: endianess annotations Jeff Garzik
@ 2005-09-08 10:44   ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2005-09-08 10:44 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Christoph Hellwig, Linux Kernel Mailing List, SCSI Mailing List

On Wed, Sep 07, 2005 at 10:13:21PM -0400, Jeff Garzik wrote:
> Linux Kernel Mailing List wrote:
> >diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
> >--- a/drivers/scsi/qla1280.c
> >+++ b/drivers/scsi/qla1280.c
> >@@ -1546,7 +1546,7 @@ qla1280_return_status(struct response * 
> > 	int host_status = DID_ERROR;
> > 	uint16_t comp_status = le16_to_cpu(sts->comp_status);
> > 	uint16_t state_flags = le16_to_cpu(sts->state_flags);
> >-	uint16_t residual_length = le16_to_cpu(sts->residual_length);
> >+	uint16_t residual_length = le32_to_cpu(sts->residual_length);
> > 	uint16_t scsi_status = le16_to_cpu(sts->scsi_status);
> [...]
> >+	__le16 status_flags;	/* Status flags. */
> >+	__le16 time;		/* Time. */
> >+	__le16 req_sense_length;/* Request sense data length. */
> >+	__le32 residual_length;	/* Residual transfer length. */
> >+	__le16 reserved[4];
> > 	uint8_t req_sense_data[32];	/* Request sense data. */
> 
> This isn't merely an endian annotation.
> 
> Is this a size fix, from 16 to 32, or a typo?  If its not a typo, 
> shouldn't the variable be declared 'uint32_t residual_length'?

It's a typo-fix.  The variable is 32bits in hardware.  Declaring it
in 32bit in software might make sense, but isn't that important.  Feel
free to send a patch if you care enough.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-08 10:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200509080111.j881BbNm032480@hera.kernel.org>
2005-09-08  2:13 ` [SCSI] qla1280: endianess annotations Jeff Garzik
2005-09-08 10:44   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox