linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rdma: amso1100: c2_provider: Use netdev_dbg()
@ 2016-02-06 15:11 Amitoj Kaur Chawla
  2016-02-11 16:27 ` Doug Ledford
  0 siblings, 1 reply; 2+ messages in thread
From: Amitoj Kaur Chawla @ 2016-02-06 15:11 UTC (permalink / raw)
  To: dledford, sean.hefty, hal.rosenstock, gregkh, linux-rdma, devel,
	linux-kernel
  Cc: julia.lawall

Replace generic pr_debug() with netdev_dbg() for net devices.

Found using Coccinelle. The semantic patch used to find this is as
follows:

//<smpl>
@@
expression e;
identifier f,i;
position p;
@@

f(...,struct net_device *i,...) {
  ...
-  pr_debug@p(e);
+  netdev_dbg(i, e);
  ...
}
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/staging/rdma/amso1100/c2_provider.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rdma/amso1100/c2_provider.c b/drivers/staging/rdma/amso1100/c2_provider.c
index e44ad22..75a7de5 100644
--- a/drivers/staging/rdma/amso1100/c2_provider.c
+++ b/drivers/staging/rdma/amso1100/c2_provider.c
@@ -659,7 +659,7 @@ static int c2_pseudo_up(struct net_device *netdev)
 	if (!ind)
 		return 0;
 
-	pr_debug("adding...\n");
+	netdev_dbg(netdev, "adding...\n");
 	for_ifa(ind) {
 #ifdef DEBUG
 		u8 *ip = (u8 *) & ifa->ifa_address;
@@ -684,7 +684,7 @@ static int c2_pseudo_down(struct net_device *netdev)
 	if (!ind)
 		return 0;
 
-	pr_debug("deleting...\n");
+	netdev_dbg(netdev, "deleting...\n");
 	for_ifa(ind) {
 #ifdef DEBUG
 		u8 *ip = (u8 *) & ifa->ifa_address;
-- 
1.9.1

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

* Re: [PATCH] rdma: amso1100: c2_provider: Use netdev_dbg()
  2016-02-06 15:11 [PATCH] rdma: amso1100: c2_provider: Use netdev_dbg() Amitoj Kaur Chawla
@ 2016-02-11 16:27 ` Doug Ledford
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Ledford @ 2016-02-11 16:27 UTC (permalink / raw)
  To: Amitoj Kaur Chawla, sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: julia.lawall-L2FTfq7BK8M

[-- Attachment #1: Type: text/plain, Size: 1600 bytes --]

On 02/06/2016 10:11 AM, Amitoj Kaur Chawla wrote:
> Replace generic pr_debug() with netdev_dbg() for net devices.
> 
> Found using Coccinelle. The semantic patch used to find this is as
> follows:
> 
> //<smpl>
> @@
> expression e;
> identifier f,i;
> position p;
> @@
> 
> f(...,struct net_device *i,...) {
>   ...
> -  pr_debug@p(e);
> +  netdev_dbg(i, e);
>   ...
> }
> //</smpl>
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

This driver has been removed entire as of 4.5-rc2, so this patch can no
longer be applied.

> ---
>  drivers/staging/rdma/amso1100/c2_provider.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rdma/amso1100/c2_provider.c b/drivers/staging/rdma/amso1100/c2_provider.c
> index e44ad22..75a7de5 100644
> --- a/drivers/staging/rdma/amso1100/c2_provider.c
> +++ b/drivers/staging/rdma/amso1100/c2_provider.c
> @@ -659,7 +659,7 @@ static int c2_pseudo_up(struct net_device *netdev)
>  	if (!ind)
>  		return 0;
>  
> -	pr_debug("adding...\n");
> +	netdev_dbg(netdev, "adding...\n");
>  	for_ifa(ind) {
>  #ifdef DEBUG
>  		u8 *ip = (u8 *) & ifa->ifa_address;
> @@ -684,7 +684,7 @@ static int c2_pseudo_down(struct net_device *netdev)
>  	if (!ind)
>  		return 0;
>  
> -	pr_debug("deleting...\n");
> +	netdev_dbg(netdev, "deleting...\n");
>  	for_ifa(ind) {
>  #ifdef DEBUG
>  		u8 *ip = (u8 *) & ifa->ifa_address;
> 


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

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

end of thread, other threads:[~2016-02-11 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-06 15:11 [PATCH] rdma: amso1100: c2_provider: Use netdev_dbg() Amitoj Kaur Chawla
2016-02-11 16:27 ` Doug Ledford

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