From patchwork Wed Aug 29 05:35:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 1383821 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7E272DFFCF for ; Wed, 29 Aug 2012 05:35:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620Ab2H2FfS (ORCPT ); Wed, 29 Aug 2012 01:35:18 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:31664 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750914Ab2H2FfI (ORCPT ); Wed, 29 Aug 2012 01:35:08 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9I00JNM4U7KUL0@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Wed, 29 Aug 2012 14:35:06 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-83-503daa0ae9ca Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 5A.4D.17335.A0AAD305; Wed, 29 Aug 2012 14:35:06 +0900 (KST) Received: from DOJG1HAN02 ([12.23.119.56]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M9I00DOX4UI0WR0@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Wed, 29 Aug 2012 14:35:06 +0900 (KST) From: Jingoo Han To: 'Chris Ball' Cc: linux-mmc@vger.kernel.org, 'Ben Dooks' , 'Jingoo Han' Subject: [PATCH] mmc: sdhci-s3c: fix checkpatch error and warnings Date: Wed, 29 Aug 2012 14:35:06 +0900 Message-id: <002701cd85a8$0c35e130$24a1a390$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac2FqAweN0t6vrP0QeCPfD+PNk5lDA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrELMWRmVeSWpSXmKPExsVy+t9jQV2uVbYBBm9eW1oc+d/P6MDo8XmT XABjFJdNSmpOZllqkb5dAlfG7uMKBYuFKx59vMzUwHiUv4uRk0NCwERiQ/tJJghbTOLCvfVs XYxcHEIC0xklTs8CSYA4M5gkJrZdYQWpYhNQk/jy5TA7iC0ioCix5ftxMJtZIE3i25tvQDUc HMICThLbWypBTBYBVYmpBz1AKngFbCV+77zACmELSvyYfI8FolNLYv3O40wQtrzE5jVvmUFa JQTUJR791YVYpCcxaeoJNogSEYl9L94xTmAUmIVk0iwkk2YhmTQLScsCRpZVjKKpBckFxUnp uYZ6xYm5xaV56XrJ+bmbGMEh+UxqB+PKBotDjAIcjEo8vBe4bQOEWBPLiitzDzFKcDArifA+ NQUK8aYkVlalFuXHF5XmpBYfYpTmYFES5+XvMwwQEkhPLEnNTk0tSC2CyTJxcEo1MDJHMjRl f1PQ+Re9Kb2o9HriIt+9pefmadiHuPJF/k6Zcb9ZV2rK9Gw94322vYc3v9RREtzEsjwmQ23H h+VpFtxXotJnqF/bv8XwscCtInF1F3GZrjNRW5ac2r/e9uTyW5uKVBvqTvdsOxbX/m+xuqqO N5/HrA3cddydbC5fnk3+3hcs/MdIU4mlOCPRUIu5qDgRAB6snnVFAgAA Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This patch fixes the checkpatch error and warnings listed below: ERROR: return is not a function, parentheses are not required WARNING: Prefer pr_err(... to printk(KERN_ERR, ... WARNING: quoted string split across lines WARNING: line over 80 characters WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Jingoo Han Acked-by: Jaehoon Chung --- drivers/mmc/host/sdhci-s3c.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index a50c205..00969ba 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -166,7 +166,7 @@ static unsigned int sdhci_s3c_consider_clock(struct sdhci_s3c *ourhost, dev_dbg(&ourhost->pdev->dev, "clk %d: rate %ld, want %d, got %ld\n", src, rate, wanted, rate / div); - return (wanted - (rate / div)); + return wanted - (rate / div); } /** @@ -288,6 +288,7 @@ static unsigned int sdhci_cmu_get_min_clock(struct sdhci_host *host) static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock) { struct sdhci_s3c *ourhost = to_s3c(host); + struct device *dev = &ourhost->pdev->dev; unsigned long timeout; u16 clk = 0; @@ -309,8 +310,8 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock) while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) & SDHCI_CLOCK_INT_STABLE)) { if (timeout == 0) { - printk(KERN_ERR "%s: Internal clock never " - "stabilised.\n", mmc_hostname(host->mmc)); + dev_err(dev, "%s: Internal clock never stabilised.\n", + mmc_hostname(host->mmc)); return; } timeout--; @@ -404,7 +405,9 @@ static void sdhci_s3c_setup_card_detect_gpio(struct sdhci_s3c *sc) if (sc->ext_cd_irq && request_threaded_irq(sc->ext_cd_irq, NULL, sdhci_s3c_gpio_card_detect_thread, - IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, + IRQF_TRIGGER_RISING | + IRQF_TRIGGER_FALLING | + IRQF_ONESHOT, dev_name(dev), sc) == 0) { int status = gpio_get_value(sc->ext_cd_gpio); if (pdata->ext_cd_gpio_invert) @@ -486,9 +489,8 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) snprintf(name, 14, "mmc_busclk.%d", ptr); clk = clk_get(dev, name); - if (IS_ERR(clk)) { + if (IS_ERR(clk)) continue; - } clks++; sc->clk_bus[ptr] = clk;