Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-12 Thread Vladimir Sementsov-Ogievskiy
12.03.2020 10:23, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 11.03.2020 17:41, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 11.03.2020 12:38, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 09.03.2020 12:56, Markus Armbruster wrote: Su

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-12 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 11.03.2020 17:41, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 11.03.2020 12:38, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: > 09.03.2020 12:56, Markus Armbruster wrote: >> Suggest >> >

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Vladimir Sementsov-Ogievskiy
11.03.2020 17:41, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 11.03.2020 12:38, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scr

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 11.03.2020 12:38, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Co

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Vladimir Sementsov-Ogievskiy
11.03.2020 12:38, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() Vladimir Sementsov-Ogievskiy wr

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Vladimir Sementsov-Ogievskiy
11.03.2020 12:53, Markus Armbruster wrote: I think a v9 makes sense now. If any of the improvement ideas should turn into time sinks for you, let's talk. We don't need perfection, we only need to get to the point where we trust the script to do what we believe it does, understand its limitation

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Markus Armbruster
I think a v9 makes sense now. If any of the improvement ideas should turn into time sinks for you, let's talk. We don't need perfection, we only need to get to the point where we trust the script to do what we believe it does, understand its limitations, and know how to compensate for them. Righ

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Vladimir Sementsov-Ogievskiy
11.03.2020 12:33, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 09.03.2020 12:56, Markus Armbruster wrote: + +// Convert error clearing functions Suggest: Ensure @local_err is cleared on free But there is no local_err after conversion True. Hmm. What about this:

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 09.03.2020 12:56, Markus Armbruster wrote: >> Suggest >> >> scripts: Coccinelle script to use auto-propagated errp >> >> or >> >> scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() >> >> Vladimir Sementsov-Ogievskiy writes: [...] >>> +// Note

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 09.03.2020 12:56, Markus Armbruster wrote: >>> + >>> +// Convert error clearing functions >> Suggest: Ensure @local_err is cleared on free > > But there is no local_err after conversion True. Hmm. What about this: // Convert calls to error_free(), p

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Vladimir Sementsov-Ogievskiy
11.03.2020 12:04, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 10.03.2020 18:47, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scr

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 10.03.2020 18:47, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Co

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Vladimir Sementsov-Ogievskiy
09.03.2020 12:56, Markus Armbruster wrote: + +// Convert error clearing functions Suggest: Ensure @local_err is cleared on free But there is no local_err after conversion +( +-error_free(local_err); ++error_free_errp(errp); +| +-error_report_err(local_err); ++error_report_e

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Vladimir Sementsov-Ogievskiy
11.03.2020 9:55, Vladimir Sementsov-Ogievskiy wrote: 10.03.2020 18:47, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 09.03.2020 12:56, Markus Armbruster wrote: Suggest   scripts: Coccinelle script to use auto-propagated errp or   scripts: Coccinelle script to use E

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-11 Thread Vladimir Sementsov-Ogievskiy
09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() Vladimir Sementsov-Ogievskiy writes: Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does co

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-10 Thread Vladimir Sementsov-Ogievskiy
10.03.2020 18:47, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() Vladimir Sementsov-Ogievskiy wr

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-10 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 09.03.2020 12:56, Markus Armbruster wrote: >> Suggest >> >> scripts: Coccinelle script to use auto-propagated errp >> >> or >> >> scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() >> >> Vladimir Sementsov-Ogievskiy writes: >> >>> Script adds

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-10 Thread Vladimir Sementsov-Ogievskiy
09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() Vladimir Sementsov-Ogievskiy writes: Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does co

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-09 Thread Vladimir Sementsov-Ogievskiy
08.03.2020 22:09, Christian Schoenebeck wrote: On Freitag, 6. März 2020 06:15:28 CET Vladimir Sementsov-Ogievskiy wrote: diff --git a/scripts/coccinelle/auto-propagated-errp.cocci b/scripts/coccinelle/auto-propagated-errp.cocci new file mode 100644 index 00..bff274bd6d --- /dev/null +++

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-09 Thread Markus Armbruster
Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() Vladimir Sementsov-Ogievskiy writes: > Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and > does corresponding changes in code (look for detail

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-08 Thread Christian Schoenebeck
On Freitag, 6. März 2020 06:15:28 CET Vladimir Sementsov-Ogievskiy wrote: > diff --git a/scripts/coccinelle/auto-propagated-errp.cocci > b/scripts/coccinelle/auto-propagated-errp.cocci new file mode 100644 > index 00..bff274bd6d > --- /dev/null > +++ b/scripts/coccinelle/auto-propagated-err

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-06 Thread Eric Blake
On 3/5/20 11:15 PM, Vladimir Sementsov-Ogievskiy wrote: Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does corresponding changes in code (look for details in include/qapi/error.h) Usage example: spatch --sp-file scripts/coccinelle/auto-propagated-errp.cocci \ --macro-f

[PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does corresponding changes in code (look for details in include/qapi/error.h) Usage example: spatch --sp-file scripts/coccinelle/auto-propagated-errp.cocci \ --macro-file scripts/cocci-macro-file.h --in-place --no-show-diff \