All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Seymour, Shane M" <shane.seymour@hp.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	"Laurence Oberman (loberman@redhat.com)" <loberman@redhat.com>,
	"Kai.Makisara@kolumbus.fi" <Kai.Makisara@kolumbus.fi>
Subject: Re: [PATCH v9] st: implement tape statistics
Date: Mon, 01 Jun 2015 10:25:42 -0700	[thread overview]
Message-ID: <1433179542.2174.23.camel@HansenPartnership.com> (raw)
In-Reply-To: <DDB9C85B850785449757F9914A034FCB3BFC42AA@G9W0748.americas.hpqcorp.net>

On Mon, 2015-06-01 at 06:43 +0000, Seymour, Shane M wrote:
> +#if (BITS_PER_LONG == 64)
> +#define PRId64 "ld"
> +#else
> +#define PRId64 "lld"
> +#endif

I know this is the windows recommended way to do this, but lets not
pollute the kernel with it because the kernel accepts %lld everywhere
for 64 bit integers (including on 64 bit platforms).

> +/**
> + * read_cnt_show - return read count - count of reads made from tape drive
> + * @dev: struct device
> + * @attr: attribute structure
> + * @buf: buffer to return formatted data in
> + */
> +static ssize_t read_cnt_show(struct device *dev,
> +	struct device_attribute *attr, char *buf)
> +{
> +	struct st_modedef *STm = dev_get_drvdata(dev);
> +
> +	return sprintf(buf, "%"PRId64,
> +		atomic64_read(&STm->tape->stats->read_cnt));
> +

In the interests of time, I just fixed all of this up.

James



      reply	other threads:[~2015-06-01 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01  6:43 [PATCH v9] st: implement tape statistics Seymour, Shane M
2015-06-01 17:25 ` 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=1433179542.2174.23.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=shane.seymour@hp.com \
    /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.