public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Andrew Morton <akpm@osdl.org>
Cc: kjhall@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: fix gcc printk warnings
Date: Mon, 14 Mar 2005 15:16:08 -0800	[thread overview]
Message-ID: <42361B38.4060704@osdl.org> (raw)
In-Reply-To: <20050314150825.5f52b1a8.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 140 bytes --]

Andrew Morton wrote:
> "Randy.Dunlap" <rddunlap@osdl.org> wrote:
> 
> Nope.  Please use %Z for size_t args.

Yeps.  Here it is.

-- 
~Randy

[-- Attachment #2: tpm_printk_v2.patch --]
[-- Type: text/x-patch, Size: 1450 bytes --]



Fix gcc printk arg type warnings:

drivers/char/tpm/tpm.c:145: warning: unsigned int format, different type arg (arg 5)
drivers/char/tpm/tpm.c:153: warning: int format, different type arg (arg 4)
drivers/char/tpm/tpm.c:190: warning: int format, different type arg (arg 4)

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>

diffstat:=
 drivers/char/tpm/tpm.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -Naurp ./drivers/char/tpm/tpm.c~tpm_printk ./drivers/char/tpm/tpm.c
--- ./drivers/char/tpm/tpm.c~tpm_printk	2005-03-14 08:41:24.000000000 -0800
+++ ./drivers/char/tpm/tpm.c	2005-03-14 15:11:23.000000000 -0800
@@ -143,7 +143,7 @@ static ssize_t tpm_transmit(struct tpm_c
 		return -ENODATA;
 	if (count > bufsiz) {
 		dev_err(&chip->pci_dev->dev,
-			"invalid count value %x %x \n", count, bufsiz);
+			"invalid count value %x %Zx\n", count, bufsiz);
 		return -E2BIG;
 	}
 
@@ -151,7 +151,7 @@ static ssize_t tpm_transmit(struct tpm_c
 
 	if ((len = chip->vendor->send(chip, (u8 *) buf, count)) < 0) {
 		dev_err(&chip->pci_dev->dev,
-			"tpm_transmit: tpm_send: error %d\n", len);
+			"tpm_transmit: tpm_send: error %Zd\n", len);
 		return len;
 	}
 
@@ -188,7 +188,7 @@ out_recv:
 	len = chip->vendor->recv(chip, (u8 *) buf, bufsiz);
 	if (len < 0)
 		dev_err(&chip->pci_dev->dev,
-			"tpm_transmit: tpm_recv: error %d\n", len);
+			"tpm_transmit: tpm_recv: error %Zd\n", len);
 	up(&chip->tpm_mutex);
 	return len;
 }

  reply	other threads:[~2005-03-14 23:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-14 22:55 [PATCH] tpm: fix gcc printk warnings Randy.Dunlap
2005-03-14 23:08 ` Andrew Morton
2005-03-14 23:16   ` Randy.Dunlap [this message]
2005-04-15 21:09     ` Kylene Jo Hall
2005-04-27 22:18 ` [PATCH 8 of 12] Fix Tpm driver -- Maintainers entry Kylene Hall

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=42361B38.4060704@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=akpm@osdl.org \
    --cc=kjhall@us.ibm.com \
    --cc=linux-kernel@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