lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230619200753.242c746d@kmaincent-XPS-13-7390>
Date:   Mon, 19 Jun 2023 20:07:53 +0200
From:   Köry Maincent <kory.maincent@...tlin.com>
To:     Serge Semin <fancer.lancer@...il.com>
Cc:     Cai Huoqing <cai.huoqing@...ux.dev>,
        Manivannan Sadhasivam <mani@...nel.org>,
        Vinod Koul <vkoul@...nel.org>,
        Gustavo Pimentel <Gustavo.Pimentel@...opsys.com>,
        dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Herve Codina <herve.codina@...tlin.com>
Subject: Re: [PATCH 1/9] dmaengine: dw-edma: Fix the ch_count hdma callback

On Mon, 19 Jun 2023 00:07:09 +0300
Serge Semin <fancer.lancer@...il.com> 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)
> >  
> >  static u16 dw_hdma_v0_core_ch_count(struct dw_edma *dw, enum dw_edma_dir
> > dir) {
> > -	u32 num_ch = 0;
> > -	int id;
> > -
> > -	for (id = 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 = HDMA_V0_MAX_NR_CH;
> > -
> > -	return (u16)num_ch;
> > +	return HDMA_V0_MAX_NR_CH;  
> 
> 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öry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ