lkml.org 
[lkml]   [2011]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2011-05-12 02:11    [W:0.073 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site