linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: Replace kmalloc with kzalloc in the comment/message
@ 2020-07-09  7:28 Yi Wang
  2020-07-09 21:05 ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Yi Wang @ 2020-07-09  7:28 UTC (permalink / raw)
  To: bhelgaas
  Cc: linux-pci, linux-kernel, xue.zhihong, wang.yi59, wang.liang82,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Use kzalloc instead of kmalloc in the comment/message according to
the previous kzalloc() call.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
 drivers/pci/hotplug/ibmphp_pci.c | 2 +-
 drivers/pci/setup-bus.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index e22d023..2d36992 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -205,7 +205,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
 								cur_func->next = newfunc;
 
 							rc = ibmphp_configure_card(newfunc, slotno);
-							/* This could only happen if kmalloc failed */
+							/* This could only happen if kzalloc failed */
 							if (rc) {
 								/* We need to do this in case bridge itself got configured properly, but devices behind it failed */
 								func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index bbcef1a..13c5a44 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -151,7 +151,7 @@ static void pdev_sort_resources(struct pci_dev *dev, struct list_head *head)
 
 		tmp = kzalloc(sizeof(*tmp), GFP_KERNEL);
 		if (!tmp)
-			panic("pdev_sort_resources(): kmalloc() failed!\n");
+			panic("%s: kzalloc() failed!\n", __func__);
 		tmp->res = r;
 		tmp->dev = dev;
 
-- 
2.9.5


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

* Re: [PATCH] PCI: Replace kmalloc with kzalloc in the comment/message
  2020-07-09  7:28 [PATCH] PCI: Replace kmalloc with kzalloc in the comment/message Yi Wang
@ 2020-07-09 21:05 ` Bjorn Helgaas
  0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2020-07-09 21:05 UTC (permalink / raw)
  To: Yi Wang
  Cc: bhelgaas, linux-pci, linux-kernel, xue.zhihong, wang.liang82,
	Liao Pingfang

On Thu, Jul 09, 2020 at 03:28:28PM +0800, Yi Wang wrote:
> From: Liao Pingfang <liao.pingfang@zte.com.cn>
> 
> Use kzalloc instead of kmalloc in the comment/message according to
> the previous kzalloc() call.
> 
> Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>

I applied the setup-bus.c change to pci/misc for v5.9, thanks!

I dropped the ibmphp_pci.c comment change because (a) it's not clear
the comment is correct even after the change, and (b) that file is so
out-of-date and hard to read that I don't want to touch it unless
we're really fixing something significant.

> ---
>  drivers/pci/hotplug/ibmphp_pci.c | 2 +-
>  drivers/pci/setup-bus.c          | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
> index e22d023..2d36992 100644
> --- a/drivers/pci/hotplug/ibmphp_pci.c
> +++ b/drivers/pci/hotplug/ibmphp_pci.c
> @@ -205,7 +205,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
>  								cur_func->next = newfunc;
>  
>  							rc = ibmphp_configure_card(newfunc, slotno);
> -							/* This could only happen if kmalloc failed */
> +							/* This could only happen if kzalloc failed */
>  							if (rc) {
>  								/* We need to do this in case bridge itself got configured properly, but devices behind it failed */
>  								func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index bbcef1a..13c5a44 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -151,7 +151,7 @@ static void pdev_sort_resources(struct pci_dev *dev, struct list_head *head)
>  
>  		tmp = kzalloc(sizeof(*tmp), GFP_KERNEL);
>  		if (!tmp)
> -			panic("pdev_sort_resources(): kmalloc() failed!\n");
> +			panic("%s: kzalloc() failed!\n", __func__);
>  		tmp->res = r;
>  		tmp->dev = dev;
>  
> -- 
> 2.9.5
> 

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

* Re: [PATCH] PCI: Replace kmalloc with kzalloc in the comment/message
       [not found] <202007081722099680673@zte.com.cn>
@ 2020-07-08 15:29 ` Bjorn Helgaas
  0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2020-07-08 15:29 UTC (permalink / raw)
  To: wang.yi59
  Cc: bhelgaas, linux-pci, linux-kernel, xue.zhihong, wang.liang82,
	liao.pingfang

On Wed, Jul 08, 2020 at 05:22:09PM +0800, wang.yi59@zte.com.cn wrote:
> Hi Bjorn,
> 
> Thanks for your review and patience on the datails :)
> 
> > On Fri, May 29, 2020 at 09:01:59AM +0800, Yi Wang wrote:
> > > From: Liao Pingfang <liao.pingfang@zte.com.cn>
> > >
> > > Use kzalloc instead of kmalloc in the comment/message according to
> > > the previous kzalloc() call.
> > >
> > > Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
> >
> > I would be happy to apply this, but this needs to show a connection
> > between Liao Pingfang and Yi Wang.
> >
> > Ideally this patch would be sent directly by Liao Pingfang.  The
> > sender should at least appear in the Signed-off-by chain.  See
> > Documentation/process/submitting-patches.rst
> 
> According to our company security policy, only a few people have
> access to send email outside of company, so this patch is sent by
> Yi Wang and the author is Liao Pingfang actually.

Please take a look at Documentation/process/submitting-patches.rst.
Specifically, it says:

  Notably, the last Signed-off-by: must always be that of the
  developer submitting the patch.

You are submitting the patch, but you didn't add a Signed-off-by.

Of course, adding your Signed-off-by means you are agreeing to the
"Developer's Certificate of Origin" (also in that file), which tells
me that the patch is licensed correctly and that you have the right to
submit it.

In addition, your signed-off-by means that if there are issues with
the patch, I will look to you (and Liao Pingfang, obviously) to help
resolve them.

So if that is all acceptable to you, just post this again with your
own signed-off-by below Liao Pingfang's.

Bjorn

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

* Re: [PATCH] PCI: Replace kmalloc with kzalloc in the comment/message
  2020-05-29  1:01 Yi Wang
@ 2020-07-07 22:26 ` Bjorn Helgaas
  0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2020-07-07 22:26 UTC (permalink / raw)
  To: Yi Wang
  Cc: bhelgaas, linux-pci, linux-kernel, xue.zhihong, wang.liang82,
	Liao Pingfang

On Fri, May 29, 2020 at 09:01:59AM +0800, Yi Wang wrote:
> From: Liao Pingfang <liao.pingfang@zte.com.cn>
> 
> Use kzalloc instead of kmalloc in the comment/message according to
> the previous kzalloc() call.
> 
> Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>

I would be happy to apply this, but this needs to show a connection
between Liao Pingfang and Yi Wang.

Ideally this patch would be sent directly by Liao Pingfang.  The
sender should at least appear in the Signed-off-by chain.  See
Documentation/process/submitting-patches.rst

> ---
>  drivers/pci/hotplug/ibmphp_pci.c | 2 +-
>  drivers/pci/setup-bus.c          | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
> index e22d023..2d36992 100644
> --- a/drivers/pci/hotplug/ibmphp_pci.c
> +++ b/drivers/pci/hotplug/ibmphp_pci.c
> @@ -205,7 +205,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
>  								cur_func->next = newfunc;
>  
>  							rc = ibmphp_configure_card(newfunc, slotno);
> -							/* This could only happen if kmalloc failed */
> +							/* This could only happen if kzalloc failed */
>  							if (rc) {
>  								/* We need to do this in case bridge itself got configured properly, but devices behind it failed */
>  								func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index bbcef1a..13c5a44 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -151,7 +151,7 @@ static void pdev_sort_resources(struct pci_dev *dev, struct list_head *head)
>  
>  		tmp = kzalloc(sizeof(*tmp), GFP_KERNEL);
>  		if (!tmp)
> -			panic("pdev_sort_resources(): kmalloc() failed!\n");
> +			panic("%s: kzalloc() failed!\n", __func__);
>  		tmp->res = r;
>  		tmp->dev = dev;
>  
> -- 
> 2.9.5
> 

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

* [PATCH] PCI: Replace kmalloc with kzalloc in the comment/message
@ 2020-05-29  1:01 Yi Wang
  2020-07-07 22:26 ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Yi Wang @ 2020-05-29  1:01 UTC (permalink / raw)
  To: bhelgaas
  Cc: linux-pci, linux-kernel, xue.zhihong, wang.yi59, wang.liang82,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Use kzalloc instead of kmalloc in the comment/message according to
the previous kzalloc() call.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
---
 drivers/pci/hotplug/ibmphp_pci.c | 2 +-
 drivers/pci/setup-bus.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index e22d023..2d36992 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -205,7 +205,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
 								cur_func->next = newfunc;
 
 							rc = ibmphp_configure_card(newfunc, slotno);
-							/* This could only happen if kmalloc failed */
+							/* This could only happen if kzalloc failed */
 							if (rc) {
 								/* We need to do this in case bridge itself got configured properly, but devices behind it failed */
 								func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index bbcef1a..13c5a44 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -151,7 +151,7 @@ static void pdev_sort_resources(struct pci_dev *dev, struct list_head *head)
 
 		tmp = kzalloc(sizeof(*tmp), GFP_KERNEL);
 		if (!tmp)
-			panic("pdev_sort_resources(): kmalloc() failed!\n");
+			panic("%s: kzalloc() failed!\n", __func__);
 		tmp->res = r;
 		tmp->dev = dev;
 
-- 
2.9.5


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

end of thread, other threads:[~2020-07-09 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09  7:28 [PATCH] PCI: Replace kmalloc with kzalloc in the comment/message Yi Wang
2020-07-09 21:05 ` Bjorn Helgaas
     [not found] <202007081722099680673@zte.com.cn>
2020-07-08 15:29 ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2020-05-29  1:01 Yi Wang
2020-07-07 22:26 ` Bjorn Helgaas

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).