On Wed, 28 Aug 2019, Rasmus Villemoes wrote: > On 25/08/2019 21.19, Julia Lawall wrote: > > > > > >> On 26 Aug 2019, at 02:59, Denis Efremov <[email protected]> wrote: > >> > >> > >> > >>> On 25.08.2019 19:37, Joe Perches wrote: > >>>> On Sun, 2019-08-25 at 16:05 +0300, Denis Efremov wrote: > >>>> This patch adds coccinelle script for detecting !likely and !unlikely > >>>> usage. It's better to use unlikely instead of !likely and vice versa. > >>> > >>> Please explain _why_ is it better in the changelog. > >>> > >> > >> In my naive understanding the negation (!) before the likely/unlikely > >> could confuse the compiler > > > > As a human I am confused. Is !likely(x) equivalent to x or !x? > > #undef likely > #undef unlikely > #define likely(x) (x) > #define unlikely(x) (x) > > should be a semantic no-op. So changing !likely(x) to unlikely(x) is > completely wrong. If anything, !likely(x) can be transformed to > unlikely(!x). Thanks. Making the change seems like a good idea. julia
- [PATCH] scripts: coccinelle: check for !(un)?likely usage Denis Efremov
- Re: [PATCH] scripts: coccinelle: check for !(un)?lik... Markus Elfring
- Re: [PATCH] scripts: coccinelle: check for !(un)... Denis Efremov
- Re: [PATCH] scripts: coccinelle: check for !(un)?lik... Markus Elfring
- Re: [PATCH] scripts: coccinelle: check for !(un)?lik... Joe Perches
- Re: [PATCH] scripts: coccinelle: check for !(un)... Denis Efremov
- Re: [Cocci] [PATCH] scripts: coccinelle: che... Julia Lawall
- Re: [PATCH] scripts: coccinelle: check f... Rasmus Villemoes
- Re: [PATCH] scripts: coccinelle: ch... Joe Perches
- Re: [PATCH] scripts: coccinelle: ch... Denis Efremov
- Re: [PATCH] scripts: coccinelle: ch... Julia Lawall
- Re: [PATCH] scripts: coccinelle: check f... Denis Efremov
- Re: [Cocci] [PATCH] scripts: coccin... Denis Efremov
- Re: [Cocci] [PATCH] scripts: coccinelle: che... Denis Efremov
- Re: [PATCH] scripts: coccinelle: check for !(un)... Pavel Machek
- Re: [Cocci] [PATCH] scripts: coccinelle: che... Denis Efremov
- [PATCH v2] scripts: coccinelle: check for !(un)?like... Denis Efremov
- Re: [PATCH v2] scripts: coccinelle: check for !(... Denis Efremov
- Re: [PATCH v2] scripts: coccinelle: check fo... Julia Lawall
- Re: [Cocci] [PATCH v2] scripts: coccinel... Denis Efremov
- Re: [PATCH v2] scripts: coccinelle:... Rasmus Villemoes
