> This script finds instances of allocate and memset which can be
> replaced with a direct call to zalloc equivalent of a function.
What is the software development status for this SmPL script in comparison
to an other directory for source code transformations?
> This script finds instances of allocate and memset which can be
> replaced with a direct call to zalloc equivalent of a function.
What is the software development status for this SmPL script in comparison
to an other directory for source code transformations?
On Fri, 19 Aug 2016, Amitoj Kaur Chawla wrote:
> On Mon, Aug 1, 2016 at 4:53 PM, SF Markus Elfring
> wrote:
> >> +@vz1 depends on patch && !context && !org && !report@
> >> +type T;
> >> +T *d;
> >> +statement S;
> >> +@@
> >> +
> >> +d =
> >> +-
On Fri, 19 Aug 2016, Amitoj Kaur Chawla wrote:
> On Mon, Aug 1, 2016 at 4:53 PM, SF Markus Elfring
> wrote:
> >> +@vz1 depends on patch && !context && !org && !report@
> >> +type T;
> >> +T *d;
> >> +statement S;
> >> +@@
> >> +
> >> +d =
> >> +-vmalloc
> >> ++
On Mon, Aug 1, 2016 at 4:53 PM, SF Markus Elfring
wrote:
>> +@vz1 depends on patch && !context && !org && !report@
>> +type T;
>> +T *d;
>> +statement S;
>> +@@
>> +
>> +d =
>> +-vmalloc
>> ++vzalloc
>> + (...);
>> +
On Mon, Aug 1, 2016 at 4:53 PM, SF Markus Elfring
wrote:
>> +@vz1 depends on patch && !context && !org && !report@
>> +type T;
>> +T *d;
>> +statement S;
>> +@@
>> +
>> +d =
>> +-vmalloc
>> ++vzalloc
>> + (...);
>> +if (!d) S
>> +-
@vz_combined
depends on patch && !context && !org && !report@
type T;
T* pointer;
+statement S;
expression express;
@@
pointer =
- vmalloc
+ vzalloc
(...);
if (!d)
S
-memset(d, 0, sizeof(
@vz_combined
depends on patch && !context && !org && !report@
type T;
T* pointer;
+statement S;
expression express;
@@
pointer =
- vmalloc
+ vzalloc
(...);
if (!d)
S
-memset(d, 0, sizeof(
On Mon, 1 Aug 2016, SF Markus Elfring wrote:
> >> How do you think about the following SmPL script example?
> >>
> >> @vz_combined
> >> depends on patch && !context && !org && !report@
> >> type T;
> >> T* pointer;
> >> +statement S;
> >> expression express;
> >> @@
> >> pointer =
> >> -
On Mon, 1 Aug 2016, SF Markus Elfring wrote:
> >> How do you think about the following SmPL script example?
> >>
> >> @vz_combined
> >> depends on patch && !context && !org && !report@
> >> type T;
> >> T* pointer;
> >> +statement S;
> >> expression express;
> >> @@
> >> pointer =
> >> -
>> How do you think about the following SmPL script example?
>>
>> @vz_combined
>> depends on patch && !context && !org && !report@
>> type T;
>> T* pointer;
>> +statement S;
>> expression express;
>> @@
>> pointer =
>> - vmalloc
>> + vzalloc
>>(...);
>> if (!d)
>>
>> How do you think about the following SmPL script example?
>>
>> @vz_combined
>> depends on patch && !context && !org && !report@
>> type T;
>> T* pointer;
>> +statement S;
>> expression express;
>> @@
>> pointer =
>> - vmalloc
>> + vzalloc
>>(...);
>> if (!d)
>>
On Mon, 1 Aug 2016, SF Markus Elfring wrote:
> >> 1. Would it make sense to merge such SmPL rules into one
> >>so that code duplication could be reduced a bit
> >>in such a script?
> >
> > I think it would suffer in readability.
>
> How do you think about the following SmPL script
On Mon, 1 Aug 2016, SF Markus Elfring wrote:
> >> 1. Would it make sense to merge such SmPL rules into one
> >>so that code duplication could be reduced a bit
> >>in such a script?
> >
> > I think it would suffer in readability.
>
> How do you think about the following SmPL script
>> 1. Would it make sense to merge such SmPL rules into one
>>so that code duplication could be reduced a bit
>>in such a script?
>
> I think it would suffer in readability.
How do you think about the following SmPL script example?
@vz_combined
depends on patch && !context && !org &&
>> 1. Would it make sense to merge such SmPL rules into one
>>so that code duplication could be reduced a bit
>>in such a script?
>
> I think it would suffer in readability.
How do you think about the following SmPL script example?
@vz_combined
depends on patch && !context && !org &&
On Mon, 1 Aug 2016, SF Markus Elfring wrote:
> > +@vz1 depends on patch && !context && !org && !report@
> > +type T;
> > +T *d;
> > +statement S;
> > +@@
> > +
> > +d =
> > +-vmalloc
> > ++vzalloc
> > + (...);
> > +if (!d) S
> > +-
On Mon, 1 Aug 2016, SF Markus Elfring wrote:
> > +@vz1 depends on patch && !context && !org && !report@
> > +type T;
> > +T *d;
> > +statement S;
> > +@@
> > +
> > +d =
> > +-vmalloc
> > ++vzalloc
> > + (...);
> > +if (!d) S
> > +-
> +@vz1 depends on patch && !context && !org && !report@
> +type T;
> +T *d;
> +statement S;
> +@@
> +
> +d =
> +-vmalloc
> ++vzalloc
> + (...);
> +if (!d) S
> +- memset(d, 0, sizeof(T));
> +
> +@vz2 depends on patch && !context && !org &&
> +@vz1 depends on patch && !context && !org && !report@
> +type T;
> +T *d;
> +statement S;
> +@@
> +
> +d =
> +-vmalloc
> ++vzalloc
> + (...);
> +if (!d) S
> +- memset(d, 0, sizeof(T));
> +
> +@vz2 depends on patch && !context && !org &&
This script finds instances of allocate and memset which can be
replaced with a direct call to zalloc equivalent of a function.
Signed-off-by: Amitoj Kaur Chawla
Acked-by: Julia Lawall
---
Changes in v2:
-Modified commit message and subject
This script finds instances of allocate and memset which can be
replaced with a direct call to zalloc equivalent of a function.
Signed-off-by: Amitoj Kaur Chawla
Acked-by: Julia Lawall
---
Changes in v2:
-Modified commit message and subject
Changes in v3:
-Modified comment
22 matches
Mail list logo