From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCsOw-00056K-FF for qemu-devel@nongnu.org; Tue, 14 Jun 2016 13:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCsOv-000425-G7 for qemu-devel@nongnu.org; Tue, 14 Jun 2016 13:45:22 -0400 From: Markus Armbruster References: <1465855078-19435-1-git-send-email-ehabkost@redhat.com> <877fdsjg6f.fsf@dusky.pond.sub.org> Date: Tue, 14 Jun 2016 19:45:12 +0200 In-Reply-To: <877fdsjg6f.fsf@dusky.pond.sub.org> (Markus Armbruster's message of "Tue, 14 Jun 2016 11:03:20 +0200") Message-ID: <8760tb64wn.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 0/3] coccinelle: Clean up error checks and return value variables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: qemu-devel@nongnu.org, Eric Blake , kwolf@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com Markus Armbruster writes: > Eduardo Habkost writes: > >> Changes v1 -> v2: >> * The Coccinelle scripts were simplified by using "when" >> constraints to detect when a variable is not used elsewhere >> inside the function. >> * Added script to remove unnecessary variables for function >> return value. >> * Coccinelle scripts added to scripts/coccinelle. >> >> Changes v2 -> v3 on patch 2/3: >> * Remove unused metavariable from script >> * Do changes only if errp is not touched before the error_setg() >> call (so we are sure *errp is not set and error_setg() won't >> abort) >> * Changes dropped from v2: >> * block.c:bdrv_create_co_entry() >> * block.c:bdrv_create_file() >> * blockdev.c:qmp_blockdev_mirror() >> >> Changes v2 -> v3 on patch 3/3: >> * Not a RFC anymore >> * Used --keep-comments option >> * Instead of using: >> - VAR = E; >> + return E; >> use: >> - VAR = >> + return >> E >> This makes Coccinelle keep the existing formatting on some >> cases. > > Neat trick. > >> * Manual fixups > > With the commit message of 3/3 amended, series > Reviewed-by: Markus Armbruster > > My other suggested touch ups are optional. If you don't object, I'll do > them, and take the result through my error-next branch. Applied to error-next, thanks!