Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1669907
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: remove a redundant condition in the for loop |
| Date | 2017-06-19 22:30 +0200 |
| Message-ID | <tUbt7-7sP-5@gated-at.bofh.it> (permalink) |
| References | <tU5nI-3mQ-1@gated-at.bofh.it> <tU5H3-3IR-9@gated-at.bofh.it> <tUadH-6Iy-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/19/2017 09:05 PM, Rasmus Villemoes wrote: > On Mon, Jun 19 2017, Vlastimil Babka <vbabka@suse.cz> wrote: > >> On 06/19/2017 03:54 PM, Hao Lee wrote: >>> The variable current_order decreases from MAX_ORDER-1 to order, so the >>> condition current_order <= MAX_ORDER-1 is always true. >>> >>> Signed-off-by: Hao Lee <haolee.swjtu@gmail.com> >> >> Sounds right. >> >> Acked-by: Vlastimil Babka <vbabka@suse.cz> > > current_order and order are both unsigned, and if order==0, > current_order >= order is always true, and we may decrement > current_order past 0 making it UINT_MAX... A comment would be in order, > though. Doh, right. Thanks.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: remove a redundant condition in the for loop Hao Lee <haolee.swjtu@gmail.com> - 2017-06-19 16:00 +0200
Re: [PATCH] mm: remove a redundant condition in the for loop Vlastimil Babka <vbabka@suse.cz> - 2017-06-19 16:20 +0200
Re: [PATCH] mm: remove a redundant condition in the for loop Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2017-06-19 21:10 +0200
Re: [PATCH] mm: remove a redundant condition in the for loop Vlastimil Babka <vbabka@suse.cz> - 2017-06-19 22:30 +0200
Re: [PATCH] mm: remove a redundant condition in the for loop Hao Lee <haolee.swjtu@gmail.com> - 2017-06-20 03:40 +0200
Re: [PATCH] mm: remove a redundant condition in the for loop Michal Hocko <mhocko@kernel.org> - 2017-06-21 11:50 +0200
[PATCH] mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2017-06-21 21:00 +0200
Re: [PATCH] mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback Michal Hocko <mhocko@kernel.org> - 2017-06-23 14:30 +0200
Re: [PATCH] mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback Vlastimil Babka <vbabka@suse.cz> - 2017-06-23 15:20 +0200
Re: [PATCH] mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback Wei Yang <richard.weiyang@gmail.com> - 2017-06-24 15:30 +0200
csiph-web