|
From: | Eric Blake |
Subject: | Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] coccinelle: re-run scripts from scripts/coccinelle |
Date: | Thu, 22 Mar 2018 14:12:41 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 03/22/2018 01:00 PM, Peter Maydell wrote:
On 22 March 2018 at 17:57, <address@hidden> wrote:Checking PATCH 4/4: Remove unnecessary variables for function return value... ERROR: return is not a function, parentheses are not required #251: FILE: target/mips/dsp_helper.c:3281: + return (temp[1] << 63) | (temp[0] >> 1);This looks like a bug in checkpatch. I guess to fix it you'd need to make checkpatch count opening and closing parens in the line to see if it goes to 0 somewhere other than just before the ';'...
Or if we don't patch the false negative, you can bypass checkpatch with an ugly hack:
return 0 + (...) | (...); (I'm NOT going to do that bypass - it's too ugly for my taste) -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |