From: Andrew Morton <akpm@linux-foundation.org>
To: "G.Shark Jeong" <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
Daniel Jeong <daniel.jeong@ti.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]backlight: lm3639: fix coccinelle warning.
Date: Thu, 8 Nov 2012 12:27:24 -0800 [thread overview]
Message-ID: <20121108122724.d602a134.akpm@linux-foundation.org> (raw)
In-Reply-To: <1352357089-4819-1-git-send-email-gshark.jeong@gmail.com>
On Thu, 8 Nov 2012 15:44:49 +0900
"G.Shark Jeong" <gshark.jeong@gmail.com> wrote:
> From: "G.Shark Jeong" <gshark.jeong@gmail.com>
>
> Fix coccinelle warning.
Please always quote the warning or error message text in the changelog
when fixing an error or warning.
> diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c
> index 585949b..868a9da 100644
> --- a/drivers/video/backlight/lm3639_bl.c
> +++ b/drivers/video/backlight/lm3639_bl.c
> @@ -403,9 +403,9 @@ static int __devexit lm3639_remove(struct i2c_client *client)
>
> regmap_write(pchip->regmap, REG_ENABLE, 0x00);
>
> - if (&pchip->cdev_torch)
> + if ((&pchip->cdev_torch)!=NULL)
> led_classdev_unregister(&pchip->cdev_torch);
> - if (&pchip->cdev_flash)
> + if ((&pchip->cdev_flash)!=NULL)
Please use scripts/checkpatch.pl.
This code is just pointless. The expression "&anything" will never
evaluate to NULL.
prev parent reply other threads:[~2012-11-08 20:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 6:44 G.Shark Jeong
2012-11-08 20:27 ` Andrew Morton [this message]
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=20121108122724.d602a134.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=daniel.jeong@ti.com \
--cc=gshark.jeong@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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
all inboxes | Powered by JetHome®