mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/3 v2] f2fs:remove unnecessary condition judgment
@ 2015-03-09  2:43 Yuan Zhong
  2015-03-09  6:46 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Yuan Zhong @ 2015-03-09  2:43 UTC (permalink / raw)
  To: Jaegeuk Kim, ???; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312, Size: 927 bytes --]

Remove the unnecessary condition judgment, because 
'max_slots' has been initialized to '0' at the beginging 
of the function, as following:
if (max_slots)
       *max_slots = 0;
	
Signed-off-by: Yuan Zhong <yuan.mark.zhong@samsung.com>	
---
 fs/f2fs/dir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 590aeef..1f1a1bc 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -139,7 +139,7 @@ struct f2fs_dir_entry *find_target_dentry(struct qstr *name, int *max_slots,
 			!memcmp(d->filename[bit_pos], name->name, name->len))
 			goto found;
 
-		if (max_slots && *max_slots >= 0 && max_len > *max_slots) {
+		if (max_slots && max_len > *max_slots) {
 			*max_slots = max_len;
 			max_len = 0;
 		}
-- 
1.7.9.5ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [f2fs-dev] [PATCH 1/3 v2] f2fs:remove unnecessary condition judgment
  2015-03-09  2:43 [f2fs-dev] [PATCH 1/3 v2] f2fs:remove unnecessary condition judgment Yuan Zhong
@ 2015-03-09  6:46 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2015-03-09  6:46 UTC (permalink / raw)
  To: yuan.mark.zhong, 'Jaegeuk Kim', '???'
  Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel

> -----Original Message-----
> From: Yuan Zhong [mailto:yuan.mark.zhong@samsung.com]
> Sent: Monday, March 09, 2015 10:44 AM
> To: Jaegeuk Kim; ???
> Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net
> Subject: [f2fs-dev] [PATCH 1/3 v2] f2fs:remove unnecessary condition judgment
> 
> Remove the unnecessary condition judgment, because
> 'max_slots' has been initialized to '0' at the beginging
> of the function, as following:
> if (max_slots)
>        *max_slots = 0;
> 
> Signed-off-by: Yuan Zhong <yuan.mark.zhong@samsung.com>

Reviewed-by: Chao Yu <chao2.yu@samsung.com>


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

end of thread, other threads:[~2015-03-09  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09  2:43 [f2fs-dev] [PATCH 1/3 v2] f2fs:remove unnecessary condition judgment Yuan Zhong
2015-03-09  6:46 ` Chao Yu

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®