From patchwork Tue Apr 3 15:49:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 10321509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 41A8B60390 for ; Tue, 3 Apr 2018 15:50:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31AE528796 for ; Tue, 3 Apr 2018 15:50:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2623528C0E; Tue, 3 Apr 2018 15:50:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CD6428796 for ; Tue, 3 Apr 2018 15:50:09 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E26D82675CE; Tue, 3 Apr 2018 17:50:07 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1BE062675D5; Tue, 3 Apr 2018 17:50:05 +0200 (CEST) Received: from smtprelay.hostedemail.com (smtprelay0142.hostedemail.com [216.40.44.142]) by alsa0.perex.cz (Postfix) with ESMTP id BB9762675CA for ; Tue, 3 Apr 2018 17:50:02 +0200 (CEST) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id CF570180A8125; Tue, 3 Apr 2018 15:50:00 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: spade90_57156a35c6141 X-Filterd-Recvd-Size: 5260 Received: from XPS-9350 (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf09.hostedemail.com (Postfix) with ESMTPA; Tue, 3 Apr 2018 15:49:58 +0000 (UTC) Message-ID: <1522770597.11653.49.camel@perches.com> From: Joe Perches To: Ladislav Michl , Colin King Date: Tue, 03 Apr 2018 08:49:57 -0700 In-Reply-To: <20180403134540.GA29017@lenoch> References: <20180330154420.6903-1-colin.king@canonical.com> <20180403134540.GA29017@lenoch> X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Cc: Alexandre Belloni , alsa-devel@alsa-project.org, Liam Girdwood , linux-kernel@vger.kernel.org, Nicolas Ferre , kernel-janitors@vger.kernel.org, Takashi Iwai , Mark Brown , linux-arm-kernel@lists.infradead.org Subject: Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: fix spelling mistake: "Stoping" -> "Stopping" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 2018-04-03 at 15:45 +0200, Ladislav Michl wrote: > On Fri, Mar 30, 2018 at 04:44:20PM +0100, Colin King wrote: > > From: Colin Ian King > > Hello Colin, > > > Trivial fix to spelling mistake in pr_debug message text > > would you mind making this patch a bit less non-trivial and > change pr_debug to dev_dbg dropping Atmel_ssc_dai prefix? Presumably, then all the pr_ calls should be changed. Something like: --- sound/soc/atmel/atmel_ssc_dai.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index a1e2c5682dcd..594228156b2d 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -291,11 +291,10 @@ static int atmel_ssc_startup(struct snd_pcm_substream *substream, int dir, dir_mask; int ret; - pr_debug("atmel_ssc_startup: SSC_SR=0x%x\n", - ssc_readl(ssc_p->ssc->regs, SR)); + dev_dbg(dai->dev, "SSC_SR=0x%x\n", ssc_readl(ssc_p->ssc->regs, SR)); /* Enable PMC peripheral clock for this SSC */ - pr_debug("atmel_ssc_dai: Starting clock\n"); + dev_dbg(dai->dev, "Starting clock\n"); clk_enable(ssc_p->ssc->clk); ssc_p->mck_rate = clk_get_rate(ssc_p->ssc->clk); @@ -385,7 +384,7 @@ static void atmel_ssc_shutdown(struct snd_pcm_substream *substream, spin_unlock_irq(&ssc_p->lock); /* Shutdown the SSC clock. */ - pr_debug("atmel_ssc_dai: Stopping clock\n"); + dev_dbg(dai->dev, "Stopping clock\n"); clk_disable(ssc_p->ssc->clk); } @@ -794,13 +793,12 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, break; default: - printk(KERN_WARNING "atmel_ssc_dai: unsupported DAI format 0x%x\n", - ssc_p->daifmt); + dev_warn(dai->dev, "unsupported DAI format 0x%x\n", + ssc_p->daifmt); return -EINVAL; } - pr_debug("atmel_ssc_hw_params: " - "RCMR=%08x RFMR=%08x TCMR=%08x TFMR=%08x\n", - rcmr, rfmr, tcmr, tfmr); + dev_dbg(dai->dev, "RCMR=%08x RFMR=%08x TCMR=%08x TFMR=%08x\n", + rcmr, rfmr, tcmr, tfmr); if (!ssc_p->initialized) { if (!ssc_p->ssc->pdata->use_dma) { @@ -818,9 +816,8 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, ret = request_irq(ssc_p->ssc->irq, atmel_ssc_interrupt, 0, ssc_p->name, ssc_p); if (ret < 0) { - printk(KERN_WARNING - "atmel_ssc_dai: request_irq failure\n"); - pr_debug("Atmel_ssc_dai: Stoping clock\n"); + dev_warn(dai->dev, "request_irq failure\n"); + dev_dbg(dai->dev, "Stopping clock\n"); clk_disable(ssc_p->ssc->clk); return ret; } @@ -839,7 +836,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, ssc_writel(ssc_p->ssc->regs, TCMR, tcmr); ssc_writel(ssc_p->ssc->regs, TFMR, tfmr); - pr_debug("atmel_ssc_dai,hw_params: SSC initialized\n"); + dev_dbg(dai->dev, "SSC initialized\n"); return 0; } @@ -862,9 +859,9 @@ static int atmel_ssc_prepare(struct snd_pcm_substream *substream, ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_disable); ssc_writel(ssc_p->ssc->regs, IDR, dma_params->mask->ssc_error); - pr_debug("%s enabled SSC_SR=0x%08x\n", - dir ? "receive" : "transmit", - ssc_readl(ssc_p->ssc->regs, SR)); + dev_dbg(dai->dev, "%s enabled SSC_SR=0x%08x\n", + dir ? "receive" : "transmit", + ssc_readl(ssc_p->ssc->regs, SR)); return 0; } @@ -1050,21 +1047,18 @@ static void asoc_ssc_exit(struct device *dev) int atmel_ssc_set_audio(int ssc_id) { struct ssc_device *ssc; - int ret; /* If we can grab the SSC briefly to parent the DAI device off it */ ssc = ssc_request(ssc_id); if (IS_ERR(ssc)) { pr_err("Unable to parent ASoC SSC DAI on SSC: %ld\n", - PTR_ERR(ssc)); + PTR_ERR(ssc)); return PTR_ERR(ssc); - } else { - ssc_info[ssc_id].ssc = ssc; } - ret = asoc_ssc_init(&ssc->pdev->dev); + ssc_info[ssc_id].ssc = ssc; - return ret; + return asoc_ssc_init(&ssc->pdev->dev); } EXPORT_SYMBOL_GPL(atmel_ssc_set_audio);