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>] [day] [month] [year] [list]
Message-ID: <AM0PR04MB6468C972CEBB98BC6E3AD73BE3200@AM0PR04MB6468.eurprd04.prod.outlook.com>
Date:   Sat, 20 Apr 2019 07:21:22 +0000
From:   "S.j. Wang" <shengjiu.wang@....com>
To:     Nicolin Chen <nicoleotsuka@...il.com>
CC:     "timur@...nel.org" <timur@...nel.org>,
        "Xiubo.Lee@...il.com" <Xiubo.Lee@...il.com>,
        "festevam@...il.com" <festevam@...il.com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V4 2/3] ASoC: fsl_asrc: replace the process_option table
 with function

Hi

> 
> 
> On Fri, Apr 19, 2019 at 10:23:53AM +0000, S.j. Wang wrote:
> 
> > @@ -289,6 +318,12 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair
> *pair)
> >               return -EINVAL;
> >       }
> >
> > +     ret = fsl_asrc_sel_proc(inrate, outrate, &pre_proc, &post_proc);
> 
> Since the function always return 0, I am thinking of treating this function as
> a lookup function, and then moving this call right before the register
> settings -- as we have already made sure that both inrate and outrate are
> supported.

Ok.

> 
> > +     if (ret) {
> > +             pair_err("No supported pre-processing options\n");
> > +             return ret;
> > +     }
> 
> And probably no longer need this error-out. If there's a new limitation
> related to this function, I believe we can add it to the rate validation
> section as we are doing now -- better to have rate validation code at one
> place.
> 
Ok.

> > @@ -380,8 +415,8 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair
> *pair)
> >       /* Apply configurations for pre- and post-processing */
> 
> Here:
> -       /* Apply configurations for pre- and post-processing */
> +       /* Select and apply configurations for pre- and post-processing */
> +       fsl_asrc_sel_proc(inrate, outrate, &pre_proc, &post_proc);
> >       regmap_update_bits(asrc_priv->regmap, REG_ASRCFG,
> >                          ASRCFG_PREMODi_MASK(index) |
> ASRCFG_POSTMODi_MASK(index),
> > -                        ASRCFG_PREMOD(index, process_option[in][out][0]) |
> > -                        ASRCFG_POSTMOD(index, process_option[in][out][1]));
> > +                        ASRCFG_PREMOD(index, pre_proc) |
> > +                        ASRCFG_POSTMOD(index, post_proc));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ