Re: [PATCH v2] coccinnelle: Remove ptr_ret script

2020-12-15 Thread Julia Lawall
On Tue, 15 Dec 2020, Maxime Ripard wrote: > The ptr_ret script script addresses a number of situations where we end up > testing an error pointer, and if it's an error returning it, or return 0 > otherwise to transform it into a PTR_ERR_OR_ZERO call. > > So it will convert a block like this: >

[PATCH v2] coccinnelle: Remove ptr_ret script

2020-12-15 Thread Maxime Ripard
The ptr_ret script script addresses a number of situations where we end up testing an error pointer, and if it's an error returning it, or return 0 otherwise to transform it into a PTR_ERR_OR_ZERO call. So it will convert a block like this: if (IS_ERR(err)) return PTR_ERR(err); return 0; in