[patch 5/24] s390: channel measurement fix.

From: Martin Schwidefsky
Date: Wed Jun 14 2006 - 10:07:12 EST


From: Cornelia Huck <cornelia.huck@xxxxxxxxxx>

[S390] channel measurement fix.

Specify correct sizeof() in chp_measurement_read() and return
correct amount of read data.

Signed-off-by: Cornelia Huck <cornelia.huck@xxxxxxxxxx>
Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
---

drivers/s390/cio/chsc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

diff -urpN linux-2.6/drivers/s390/cio/chsc.c linux-2.6-patched/drivers/s390/cio/chsc.c
--- linux-2.6/drivers/s390/cio/chsc.c 2006-06-14 14:29:18.000000000 +0200
+++ linux-2.6-patched/drivers/s390/cio/chsc.c 2006-06-14 14:29:37.000000000 +0200
@@ -918,12 +918,13 @@ chp_measurement_read(struct kobject *kob
chp = to_channelpath(container_of(kobj, struct device, kobj));
css = to_css(chp->dev.parent);

- size = sizeof(struct cmg_chars);
+ size = sizeof(struct cmg_entry);

/* Only allow single reads. */
if (off || count < size)
return 0;
chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->id);
+ count = size;
return count;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/