From: Mark Brown <broonie@kernel.org>
To: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
MANAGEM..." <alsa-devel@alsa-project.org>,
Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@amd.com>,
open list <linux-kernel@vger.kernel.org>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Sanju R Mehta <sanju.mehta@amd.com>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Alexander.Deucher@amd.com,
Colin Ian King <colin.king@canonical.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [alsa-devel] [PATCH 1/5] ASoC: amd: Registering device endpoints using MFD framework
Date: Thu, 26 Sep 2019 11:23:00 -0700 [thread overview]
Message-ID: <20190926182300.GD2036@sirena.org.uk> (raw)
In-Reply-To: <1569539290-756-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com>
[-- Attachment #1.1: Type: text/plain, Size: 1804 bytes --]
On Fri, Sep 27, 2019 at 04:37:35AM +0530, Ravulapati Vishnu vardhan rao wrote:
> -#define ACP3x_PHY_BASE_ADDRESS 0x1240000
> -#define ACP3x_I2S_MODE 0
> -#define ACP3x_REG_START 0x1240000
> -#define ACP3x_REG_END 0x1250200
> -#define I2S_MODE 0x04
> -#define BT_TX_THRESHOLD 26
> -#define BT_RX_THRESHOLD 25
> -#define ACP3x_POWER_ON 0x00
> -#define ACP3x_POWER_ON_IN_PROGRESS 0x01
> -#define ACP3x_POWER_OFF 0x02
> -#define ACP3x_POWER_OFF_IN_PROGRESS 0x03
> +#define ACP3x_DEVS 3
> +#define ACP3x_PHY_BASE_ADDRESS 0x1240000
> +#define ACP3x_I2S_MODE 0
> +#define ACP3x_REG_START 0x1240000
> +#define ACP3x_REG_END 0x1250200
A large part of this appears to be unrelated indentation changes,
these should be split out into a separate patch.
> +static struct device *get_mfd_cell_dev(const char *device_name, int r)
> +{
> + char auto_dev_name[25];
> + struct device *dev;
> +
> + snprintf(auto_dev_name, sizeof(auto_dev_name),
> + "%s.%d.auto", device_name, r);
> + dev = bus_find_device_by_name(&platform_bus_type,
> + NULL, auto_dev_name);
> + dev_info(dev, "device %s added\n", auto_dev_name);
Remove this log message, it's going to be very noisy.
> + r = mfd_add_hotplug_devices(adata->parent, adata->cell, 3);
> + for (i = 0; i < 3 ; i++)
> + dev = get_mfd_cell_dev(adata->cell[i].name, i);
What is this doing? We never look at the result of this
get_mfd_cell_dev() and having a function like this suggests that
there's some abstraction issue here.
> + kfree(adata->cell);
> iounmap(adata->acp3x_base);
> + /*ignore device status and return driver probe error*/
> + return -ENODEV;
> release_regions:
This looks broken, as well as discarding error codes (making
things harder to diagnose) it means we stop unwinding things and
leave the rest of the resources lying around.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-09-26 18:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 23:07 [alsa-devel] [PATCH 1/5] ASoC: amd: Registering device endpoints using MFD framework Ravulapati Vishnu vardhan rao
2019-09-26 18:23 ` Mark Brown [this message]
2019-09-26 23:07 ` [alsa-devel] [PATCH 2/5] ASoC: amd: Refactoring of DAI from DMA driver Ravulapati Vishnu vardhan rao
2019-09-26 23:07 ` [alsa-devel] [PATCH 3/5] ASoC: amd: Enabling two I2S instances Ravulapati Vishnu vardhan rao
2019-09-26 18:15 ` Mark Brown
2019-09-26 23:07 ` [alsa-devel] [PATCH 4/5] ASoC: amd: added pmops for pci driver Ravulapati Vishnu vardhan rao
2019-09-26 18:24 ` Mark Brown
2019-09-30 11:30 ` vishnu
2019-09-26 23:07 ` [alsa-devel] [PATCH 5/5] ASoC: amd: ACP powergating should be done by controller Ravulapati Vishnu vardhan rao
2019-09-26 12:55 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190926182300.GD2036@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Alexander.Deucher@amd.com \
--cc=Maruthi.Bayyavarapu@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=Vishnuvardhanrao.Ravulapati@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=colin.king@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sanju.mehta@amd.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).