From patchwork Fri Mar 22 20:44:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Droms X-Patchwork-Id: 2322491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 74EF4400E6 for ; Fri, 22 Mar 2013 20:47:52 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UJ8pn-0005fk-4N; Fri, 22 Mar 2013 20:45:07 +0000 Received: from mail-vb0-x233.google.com ([2607:f8b0:400c:c02::233]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UJ8ph-0005eN-F3 for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2013 20:45:02 +0000 Received: by mail-vb0-f51.google.com with SMTP id fq11so2764420vbb.24 for ; Fri, 22 Mar 2013 13:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer; bh=wgvC3q4fOnvPmtb5OB5weOCK1Ld1NjdMVAEW+DT3xAI=; b=Ij25guiAcuo0rMSrDbySWsuJ4pS8BsjKk3b6HeXtKIhXxFgC/dcfuUAd1qjon5mbd8 1LjSHIEV1SoIDhHyWwGAlkjxISa1HRSCp+muJotEGaGeP17EjoZZqWeZWlrycuAfNOXS 5cpAv8Uw+SXMBpwqj3lIHLgr1i8Df3h5q0XQH4haUkHDCDhdqu7UfR/PTweBIrIk6zBX kOdqvexvPdIHcvbY/E/ffBmEh6Odz71BEKCi+WlKWjjcfdSAF/FAY7WKyBH2QLVS2xmY huEXOHSxowwLfHKEjqteGmfdpG9tsV/kUdLSm8TWXcEWwiOitwLB151ITrE86cqu5hUB JHZA== X-Received: by 10.58.220.229 with SMTP id pz5mr4189621vec.30.1363985097730; Fri, 22 Mar 2013 13:44:57 -0700 (PDT) Received: from [192.168.1.113] (c-24-62-110-75.hsd1.ma.comcast.net. [24.62.110.75]) by mx.google.com with ESMTPS id 6sm5164995vei.0.2013.03.22.13.44.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Mar 2013 13:44:56 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: [PATCH for 3.10 v2] mmc: mvsdio: use dev_*() API instead of pr_*() API From: Ralph Droms In-Reply-To: <1363959441-30744-1-git-send-email-thomas.petazzoni@free-electrons.com> Date: Fri, 22 Mar 2013 16:44:53 -0400 Message-Id: <314D078E-96FA-4118-9640-CF37883137A0@gmail.com> References: <1363959441-30744-1-git-send-email-thomas.petazzoni@free-electrons.com> To: Chris Ball , linux-mmc@vger.kernel.org X-Mailer: Apple Mail (2.1503) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130322_164501_563267_0F7F0C06 X-CRM114-Status: GOOD ( 15.32 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rdroms[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Lior Amsalem , Thomas Petazzoni , Jason Cooper , Andrew Lunn , Maen Suleiman , Ezequiel Garcia , Gregory Clement , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org I've successfully compiled and tested this patch on my SheevaPlug platform. - Ralph Droms On Mar 22, 2013, at 9:37 AM, Thomas Petazzoni wrote: The mvsdio driver was already using some dev_*() functions to print some messages, but still using pr_*() functions for some others. This patch converts all messages to use dev_*() functions. Many of the pr_*() function calls were printing the output of mmc_hostname() to preprend the message with an identifier for the device. Since the dev_*() functions do that automatically, this patch also gets rid of those string prefixes. Signed-off-by: Thomas Petazzoni Tested-by: Ralph Droms --- This is for 3.10. Changes between v1 and v2: * Fix incorrect format string. A "%s" was left, even though the mmc_hostname() argument was removed due to the conversion to the dev_*() API. --- drivers/mmc/host/mvsdio.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 145cdaf..f6e5e25 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -119,10 +119,8 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) host->pio_size = data->blocks * data->blksz; host->pio_ptr = sg_virt(data->sg); if (!nodma) - pr_debug("%s: fallback to PIO for data " - "at 0x%p size %d\n", - mmc_hostname(host->mmc), - host->pio_ptr, host->pio_size); + dev_dbg(host->dev, "fallback to PIO for data at 0x%p size %d\n", + host->pio_ptr, host->pio_size); return 1; } else { dma_addr_t phys_addr; @@ -473,8 +471,8 @@ static irqreturn_t mvsd_irq(int irq, void *dev) if (mrq->data) err_status = mvsd_finish_data(host, mrq->data, err_status); if (err_status) { - pr_err("%s: unhandled error status %#04x\n", - mmc_hostname(host->mmc), err_status); + dev_err(host->dev, "unhandled error status %#04x\n", + err_status); cmd->error = -ENOMSG; } @@ -491,9 +489,8 @@ static irqreturn_t mvsd_irq(int irq, void *dev) if (irq_handled) return IRQ_HANDLED; - pr_err("%s: unhandled interrupt status=0x%04x en=0x%04x " - "pio=%d\n", mmc_hostname(host->mmc), intr_status, - host->intr_en, host->pio_size); + dev_err(host->dev, "unhandled interrupt status=0x%04x en=0x%04x pio=%d\n", + intr_status, host->intr_en, host->pio_size); return IRQ_NONE; } @@ -507,13 +504,11 @@ static void mvsd_timeout_timer(unsigned long data) spin_lock_irqsave(&host->lock, flags); mrq = host->mrq; if (mrq) { - pr_err("%s: Timeout waiting for hardware interrupt.\n", - mmc_hostname(host->mmc)); - pr_err("%s: hw_state=0x%04x, intr_status=0x%04x " - "intr_en=0x%04x\n", mmc_hostname(host->mmc), - mvsd_read(MVSD_HW_STATE), - mvsd_read(MVSD_NOR_INTR_STATUS), - mvsd_read(MVSD_NOR_INTR_EN)); + dev_err(host->dev, "Timeout waiting for hardware interrupt.\n"); + dev_err(host->dev, "hw_state=0x%04x, intr_status=0x%04x intr_en=0x%04x\n", + mvsd_read(MVSD_HW_STATE), + mvsd_read(MVSD_NOR_INTR_STATUS), + mvsd_read(MVSD_NOR_INTR_EN)); host->mrq = NULL; @@ -778,7 +773,7 @@ static int __init mvsd_probe(struct platform_device *pdev) ret = devm_request_irq(&pdev->dev, irq, mvsd_irq, 0, DRIVER_NAME, host); if (ret) { - pr_err("%s: cannot assign irq %d\n", DRIVER_NAME, irq); + dev_err(&pdev->dev, "cannot assign irq %d\n", irq); goto out; } @@ -797,13 +792,11 @@ static int __init mvsd_probe(struct platform_device *pdev) if (ret) goto out; - pr_notice("%s: %s driver initialized, ", - mmc_hostname(mmc), DRIVER_NAME); if (!(mmc->caps & MMC_CAP_NEEDS_POLL)) - printk("using GPIO %d for card detection\n", - gpio_card_detect); + dev_notice(&pdev->dev, "using GPIO %d for card detection\n", + gpio_card_detect); else - printk("lacking card detect (fall back to polling)\n"); + dev_notice(&pdev->dev, "lacking card detect (fall back to polling)\n"); return 0; out: