From: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
linux-kernel@vger.kernel.org
Subject: blk-settings.c integer truncation
Date: Fri, 19 Jun 2009 12:04:05 +0300 [thread overview]
Message-ID: <20090619090405.GA3222@localdomain.by> (raw)
Hello.
commit e475bba2fdee9c3dbfe25f026f8fb8de69508ad2
introduced 'void blk_set_default_limits(struct queue_limits *lim)'
blkdev.h
...
#endif
#define BLK_BOUNCE_ANY (-1ULL)
#define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD)
struct queue_limits {
unsigned long bounce_pfn;
unsigned long seg_boundary_mask;
....
};
Assignment at block/blk-settings.c:115 (4 bytes = 8 bytes):
lim->bounce_pfn = BLK_BOUNCE_ANY;
leads to truncation:
block/blk-settings.c: In function ‘blk_set_default_limits’:
block/blk-settings.c:115: warning: large integer implicitly truncated to unsigned type
Should BLK_BOUNCE_ANY be (-1UL)?
Thanks.
Sergey
p.s.
In case it's already fixed - let me know.
next reply other threads:[~2009-06-19 9:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-19 9:04 Sergey Senozhatsky [this message]
2009-06-19 14:24 ` Martin K. Petersen
2009-06-19 14:40 ` Sergey Senozhatsky
2009-06-19 9:20 Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090619090405.GA3222@localdomain.by \
--to=sergey.senozhatsky@mail.by \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®