From patchwork Thu Dec 17 18:10:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radhey Shyam Pandey X-Patchwork-Id: 11980487 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 5AC16C3526F for ; Thu, 17 Dec 2020 18:13:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E9A523998 for ; Thu, 17 Dec 2020 18:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731718AbgLQSNi (ORCPT ); Thu, 17 Dec 2020 13:13:38 -0500 Received: from mail-bn8nam11on2044.outbound.protection.outlook.com ([40.107.236.44]:15681 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731350AbgLQSNh (ORCPT ); Thu, 17 Dec 2020 13:13:37 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CLsEsinl4jnMmMNpDQP1qDcNQkcCErkWdLAHexqpk1UC8UsbVQ9+Yors6ZJFTGVUJD99jGQItqLTy/oTqLORCCM9ryu+91f1iUAeHaWW6EBCnhzByTUeMFGZ3DgBe8oXZlxSIfTxt5glWW3RoiUK3jefa3QiffcmMPlay/BJ3lgJYrKBeQmMA2ENHiATVXP6B0Q7uV3BPsdQcW3Lks8SRg3j/B0PwFjoTjX/VKFOLDIwsxFMsQf9L+EAzeRsHE7jzsVyz8C5LIlNskoA4c8GdmOJniDCXM8ajrHjG5t0vC9UZWPgx9MMcoAXURZ9KyGeCpZJgxoBHLEEinp6tdhxFA== 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-SenderADCheck; bh=YBTxI0H0rd0ytUGoR+2N3Nw6tlj8RwPC+P2QiYDsjpo=; b=FPO8VpFb3+Ux0AMRa3ReKs//muQKxqPOuYH2AInamXllFS7lGeH2n/K9IJjGst7zAUM6J9xAit3ovl6rKCnMWFENrlv9qGJrr+V+bY8jkN+REp1BX7cqRsqP9hzmE75m6r9QnRFLGRwn36U9oqp0dB93UPOQfj2gjdbqH3+SnS1UQCcFs6WB9/P0rRP2NC1FsFIlJb0IXSME4xqGxV9pfBw3XHTD3ThTqzCdS1xLHEjuAjdwiDrJPScRTt7J8sW0IAOPVVX1/l0i45zAuXlEdxCcUBY8b9qA+qr3D43w0lML4cGPoLAX+RQgYuCTfevi65V17HZ8926D+QbkhAvJmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=intel.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YBTxI0H0rd0ytUGoR+2N3Nw6tlj8RwPC+P2QiYDsjpo=; b=l3TGPsdLWI38YeqbIcNeX0iNR3/MJBl6kR0RZSMefXE5sVGHbpqeOvO7SKJYSi1mdQJLCOT0Yfs4L5NMwZxIwG4CeomquvmNRD3E9s6DibcTXvVVGZyhCGO/qBpAaOdR/StmRXOYO4IH2G5ckj+KK7otmgs+tiHxC4WFU3pCLy4= Received: from CY4PR06CA0060.namprd06.prod.outlook.com (2603:10b6:903:13d::22) by DM6PR02MB5324.namprd02.prod.outlook.com (2603:10b6:5:4e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.25; Thu, 17 Dec 2020 18:12:44 +0000 Received: from CY1NAM02FT022.eop-nam02.prod.protection.outlook.com (2603:10b6:903:13d:cafe::e1) by CY4PR06CA0060.outlook.office365.com (2603:10b6:903:13d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Thu, 17 Dec 2020 18:12:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT022.mail.protection.outlook.com (10.152.75.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3676.25 via Frontend Transport; Thu, 17 Dec 2020 18:12:44 +0000 Received: from xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Thu, 17 Dec 2020 10:11:43 -0800 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Thu, 17 Dec 2020 10:11:43 -0800 Envelope-to: git@xilinx.com, michal.simek@xilinx.com, dan.j.williams@intel.com, vkoul@kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Received: from [172.23.64.106] (port=52438 helo=xhdvnc125.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1kpxkc-0004oa-BH; Thu, 17 Dec 2020 10:11:42 -0800 Received: by xhdvnc125.xilinx.com (Postfix, from userid 13245) id 6118012108E; Thu, 17 Dec 2020 23:41:28 +0530 (IST) From: Radhey Shyam Pandey To: , , CC: , , , Shravya Kumbham , "Radhey Shyam Pandey" Subject: [PATCH 1/3] dmaengine: xilinx_dma: check dma_async_device_register return value Date: Thu, 17 Dec 2020 23:40:13 +0530 Message-ID: <1608228615-7413-2-git-send-email-radhey.shyam.pandey@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1608228615-7413-1-git-send-email-radhey.shyam.pandey@xilinx.com> References: <1608228615-7413-1-git-send-email-radhey.shyam.pandey@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0aa735f9-6b9d-4e70-6278-08d8a2b759df X-MS-TrafficTypeDiagnostic: DM6PR02MB5324: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LVlEauUjPZwlCU39y9c7wODAi+ZeUEapSpIOFl6AuLBQoJPsY1YcvLf7BwT7DXaKis27PWPQKUKfc0ADFLYJT+GJ49ghCvMbxM2T7OZYZ51STrtZU7yTGmpmow+SbvoLEQ8l8DlhRvMdoZkh8aQUI1eHJvglMzlBbrSydEjurAVxMaF44/ZaZIECS3XI0tIqhMV6XyZ8LXx+ccTcNewUNZYSqcwosPLCvuZuaj4Fdl080N/mQ8Dec4RvlqfYSuW8iZjPY1xhNRWjIOqal2pegTc3KAaZrQXqqVNRX7V8F/U1LaTO2bd3V0Y1Dt0MCtafIAo/3GeJh28QxpF+3hxPdYZUOY6X8gN0JTv2NHX9U9sU/orazosvIbN4gGAPK0jArNZhCuRE1UMHHYddxC61XJkqnbs1henol+732ak7xYtTEek5oguDVfbtckwIGG8/uUPqnsYh7wZ+8dOJ/R2Gtg== X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(136003)(39860400002)(376002)(346002)(396003)(46966005)(6266002)(2906002)(186003)(426003)(6636002)(8676002)(2616005)(4326008)(70206006)(70586007)(82740400003)(6666004)(36756003)(82310400003)(336012)(356005)(42186006)(7636003)(47076004)(316002)(478600001)(26005)(107886003)(8936002)(83380400001)(54906003)(110136005)(5660300002)(36906005)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2020 18:12:44.2812 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0aa735f9-6b9d-4e70-6278-08d8a2b759df X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT022.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB5324 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Shravya Kumbham dma_async_device_register() can return non-zero error code. Add condition to check the return value of dma_async_device_register function and handle the error path. Addresses-Coverity: Event check_return. Signed-off-by: Shravya Kumbham Signed-off-by: Radhey Shyam Pandey --- drivers/dma/xilinx/xilinx_dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 993297d585c0..e41435be5b79 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -3133,7 +3133,11 @@ static int xilinx_dma_probe(struct platform_device *pdev) } /* Register the DMA engine with the core */ - dma_async_device_register(&xdev->common); + err = dma_async_device_register(&xdev->common); + if (err) { + dev_err(xdev->dev, "failed to register the dma device\n"); + goto error; + } err = of_dma_controller_register(node, of_dma_xilinx_xlate, xdev); From patchwork Thu Dec 17 18:10:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radhey Shyam Pandey X-Patchwork-Id: 11980491 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 9FFCCC4361B for ; Thu, 17 Dec 2020 18:15:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F01B2388E for ; Thu, 17 Dec 2020 18:15:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729613AbgLQSPX (ORCPT ); Thu, 17 Dec 2020 13:15:23 -0500 Received: from mail-bn8nam08on2043.outbound.protection.outlook.com ([40.107.100.43]:58017 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731487AbgLQSOg (ORCPT ); Thu, 17 Dec 2020 13:14:36 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oUNe18WEKUFp6Z9K7H7cpuxrzrxvyCHurV4G3wWCORSI45F/9QJOXRer19V2QqWAhyJTye4UBp0xsd1nB5l2FC4FsyjczsWi4YATC7UdqbGZZc70xrmV9c3/4AIzlhk2zCdBKlW8ZtPPH+T5G5dFHDL4g3LY0rmWMxCEPWSW0vFJmHiT++eihbNG0I9X7NiUuHwnRGgLPxIt1rkYf95E385zuUPbpE8vUHEk1XTJ3pKSa4WnoAt0R1u1jIBZovjhSUg+hZWleKsq0h8G9n6XOafb5aKt0d/Tqa6hY442LyElEpIKbHGfqIfoYvDKG9V0kvA0ZTGa4Tl1BnBKjZSq5Q== 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-SenderADCheck; bh=vsoxlBfD5ghzCMcSOsova5v9JcQf7lsWdCtoZP4oHaI=; b=dvdWMTbwcMdpFRGpe06rVfLw2nqlv113txvQ0STAka9R4Cb//VSwZSfAkohEyHmOXsLO4tCEzHPpUSK8kVfHvYLED544x71DC7qX9BI5wvsH4IY4O21Pt1m7W3oRFLdeuI1Km1Bwkq6ktyMI4Q9KScLT6O76i4QuUErvlSz9okQ2KYiXiCJa0PiYLYGkt/0XaJdJNI5tVUw8EOGImY+FXuzpX3TUzGXrhhxjbZI6XK1kr4RLbkZMMwEpICkVx+LwlAFm4taql3z666fs7AHP3lTFjc56pz/iEMlsZOheXd2WZJ4IyYLaO259YjBaPN2u8Pih+dfV1tYp3lChxZQgIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=intel.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vsoxlBfD5ghzCMcSOsova5v9JcQf7lsWdCtoZP4oHaI=; b=BZSLsBrrk+SCGh5asTHuqiKx/wco1O+rAm5qJFlstXdUjX6d2scisMjjoL3GYtxKPcNgzW/EsX6iCFvpe9c7CkMN954w5gxYMKQyvwhoYX5rv+X6imkHhYUzXxqexqgqowusbaiN5I5gaRs1lcJgju62GSYjXVQK+5JrutmYE+g= Received: from BL0PR05CA0030.namprd05.prod.outlook.com (2603:10b6:208:91::40) by BL0PR02MB4418.namprd02.prod.outlook.com (2603:10b6:208:4a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.18; Thu, 17 Dec 2020 18:13:41 +0000 Received: from BL2NAM02FT022.eop-nam02.prod.protection.outlook.com (2603:10b6:208:91:cafe::3c) by BL0PR05CA0030.outlook.office365.com (2603:10b6:208:91::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.19 via Frontend Transport; Thu, 17 Dec 2020 18:13:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by BL2NAM02FT022.mail.protection.outlook.com (10.152.77.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3654.12 via Frontend Transport; Thu, 17 Dec 2020 18:13:40 +0000 Received: from xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Thu, 17 Dec 2020 10:11:56 -0800 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Thu, 17 Dec 2020 10:11:56 -0800 Envelope-to: git@xilinx.com, michal.simek@xilinx.com, dan.j.williams@intel.com, vkoul@kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Received: from [172.23.64.106] (port=52450 helo=xhdvnc125.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1kpxkp-0004pK-GF; Thu, 17 Dec 2020 10:11:55 -0800 Received: by xhdvnc125.xilinx.com (Postfix, from userid 13245) id 63E931222BF; Thu, 17 Dec 2020 23:41:28 +0530 (IST) From: Radhey Shyam Pandey To: , , CC: , , , Shravya Kumbham , "Radhey Shyam Pandey" Subject: [PATCH 2/3] dmaengine: xilinx_dma: fix incompatible param warning in _child_probe() Date: Thu, 17 Dec 2020 23:40:14 +0530 Message-ID: <1608228615-7413-3-git-send-email-radhey.shyam.pandey@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1608228615-7413-1-git-send-email-radhey.shyam.pandey@xilinx.com> References: <1608228615-7413-1-git-send-email-radhey.shyam.pandey@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 26e9c34a-385f-429e-d0ce-08d8a2b77b9c X-MS-TrafficTypeDiagnostic: BL0PR02MB4418: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:497; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T2HqFoberTvldRc4FeDt3FHmkirfjlfq0I8FA8iJk4W41qQYPAmDlYRRm9ghA4MJUiXoauwIJLU7spHsrhc0It1doQfvHQxaibPvWhrDVfw/OQObChskZXnYpzP8tMKfpZKxYj0gIfTUp/CzrTF0sMfv5UGn+J9FU18mo46PiU7aqwh8h8T90dEw6jlbERRfSYndg8lBr98jK66pQFjlieynO0Mgox4OaHik1cfZS0FEn0N6sy+a3tVVXxB0m/OuXZlvKdufPmZ4DbTkTOVyTepZFEQa1esDREcQaIsb2EZc/1ktrFQI38KpntPoiSwaKDH7s+1wUqeq8qN2kx/3kbQJJmmUBWLOVG4fJUjg/RiVRZsYPrir05mVbwPNVaoPzDsgZBKqZ93vgvWqlF/x+dzokaYfaoDkzcODEL8ewl4= X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(346002)(396003)(39860400002)(376002)(136003)(46966005)(6266002)(82740400003)(7636003)(36756003)(47076004)(2906002)(5660300002)(8936002)(110136005)(356005)(316002)(70586007)(42186006)(70206006)(54906003)(36906005)(83380400001)(26005)(336012)(2616005)(186003)(426003)(4326008)(6636002)(82310400003)(107886003)(478600001)(8676002)(6666004)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2020 18:13:40.8095 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 26e9c34a-385f-429e-d0ce-08d8a2b77b9c X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BL2NAM02FT022.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB4418 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Shravya Kumbham In xilinx_dma_child_probe function, the nr_channels variable is passed to of_property_read_u32() which expects an u32 return value pointer. Modify the nr_channels variable type from int to u32 to fix the incompatible parameter coverity warning. Addresses-Coverity: Event incompatible_param. Signed-off-by: Shravya Kumbham Signed-off-by: Radhey Shyam Pandey --- drivers/dma/xilinx/xilinx_dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index e41435be5b79..cf75e2af6381 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -2921,7 +2921,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, static int xilinx_dma_child_probe(struct xilinx_dma_device *xdev, struct device_node *node) { - int ret, i, nr_channels = 1; + int ret, i; + u32 nr_channels = 1; ret = of_property_read_u32(node, "dma-channels", &nr_channels); if (xdev->dma_config->dmatype == XDMA_TYPE_AXIMCDMA && ret < 0) From patchwork Thu Dec 17 18:10:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radhey Shyam Pandey X-Patchwork-Id: 11980489 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 1C3C0C3526A for ; Thu, 17 Dec 2020 18:15:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5F3A2396F for ; Thu, 17 Dec 2020 18:15:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729976AbgLQSOl (ORCPT ); Thu, 17 Dec 2020 13:14:41 -0500 Received: from mail-eopbgr760075.outbound.protection.outlook.com ([40.107.76.75]:10627 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731479AbgLQSOf (ORCPT ); Thu, 17 Dec 2020 13:14:35 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UVhZc98VstQ+Di+l9Xdk8nl0azgHY/DUaYqplSVEHYRyOaetzs4Y+Aqu1gkoOtatEun4fnS61Zzw1L5zVWq0iQybndCm0JThKTSw0lzSKW3cDgkCf6uGmKZGnDh3mkgLgju8j8GHtMjkorCzu55T2Wx3sUqaypQwXxMWHwzMxJHqQUG04LfrcCdhKXIYkEOHg1v7k2R3jjJHd/2ln6d+fArA6gLfk1+HzPfaBTPMkg7i8dnhhVMZ1m5l9ZBAcZ6hPEJZQ+m2ZAbpyFAoe0WOg9LkAYhkAbEpj/DqHI3VV3GxLerLsQAedfaLDIWvEF7XjYDbAJhOOC3BcL8Ejtv9rQ== 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-SenderADCheck; bh=W6pNn18DyepbDYAR6RD6yq39uNnTtroIzm1G86krXU4=; b=lAoeAL3i+NJfEtzE9Oif4WkU9M10OMneYUfWDQZZgCsxZvHtxqnOfmj3IY4tpDc0RQzW1IDHFXrLmAsWhetQwe3zUqFfxJiDuVyi00LISrLR7S61O6aqiZ2hrxFG5YsXpVNEiPJ9QgOWHA2PZ9KKC+P14E+9++MmlCALkgdLmAyKkzwqPtuo+z8eeXhp5rL7I83SuNgtMlHN/PPRfQuti0fbR7woGOpfxfywNHsreEYAVkUMp9DHsxRd9SBhF/6iJHyKQh2vQ701dVkpcOlGWU614Nli62gVDZ7Rd62ezdt0+gkE/kuJF21FXQiNOlW70dr4g4mPxDKxJWd8o3SdRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=intel.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W6pNn18DyepbDYAR6RD6yq39uNnTtroIzm1G86krXU4=; b=Fl4iuyditL6VzUP7E/D9wVPr5Mgv7Plc0YiN2F8g1nox1Atl5Nf6eY+gd4RFY3G3tcFVaDPnee2QHZR9o6d6LU1ta5XL8T18CB+fuGPYsuRXVjgmdkorXlAhcjpyMfC2BHmrtJ/nJaAMvN1sttuPtiFVXLyLExNZ3GJB+FHTPkI= Received: from BL0PR05CA0010.namprd05.prod.outlook.com (2603:10b6:208:91::20) by MN2PR02MB6077.namprd02.prod.outlook.com (2603:10b6:208:1b7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.25; Thu, 17 Dec 2020 18:13:44 +0000 Received: from BL2NAM02FT022.eop-nam02.prod.protection.outlook.com (2603:10b6:208:91:cafe::f4) by BL0PR05CA0010.outlook.office365.com (2603:10b6:208:91::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.12 via Frontend Transport; Thu, 17 Dec 2020 18:13:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by BL2NAM02FT022.mail.protection.outlook.com (10.152.77.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3654.12 via Frontend Transport; Thu, 17 Dec 2020 18:13:44 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Thu, 17 Dec 2020 10:12:09 -0800 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Thu, 17 Dec 2020 10:12:09 -0800 Envelope-to: git@xilinx.com, michal.simek@xilinx.com, dan.j.williams@intel.com, vkoul@kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Received: from [172.23.64.106] (port=52468 helo=xhdvnc125.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1kpxl2-0004rP-L1; Thu, 17 Dec 2020 10:12:08 -0800 Received: by xhdvnc125.xilinx.com (Postfix, from userid 13245) id 69A9D1222C2; Thu, 17 Dec 2020 23:41:28 +0530 (IST) From: Radhey Shyam Pandey To: , , CC: , , , Shravya Kumbham , "Radhey Shyam Pandey" Subject: [PATCH 3/3] dmaengine: xilinx_dma: fix mixed_enum_type coverity warning Date: Thu, 17 Dec 2020 23:40:15 +0530 Message-ID: <1608228615-7413-4-git-send-email-radhey.shyam.pandey@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1608228615-7413-1-git-send-email-radhey.shyam.pandey@xilinx.com> References: <1608228615-7413-1-git-send-email-radhey.shyam.pandey@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e99d3700-8093-4ddb-1251-08d8a2b77da1 X-MS-TrafficTypeDiagnostic: MN2PR02MB6077: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XX5oP/8KEMH7sUew6Tdxq9qJlybNzGGcnYtaDpsDPLA5TMWiT2D898nA/hm4Irs3fClJgcYjqdL4RY1L/Y5IF4qgX9lyyEW1izR8EVPmCoPhja4xuopg3E8dt6QEFfSCppBs0k81ph7RMAubWQCu6CTIHuhVYDRVKJsn2EhQCHeKttCGuxbZwVBK/01/f+2oOFevqC6st+bLRADFtkSun5chM2Csc5tPdGLlf/TsmXsCZI3Gwr06ni2juTiP5Q/qUt3a5+Ji/1hvOQ8NdxMcD3MgwlH2XLcz6MYQ2jN3/6ZNhBXAbS5jy0CUxQLC13JB12X1Xk6idDsXnpfvqwroKsrlwg8wxx+bdDL9lt0jLjBVjjXRhNbnG5h78qOejmmxCVZb8CxJkCb0EarvuzGK4hysoWfhekhBy8hKtkJ0jzfEO7jB85orBd/FOalGeFKVVLuEnfFIMuq+Zg3Tvy3ZGCY0+2YjwGePv5Dn2LBwZFkBqyIPWwyqkwRHLqzQSjv8 X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(346002)(39860400002)(136003)(376002)(396003)(46966005)(6666004)(478600001)(186003)(47076004)(110136005)(82740400003)(54906003)(8936002)(82310400003)(6266002)(2906002)(70586007)(70206006)(316002)(26005)(336012)(4326008)(36906005)(426003)(356005)(7636003)(83380400001)(8676002)(36756003)(107886003)(5660300002)(6636002)(2616005)(42186006)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2020 18:13:44.1908 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e99d3700-8093-4ddb-1251-08d8a2b77da1 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BL2NAM02FT022.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6077 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Shravya Kumbham Typecast the fls(width -1) with (enum dmaengine_alignment) in xilinx_dma_chan_probe function to fix the coverity warning. Addresses-Coverity: Event mixed_enum_type. Signed-off-by: Shravya Kumbham Signed-off-by: Radhey Shyam Pandey --- drivers/dma/xilinx/xilinx_dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index cf75e2af6381..5e6dcb72a888 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -2801,7 +2801,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, has_dre = false; if (!has_dre) - xdev->common.copy_align = fls(width - 1); + xdev->common.copy_align = (enum dmaengine_alignment) + fls(width - 1); if (of_device_is_compatible(node, "xlnx,axi-vdma-mm2s-channel") || of_device_is_compatible(node, "xlnx,axi-dma-mm2s-channel") ||