All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Himanshu Jha <himanshujha199640@gmail.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Michal Marek <michal.lkml@markovi.net>,
	cocci@systeme.lip6.fr,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] Coccinelle: kzalloc-simple: Add all zero allocating functions
Date: Sat, 30 Dec 2017 02:22:19 +0900	[thread overview]
Message-ID: <CAK7LNAR27r4j4c1FCh_ObpMpBKXgSP6Vq3P=reA-JKoTji6Q1A@mail.gmail.com> (raw)
In-Reply-To: <1514324410-14561-1-git-send-email-himanshujha199640@gmail.com>

2017-12-27 6:40 GMT+09:00 Himanshu Jha <himanshujha199640@gmail.com>:
> There are many instances where memory is allocated using regular
> allocator
> functions immediately followed by setting the allocated memory
> to 0 value using memset.
>
> We already have zero memory allocator functions to set the memory to
> 0 value instead of manually setting it using memset.
>
> Therefore, use zero memory allocating functions instead of regular
> memory allocators followed by memset 0 to remove redundant memset and
> make the code more cleaner and also reduce the code size.
>
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
>
> v2:
>    -fix typo in copyright.
>    -move all the (T *) disjunction cases before (T) as (T) matches any cast
>     at all including (T *) ones which is not desirable.
>

...

> +@script:python depends on report@
> +p << r9.p;
> +x << r9.x;
> +@@
> +
> +msg="WARNING: kvzalloc_node should be used for %s, instead of kvmalloc_node/memset" % (x)
> +coccilib.report.print_report(p[0], msg)
> +


I removed the blank line at EOF,
then applied to linux-kbuild/misc.  Thanks!




-- 
Best Regards
Masahiro Yamada

WARNING: multiple messages have this Message-ID (diff)
From: yamada.masahiro@socionext.com (Masahiro Yamada)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH v2] Coccinelle: kzalloc-simple: Add all zero allocating functions
Date: Sat, 30 Dec 2017 02:22:19 +0900	[thread overview]
Message-ID: <CAK7LNAR27r4j4c1FCh_ObpMpBKXgSP6Vq3P=reA-JKoTji6Q1A@mail.gmail.com> (raw)
In-Reply-To: <1514324410-14561-1-git-send-email-himanshujha199640@gmail.com>

2017-12-27 6:40 GMT+09:00 Himanshu Jha <himanshujha199640@gmail.com>:
> There are many instances where memory is allocated using regular
> allocator
> functions immediately followed by setting the allocated memory
> to 0 value using memset.
>
> We already have zero memory allocator functions to set the memory to
> 0 value instead of manually setting it using memset.
>
> Therefore, use zero memory allocating functions instead of regular
> memory allocators followed by memset 0 to remove redundant memset and
> make the code more cleaner and also reduce the code size.
>
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
>
> v2:
>    -fix typo in copyright.
>    -move all the (T *) disjunction cases before (T) as (T) matches any cast
>     at all including (T *) ones which is not desirable.
>

...

> + at script:python depends on report@
> +p << r9.p;
> +x << r9.x;
> +@@
> +
> +msg="WARNING: kvzalloc_node should be used for %s, instead of kvmalloc_node/memset" % (x)
> +coccilib.report.print_report(p[0], msg)
> +


I removed the blank line at EOF,
then applied to linux-kbuild/misc.  Thanks!




-- 
Best Regards
Masahiro Yamada

  parent reply	other threads:[~2017-12-29 17:23 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26 21:40 [PATCH v2] Coccinelle: kzalloc-simple: Add all zero allocating functions Himanshu Jha
2017-12-26 21:40 ` [Cocci] " Himanshu Jha
2017-12-26 21:52 ` Julia Lawall
2017-12-26 21:52   ` [Cocci] " Julia Lawall
2017-12-29 17:22 ` Masahiro Yamada [this message]
2017-12-29 17:22   ` Masahiro Yamada
2017-12-29 17:49   ` Julia Lawall
2017-12-29 17:49     ` [Cocci] " Julia Lawall
2018-01-02 14:25   ` Rename the SmPL script “kzalloc-….cocci”? SF Markus Elfring
2018-01-02 14:25     ` SF Markus Elfring
2018-01-02 14:28     ` Julia Lawall
2018-01-02 14:28       ` [Cocci] " Julia Lawall
2018-01-02 14:28       ` Julia Lawall
2018-01-02 14:38       ` SF Markus Elfring
2018-01-02 14:38         ` SF Markus Elfring
2018-01-02 14:43         ` Julia Lawall
2018-01-02 14:43           ` [Cocci] " Julia Lawall
2018-01-02 14:43           ` Julia Lawall
2018-01-02 15:00           ` SF Markus Elfring
2018-01-02 15:00             ` SF Markus Elfring
2018-01-08  9:55           ` SF Markus Elfring
2018-01-08  9:55             ` SF Markus Elfring
2018-01-03 11:55       ` [PATCH] Coccinelle: Rename the script for a transformation of memory allocations SF Markus Elfring
2018-01-03 11:55         ` SF Markus Elfring
2018-01-03 12:02         ` Julia Lawall
2018-01-03 12:02           ` [Cocci] " Julia Lawall
2018-01-03 12:02           ` Julia Lawall
2018-01-03 12:13           ` SF Markus Elfring
2018-01-03 12:13             ` SF Markus Elfring
2018-01-03 12:17             ` Julia Lawall
2018-01-03 12:17               ` [Cocci] " Julia Lawall
2018-01-03 12:17               ` Julia Lawall
2018-01-03 12:31               ` SF Markus Elfring
2018-01-03 12:31                 ` SF Markus Elfring
2018-01-03 12:40                 ` Julia Lawall
2018-01-03 12:40                   ` [Cocci] " Julia Lawall
2018-01-03 12:40                   ` Julia Lawall
2018-01-03 12:45                   ` SF Markus Elfring
2018-01-03 12:45                     ` SF Markus Elfring
2018-01-04  8:36                   ` SF Markus Elfring
2018-01-04  8:36                     ` SF Markus Elfring
2018-01-04  8:54                     ` Julia Lawall
2018-01-04  8:54                       ` [Cocci] " Julia Lawall
2018-01-04  8:54                       ` Julia Lawall
2018-01-04  9:43                       ` SF Markus Elfring
2018-01-04  9:43                         ` SF Markus Elfring
2018-01-17 16:47   ` [v2] Coccinelle: zalloc-simple: Safer transformations with SmPL SF Markus Elfring
2018-01-17 16:47     ` SF Markus Elfring
2018-01-19 16:14   ` Coccinelle: zalloc-simple: Checking consequences from the usage of at signs in Python strings SF Markus Elfring
2018-01-19 16:14     ` SF Markus Elfring
2018-01-19 16:18     ` Julia Lawall
2018-01-19 16:18       ` [Cocci] " Julia Lawall
2018-01-19 16:18       ` Julia Lawall
2018-01-19 16:43       ` SF Markus Elfring
2018-01-19 16:43         ` SF Markus Elfring
2018-01-24  8:41       ` SF Markus Elfring
2018-01-24  8:41         ` SF Markus Elfring
2018-01-31 17:28   ` [v2] Coccinelle: zalloc-simple: Delete function “kmem_cache_alloc” from SmPL rules SF Markus Elfring
2018-01-31 17:28     ` [Cocci] " SF Markus Elfring
2018-01-31 17:28     ` [v2] Coccinelle: zalloc-simple: Delete function =?UTF-8?B?4oCca21lbV9jYWNoZV9hbGxvY SF Markus Elfring
2018-01-31 17:38     ` [v2] Coccinelle: zalloc-simple: Delete function “kmem_cache_alloc” from SmPL rules Julia Lawall
2018-01-31 17:38       ` [Cocci] " Julia Lawall
2018-01-31 17:38       ` =?UTF-8?Q?Re=3A_=5Bv2=5D_Coccinelle=3A_zalloc-simple=3A_Delete_function_=E2=80=9Ckmem=5Fcache=5Fallo Julia Lawall
2018-01-31 17:53       ` [v2] Coccinelle: zalloc-simple: Delete function “kmem_cache_alloc” from SmPL rules SF Markus Elfring
2018-01-31 17:53         ` [v2] Coccinelle: zalloc-simple: Delete function =?UTF-8?B?4oCca21lbV9jYWNoZV9hbGxvY SF Markus Elfring
2018-02-01  9:35   ` [PATCH] Coccinelle: zalloc-simple: Delete function "kmem_cache_alloc" from SmPL rules SF Markus Elfring
2018-02-01  9:35     ` SF Markus Elfring
2018-02-01  9:40     ` Julia Lawall
2018-02-01  9:40       ` [Cocci] " Julia Lawall
2018-02-01  9:40       ` Julia Lawall
2018-02-01 10:17       ` SF Markus Elfring
2018-02-01 10:17         ` SF Markus Elfring
2018-02-01 10:27         ` Julia Lawall
2018-02-01 10:27           ` [Cocci] " Julia Lawall
2018-02-01 10:27           ` Julia Lawall
2018-02-01 11:00           ` SF Markus Elfring
2018-02-01 11:00             ` SF Markus Elfring
2018-02-03  7:22           ` Coccinelle: zalloc-simple: Checking consistency for " SF Markus Elfring
2018-02-03  7:22             ` SF Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNAR27r4j4c1FCh_ObpMpBKXgSP6Vq3P=reA-JKoTji6Q1A@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Julia.Lawall@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=himanshujha199640@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.