From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 498D4C433F5 for ; Tue, 3 May 2022 08:23:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231847AbiECI0n (ORCPT ); Tue, 3 May 2022 04:26:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbiECI0m (ORCPT ); Tue, 3 May 2022 04:26:42 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76EDB29800; Tue, 3 May 2022 01:23:11 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id D8A15814C; Tue, 3 May 2022 08:19:54 +0000 (UTC) Date: Tue, 3 May 2022 11:23:09 +0300 From: Tony Lindgren To: Arnd Bergmann Cc: kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List , Russell King , linux-omap , Linux ARM , Linux Kernel Mailing List Subject: Re: [PATCH] ARM: dove: fix returnvar.cocci warnings Message-ID: References: <202205031017.4TwMan3l-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org * Arnd Bergmann [220503 08:12]: > On Tue, May 3, 2022 at 9:30 AM Tony Lindgren wrote: > > * Arnd Bergmann [220503 07:18]: > > > On Tue, May 3, 2022 at 4:45 AM kernel test robot wrote: > > > > > > > > From: kernel test robot > > > > > > > > arch/arm/mach-omap2/dma.c:82:10-16: Unneeded variable: "errata". Return "0" on line 161 > > > > > > > > > > > > Remove unneeded variable used to store return value. > > > > > > > > Generated by: scripts/coccinelle/misc/returnvar.cocci > > > > > > > > Reported-by: kernel test robot > > > > Signed-off-by: kernel test robot > > > > > > I checked the patch, and unfortunately it is wrong, the current code > > > needs to stay. > > > The problem is the SET_DMA_ERRATA() macro that accesses the > > > local 'errata' variable. > > > > Yeah this one keeps popping up. Maybe we can make SET_DMA_ERRATA > > into a function or have it at least change it to set the errata > > value. > > I would just remove the macro and open-code the assignment, which > I think makes it more readable to both people and tools. Yeah agree after looking at the macro :) Regards, Tony