Messages in this thread | | | Date | Wed, 11 May 2011 17:08:18 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] block: Remove extra discard_alignment from hd_struct. |
| |
On Wed, 20 Apr 2011 16:17:35 +0800 Tao Ma <tm@tao.ma> 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.
| |