From patchwork Fri Aug 20 02:15:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lv Ruyi X-Patchwork-Id: 501220 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52E9FC432BE for ; Fri, 20 Aug 2021 02:15:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39FA260F91 for ; Fri, 20 Aug 2021 02:15:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237268AbhHTCQJ (ORCPT ); Thu, 19 Aug 2021 22:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234768AbhHTCQI (ORCPT ); Thu, 19 Aug 2021 22:16:08 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7D5EC061575; Thu, 19 Aug 2021 19:15:31 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id y9so6333579qtv.7; Thu, 19 Aug 2021 19:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mgg6OSXjYOGCt953oRCYOuUm9dXQWYHQwFuVeNFVFo4=; b=s2w/JUFsOgn9JFym1QKLSk51H9GIQhKoD6hJgH/5zCeC0VvYYpoDBk5uijYU5EUMG7 FjmzR0qQi+gKFkZy43UzC1Btzfq5ZexhRihAX1+kef9/lnEHRNQduYMHCwKNH5DdyNh6 IhNdwsXMrBM25fI+zSvQy+Uf4s6dOZvVDHdEdEHEaI3r/Or2kcaX+77CnG8fcXEeQ3X0 04xNTbTrkS9CDOFsJSfl/Hrm1eSNzE/+N2IvHUCu/L1CxySzqu79UiLwk0xGx7k9r6oI yLwVrpzVJwvSIUjRS+3cHizfOSqjnEZOH/D4gYjxAltWKjfA2veDm6+89Ldl08adZAvX mHNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mgg6OSXjYOGCt953oRCYOuUm9dXQWYHQwFuVeNFVFo4=; b=La+n/poZaZvaVDE39cPp2fG5dNtz/I84wNcNVLXcFCP6sbBbiPcn/pBtafOKJjlg5b DY9oBH1Da8MN0rGthZwDKZ7jfc/HU+6FY9olM6WsDa08ciCWxv2ogIPetTwdXzUKIiUD 8FiIuqHjsSXxCeWPHokcBa2tzblCLkBRK664IVMbHusKxP8q3C5y663Xfz8cHrltCcUN vwdWh4DH9X6YBpRKKTkwJXQDgMNBqoQH+w16d+Yr+26F9Fu+7PisEnRfRkq8uMYVXKQ3 by50HP6pt4SF502L475nuqe1rh3TyF9uZnOlcZ8qUwMsW5tGvcW90bVFLrXBUxyQctoY e6YA== X-Gm-Message-State: AOAM530kPMBukOQDU6XOpCmcbgrReaTtaha8ZPPsYq6sUhlUEKcsazaO HLWwolyLc8Kj0AGMnIoELJI= X-Google-Smtp-Source: ABdhPJyqwKeMCdI+1c0UUXtbwtY8zYIle1OYAae0EU3Kld2Yh2/EQfmbiYWh/P7oP0tCOS6FI6iFbA== X-Received: by 2002:ac8:5d0b:: with SMTP id f11mr15514469qtx.294.1629425730969; Thu, 19 Aug 2021 19:15:30 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id n124sm2595096qkf.119.2021.08.19.19.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 19:15:30 -0700 (PDT) From: jing yangyang X-Google-Original-From: jing yangyang To: Tony Lindgren Cc: Russell King , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, jing yangyang , Zeal Robot Subject: [PATCH linux-next] arm: dma fix returnvar.cocci warnings Date: Thu, 19 Aug 2021 19:15:18 -0700 Message-Id: <20210820021518.10844-1-jing.yangyang@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Remove unneeded variables when "0" can be returned. Generated by: scripts/coccinelle/misc/returnvar.cocci Reported-by: Zeal Robot Signed-off-by: jing yangyang Reported-by: kernel test robot --- arch/arm/mach-omap2/dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index dfc9b21..ba4a48e 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c @@ -79,7 +79,6 @@ static unsigned configure_dma_errata(void) { - unsigned errata = 0; /* * Errata applicable for OMAP2430ES1.0 and all omap2420 @@ -158,7 +157,7 @@ static unsigned configure_dma_errata(void) if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP)) SET_DMA_ERRATA(DMA_ROMCODE_BUG); - return errata; + return 0; } static const struct dma_slave_map omap24xx_sdma_dt_map[] = {