Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6750594rwd; Mon, 19 Jun 2023 11:43:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZxkvXWZ0xRi0HfRaGmPSebtFADSR9wV7L9b6m/Dfmm+xERPr4BfT94aEjVKc63BuS/POY X-Received: by 2002:a05:6a00:a02:b0:64d:1c59:6767 with SMTP id p2-20020a056a000a0200b0064d1c596767mr7915401pfh.24.1687200235344; Mon, 19 Jun 2023 11:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687200235; cv=none; d=google.com; s=arc-20160816; b=nLAt125OgNTXDW744T2tS6TNE+ZbJRysA7HLxqM8FpIsSUbnvglTTt14jpJkVRz6vB 65yxwUHzcCtFLYEFP09uKJ5lpeNf1fXgHcPXAW4Wk8kQejtkyJXvpbtRMYgYBDxZ03Am FSul1BsjOLezKeQsLrCALHbgPyMD74pqN1ks1ll0o9vehu5fPLNhKKiLlv0Bjn4hLgZq RE7BNKOYZf9LWu0PRrP2YVjAaVtuj1dd+MQsGSkYTxh3s6GYfbTjZIUBE9WI7wgflHWd baygpYYpdfkEQE7CZ5GT8gWxvgXy0VmN5tmSIBRbIHlpFnBOgzsHRAecSpxneUXJmFsK BX4w== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=1Tp0LI/vg6JlukmNhiGcWBsiAqUGGuvYo9ddkoGSkQ8=; b=WOELMzwes3kBSwVvdPRrYknnM72pkKgMrNsXdq5deC4+zoDHfqhLDyr2EJ5UeLkxE+ zaW62xX7UjJGhCi779WGW/+8dJiWNhNccsED42+Xc5dAg+soeuLBB0SNMYEf68eX5Oxu 0UhlPD8pdXS9ZJbQ8TBTHCAM5PRyAqUu9WX78XPtAKY6y7q+jlDuXSOM8329l6htoX1n bXJfyIc3gbRXAqsLDluiQNCCwB7h77bW9dWYUGbuX2qaOZScvPqno0kTpBDze+xeI1Sp cqIhNbeYlJAKBdrSkC/iB6q2EtnXWY6UexrMj/OfoxUEEOF03Tq7o4fatq5By73YYgMB wyVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TqUC5G+o; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y71-20020a638a4a000000b0055336b93e04si38852pgd.827.2023.06.19.11.43.42; Mon, 19 Jun 2023 11:43:55 -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=@bootlin.com header.s=gm1 header.b=TqUC5G+o; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231990AbjFSSH7 (ORCPT + 99 others); Mon, 19 Jun 2023 14:07:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbjFSSH6 (ORCPT ); Mon, 19 Jun 2023 14:07:58 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D94E7127; Mon, 19 Jun 2023 11:07:56 -0700 (PDT) X-GND-Sasl: kory.maincent@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1687198075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Tp0LI/vg6JlukmNhiGcWBsiAqUGGuvYo9ddkoGSkQ8=; b=TqUC5G+oG2WZNMdW5APZhi2AEdB2iUJ6cOkSUjSv4dsXItMPY/7hLXGuFgAWL0AA9C1m6O NVYkBMiafaZx/Y+BFKc69nmbridg+oN+ogOvlJpnlm5LGN44R9K5dGrHO0IHiOwWvlBluk LXyHZ+AmJyrq1he8xnZV9STojd2OCZsWS0qcKZ87OOBtbY/zs6LdZQSp3BlRuFXUDBgFVi elF+gMlV/6fk1ggzD34RIh3p6leN41HeT4a7bcwD22922M+9Y0EeCQBgxGHWOFePxOBdtf qyhB7Et6w28JtrGPmDzhfAvIUyuKczE6x/CMI7hm+fe010hME2DwiwrroP2e8w== X-GND-Sasl: kory.maincent@bootlin.com X-GND-Sasl: kory.maincent@bootlin.com X-GND-Sasl: kory.maincent@bootlin.com X-GND-Sasl: kory.maincent@bootlin.com X-GND-Sasl: kory.maincent@bootlin.com X-GND-Sasl: kory.maincent@bootlin.com X-GND-Sasl: kory.maincent@bootlin.com X-GND-Sasl: kory.maincent@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 7EE67E0003; Mon, 19 Jun 2023 18:07:54 +0000 (UTC) Date: Mon, 19 Jun 2023 20:07:53 +0200 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Serge Semin Cc: Cai Huoqing , Manivannan Sadhasivam , Vinod Koul , Gustavo Pimentel , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Herve Codina Subject: Re: [PATCH 1/9] dmaengine: dw-edma: Fix the ch_count hdma callback Message-ID: <20230619200753.242c746d@kmaincent-XPS-13-7390> In-Reply-To: <20230618210709.rkdjlehyhc7lngam@mobilestation> References: <20230609081654.330857-1-kory.maincent@bootlin.com> <20230609081654.330857-2-kory.maincent@bootlin.com> <20230618210709.rkdjlehyhc7lngam@mobilestation> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 On Mon, 19 Jun 2023 00:07:09 +0300 Serge Semin wrote: > > diff --git a/drivers/dma/dw-edma/dw-hdma-v0-core.c > > b/drivers/dma/dw-edma/dw-hdma-v0-core.c index 00b735a0202a..de87ce6b8585 > > 100644 --- a/drivers/dma/dw-edma/dw-hdma-v0-core.c > > +++ b/drivers/dma/dw-edma/dw-hdma-v0-core.c > > @@ -65,18 +65,7 @@ static void dw_hdma_v0_core_off(struct dw_edma *dw) > > =20 > > static u16 dw_hdma_v0_core_ch_count(struct dw_edma *dw, enum dw_edma_d= ir > > dir) { > > - u32 num_ch =3D 0; > > - int id; > > - > > - for (id =3D 0; id < HDMA_V0_MAX_NR_CH; id++) { > > - if (GET_CH_32(dw, id, dir, ch_en) & BIT(0)) > > - num_ch++; > > - } > > - > > - if (num_ch > HDMA_V0_MAX_NR_CH) > > - num_ch =3D HDMA_V0_MAX_NR_CH; > > - > > - return (u16)num_ch; > > + return HDMA_V0_MAX_NR_CH; =20 >=20 > Mainly I am ok with this change. But it would be nice to have a > comment inlined here of why the number of channels is fixed and that > the platform is responsible for specifying the real number of channels > (it's basically what you described in the patch log). Ok I will, thanks for your review. K=C3=B6ry