Received: from eggs.gnu.org ([2001:4830:134:3::10]:40236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ez5eA-0007OP-DU for qemu-devel@nongnu.org; Thu, 22 Mar 2018 15:13:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ez5e9-0007ew-Gb for qemu-devel@nongnu.org; Thu, 22 Mar 2018 15:13:10 -0400 References: <20180322161226.29796-1-lvivier@redhat.com> <152174145840.240.3926671265619235661@71c20359a636> From: Eric Blake Message-ID: <6137f1be-98a0-1b3f-6bed-ca94be1b5d1a@redhat.com> Date: Thu, 22 Mar 2018 14:12:41 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/4] coccinelle: re-run scripts from scripts/coccinelle List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , QEMU Developers Cc: "Michael S. Tsirkin" , Jason Wang , Alexander Graf , Max Filippov , Yongbok Kim , Alberto Garcia , Qemu-block , QEMU Trivial , Markus Armbruster , David Gibson , Laurent Vivier , Fam Zheng , Eduardo Habkost , "Dr. David Alan Gilbert" , qemu-arm , Richard Henderson , Kevin Wolf , Peter Crosthwaite , Igor Mitsyanko , Max Reitz , qemu-ppc , Paolo Bonzini , Aurelien Jarno On 03/22/2018 01:00 PM, Peter Maydell wrote: > On 22 March 2018 at 17:57, 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