linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] NTB: EPF: set pointer addr to null using NULL rather than 0
@ 2022-06-23 16:57 Colin Ian King
  2022-06-27 20:28 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2022-06-23 16:57 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas, Jon Mason, Frank Li,
	linux-pci
  Cc: kernel-janitors, linux-kernel

The pointer addr is being set to null using 0. Use NULL instead.

Cleans up sparse warning:
warning: Using plain integer as NULL pointer

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] NTB: EPF: set pointer addr to null using NULL rather than 0
  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
  2022-08-12 14:05   ` Jon Mason
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2022-06-27 20:28 UTC (permalink / raw)
  To: Colin Ian King, Jon Mason
  Cc: Kishon Vijay Abraham I, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas, Frank Li, linux-pci,
	kernel-janitors, linux-kernel

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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] NTB: EPF: set pointer addr to null using NULL rather than 0
  2022-06-27 20:28 ` Bjorn Helgaas
@ 2022-08-12 14:05   ` Jon Mason
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Mason @ 2022-08-12 14:05 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Colin Ian King, Kishon Vijay Abraham I, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas, Frank Li, linux-pci,
	kernel-janitors, linux-kernel

On Mon, Jun 27, 2022 at 03:28:58PM -0500, Bjorn Helgaas wrote:
> 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
> > 

Sorry for the extremely long delay in response.  This series is in my
ntb branch and will be in my pull request for v5.20 which should be
going out later today.

Thanks,
Jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-12 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-08-12 14:05   ` Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).