From: Markus Armbruster <armbru@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
qemu-block@nongnu.org, "Paul Durrant" <paul@xen.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
"Michael Roth" <mdroth@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, "Greg Kurz" <groug@kaod.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Anthony Perard" <anthony.perard@citrix.com>,
xen-devel@lists.xenproject.org, "Max Reitz" <mreitz@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"Stefan Berger" <stefanb@linux.ibm.com>
Subject: Re: [Xen-devel] [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()
Date: Fri, 13 Mar 2020 16:34:07 +0100 [thread overview]
Message-ID: <87d09ggtg0.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <efaed3e4-3f4d-f538-5087-96391fc20d2f@virtuozzo.com> (Vladimir Sementsov-Ogievskiy's message of "Fri, 13 Mar 2020 11:06:37 +0300")
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> 13.03.2020 10:50, Markus Armbruster wrote:
>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>>
>> [...]
>>> +// Warn several Error * definitions.
>>> +@check1 disable optional_qualifier exists@
>>> +identifier fn = rule1.fn, local_err, local_err2;
>>> +@@
>>> +
>>> + fn(..., Error ** ____, ...)
>>> + {
>>> + ...
>>> + Error *local_err = NULL;
>>> + ... when any
>>> + Error *local_err2 = NULL;
>>> + ... when any
>>> + }
>>> +
>>> +@ script:python @
>>> +fn << check1.fn;
>>> +@@
>>> +
>>> +print('Warning: function {} has several definitions of '
>>> + 'Error * local variable'.format(fn))
>>
>> Printing the positions like you do in the next rule is useful when
>> examining these warnings.
>
> I decided that searching for Error * definition is simple, and better for
> user to search all definitions by hand (may be more than too).
>
> But understanding control flows is more complex thing and better to help
> user with line positions.
>
> But if you want, we can add them of course. Note, that for some reasons some
> times coccinelle instead of original filename prints something like /tmp/...original-name...
> so it don't look nice and may be a bit misleading.
I noticed when I actually tried mu idea %-}
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
qemu-block@nongnu.org, "Paul Durrant" <paul@xen.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
"Michael Roth" <mdroth@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, "Greg Kurz" <groug@kaod.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Anthony Perard" <anthony.perard@citrix.com>,
xen-devel@lists.xenproject.org, "Max Reitz" <mreitz@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"Stefan Berger" <stefanb@linux.ibm.com>
Subject: Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()
Date: Fri, 13 Mar 2020 16:34:07 +0100 [thread overview]
Message-ID: <87d09ggtg0.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <efaed3e4-3f4d-f538-5087-96391fc20d2f@virtuozzo.com> (Vladimir Sementsov-Ogievskiy's message of "Fri, 13 Mar 2020 11:06:37 +0300")
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> 13.03.2020 10:50, Markus Armbruster wrote:
>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>>
>> [...]
>>> +// Warn several Error * definitions.
>>> +@check1 disable optional_qualifier exists@
>>> +identifier fn = rule1.fn, local_err, local_err2;
>>> +@@
>>> +
>>> + fn(..., Error ** ____, ...)
>>> + {
>>> + ...
>>> + Error *local_err = NULL;
>>> + ... when any
>>> + Error *local_err2 = NULL;
>>> + ... when any
>>> + }
>>> +
>>> +@ script:python @
>>> +fn << check1.fn;
>>> +@@
>>> +
>>> +print('Warning: function {} has several definitions of '
>>> + 'Error * local variable'.format(fn))
>>
>> Printing the positions like you do in the next rule is useful when
>> examining these warnings.
>
> I decided that searching for Error * definition is simple, and better for
> user to search all definitions by hand (may be more than too).
>
> But understanding control flows is more complex thing and better to help
> user with line positions.
>
> But if you want, we can add them of course. Note, that for some reasons some
> times coccinelle instead of original filename prints something like /tmp/...original-name...
> so it don't look nice and may be a bit misleading.
I noticed when I actually tried mu idea %-}
next prev parent reply other threads:[~2020-03-13 15:34 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 8:59 [Xen-devel] [PATCH v9 00/10] error: auto propagated local_err part I Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [Xen-devel] [PATCH v9 01/10] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [Xen-devel] [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` Vladimir Sementsov-Ogievskiy
2020-03-12 16:36 ` [Xen-devel] " Markus Armbruster
2020-03-12 16:36 ` Markus Armbruster
2020-03-13 6:38 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-13 6:38 ` Vladimir Sementsov-Ogievskiy
2020-03-13 15:42 ` [Xen-devel] " Markus Armbruster
2020-03-13 15:42 ` Markus Armbruster
2020-03-13 16:12 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-13 16:12 ` Vladimir Sementsov-Ogievskiy
2020-03-13 21:54 ` [Xen-devel] " Markus Armbruster
2020-03-13 21:54 ` Markus Armbruster
2020-03-13 22:12 ` [Xen-devel] " Eric Blake
2020-03-13 22:12 ` Eric Blake
2020-03-15 16:38 ` [Xen-devel] " Markus Armbruster
2020-03-15 16:38 ` Markus Armbruster
2020-03-16 7:12 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-16 7:12 ` Vladimir Sementsov-Ogievskiy
2020-03-16 8:21 ` [Xen-devel] " Markus Armbruster
2020-03-16 8:21 ` Markus Armbruster
2020-03-17 9:29 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-17 9:29 ` Vladimir Sementsov-Ogievskiy
2020-03-17 10:39 ` [Xen-devel] " Markus Armbruster
2020-03-17 10:39 ` Markus Armbruster
2020-03-17 11:35 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-17 11:35 ` Vladimir Sementsov-Ogievskiy
2020-03-19 10:45 ` [Xen-devel] " Markus Armbruster
2020-03-19 10:45 ` Markus Armbruster
2020-03-19 12:12 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-19 12:12 ` Vladimir Sementsov-Ogievskiy
2020-03-20 13:58 ` [Xen-devel] " Markus Armbruster
2020-03-20 13:58 ` Markus Armbruster
2020-03-20 14:36 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-20 14:36 ` Vladimir Sementsov-Ogievskiy
2020-03-20 16:23 ` [Xen-devel] " Markus Armbruster
2020-03-20 16:23 ` Markus Armbruster
2020-03-17 13:54 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-17 13:54 ` Vladimir Sementsov-Ogievskiy
2020-03-19 8:31 ` [Xen-devel] " Markus Armbruster
2020-03-19 8:31 ` Markus Armbruster
2020-03-13 7:50 ` [Xen-devel] " Markus Armbruster
2020-03-13 7:50 ` Markus Armbruster
2020-03-13 8:06 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-13 8:06 ` Vladimir Sementsov-Ogievskiy
2020-03-13 15:34 ` Markus Armbruster [this message]
2020-03-13 15:34 ` Markus Armbruster
2020-03-13 14:58 ` [Xen-devel] " Markus Armbruster
2020-03-13 14:58 ` Markus Armbruster
2020-03-13 15:22 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-13 15:22 ` Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [PATCH v9 03/10] hw/sd/ssi-sd: fix error handling in ssi_sd_realize Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [PATCH v9 04/10] SD (Secure Card): introduce ERRP_AUTO_PROPAGATE Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [PATCH v9 05/10] pflash: " Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [PATCH v9 06/10] fw_cfg: " Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [PATCH v9 07/10] virtio-9p: " Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [PATCH v9 08/10] TPM: " Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [PATCH v9 09/10] nbd: " Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` [Xen-devel] [PATCH v9 10/10] xen: " Vladimir Sementsov-Ogievskiy
2020-03-12 8:59 ` Vladimir Sementsov-Ogievskiy
2020-03-12 14:24 ` [Xen-devel] [PATCH v9 00/10] error: auto propagated local_err part I Markus Armbruster
2020-03-12 14:24 ` Markus Armbruster
2020-03-13 6:40 ` [Xen-devel] " Vladimir Sementsov-Ogievskiy
2020-03-13 6:40 ` Vladimir Sementsov-Ogievskiy
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=87d09ggtg0.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=groug@kaod.org \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=lersek@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=paul@xen.org \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--cc=sstabellini@kernel.org \
--cc=stefanb@linux.ibm.com \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.com \
--cc=xen-devel@lists.xenproject.org \
/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.