All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: James.Smart@Emulex.Com
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 2/3] MidLayer updates - Add device io statistics
Date: Thu, 03 Feb 2005 22:03:12 -0600	[thread overview]
Message-ID: <1107489792.5502.50.camel@mulgrave> (raw)
In-Reply-To: <0B1E13B586976742A7599D71A6AC733C12EAB2@xbl3.ma.emulex.com>

On Sat, 2005-01-29 at 09:03 -0500, James.Smart@Emulex.Com wrote:
>   Adds io statistics (requests, completions, error count) as generic
>   attributes for scsi devices.

I needed the attached to make this compile without warnings on ia64

James

===== drivers/scsi/scsi_sysfs.c 1.65 vs edited =====
--- 1.65/drivers/scsi/scsi_sysfs.c	2005-02-03 21:35:03 -06:00
+++ edited/drivers/scsi/scsi_sysfs.c	2005-02-03 21:59:14 -06:00
@@ -411,7 +411,7 @@
 static ssize_t
 show_iostat_counterbits(struct device *dev, char *buf)
 {
-	return snprintf(buf, 20, "%d\n", sizeof(atomic_t) * 8);
+	return snprintf(buf, 20, "%d\n", (int)sizeof(atomic_t) * 8);
 }
 
 static DEVICE_ATTR(iocounterbits, S_IRUGO, show_iostat_counterbits, NULL);
@@ -421,7 +421,7 @@
 show_iostat_##field(struct device *dev, char *buf)			\
 {									\
 	struct scsi_device *sdev = to_scsi_device(dev);			\
-	u64 count = (u64)atomic_read(&sdev->field);			\
+	unsigned long long count = atomic_read(&sdev->field);		\
 	return snprintf(buf, 20, "0x%llx\n", count);			\
 }									\
 static DEVICE_ATTR(field, S_IRUGO, show_iostat_##field, NULL)



      reply	other threads:[~2005-02-04  4:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-29 14:03 [PATCH 2/3] MidLayer updates - Add device io statistics James.Smart
2005-02-04  4:03 ` James Bottomley [this message]

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=1107489792.5502.50.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=James.Smart@Emulex.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 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.