* [PATCH] [-next] PCI: endpoint: Using plain integer as NULL pointer
@ 2020-09-17 21:30 Gustavo Pimentel
2020-09-17 21:46 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo Pimentel @ 2020-09-17 21:30 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: Gustavo Pimentel, Kishon Vijay Abraham I, Joao Pinto
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [-next] PCI: endpoint: Using plain integer as NULL pointer
2020-09-17 21:30 [PATCH] [-next] PCI: endpoint: Using plain integer as NULL pointer Gustavo Pimentel
@ 2020-09-17 21:46 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2020-09-17 21:46 UTC (permalink / raw)
To: Gustavo Pimentel; +Cc: linux-pci, bhelgaas, Kishon Vijay Abraham I, Joao Pinto
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-17 21:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.