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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A3A2C433F5 for ; Tue, 3 May 2022 08:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ue06aJgd+gynCoTPsmy0fr6Q9XetDOvS1p66UV/XxlE=; b=A0gO32dE0iBk1d Xx1fmW7z15sKKigEAwvnwfdUzb556A71pBRF4vSJi2F6ss2gIbtu7L6Vehrg6r8A0Nq9xSbpVY3BS O6mWuESVRG+WU8DjJmZDtRBNejlXC7TnxdXAEKcG8pdz1t5jClGhtXtzMiLY8SZcb2juHfOA2SnTe +HwjuMoGpq0GAf8oZNVZ6FqZyAScs8DNGQcXY1YAhou3y+M6VzyA2BXs4N8gMAy3G9dHD1z5QVtJu 6xLudx8H1EjWWGPeDC/ms/NtCDPTqaAWSsIVbddPhOwmC6sydVdOJJpfXiaRyBh56yZZWBV8HsS9X 9n71iz8e92/QS0hQyiYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlnoT-004bWF-Ca; Tue, 03 May 2022 08:23:17 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlnoQ-004bUX-Hr for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:23:15 +0000 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_012314_679158_AC5C984F X-CRM114-Status: GOOD ( 19.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3585239483755961859==" MIME-Version: 1.0 From: Tony Lindgren To: kbuild-all@lists.01.org Subject: Re: [PATCH] ARM: dove: fix returnvar.cocci warnings Date: Tue, 03 May 2022 11:23:09 +0300 Message-ID: In-Reply-To: List-Id: --===============3585239483755961859== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable * 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 wr= ote: > > > > > > > > From: kernel test robot > > > > > > > > arch/arm/mach-omap2/dma.c:82:10-16: Unneeded variable: "errata". Re= turn "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 --===============3585239483755961859==--