From patchwork Fri Aug 19 05:23:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12948323 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 8E1C6C25B0E for ; Fri, 19 Aug 2022 05:24:26 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E42B8161D; Fri, 19 Aug 2022 07:23:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E42B8161D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660886664; bh=e3wKxoVy4HjXrbjqO/2OvmAfxb+QR8ab9moOC4Zw14k=; h=Date:From:To:Subject:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=OciQfia9OfL+9y6qtJVGeTu5QRAKsg4RLJwBKrqbZ03pERZjCO/v8khABhEqsBlvl WiCNE8YS7IP8LoR0+6TSA3pc3fqHr0vNGBExAw/YosCqTscNTjG3B5JGLrUqq8O0K0 HWjiC1G6I+mVGBzEH7ogN8EuFSD1Iy8TYK6OEPAU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3ED11F8016C; Fri, 19 Aug 2022 07:23:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 58884F801F7; Fri, 19 Aug 2022 07:23:30 +0200 (CEST) Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0B5EBF800B5 for ; Fri, 19 Aug 2022 07:23:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0B5EBF800B5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="sDvaTg/m"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="kKzGL/se" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27J3vwFl006027; Fri, 19 Aug 2022 05:23:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : mime-version; s=corp-2022-7-12; bh=NW49NS+3I3Hc72FLTG3+D/8X+0ERjcC9QqmkWH+iHEc=; b=sDvaTg/mx6vucv9yNXDBDQy4PexjYPVQl8UcFq2DeVkdjCa2nmUyry3b4XoBNuMUcHYF B+semUVznAalQcLsHTXKMwlFhp3++SCM0mVIn9iGE8Vmu5iarRdDjIMS1vH0LHjiDj6R Sa6SU9Tn7aLIIs6wOhD0zi/fJnLchSUxcwoftmz34HVHEemYpBL33+4WByl6UTb6qXM9 e+DvyNrrrW6BlD+Ai1Q/pJG417Yopre3m3Exfz7qJQL24PD26Ur3B79fCdFvgssC+1Yl pux/ArBSKWwmGJBZNfDlE6dqvxNufYq9dZqL+Jisfvib4XrquyYUwB/w7/c/9kBTfgwe ow== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3j232rr365-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Aug 2022 05:23:24 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 27J25Y5R009913; Fri, 19 Aug 2022 05:23:23 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2104.outbound.protection.outlook.com [104.47.70.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3j0c2cq2w1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Aug 2022 05:23:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I9ekQJeL1r5uKnnWP34sV6AjkG/mjr5j703ahMQSWgmBMVAjv1/+wvq2a4Mf7VBL2BhwsNgREWb6C00/IIjfdD+L7yFXCIR+FWO9S4nG4ICH6fCf3rndFG+Bmr4Ap9OCQ0aRo+kUk76G0ogef7sWY6KQc4sZkULyHCFrdXoDj2KfKP2wWVBoONB9fMwTjKwysRhgMBxBMatmPtt/0TpWQvSA8mVVCGump1JJLkvVbeHgLsbG+0JADrAKlHOmqeLNq9knEuwpzQB3ZqiThfYAK/FND69KKYO5Em5Az9JwyM5lIRiITl4pmcwxKyjA8Xd/elxEVbSPqoSl1CphqJz/yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NW49NS+3I3Hc72FLTG3+D/8X+0ERjcC9QqmkWH+iHEc=; b=ULuvD0w6kUZhGjzfgeg70W1wF7cGIYaKRTGjMiGy9OJPPfxpuRZpRnVvO7v15U5ItySJrS2DOsuA8EAnqxO+8gvtZFREuA7kA9/zrEtio9XAlzh+cP5sRVAMB+yxgYxLEM9dt6eU7Hbh2z5PX1VjOuy/j3a/CozUmzzl6bsRCtE/kRm2agaYzK+UGwsuZryjVnt6QtdAMgmoq1dOAiXOsITuF018jZhVLTRA9S8riu/bxxrhli7MZDPzcObylTSDU9fvO/Hkvz9wbNlSpXVVUMZb+SlvRU5bDVeTgZ/ZnlBbBdbcNXEmfhNfci/KQ2HVpmgDZoDE77m6MCooLUyqEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NW49NS+3I3Hc72FLTG3+D/8X+0ERjcC9QqmkWH+iHEc=; b=kKzGL/sex4hS1qBdw7QeI7GQ02qIqYUJ3HS4GOGrn3VkU96M8Unbq/PAU9zlnBAtxSeQ6k+dBXa1WZjEJQW4V9rbXEnMhvGQl0k21I7tAUP4Jaww//XyyyxqO4yZGA4nI6tlclciggL+GKyrfRpCXcRgMdASC2modr5yurezCrw= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by DM6PR10MB4124.namprd10.prod.outlook.com (2603:10b6:5:218::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Fri, 19 Aug 2022 05:23:21 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::209e:de4d:68ea:c026]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::209e:de4d:68ea:c026%3]) with mapi id 15.20.5504.028; Fri, 19 Aug 2022 05:23:21 +0000 Date: Fri, 19 Aug 2022 08:23:09 +0300 From: Dan Carpenter To: Liam Girdwood , Ajit Kumar Pandey Subject: [PATCH] ASoC: amd: acp: remove unnecessary NULL checks Message-ID: Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-ClientProxiedBy: ZR0P278CA0179.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:45::19) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00d065c2-f8e1-4465-d5dd-08da81a2ee3c X-MS-TrafficTypeDiagnostic: DM6PR10MB4124:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MlfJRsNK9SjMmodCwNhso6JycTJhnTX1QsY1rHNCeE6d5OdTwjN/WIOEa9xoO15I9pFcuRPk1aVk88y/tU3DhxMj4HbAP9pEiW75svUU8U0cfiw/rvYOLpU7lZihqfxY0LAt5/QnZzoeKj7dAqD//es+avceRuNvS00Ax6lBNuvm6HxLfCMIRju/e2Wx2hfB/xA+qWDAfk4INoV2iJugkhYn/dFfTx8l4eGCI5I6DgCE33BqpsaX60HLKmE7GTEatvnO/NEGTnrX27xDo12Fhtxf64XcT+wLItrkDjB6huaHUr1KEuxRbUDqBcC919MrqZmxERaHrflNcUrcsGvxmC3fkTDDNbJJvfynr5oqUWTjBf7JQsABYALyQya1ZBQYT9SeVtWnO8R7w6T+d2crMrqZmmESndLDGm6aSQ9dcueLvDNMvYX5APzi3/LodTeU+APU19F1MDT3SxWNCkEJkYayokrIxc53FcDAFgoC1+zlvUszCpmn8ckUgBpFSF4lIzxRI0mWCvUs6SU1HtX15z1Oyg1IsXd755JrlWI8nC7bOymoaNDg9fX++E3ntzjBBe6coHkbhpz6La4Wt4ZOkNtvf8bqqFBRTsHAUSl2lOthjSmmAWj8hXy0TqlgjqNoFOi5VPC/lIOADSmdpDKJ7Aat2D3LKsk2Y3ARPl3UTKmZ7t+QdH6oS2JcE4OxXJzEOTpBvDoQzJJZNpbRd3sivb04Zv8UhYu30JWpTB/idQq74kXGy5DhM44lqB8pBysUdZAb0QSanF1dLnG1aV+NrA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2365.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(7916004)(366004)(346002)(136003)(376002)(39860400002)(396003)(41300700001)(52116002)(186003)(478600001)(6512007)(26005)(9686003)(33716001)(83380400001)(44832011)(316002)(6666004)(6506007)(2906002)(54906003)(8936002)(6486002)(5660300002)(8676002)(66556008)(4326008)(66476007)(66946007)(38350700002)(7416002)(110136005)(86362001)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zd0BYxys2aQHPhnyLPbyusLkqWhxFQqloNTI29sigHrSvvB13GHRV5SVfHSAnVhMvIBvho+qNeqvKoj0UDUc/C7iidyDl3/G59OpndJl9Hy2acAyj431HxxJA5DPzR6JD212OdRlY+iFq3uaUN01aEV/ILAcYywx1gac6uamKvZoaUSgtHkNck2i9VpEI/tyA6GbCUdVDCFAWkJ7vgTDpTsHfKp/WfZZmGcZbwRfERANfFip6V8HO3lA5y+VNWVUeVQPAeLeKDPu/seOMpbyp5GlmFBdBbLTlTXm+c/Wgmar/dZPHT/ryXTZ2la5BX4v8HUDvRuNlwKudlSdg92LpD4s0uWmYemzPU8kEmw9qHCWl5aJwGGrXUVqxeBCfp4kxhFVRiAYyuZiw5qFkGSSdXec7+C6x7G78T+lSqkjbjdwfgdIh1KlQCY2xsbBbw5lgw3VcoHk/mYiCdL+N8pqFIe0kTyLks6v8wq+8eV9/Xk/oeE+Np+0T+crn1rKPp+Zs7wxUJTkiB49KBCIUFo02BQpEkIpwaDWGToaNG/cMcT+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xxndEBxYJ5iUdqHdayL6zhQpDX9WNpWHn3JvGMhc7G8DPddLCGsghILmpxZm8pebeBVbkom/o/RHrGkJMxL58/8zl9SEUcUCajeyIztumJmUsWsncXqNR2a8xKd/ALYT+2Yh9Y5fP1z/i0JkHbT51A8+mOsvpR52NfOurHERV/7yEq1x7yd2k28TyL/v/Yc5OUVfGOD8+PUkZThC463GQduNM2swbW76fV8kW7F4CraQBNZNC8E/Mp1W+9VT7f8lTNNXRrtT0iig/wQCLpvNQv0Ox7WUzSxXfxQt7Foh8KOc6nUJv0MbZrM+On6ySv/ox8gMn65sTRimJDEMbXdR6VQ/+OMhYnuKhkqrwUMPrWXLk7y9bIEinpkOzzqqHtvB5HaFKrdptofirT9Neyw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00d065c2-f8e1-4465-d5dd-08da81a2ee3c X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2022 05:23:21.4714 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d4CZz8uN3ql+3Aa5yiuqWt9hDx49DYoUAWqjd3MxkgSSlLnVim8tgsLG493WFUpawbhKYumAi+Rryycz5bLgw4DGrH+hP28h0K/s1l1e66U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4124 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-19_02,2022-08-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 phishscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208190022 X-Proofpoint-ORIG-GUID: jCWG4VCcMuQAObT5MmK9lu17OmmzgKYQ X-Proofpoint-GUID: jCWG4VCcMuQAObT5MmK9lu17OmmzgKYQ Cc: alsa-devel@alsa-project.org, Charles Keepax , Venkata Prasad Potturu , kernel-janitors@vger.kernel.org, Takashi Iwai , Nathan Chancellor , Mark Brown , Vijendar Mukunda , V sujith kumar Reddy X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The list iterator can never be NULL. Delete the bogus NULL checks. Signed-off-by: Dan Carpenter --- sound/soc/amd/acp/acp-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c index beee53aedeaf..85a81add4ef9 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -106,14 +106,14 @@ static irqreturn_t i2s_irq_handler(int irq, void *data) spin_lock(&adata->acp_lock); list_for_each_entry(stream, &adata->stream_list, list) { - if (stream && (ext_intr_stat & stream->irq_bit)) { + if (ext_intr_stat & stream->irq_bit) { writel(stream->irq_bit, ACP_EXTERNAL_INTR_STAT(adata, rsrc->irqp_used)); snd_pcm_period_elapsed(stream->substream); i2s_flag = 1; } if (adata->rsrc->no_of_ctrls == 2) { - if (stream && (ext_intr_stat1 & stream->irq_bit)) { + if (ext_intr_stat1 & stream->irq_bit) { writel(stream->irq_bit, ACP_EXTERNAL_INTR_STAT(adata, (rsrc->irqp_used - 1))); snd_pcm_period_elapsed(stream->substream);