* [PATCH] mmc: sdhci-s3c: fix checkpatch error and warnings
@ 2012-08-29 5:35 Jingoo Han
2012-08-29 6:22 ` Jaehoon Chung
2012-08-29 10:36 ` Chris Ball
0 siblings, 2 replies; 3+ messages in thread
From: Jingoo Han @ 2012-08-29 5:35 UTC (permalink / raw)
To: 'Chris Ball'; +Cc: linux-mmc, 'Ben Dooks', 'Jingoo Han'
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 <jg1.han@samsung.com>
---
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;
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mmc: sdhci-s3c: fix checkpatch error and warnings
2012-08-29 5:35 [PATCH] mmc: sdhci-s3c: fix checkpatch error and warnings Jingoo Han
@ 2012-08-29 6:22 ` Jaehoon Chung
2012-08-29 10:36 ` Chris Ball
1 sibling, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2012-08-29 6:22 UTC (permalink / raw)
To: Jingoo Han; +Cc: 'Chris Ball', linux-mmc, 'Ben Dooks'
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
On 08/29/2012 02:35 PM, Jingoo Han wrote:
> 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 <jg1.han@samsung.com>
> ---
> 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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mmc: sdhci-s3c: fix checkpatch error and warnings
2012-08-29 5:35 [PATCH] mmc: sdhci-s3c: fix checkpatch error and warnings Jingoo Han
2012-08-29 6:22 ` Jaehoon Chung
@ 2012-08-29 10:36 ` Chris Ball
1 sibling, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-08-29 10:36 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-mmc, 'Ben Dooks'
Hi,
On Wed, Aug 29 2012, Jingoo Han wrote:
> 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 <jg1.han@samsung.com>
Thanks, pushed to mmc-next for 3.7 with Jaehoon's ACK.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-29 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29 5:35 [PATCH] mmc: sdhci-s3c: fix checkpatch error and warnings Jingoo Han
2012-08-29 6:22 ` Jaehoon Chung
2012-08-29 10:36 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox