Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Gustavo Pimentel <Gustavo.Pimentel@synopsys.com>
Cc: linux-pci@vger.kernel.org, bhelgaas@google.com,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>
Subject: Re: [PATCH] [-next] PCI: endpoint: Using plain integer as NULL pointer
Date: Thu, 17 Sep 2020 16:46:18 -0500	[thread overview]
Message-ID: <20200917214618.GA1740746@bjorn-Precision-5520> (raw)
In-Reply-To: <80895f7465719edb3aa259e907acc4bc3217945c.1600378209.git.gustavo.pimentel@synopsys.com>

On Thu, Sep 17, 2020 at 11:30:27PM +0200, Gustavo Pimentel wrote:
> Fixes warning given by executing "make C=2 drivers/pci/"
> 
> Sparse output:
> CHECK   drivers/pci/endpoint/pci-epc-core.c
>  drivers/pci/endpoint/pci-epc-core.c: note: in included file:
>  ./include/linux/pci-ep-cfs.h:22:16: warning:
>  Using plain integer as NULL pointer
> CHECK   drivers/pci/endpoint/pci-epf-core.c
>  drivers/pci/endpoint/pci-epf-core.c: note: in included file:
>  ./include/linux/pci-ep-cfs.h:31:16: warning:
>  Using plain integer as NULL pointer
> 
> Reported-by: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Joao Pinto <jpinto@synopsys.com>
> Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>

I like this one.

Applied to pci/misc for v5.10, thanks!

> ---
>  include/linux/pci-ep-cfs.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/pci-ep-cfs.h b/include/linux/pci-ep-cfs.h
> index f42b0fd..6628813 100644
> --- a/include/linux/pci-ep-cfs.h
> +++ b/include/linux/pci-ep-cfs.h
> @@ -19,7 +19,7 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group);
>  #else
>  static inline struct config_group *pci_ep_cfs_add_epc_group(const char *name)
>  {
> -	return 0;
> +	return NULL;
>  }
>  
>  static inline void pci_ep_cfs_remove_epc_group(struct config_group *group)
> @@ -28,7 +28,7 @@ static inline void pci_ep_cfs_remove_epc_group(struct config_group *group)
>  
>  static inline struct config_group *pci_ep_cfs_add_epf_group(const char *name)
>  {
> -	return 0;
> +	return NULL;
>  }
>  
>  static inline void pci_ep_cfs_remove_epf_group(struct config_group *group)
> -- 
> 2.7.4
> 

      reply	other threads:[~2020-09-17 21:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 21:30 [PATCH] [-next] PCI: endpoint: Using plain integer as NULL pointer Gustavo Pimentel
2020-09-17 21:46 ` Bjorn Helgaas [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=20200917214618.GA1740746@bjorn-Precision-5520 \
    --to=helgaas@kernel.org \
    --cc=Gustavo.Pimentel@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=bhelgaas@google.com \
    --cc=kishon@ti.com \
    --cc=linux-pci@vger.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