Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1787064pxf; Fri, 26 Mar 2021 15:02:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZCRxAh9IMURXukT0p74reqnGyzJiPV1YnDYzrTNEx3d8UxqtyUUH4cmcJSHfuhVvu57qp X-Received: by 2002:a05:6402:1c98:: with SMTP id cy24mr17373824edb.296.1616796151781; Fri, 26 Mar 2021 15:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616796151; cv=none; d=google.com; s=arc-20160816; b=YxeT4ycw2r8iYgO+JOq04m1S9uKAG2Y9+ynK6HejP6USxqqWxFGhkigIfhdwh2YIC8 5Njn9pyLXtv7nAxbnkFWfXL6ntuJbsw9BLvKXmeSuh3hUHf3E9aIT3DblF447y0zNjMx Y8fCNFEosxha6tANJLbfKulTarRtMvh9KrTxnqV/+H34/Njgr6GXuiqytSFZzWv2roLg eGs/tKbUiiJr4B1OguQBlR+NmUi1vVgTQyRZAgIyPYrkrpGXsXoNkdUMmp3vp1vSDXKG wB41c8t2GUhoDKMJ3NUd7xz34xhseSbnn9tob562gdfuivBfKxDOhz5AIM788pq5LU3D zXmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=2G/sUJutu8VvU5qTlLZcKGOtfzaIJ23wGOr3NS499vM=; b=PeUPuLj6JU1yVVzocHl2ZE6do3bc8uB0o5+9a14dV3t6rD5Evrz3kzfKXlV2Zm0x1z MbOuKCTduB//IAfxVDRRZM1O2EZ9LCcWAhTophDV/ZlsPD/kdcrREcWCstepaxrZbbI0 2H5wq8xj+xXe1J4GBWwjTJ9VOuXpdoKjMVbySIekvp6J6mqTjO7qGhqSxmW5l7Boy+kX OWluSWZSfIUECLBBshL8BHN0zaacVI1jj6o8iUEpGUJO4cLi8DoZ125jcJw/9DliC4fB Llt8N9wlJgZobsIIeVSYvoxTlgZFZPCIoSIQYxxz94OdKVBoc9r1QjL9DHynIQwggzVU 7ePQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si7916276edx.311.2021.03.26.15.02.09; Fri, 26 Mar 2021 15:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231219AbhCZWAy (ORCPT + 99 others); Fri, 26 Mar 2021 18:00:54 -0400 Received: from mga04.intel.com ([192.55.52.120]:61331 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230416AbhCZWAT (ORCPT ); Fri, 26 Mar 2021 18:00:19 -0400 IronPort-SDR: NIURe4pAK8sVOlm6nK+bg7e2KehHkYVENbnSXyGgOFC022Ne8zyCvBtnI7Gk8YlRK1+U6hl/xS nYC0f3YLQWhw== X-IronPort-AV: E=McAfee;i="6000,8403,9935"; a="188957164" X-IronPort-AV: E=Sophos;i="5.81,281,1610438400"; d="scan'208";a="188957164" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 15:00:18 -0700 IronPort-SDR: ASrSkSy8ZzswgpddkfExnkweIrF0cmWYNKVfEIkWOgDZgL5x4QQMuVTx979VYSanpiBWsvpsoE oMy7OKeqDUbw== X-IronPort-AV: E=Sophos;i="5.81,281,1610438400"; d="scan'208";a="416706935" Received: from zcmahone-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.231.203]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 15:00:17 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Peter Ujfalusi , Jarkko Nikula , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-omap@vger.kernel.org (open list:OMAP AUDIO SUPPORT) Subject: [PATCH 15/17] ASoC: ti: omap-mcsp: remove duplicate test Date: Fri, 26 Mar 2021 16:59:25 -0500 Message-Id: <20210326215927.936377-16-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com> References: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cppcheck warning: sound/soc/ti/omap-mcbsp.c:379:11: style: The if condition is the same as the previous if condition [duplicateCondition] if (mcbsp->irq) { ^ sound/soc/ti/omap-mcbsp.c:376:11: note: First condition if (mcbsp->irq) ^ sound/soc/ti/omap-mcbsp.c:379:11: note: Second condition if (mcbsp->irq) { ^ Keeping two separate tests was probably intentional for clarity, but since this generates warnings we might as well make cppcheck happy so that we have fewer warnings. Signed-off-by: Pierre-Louis Bossart --- sound/soc/ti/omap-mcbsp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index 6025b30bbe77..db47981768c5 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/omap-mcbsp.c @@ -373,10 +373,9 @@ static void omap_mcbsp_free(struct omap_mcbsp *mcbsp) MCBSP_WRITE(mcbsp, WAKEUPEN, 0); /* Disable interrupt requests */ - if (mcbsp->irq) + if (mcbsp->irq) { MCBSP_WRITE(mcbsp, IRQEN, 0); - if (mcbsp->irq) { free_irq(mcbsp->irq, (void *)mcbsp); } else { free_irq(mcbsp->rx_irq, (void *)mcbsp); -- 2.25.1