All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: most: hdm-usb: convert pr_warn() to dev_warn()
@ 2016-09-19  4:23 Eva Rachel Retuya
  2016-09-19  9:56 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Eva Rachel Retuya @ 2016-09-19  4:23 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel, Eva Rachel Retuya

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

@a@
identifier f, dev;
expression fmt, E;
@@

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

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
 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] 4+ messages in thread

end of thread, other threads:[~2016-09-19 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-19  4:23 [PATCH] staging: most: hdm-usb: convert pr_warn() to dev_warn() Eva Rachel Retuya
2016-09-19  9:56 ` [Outreachy kernel] " Julia Lawall
2016-09-19 13:35   ` Eva Rachel Retuya
2016-09-19 13:37     ` Julia Lawall

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.