Linux-f2fs-devel Archive on lore.kernel.org
 help / color / Atom feed
* [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
@ 2019-12-24 12:43 YueHaibing
  2019-12-26  3:44 ` Chao Yu
  0 siblings, 1 reply; 8+ messages in thread
From: YueHaibing @ 2019-12-24 12:43 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: YueHaibing, linux-kernel, linux-f2fs-devel

fs/f2fs/segment.c: In function fix_curseg_write_pointer:
fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used [-Wunused-but-set-variable]

It is never used since commit 362d8a920384 ("f2fs: Check
write pointer consistency of open zones") , so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/f2fs/segment.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a951953..72cf257 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4482,14 +4482,13 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
 	struct f2fs_dev_info *zbd;
 	struct blk_zone zone;
 	unsigned int cs_section, wp_segno, wp_blkoff, wp_sector_off;
-	block_t cs_zone_block, wp_block, cs_block;
+	block_t cs_zone_block, wp_block;
 	unsigned int log_sectors_per_block = sbi->log_blocksize - SECTOR_SHIFT;
 	sector_t zone_sector;
 	int err;
 
 	cs_section = GET_SEC_FROM_SEG(sbi, cs->segno);
 	cs_zone_block = START_BLOCK(sbi, GET_SEG_FROM_SEC(sbi, cs_section));
-	cs_block = START_BLOCK(sbi, cs->segno) + cs->next_blkoff;
 
 	zbd = get_target_zoned_dev(sbi, cs_zone_block);
 	if (!zbd)
-- 
2.7.4




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
  2019-12-24 12:43 [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block' YueHaibing
@ 2019-12-26  3:44 ` Chao Yu
  2019-12-26  6:05   ` Yuehaibing
  0 siblings, 1 reply; 8+ messages in thread
From: Chao Yu @ 2019-12-26  3:44 UTC (permalink / raw)
  To: YueHaibing, jaegeuk, chao; +Cc: linux-kernel, linux-f2fs-devel

On 2019/12/24 20:43, YueHaibing wrote:
> fs/f2fs/segment.c: In function fix_curseg_write_pointer:
> fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used [-Wunused-but-set-variable]
> 
> It is never used since commit 362d8a920384 ("f2fs: Check
> write pointer consistency of open zones") , so remove it.

Thanks for the fix!

Do you mind merging this patch to original patch? as it's still
pending in dev branch.

Thanks,

> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  fs/f2fs/segment.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index a951953..72cf257 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -4482,14 +4482,13 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
>  	struct f2fs_dev_info *zbd;
>  	struct blk_zone zone;
>  	unsigned int cs_section, wp_segno, wp_blkoff, wp_sector_off;
> -	block_t cs_zone_block, wp_block, cs_block;
> +	block_t cs_zone_block, wp_block;
>  	unsigned int log_sectors_per_block = sbi->log_blocksize - SECTOR_SHIFT;
>  	sector_t zone_sector;
>  	int err;
>  
>  	cs_section = GET_SEC_FROM_SEG(sbi, cs->segno);
>  	cs_zone_block = START_BLOCK(sbi, GET_SEG_FROM_SEC(sbi, cs_section));
> -	cs_block = START_BLOCK(sbi, cs->segno) + cs->next_blkoff;
>  
>  	zbd = get_target_zoned_dev(sbi, cs_zone_block);
>  	if (!zbd)
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
  2019-12-26  3:44 ` Chao Yu
@ 2019-12-26  6:05   ` Yuehaibing
  2019-12-26  8:24     ` Shinichiro Kawasaki
  0 siblings, 1 reply; 8+ messages in thread
From: Yuehaibing @ 2019-12-26  6:05 UTC (permalink / raw)
  To: Chao Yu, jaegeuk, chao; +Cc: linux-kernel, linux-f2fs-devel

On 2019/12/26 11:44, Chao Yu wrote:
> On 2019/12/24 20:43, YueHaibing wrote:
>> fs/f2fs/segment.c: In function fix_curseg_write_pointer:
>> fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used [-Wunused-but-set-variable]
>>
>> It is never used since commit 362d8a920384 ("f2fs: Check
>> write pointer consistency of open zones") , so remove it.
> 
> Thanks for the fix!
> 
> Do you mind merging this patch to original patch? as it's still
> pending in dev branch.

It's ok for me.

> 
> Thanks,
> 
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  fs/f2fs/segment.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
>> index a951953..72cf257 100644
>> --- a/fs/f2fs/segment.c
>> +++ b/fs/f2fs/segment.c
>> @@ -4482,14 +4482,13 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
>>  	struct f2fs_dev_info *zbd;
>>  	struct blk_zone zone;
>>  	unsigned int cs_section, wp_segno, wp_blkoff, wp_sector_off;
>> -	block_t cs_zone_block, wp_block, cs_block;
>> +	block_t cs_zone_block, wp_block;
>>  	unsigned int log_sectors_per_block = sbi->log_blocksize - SECTOR_SHIFT;
>>  	sector_t zone_sector;
>>  	int err;
>>  
>>  	cs_section = GET_SEC_FROM_SEG(sbi, cs->segno);
>>  	cs_zone_block = START_BLOCK(sbi, GET_SEG_FROM_SEC(sbi, cs_section));
>> -	cs_block = START_BLOCK(sbi, cs->segno) + cs->next_blkoff;
>>  
>>  	zbd = get_target_zoned_dev(sbi, cs_zone_block);
>>  	if (!zbd)
>>
> 
> .
> 



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
  2019-12-26  6:05   ` Yuehaibing
@ 2019-12-26  8:24     ` Shinichiro Kawasaki
  2020-01-15  2:33       ` Shinichiro Kawasaki
  0 siblings, 1 reply; 8+ messages in thread
From: Shinichiro Kawasaki @ 2019-12-26  8:24 UTC (permalink / raw)
  To: Yuehaibing; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

On Dec 26, 2019 / 14:05, Yuehaibing wrote:
> On 2019/12/26 11:44, Chao Yu wrote:
> > On 2019/12/24 20:43, YueHaibing wrote:
> >> fs/f2fs/segment.c: In function fix_curseg_write_pointer:
> >> fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used [-Wunused-but-set-variable]
> >>
> >> It is never used since commit 362d8a920384 ("f2fs: Check
> >> write pointer consistency of open zones") , so remove it.
> > 
> > Thanks for the fix!
> > 
> > Do you mind merging this patch to original patch? as it's still
> > pending in dev branch.
> 
> It's ok for me.
>

Thank you for this catch and the fix. Appreciated.

--
Best Regards,
Shin'ichiro Kawasaki

_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
  2019-12-26  8:24     ` Shinichiro Kawasaki
@ 2020-01-15  2:33       ` Shinichiro Kawasaki
  2020-01-15  9:54         ` Chao Yu
  2020-01-15 21:44         ` Jaegeuk Kim
  0 siblings, 2 replies; 8+ messages in thread
From: Shinichiro Kawasaki @ 2020-01-15  2:33 UTC (permalink / raw)
  To: Yuehaibing; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

On Dec 26, 2019 / 17:24, Shin'ichiro Kawasaki wrote:
> On Dec 26, 2019 / 14:05, Yuehaibing wrote:
> > On 2019/12/26 11:44, Chao Yu wrote:
> > > On 2019/12/24 20:43, YueHaibing wrote:
> > >> fs/f2fs/segment.c: In function fix_curseg_write_pointer:
> > >> fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used [-Wunused-but-set-variable]
> > >>
> > >> It is never used since commit 362d8a920384 ("f2fs: Check
> > >> write pointer consistency of open zones") , so remove it.
> > > 
> > > Thanks for the fix!
> > > 
> > > Do you mind merging this patch to original patch? as it's still
> > > pending in dev branch.
> > 
> > It's ok for me.
> >
> 
> Thank you for this catch and the fix. Appreciated.

I have merged YueHaibing's change to the write pointer consistency fix patch
and sent out as the v6 series. Thanks again for finding out the unused variable.

I was not sure if I should add Chao Yu's reviewed by tag to the patch from which
the unused variable was removed. To be strict, I didn't add the tag. Just
another quick review by Chao will be appreciated.

--
Best Regards,
Shin'ichiro Kawasaki

_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
  2020-01-15  2:33       ` Shinichiro Kawasaki
@ 2020-01-15  9:54         ` Chao Yu
  2020-01-16  0:25           ` Shinichiro Kawasaki
  2020-01-15 21:44         ` Jaegeuk Kim
  1 sibling, 1 reply; 8+ messages in thread
From: Chao Yu @ 2020-01-15  9:54 UTC (permalink / raw)
  To: Shinichiro Kawasaki, Yuehaibing; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

On 2020/1/15 10:33, Shinichiro Kawasaki wrote:
> On Dec 26, 2019 / 17:24, Shin'ichiro Kawasaki wrote:
>> On Dec 26, 2019 / 14:05, Yuehaibing wrote:
>>> On 2019/12/26 11:44, Chao Yu wrote:
>>>> On 2019/12/24 20:43, YueHaibing wrote:
>>>>> fs/f2fs/segment.c: In function fix_curseg_write_pointer:
>>>>> fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used [-Wunused-but-set-variable]
>>>>>
>>>>> It is never used since commit 362d8a920384 ("f2fs: Check
>>>>> write pointer consistency of open zones") , so remove it.
>>>>
>>>> Thanks for the fix!
>>>>
>>>> Do you mind merging this patch to original patch? as it's still
>>>> pending in dev branch.
>>>
>>> It's ok for me.
>>>
>>
>> Thank you for this catch and the fix. Appreciated.
> 
> I have merged YueHaibing's change to the write pointer consistency fix patch
> and sent out as the v6 series. Thanks again for finding out the unused variable.
> 
> I was not sure if I should add Chao Yu's reviewed by tag to the patch from which
> the unused variable was removed. To be strict, I didn't add the tag. Just
> another quick review by Chao will be appreciated.

Thanks for the revision. :)

I guess Jaegeuk can merge that kind of fix into original patch, and
meanwhile keeping old Reviewed-by tag in that patch.

Thanks,

> 
> --
> Best Regards,
> Shin'ichiro Kawasaki.
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
  2020-01-15  2:33       ` Shinichiro Kawasaki
  2020-01-15  9:54         ` Chao Yu
@ 2020-01-15 21:44         ` Jaegeuk Kim
  1 sibling, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2020-01-15 21:44 UTC (permalink / raw)
  To: Shinichiro Kawasaki; +Cc: Yuehaibing, linux-kernel, linux-f2fs-devel

On 01/15, Shinichiro Kawasaki wrote:
> On Dec 26, 2019 / 17:24, Shin'ichiro Kawasaki wrote:
> > On Dec 26, 2019 / 14:05, Yuehaibing wrote:
> > > On 2019/12/26 11:44, Chao Yu wrote:
> > > > On 2019/12/24 20:43, YueHaibing wrote:
> > > >> fs/f2fs/segment.c: In function fix_curseg_write_pointer:
> > > >> fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used [-Wunused-but-set-variable]
> > > >>
> > > >> It is never used since commit 362d8a920384 ("f2fs: Check
> > > >> write pointer consistency of open zones") , so remove it.
> > > > 
> > > > Thanks for the fix!
> > > > 
> > > > Do you mind merging this patch to original patch? as it's still
> > > > pending in dev branch.
> > > 
> > > It's ok for me.
> > >
> > 
> > Thank you for this catch and the fix. Appreciated.
> 
> I have merged YueHaibing's change to the write pointer consistency fix patch
> and sent out as the v6 series. Thanks again for finding out the unused variable.

I applied the fix in the original patch.

Thanks,

> 
> I was not sure if I should add Chao Yu's reviewed by tag to the patch from which
> the unused variable was removed. To be strict, I didn't add the tag. Just
> another quick review by Chao will be appreciated.
> 
> --
> Best Regards,
> Shin'ichiro Kawasaki


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
  2020-01-15  9:54         ` Chao Yu
@ 2020-01-16  0:25           ` Shinichiro Kawasaki
  0 siblings, 0 replies; 8+ messages in thread
From: Shinichiro Kawasaki @ 2020-01-16  0:25 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, Yuehaibing, linux-kernel, linux-f2fs-devel

On Jan 15, 2020 / 17:54, Chao Yu wrote:
> On 2020/1/15 10:33, Shinichiro Kawasaki wrote:
> > On Dec 26, 2019 / 17:24, Shin'ichiro Kawasaki wrote:
> >> On Dec 26, 2019 / 14:05, Yuehaibing wrote:
> >>> On 2019/12/26 11:44, Chao Yu wrote:
> >>>> On 2019/12/24 20:43, YueHaibing wrote:
> >>>>> fs/f2fs/segment.c: In function fix_curseg_write_pointer:
> >>>>> fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used [-Wunused-but-set-variable]
> >>>>>
> >>>>> It is never used since commit 362d8a920384 ("f2fs: Check
> >>>>> write pointer consistency of open zones") , so remove it.
> >>>>
> >>>> Thanks for the fix!
> >>>>
> >>>> Do you mind merging this patch to original patch? as it's still
> >>>> pending in dev branch.
> >>>
> >>> It's ok for me.
> >>>
> >>
> >> Thank you for this catch and the fix. Appreciated.
> > 
> > I have merged YueHaibing's change to the write pointer consistency fix patch
> > and sent out as the v6 series. Thanks again for finding out the unused variable.
> > 
> > I was not sure if I should add Chao Yu's reviewed by tag to the patch from which
> > the unused variable was removed. To be strict, I didn't add the tag. Just
> > another quick review by Chao will be appreciated.
> 
> Thanks for the revision. :)
> 
> I guess Jaegeuk can merge that kind of fix into original patch, and
> meanwhile keeping old Reviewed-by tag in that patch.

Yeah, my action looks too much for this fix. I saw the fix merged to the commit
in Jaegeuk's dev branch. Thank you Jaeguek.

--
Best Regards,
Shin'ichiro Kawasaki

_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-24 12:43 [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block' YueHaibing
2019-12-26  3:44 ` Chao Yu
2019-12-26  6:05   ` Yuehaibing
2019-12-26  8:24     ` Shinichiro Kawasaki
2020-01-15  2:33       ` Shinichiro Kawasaki
2020-01-15  9:54         ` Chao Yu
2020-01-16  0:25           ` Shinichiro Kawasaki
2020-01-15 21:44         ` Jaegeuk Kim

Linux-f2fs-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-f2fs-devel/0 linux-f2fs-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-f2fs-devel linux-f2fs-devel/ https://lore.kernel.org/linux-f2fs-devel \
		linux-f2fs-devel@lists.sourceforge.net
	public-inbox-index linux-f2fs-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/net.sourceforge.lists.linux-f2fs-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git