Re: [PATCH] block: Remove extra discard_alignment from hd_struct.

From: Andrew Morton
Date: Wed May 11 2011 - 20:09:02 EST


On Wed, 20 Apr 2011 16:17:35 +0800
Tao Ma <tm@xxxxxx> wrote:

> --- a/fs/partitions/check.c
> +++ b/fs/partitions/check.c
> @@ -255,7 +255,12 @@ ssize_t part_discard_alignment_show(struct device *dev,
> struct device_attribute *attr, char *buf)
> {
> struct hd_struct *p = dev_to_part(dev);
> - return sprintf(buf, "%u\n", p->discard_alignment);
> + struct gendisk *disk = dev_to_disk(dev);
> +
> + return sprintf(buf, "%u\n",
> + (unsigned long long)queue_limit_discard_alignment(
> + &disk->queue->limits,
> + p->start_sect));

fs/partitions/check.c: In function 'part_discard_alignment_show':
fs/partitions/check.c:263: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'long long unsigned int'

um, that should have been apparent from cursory review, let alone
compile testing. And it will fail runtime testing on little-endian
machines if the third arg is passed on the stack.

--
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/