From: Bjorn Helgaas <helgaas@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>, Jon Mason <jdmason@kudzu.us>
Cc: "Kishon Vijay Abraham I" <kishon@ti.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Frank Li" <Frank.Li@nxp.com>,
linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] NTB: EPF: set pointer addr to null using NULL rather than 0
Date: Mon, 27 Jun 2022 15:28:58 -0500 [thread overview]
Message-ID: <20220627202858.GA1776067@bhelgaas> (raw)
In-Reply-To: <20220623165709.77229-1-colin.i.king@gmail.com>
On Thu, Jun 23, 2022 at 05:57:09PM +0100, Colin Ian King wrote:
> The pointer addr is being set to null using 0. Use NULL instead.
>
> Cleans up sparse warning:
> warning: Using plain integer as NULL pointer
Another one for Jon; fixes this commit:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ff32fac00d97
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/pci/endpoint/functions/pci-epf-vntb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
> index ebf7e243eefa..fb31c868af6a 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
> @@ -605,7 +605,7 @@ static int epf_ntb_mw_bar_init(struct epf_ntb *ntb)
>
> ntb->epf->bar[barno].barno = barno;
> ntb->epf->bar[barno].size = size;
> - ntb->epf->bar[barno].addr = 0;
> + ntb->epf->bar[barno].addr = NULL;
> ntb->epf->bar[barno].phys_addr = 0;
> ntb->epf->bar[barno].flags |= upper_32_bits(size) ?
> PCI_BASE_ADDRESS_MEM_TYPE_64 :
> --
> 2.35.3
>
next prev parent reply other threads:[~2022-06-27 20:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 16:57 [PATCH][next] NTB: EPF: set pointer addr to null using NULL rather than 0 Colin Ian King
2022-06-27 20:28 ` Bjorn Helgaas [this message]
2022-08-12 14:05 ` Jon Mason
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=20220627202858.GA1776067@bhelgaas \
--to=helgaas@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=colin.i.king@gmail.com \
--cc=jdmason@kudzu.us \
--cc=kernel-janitors@vger.kernel.org \
--cc=kishon@ti.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@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