* [PATCH] ext4:quiet 'unsed variables' compiling warnings.
@ 2011-06-15 3:27 Yongqiang Yang
2011-06-27 20:34 ` Ted Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Yongqiang Yang @ 2011-06-15 3:27 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4, Yongqiang Yang
Delete unused variables.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
fs/ext4/extents.c | 2 --
fs/ext4/mballoc.c | 5 +----
2 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 5199bac..a33bf11 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3107,12 +3107,10 @@ static int ext4_convert_unwritten_extents_endio(handle_t *handle,
struct ext4_ext_path *path)
{
struct ext4_extent *ex;
- struct ext4_extent_header *eh;
int depth;
int err = 0;
depth = ext_depth(inode);
- eh = path[depth].p_hdr;
ex = path[depth].p_ext;
ext_debug("ext4_convert_unwritten_extents_endio: inode %lu, logical"
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 859f2ae..fece8c2 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2860,7 +2860,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
{
int bsbits, max;
ext4_lblk_t end;
- loff_t size, orig_size, start_off;
+ loff_t size, start_off;
ext4_lblk_t start;
struct ext4_inode_info *ei = EXT4_I(ac->ac_inode);
struct ext4_prealloc_space *pa;
@@ -2892,7 +2892,6 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
size = size << bsbits;
if (size < i_size_read(ac->ac_inode))
size = i_size_read(ac->ac_inode);
- orig_size = size;
/* max size of free chunks */
max = 2 << bsbits;
@@ -4666,12 +4665,10 @@ void ext4_add_groupblocks(handle_t *handle, struct super_block *sb,
struct ext4_buddy e4b;
int err = 0, ret, blk_free_count;
ext4_grpblk_t blocks_freed;
- struct ext4_group_info *grp;
ext4_debug("Adding block(s) %llu-%llu\n", block, block + count - 1);
ext4_get_group_no_and_offset(sb, block, &block_group, &bit);
- grp = ext4_get_group_info(sb, block_group);
/*
* Check to see if we are freeing blocks across a group
* boundary.
--
1.7.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4:quiet 'unsed variables' compiling warnings.
2011-06-15 3:27 [PATCH] ext4:quiet 'unsed variables' compiling warnings Yongqiang Yang
@ 2011-06-27 20:34 ` Ted Ts'o
2011-06-28 1:32 ` Yongqiang Yang
0 siblings, 1 reply; 3+ messages in thread
From: Ted Ts'o @ 2011-06-27 20:34 UTC (permalink / raw)
To: Yongqiang Yang; +Cc: linux-ext4
On Wed, Jun 15, 2011 at 11:27:00AM +0800, Yongqiang Yang wrote:
> Delete unused variables.
>
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 859f2ae..fece8c2 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -2860,7 +2860,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
> {
> int bsbits, max;
> ext4_lblk_t end;
> - loff_t size, orig_size, start_off;
> + loff_t size, start_off;
Unfortunately, orig_size is being used by an mb_debug statement. So
simply removing orig_size and its initialization will cause the build
to break if CONFIG_EXT4_DEBUG is enabled.
Can you resend this patch with this part of the patch removed?
Also, for future reference I prefer for consistency's sake that the
one-line summary be:
ext4: quiet 'used variables' compiling warnings
(note the space after "ext4: ", the lack of a ending period, and the
spelling correction for "unsed"; the other change which I will
commonly make for folks, again for consistency, is to make the first
word after "ext4: " lower case --- the summary does not have to be a
complete sentence, which is why I remove the trailing period)
Thanks,
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4:quiet 'unsed variables' compiling warnings.
2011-06-27 20:34 ` Ted Ts'o
@ 2011-06-28 1:32 ` Yongqiang Yang
0 siblings, 0 replies; 3+ messages in thread
From: Yongqiang Yang @ 2011-06-28 1:32 UTC (permalink / raw)
To: Ted Ts'o; +Cc: linux-ext4
On Tue, Jun 28, 2011 at 4:34 AM, Ted Ts'o <tytso@mit.edu> wrote:
> On Wed, Jun 15, 2011 at 11:27:00AM +0800, Yongqiang Yang wrote:
>> Delete unused variables.
>>
>> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
>> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
>> index 859f2ae..fece8c2 100644
>> --- a/fs/ext4/mballoc.c
>> +++ b/fs/ext4/mballoc.c
>> @@ -2860,7 +2860,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
>> {
>> int bsbits, max;
>> ext4_lblk_t end;
>> - loff_t size, orig_size, start_off;
>> + loff_t size, start_off;
>
> Unfortunately, orig_size is being used by an mb_debug statement. So
> simply removing orig_size and its initialization will cause the build
> to break if CONFIG_EXT4_DEBUG is enabled.
Sorry for my carelessness.
>
> Can you resend this patch with this part of the patch removed?
>
> Also, for future reference I prefer for consistency's sake that the
> one-line summary be:
>
> ext4: quiet 'used variables' compiling warnings
>
> (note the space after "ext4: ", the lack of a ending period, and the
> spelling correction for "unsed"; the other change which I will
> commonly make for folks, again for consistency, is to make the first
> word after "ext4: " lower case --- the summary does not have to be a
> complete sentence, which is why I remove the trailing period)
I have resent the updated patch. Thank you very much for your
explanation on the summary.
Yongqiang.
>
> Thanks,
>
> - Ted
>
--
Best Wishes
Yongqiang Yang
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-28 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 3:27 [PATCH] ext4:quiet 'unsed variables' compiling warnings Yongqiang Yang
2011-06-27 20:34 ` Ted Ts'o
2011-06-28 1:32 ` Yongqiang Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).