2005-03-14 23:02:22

by Randy.Dunlap

[permalink] [raw]
Subject: [PATCH] tpm: fix gcc printk warnings


(Kylene, please add TPM info to MAINTAINERS or CREDITS)

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 <[email protected]>

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 11:19:28.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 %lx\n", count, (unsigned long)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;
}


---


2005-03-14 23:11:29

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] tpm: fix gcc printk warnings

"Randy.Dunlap" <[email protected]> wrote:
>
> - "invalid count value %x %x \n", count, bufsiz);
> + "invalid count value %x %lx\n", count, (unsigned long)bufsiz);

Nope. Please use %Z for size_t args.

2005-03-14 23:20:43

by Randy.Dunlap

[permalink] [raw]
Subject: Re: [PATCH] tpm: fix gcc printk warnings

Andrew Morton wrote:
> "Randy.Dunlap" <[email protected]> wrote:
>
> Nope. Please use %Z for size_t args.

Yeps. Here it is.

--
~Randy


Attachments:
tpm_printk_v2.patch (1.42 kB)

2005-04-15 21:09:58

by Kylene Jo Hall

[permalink] [raw]
Subject: Re: [PATCH] tpm: fix gcc printk warnings

The patch that was attached to this orginal message looks good to me and
can be applied to the Tpm driver.

Thanks,
Kylie

On Mon, 2005-03-14 at 15:16 -0800, Randy.Dunlap wrote:
> Andrew Morton wrote:
> > "Randy.Dunlap" <[email protected]> wrote:
> >
> > Nope. Please use %Z for size_t args.
>
> Yeps. Here it is.
>

2005-04-27 22:22:39

by Kylene Jo Hall

[permalink] [raw]
Subject: [PATCH 8 of 12] Fix Tpm driver -- Maintainers entry

On Mon, 14 Mar 2005, Randy.Dunlap wrote:
> (Kylene, please add TPM info to MAINTAINERS or CREDITS)

This patch adds the maintainers entry.

Signed-off-by: Kylene Hall <[email protected]
---
--- linux-2.6.12-rc2/MAINTAINERS 2005-04-04 11:38:36.000000000 -0500
+++ linux-2.6.12-rc2-tpmdd/MAINTAINERS 2005-04-14 14:45:57.000000000 -0500
@@ -2116,6 +2116,13 @@ M: [email protected]
L: [email protected]
S: Maintained

+TPM DEVICE DRIVER
+P: Kylene Hall
+M: [email protected]
+W: http://tpmdd.sourceforge.net
+L: [email protected]
+S: Maintained
+
UltraSPARC (sparc64):
P: David S. Miller
M: [email protected]