Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1642296rwb; Sun, 14 Aug 2022 08:33:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR6+nPeO88kJ/nPJyXeuYwPJY+9emkKv5srwOGImsxwbtdm91j2ga0mMSMnH9bSvwDwlG2+E X-Received: by 2002:a05:6a00:22c6:b0:52f:4d67:b370 with SMTP id f6-20020a056a0022c600b0052f4d67b370mr12494387pfj.58.1660491204870; Sun, 14 Aug 2022 08:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660491204; cv=none; d=google.com; s=arc-20160816; b=KJxXmv4uWkjYQPC8Jsnb/h6nBbcKtXH63/zvgiZJw9lpWpVueZn8FGXonWqaH+VjVx /pN/uocmTqYeNHHdIFcYNMrHBBFX7Ir0dubSglmtdXBTcrxFODtfFgUDOEcQyKRplNYn /g2q19qnETSfFljQlUHdXBF1gW/dx5es96zMTVT6GmVm81R5rWKsikaPu5Z/kb3NX4tY sDA4eF+nPWP1sJhOyd0og9l0KY0OinWHmcGMTnRG9YDPWr8Otyn4kirFSL/pULw6gAy/ A+gjN618wLO5E17nMybsUERn3Xc0xrvqCjBJdEkSj80Gq/oOQjfXbg7uIAhol94l1qWz F2mg== 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 :dkim-signature; bh=hUbUdRPYBgtWOGAcRnEfVkvw/QQC0p1cKv6Yf5vSXAQ=; b=Esls6e3xz19wyfi8DpB8DtywjE0GLyQpiYAqp5EcVO1g8QqVyTpFns3+1sCdogXrDF YZhIlQ6WY2oCV47mJjuxhwM3FdYm801VTJP0+GPzf1x7mYO6v8oxS3ybxkzmMQgKXh3U SrCxv7QV9NI3zj2xLNZ6k3arG4PdSgZApsz/+eraNE40ajZrWDwzw+i7Pe60EchAqGqE +yUjetpnX/WaWu1I0SEh6566OWrPE20A1JmxxCq//CHn8L2REK1TGeDbHWpDLz/tKgET kU3+Kp/51WTCq5l1VJ4u8EJ2oqgvF/5VX3tnImoekHOKXE+nGlgck6Ge1qLwhlJmi2g5 i9hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z5ITyE4x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a056a00130900b0052e75c5055bsi3822989pfu.192.2022.08.14.08.33.12; Sun, 14 Aug 2022 08:33:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z5ITyE4x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240607AbiHNPcN (ORCPT + 99 others); Sun, 14 Aug 2022 11:32:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240554AbiHNPbf (ORCPT ); Sun, 14 Aug 2022 11:31:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E57031ADB7; Sun, 14 Aug 2022 08:29:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6BA98B80B7C; Sun, 14 Aug 2022 15:29:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67430C433D6; Sun, 14 Aug 2022 15:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660490981; bh=Wk2EN4oWzCNZy1fjsGB+gIos7yTqSgZhVXSohy2ODQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z5ITyE4xTEwwb1Un26icuUT8GUYvzz5q3bsiK46KcXkYAAL7XMdbAIouj9wECJTNE GgclXY9KHIwkj5YN4zxEkEuCVTIFGhepxVB/KwR1dZf0mbOUSw8RtZ4tof79ZpTWLZ 8kEK77Ekxs+HF7gdUpA2p1jQZt0WTEYTVcvMHZGHHkGi/cQMBhvUogAvaRoxOWLbcc pOxrVmaS8oYVVax71zIpcSuTOIPzWBdhz5e4fQMC+niwFXeOEywVngPNrk2EQCWYpY 7tlv5YdzfaPDgj6uk0cTMGBp3O39cr/fRhKJ0JYqb2FUuzLYn717qxYh1Ti2dUXyHn SGTUpAYPBlegA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ben Dooks , Vinod Koul , Sasha Levin , Eugeniy.Paltsev@synopsys.com, dmaengine@vger.kernel.org Subject: [PATCH AUTOSEL 5.19 44/64] dmaengine: dw-axi-dmac: do not print NULL LLI during error Date: Sun, 14 Aug 2022 11:24:17 -0400 Message-Id: <20220814152437.2374207-44-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220814152437.2374207-1-sashal@kernel.org> References: <20220814152437.2374207-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Dooks [ Upstream commit 86cb0defe0e275453bc39e856bb523eb425a6537 ] During debugging we have seen an issue where axi_chan_dump_lli() is passed a NULL LLI pointer which ends up causing an OOPS due to trying to get fields from it. Simply print NULL LLI and exit to avoid this. Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20220708170153.269991-3-ben.dooks@sifive.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c index c741da02b67e..41583f01a360 100644 --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c @@ -982,6 +982,11 @@ static int dw_axi_dma_chan_slave_config(struct dma_chan *dchan, static void axi_chan_dump_lli(struct axi_dma_chan *chan, struct axi_dma_hw_desc *desc) { + if (!desc->lli) { + dev_err(dchan2dev(&chan->vc.chan), "NULL LLI\n"); + return; + } + dev_err(dchan2dev(&chan->vc.chan), "SAR: 0x%llx DAR: 0x%llx LLP: 0x%llx BTS 0x%x CTL: 0x%x:%08x", le64_to_cpu(desc->lli->sar), -- 2.35.1