From: Dan Carpenter <dan.carpenter@oracle.com>
To: jaegeuk.kim@samsung.com
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: f2fs: introduce f2fs_issue_discard() to clean up
Date: Tue, 26 Nov 2013 17:53:16 +0300 [thread overview]
Message-ID: <20131126145315.GA27436@elgon.mountain> (raw)
Hello Jaegeuk Kim,
The patch 3fa7fb17dc9a: "f2fs: introduce f2fs_issue_discard() to clean
up" from Nov 12, 2013, leads to the following static checker warning:
"fs/f2fs/segment.c:274 f2fs_issue_discard()
warn: should 'blklen << sbi->log_sectors_per_block' be a 64 bit
type?"
fs/f2fs/segment.c
270 static void f2fs_issue_discard(struct f2fs_sb_info *sbi,
271 block_t blkstart, block_t blklen)
272 {
273 sector_t sector_addr = blkstart << sbi->log_sectors_per_block;
274 sector_t sector_len = blklen << sbi->log_sectors_per_block;
block_t is a 32 bit type and sector_t is a 64 bit type. The upper 32
bits of the sector_t are not used because the shift will wrap.
275
276 blkdev_issue_discard(sbi->sb->s_bdev, sector_addr, sector_len,
277 GFP_NOFS, 0);
278 trace_f2fs_issue_discard(sbi->sb, blkstart, blklen);
279 }
regards,
dan carpenter
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
next reply other threads:[~2013-11-26 14:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 14:53 Dan Carpenter [this message]
2013-11-27 2:46 ` f2fs: introduce f2fs_issue_discard() to clean up Jaegeuk Kim
2013-11-27 8:31 ` Dan Carpenter
2013-11-27 9:04 ` Jaegeuk Kim
2013-11-27 10:41 ` Dan Carpenter
2013-11-28 4:04 ` Jaegeuk Kim
2013-11-28 8:08 ` Dan Carpenter
2013-11-28 9:24 ` Jaegeuk Kim
2013-11-28 9:45 ` Dan Carpenter
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=20131126145315.GA27436@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=jaegeuk.kim@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.