On 03/22/2018 01:00 PM, Peter Maydell wrote:
On 22 March 2018 at 17:57,  <no-re...@patchew.org> 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

Reply via email to