Re: [RESEND, v9 06/10] ASoC: qcom: Add regmap config support for codec dma driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux