lkml.org 
[lkml]   [2021]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND, v9 06/10] ASoC: qcom: Add regmap config support for codec dma driver
On Mon, Dec 06, 2021 at 07:52:43PM +0530, Srinivasa Rao Mandadapu wrote:

> +static bool __lpass_rxtx_regmap_accessible(struct device *dev, unsigned int reg, bool rw)
> +{
> + struct lpass_data *drvdata = dev_get_drvdata(dev);
> + struct lpass_variant *v = drvdata->variant;
> + int i;
> +
> + for (i = 0; i < v->rxtx_irq_ports; ++i) {

> + for (i = 0; i < v->rxtx_rdma_channels; ++i) {

This is looking relatively expensive to run with all these loops -
there's a reason these are normally written as switch statements, the
theory being that the compiler will generate something at least as good
as any data structure we're likely to code. It's not a *problem*
exactly, but if you're doing anything that ends up querying properties a
lot it might be an issue.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-12-10 20:07    [W:0.080 / U:1.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site