All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: most: hdm-usb: convert pr_warn() to dev_warn()
@ 2016-09-20  3:09 Eva Rachel Retuya
  0 siblings, 0 replies; only message in thread
From: Eva Rachel Retuya @ 2016-09-20  3:09 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, Eva Rachel Retuya

Replace pr_warn() call with its respective dev_warn() counterpart.
Semantic patch used to detect and apply the transformation:

@a@
identifier dev;
expression E;
@@

	struct device *dev = E;
	<+... when != dev == NULL
- pr_warn(
+ dev_warn(dev,
		...);
	...+>

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
Change in v2:
* amend coccinelle script to drop unnecessary matching statements

 drivers/staging/most/hdm-usb/hdm_usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 5b27e96..6fc20b1 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -1315,8 +1315,8 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
 				  ep_desc->bEndpointAddress * 16,
 				  1);
 		if (err < 0)
-			pr_warn("DCI Sync for EP %02x failed",
-				ep_desc->bEndpointAddress);
+			dev_warn(dev, "DCI Sync for EP %02x failed",
+				 ep_desc->bEndpointAddress);
 	}
 	dev_notice(dev, "claimed gadget: Vendor=%4.4x ProdID=%4.4x Bus=%02x Device=%02x\n",
 		   le16_to_cpu(usb_dev->descriptor.idVendor),
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-20  3:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20  3:09 [PATCH v2] staging: most: hdm-usb: convert pr_warn() to dev_warn() Eva Rachel Retuya

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.