From: 白浩文 <baihaowen@meizu.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"masahiroy@kernel.org" <masahiroy@kernel.org>,
"adobriyan@gmail.com" <adobriyan@gmail.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 答复: [PATCH] macintosh: macio-adb: Fix warning comparing pointer to 0
Date: Thu, 17 Mar 2022 09:25:36 +0000 [thread overview]
Message-ID: <1ae49db9e2354e28a80cea49c1bfb4a4@meizu.com> (raw)
In-Reply-To: <0d00b06f-52e5-bd9b-5592-f3c0ae7cc860@csgroup.eu>
Sorry, That's my fault. I've sent again.
________________________________________
发件人: Christophe Leroy <christophe.leroy@csgroup.eu>
发送时间: 2022年3月17日 16:54:16
收件人: 白浩文; benh@kernel.crashing.org; masahiroy@kernel.org; adobriyan@gmail.com
抄送: linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org
主题: Re: [PATCH] macintosh: macio-adb: Fix warning comparing pointer to 0
Le 17/03/2022 à 03:30, Haowen Bai a écrit :
> Avoid pointer type value compared with 0 to make code clear.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
This patch doesn't apply:
Applying patch #1606366 using "git am -s -3 -m"
Description: macintosh: macio-adb: Fix warning comparing pointer to 0
Applying: macintosh: macio-adb: Fix warning comparing pointer to 0
error: corrupt patch at line 37
error: could not build fake ancestor
Patch failed at 0001 macintosh: macio-adb: Fix warning comparing pointer
to 0
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'git am' failed with exit status 128
> ---
> drivers/macintosh/macio-adb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
> index dc634c2..51afa46 100644
> --- a/drivers/macintosh/macio-adb.c
> +++ b/drivers/macintosh/macio-adb.c
> @@ -97,7 +97,7 @@ int macio_init(void)
> unsigned int irq;
>
> adbs = of_find_compatible_node(NULL, "adb", "chrp,adb0");
> - if (adbs == 0)
> + if (!adbs)
> return -ENXIO;
>
> if (of_address_to_resource(adbs, 0, &r)) {
> @@ -180,7 +180,7 @@ static int macio_send_request(struct adb_request *req, int sync)
> req->reply_len = 0;
>
> spin_lock_irqsave(&macio_lock, flags);
> - if (current_req != 0) {
> + if (current_req) {
> last_req->next = req;
> last_req = req;
> } else {
> @@ -210,7 +210,7 @@ static irqreturn_t macio_adb_interrupt(int irq, void *arg)
> spin_lock(&macio_lock);
> if (in_8(&adb->intr.r) & TAG) {
> handled = 1;
> - if ((req = current_req) != 0) {
> + req = current_req;
> + if (req) {
> /* put the current request in */
> for (i = 0; i < req->nbytes; ++i)
> out_8(&adb->data[i].r, req->data[i]);
prev parent reply other threads:[~2022-03-17 9:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 2:30 Haowen Bai
2022-03-17 8:54 ` Christophe Leroy
2022-03-17 9:25 ` 白浩文 [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=1ae49db9e2354e28a80cea49c1bfb4a4@meizu.com \
--to=baihaowen@meizu.com \
--cc=adobriyan@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=masahiroy@kernel.org \
/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®