From patchwork Mon Dec 14 06:54:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 11971435 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 E410AC4361B for ; Mon, 14 Dec 2020 06:55:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9778522597 for ; Mon, 14 Dec 2020 06:55:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9778522597 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=l/iqVrAN0Kiv6qN6+Eo4tmc9OgjOPAWy7u4VNDQnSYI=; b=a+RTpS9Pk8IbFBqGQV4P6vqaks RM44XQH8zHQ7+k+sQ1+RffKyktL+MmhEWswtI3Bq7GhDPdSe346d2UW1J3KyvRSPj9Vu2J4IRHUdx B+bvFkkdTLovJzBGs3Tm2T0d+T++flruuyl4nT33WIq8Q7dxRHRBORzofac6fSfZYO+rpil4wM67+ 4VjXzxg2M3ekPGbDRXZtD8zcHSh4hxo+e8pZRSec7rNE67heL+kQGO7OcYIafqwM2R+fdjrYtZNG2 LQm7VgQ+v4/0P9KOp+mWtRn4xWJRw7vvzbQqk2CB2hcFzqyeq055D8dnQfpRLSlIbluDiUpDSoJRk 3VtMTBQg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kohje-00084X-3c; Mon, 14 Dec 2020 06:53:30 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kohja-00083V-Kz for linux-arm-kernel@lists.infradead.org; Mon, 14 Dec 2020 06:53:27 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0BE6rJLs044767; Mon, 14 Dec 2020 00:53:19 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1607928799; bh=fjMxuww0pI6MgGW3bPWunKl2njfFRpIUYB2BKc1LH+k=; h=From:To:CC:Subject:Date; b=sMP5NYwsVFA0Mgnuq4fje42VbNYMVRZa1xiKSw5AWmy25+W5Fx+8ek+Iz4uIjNrqc JyP2q99M3ACpN95rEzoun/GeSE7XUJ7Bx/AVjPIjMHILN6DgkiAbaCYWjKNTWpNMDP ea7lwgE9YSrQsr4GveWcOclqaq6T3xzuACMEM+Cw= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0BE6rJUa068701 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Dec 2020 00:53:19 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 14 Dec 2020 00:53:19 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 14 Dec 2020 00:53:19 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0BE6rGWS050104; Mon, 14 Dec 2020 00:53:17 -0600 From: Peter Ujfalusi To: , , Subject: [PATCH] soc: ti: k3-ringacc: Use correct error casting in k3_ringacc_dmarings_init Date: Mon, 14 Dec 2020 08:54:21 +0200 Message-ID: <20201214065421.5138-1-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201214_015326_798558_4877977A X-CRM114-Status: GOOD ( 14.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: grygorii.strashko@ti.com, vigneshr@ti.com, linux-kernel@vger.kernel.org, t-kristo@ti.com, dmaengine@vger.kernel.org, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use ERR_CAST() when devm_ioremap_resource() fails. Reported-by: kernel test robot Signed-off-by: Peter Ujfalusi --- Hi Vinod, it came to my attention too late. This patch fixes the sparse warnig introduced by the AM64 support in https://lore.kernel.org/lkml/20201208090440.31792-1-peter.ujfalusi@ti.com/ Regards, Peter drivers/soc/ti/k3-ringacc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c index c88c305ba367..b495b0d5d0fa 100644 --- a/drivers/soc/ti/k3-ringacc.c +++ b/drivers/soc/ti/k3-ringacc.c @@ -1476,7 +1476,7 @@ struct k3_ringacc *k3_ringacc_dmarings_init(struct platform_device *pdev, res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ringrt"); base_rt = devm_ioremap_resource(dev, res); if (IS_ERR(base_rt)) - return base_rt; + return ERR_CAST(base_rt); ringacc->rings = devm_kzalloc(dev, sizeof(*ringacc->rings) *