lkml.org 
[lkml]   [2023]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@gmail.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

\
 
 \ /
  Last update: 2023-06-19 20:08    [W:0.064 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site