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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF92EC433EF for ; Tue, 3 May 2022 08:23:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 458BF6B0073; Tue, 3 May 2022 04:23:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4064D6B0074; Tue, 3 May 2022 04:23:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2CE3C6B0075; Tue, 3 May 2022 04:23:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 1E0EA6B0073 for ; Tue, 3 May 2022 04:23:14 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E9ED226C4 for ; Tue, 3 May 2022 08:23:13 +0000 (UTC) X-FDA: 79423741866.10.04DFF04 Received: from muru.com (muru.com [72.249.23.125]) by imf27.hostedemail.com (Postfix) with ESMTP id 982504006C for ; Tue, 3 May 2022 08:23:10 +0000 (UTC) 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: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 982504006C X-Stat-Signature: 1nrkn1dk3g4t3k6mdnh89yt8iyso33z9 X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=none; spf=none (imf27.hostedemail.com: domain of tony@atomide.com has no SPF policy when checking 72.249.23.125) smtp.mailfrom=tony@atomide.com X-HE-Tag: 1651566190-118233 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: * 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