Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3416010rwb; Fri, 20 Jan 2023 16:06:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXufJMZZyhxZM6oI0LgNmijv50qfZzeuQV+lHLPjllSciMt4lLJK8o8gYtxegwfrpbo1nBIE X-Received: by 2002:a17:906:489b:b0:850:52f8:5ca9 with SMTP id v27-20020a170906489b00b0085052f85ca9mr17053666ejq.28.1674259562628; Fri, 20 Jan 2023 16:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674259562; cv=none; d=google.com; s=arc-20160816; b=J328jd6GbyILKAHE1rqpD82Q5ZWGqOk60A46DjzATF0WdXXETboKlZHD8ACZXfUHQP GpcXKg173XdHLwgLRU4JW2GvxODGf/cEv3qB/dB95zbw0B67pOBGRQ8AcuVmtQBrGS3z 4lAHAfqhyrOy8ylMpjUB4tzei3TK3ZttvO/WLEJSOH6yijmNAHLqnR+0fCvJYjmuKKqD Zlp8NIM18HuTh82opjXoBcqfE3RgFXBoF73Vr29ZOO5Ni/k8dVcb4mmtaMx0RSp3JrdS p35B6pOdaJUqeUABPhlLUKNo+iacTlyge4E4fwJV+iCRK46K++do7Bxldd6Zsc9lnvmP RZSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=O6M7boY+tM34Srrr/HPmJsfbVFJQ5IVOWkFCvDx/ZmI=; b=ZAyH0rFpMxkOz9Y/7ByaKlchMXCGbPQdgc6wAmFG7pAOYRgopnV+9UcUEPM/seEFCF uVuPaaz8mUF+zOijGs36r9n0WuDTTPxKRVlKGN3h0T7YSTjNqyPIvhYmf/+qLPWh5j3D jPVO8/2UqaBOYioCOU2gcFiQRNfinD+iY+3+Sgjvb4ECWHycj6/cy3iR6VDHzxr+Cy/D Kt41GT4VP31YDGFJfrXiwz7bFQWwyzF9SIvOlnFlIsaoAEyFeINYVEc4VnEupE6BYc+u a8zTTVrt6KoVe4atDUCQn9wTFjXe7sGmxTaAJOXnfFz1yXqlSecHctkDLjALstRnaD6p KsWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fNx76M08; 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 oz14-20020a1709077d8e00b0087760357eacsi10070296ejc.949.2023.01.20.16.05.50; Fri, 20 Jan 2023 16:06:02 -0800 (PST) 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=fNx76M08; 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 S229823AbjATXy4 (ORCPT + 50 others); Fri, 20 Jan 2023 18:54:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjATXyy (ORCPT ); Fri, 20 Jan 2023 18:54:54 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADFD81449C; Fri, 20 Jan 2023 15:54:53 -0800 (PST) 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 58D33B82A89; Fri, 20 Jan 2023 23:54:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A73C3C433EF; Fri, 20 Jan 2023 23:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674258890; bh=iqOP9lSV+EeLcJNsAsjglTNHC5XAcXVWOnjm6GTY4Ao=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=fNx76M08EivqBfJbGMukrlvh4EqFOFpmEMiDwWF7NePATZGCS7s5C8yCLEzWNqZF+ C1MwY2a9/xN+JejzMVY46RFd85ZmpwjZ5oj0QaqeWv/NB8IY+DjozSksPN3pFE/wPl KY5EcEZ9R5lhKB6uJJUyNZhEQfQytEprNdVxcMS6atz0iYzo2agwamjfHSmwv8nOn+ 86OYSkjsICiZ5RPD8KoSUHkhSZafUH/xI2LMT+d9IdfDafmn17LQadoU0Yqtm6odtu O1up+U2j8c2W/RdIwaESoTYVJzTVrviyr9NS2NJmG/S4jfmG8Mm0BehQz0Htx0iiu/ y1zsgL7Xz4oLA== Date: Fri, 20 Jan 2023 17:54:49 -0600 From: Bjorn Helgaas To: Serge Semin Cc: Gustavo Pimentel , Vinod Koul , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Cai Huoqing , Robin Murphy , Jingoo Han , Frank Li , Manivannan Sadhasivam , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , caihuoqing , Yoshihiro Shimoda , linux-pci@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 09/27] dmaengine: dw-edma: Drop chancnt initialization Message-ID: <20230120235449.GA682361@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230113171409.30470-10-Sergey.Semin@baikalelectronics.ru> X-Spam-Status: No, score=-7.1 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 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 On Fri, Jan 13, 2023 at 08:13:51PM +0300, Serge Semin wrote: > DMA device drivers aren't supposed to initialize the dma_device.chancnt > field. It will be done by the DMA-engine core in accordance with number of > added virtual DMA-channels. Pre-initializing it with some value causes > having a wrong number of channels printed in the device summary. > > Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") > Signed-off-by: Serge Semin > Reviewed-by: Manivannan Sadhasivam > Tested-by: Manivannan Sadhasivam > Acked-by: Vinod Koul > --- > drivers/dma/dw-edma/dw-edma-core.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c > index 6c9f95a8e397..ecd3e8f7ac5d 100644 > --- a/drivers/dma/dw-edma/dw-edma-core.c > +++ b/drivers/dma/dw-edma/dw-edma-core.c > @@ -817,7 +817,6 @@ static int dw_edma_channel_setup(struct dw_edma *dw, bool write, > dma->src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); > dma->dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); > dma->residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR; > - dma->chancnt = cnt; Did you look for other instances of this bug? There are several other places that *look* like they might have the same issue: axi_dmac_probe dw_probe (dw-axi-dmac-platform.c) ioat_pci_probe plx_dma_create ... I hate to fix just one if there are other similar issues. > /* Set DMA channel callbacks */ > dma->dev = chip->dev; > -- > 2.39.0 > >