From: "Arnd Bergmann" <arnd@arndb.de>
To: cgel.zte@gmail.com, benh@kernel.crashing.org
Cc: Xu Panda <xu.panda@zte.com.cn>, Zeal Robot <zealci@zte.com.cn>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH linux-next] macintosh/windfarm: fix comparing pointer to 0
Date: Sun, 18 Sep 2022 19:45:22 +0200 [thread overview]
Message-ID: <763da949-5eac-4387-aed2-223ced4f9e60@www.fastmail.com> (raw)
In-Reply-To: <20220918155043.210309-1-xu.panda@zte.com.cn>
On Sun, Sep 18, 2022, at 5:50 PM, cgel.zte@gmail.com wrote:
> @@ -970,7 +970,7 @@ static int pm121_init_pm(void)
> const struct smu_sdbp_header *hdr;
>
> hdr = smu_get_sdb_partition(SMU_SDB_SENSORTREE_ID, NULL);
> - if (hdr != 0) {
> + if (hdr != NULL) {
> struct smu_sdbp_sensortree *st =
> (struct smu_sdbp_sensortree *)&hdr[1];
The more common way of writing this in the kernel is
"if (hdr)".
Arnd
prev parent reply other threads:[~2022-09-18 17:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-18 15:50 [PATCH linux-next] macintosh/windfarm: fix comparing pointer to 0 cgel.zte
2022-09-18 17:45 ` Arnd Bergmann [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=763da949-5eac-4387-aed2-223ced4f9e60@www.fastmail.com \
--to=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=cgel.zte@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=xu.panda@zte.com.cn \
--cc=zealci@zte.com.cn \
/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