diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 85410a2214da..5aae319198fa 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -357,7 +357,7 @@ int dwc3_event_buffers_setup(struct dwc3 *dwc) for (n = 0; n < dwc->num_event_buffers; n++) { evt = dwc->ev_buffs[n]; - dev_dbg(dwc->dev, "Event buf %p dma %08llx length %d\n", + dev_dbg(dwc->dev, "Event buf %pK dma %08llx length %d\n", evt->buf, (unsigned long long) evt->dma, evt->length); diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c index 9f67de3cc9e8..4b4978043d50 100644 --- a/drivers/usb/dwc3/debugfs.c +++ b/drivers/usb/dwc3/debugfs.c @@ -672,7 +672,7 @@ static int dwc3_ep_req_list_show(struct seq_file *s, void *unused) req = list_entry(ptr, struct dwc3_request, list); seq_printf(s, - "req:0x%p len: %d sts: %d dma:0x%pa num_sgs: %d\n", + "req:0x%pK len: %d sts: %d dma:0x%pa num_sgs: %d\n", req, req->request.length, req->request.status, &req->request.dma, req->request.num_sgs); } @@ -711,7 +711,7 @@ static int dwc3_ep_queued_req_show(struct seq_file *s, void *unused) req = list_entry(ptr, struct dwc3_request, list); seq_printf(s, - "req:0x%p len:%d sts:%d dma:%pa nsg:%d trb:0x%p\n", + "req:0x%pK len:%d sts:%d dma:%pa nsg:%d trb:0x%pK\n", req, req->request.length, req->request.status, &req->request.dma, req->request.num_sgs, req->trb); } @@ -751,7 +751,7 @@ static int dwc3_ep_trbs_show(struct seq_file *s, void *unused) dep->name, dep->flags, dep->free_slot, dep->busy_slot); for (j = 0; j < DWC3_TRB_NUM; j++) { trb = &dep->trb_pool[j]; - seq_printf(s, "trb:0x%p bph:0x%x bpl:0x%x size:0x%x ctrl: %x\n", + seq_printf(s, "trb:0x%pK bph:0x%x bpl:0x%x size:0x%x ctrl: %x\n", trb, trb->bph, trb->bpl, trb->size, trb->ctrl); } spin_unlock_irqrestore(&dwc->lock, flags); diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c index db74e4f4f4d9..5c451f8a6827 100644 --- a/drivers/usb/dwc3/dwc3-msm.c +++ b/drivers/usb/dwc3/dwc3-msm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -723,7 +723,7 @@ static int dwc3_msm_ep_queue(struct usb_ep *ep, list_add_tail(&req_complete->list_item, &mdwc->req_complete_list); request->complete = dwc3_msm_req_complete_func; - dev_vdbg(dwc->dev, "%s: queing request %p to ep %s length %d\n", + dev_vdbg(dwc->dev, "%s: queing request %pK to ep %s length %d\n", __func__, request, ep->name, request->length); size = dwc3_msm_read_reg(mdwc->base, DWC3_GEVNTSIZ(0)); dbm_event_buffer_config(mdwc->dbm, @@ -908,7 +908,7 @@ static void gsi_ring_in_db(struct usb_ep *ep, struct usb_gsi_request *request) dev_dbg(mdwc->dev, "Failed to get GSI DBL address MSB\n"); offset = dwc3_trb_dma_offset(dep, &dep->trb_pool[num_trbs-1]); - dev_dbg(mdwc->dev, "Writing link TRB addr: %pa to %p (%x)\n", + dev_dbg(mdwc->dev, "Writing link TRB addr: %pa to %pK (%x)\n", &offset, gsi_dbl_address_lsb, dbl_lo_addr); writel_relaxed(offset, gsi_dbl_address_lsb); diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 4ee0faa87cff..2b910e09a80a 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -240,7 +240,7 @@ int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request, spin_lock_irqsave(&dwc->lock, flags); if (!dep->endpoint.desc) { dwc3_trace(trace_dwc3_ep0, - "trying to queue request %p to disabled %s", + "trying to queue request %pK to disabled %s", request, dep->name); ret = -ESHUTDOWN; goto out; @@ -253,7 +253,7 @@ int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request, } dwc3_trace(trace_dwc3_ep0, - "queueing request %p to %s length %d state '%s'", + "queueing request %pK to %s length %d state '%s'", request, dep->name, request->length, dwc3_ep0_state_string(dwc->ep0state)); diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 6852df4f7d1f..e2440b7efc58 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -291,7 +291,7 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, usb_gadget_unmap_request(&dwc->gadget, &req->request, req->direction); - dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n", + dev_dbg(dwc->dev, "request %pK from %s completed %d/%d ===> %d\n", req, dep->name, req->request.actual, req->request.length, status); trace_dwc3_gadget_giveback(req); @@ -760,7 +760,7 @@ static int dwc3_gadget_ep_enable(struct usb_ep *ep, int ret; if (!ep || !desc || desc->bDescriptorType != USB_DT_ENDPOINT) { - pr_debug("dwc3: invalid parameters. ep=%p, desc=%p, DT=%d\n", + pr_debug("dwc3: invalid parameters. ep=%pK, desc=%pK, DT=%d\n", ep, desc, desc ? desc->bDescriptorType : 0); return -EINVAL; } @@ -855,7 +855,7 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep, { struct dwc3_trb *trb; - dwc3_trace(trace_dwc3_gadget, "%s: req %p dma %08llx length %d%s%s", + dwc3_trace(trace_dwc3_gadget, "%s: req %pK dma %08llx length %d%s%s", dep->name, req, (unsigned long long) dma, length, last ? " last" : "", chain ? " chain" : ""); @@ -1200,7 +1200,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) if (req->request.status == -EINPROGRESS) { ret = -EBUSY; - dev_err(dwc->dev, "%s: %p request already in queue", + dev_err(dwc->dev, "%s: %pK request already in queue", dep->name, req); return ret; } @@ -1344,13 +1344,13 @@ static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request, spin_lock_irqsave(&dwc->lock, flags); if (!dep->endpoint.desc) { - dev_dbg(dwc->dev, "trying to queue request %p to disabled %s\n", + dev_dbg(dwc->dev, "trying to queue request %pK to disabled %s\n", request, ep->name); ret = -ESHUTDOWN; goto out; } - if (WARN(req->dep != dep, "request %p belongs to '%s'\n", + if (WARN(req->dep != dep, "request %pK belongs to '%s'\n", request, req->dep->name)) { ret = -EINVAL; goto out; @@ -1421,7 +1421,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, dwc3_stop_active_transfer(dwc, dep->number, true); goto out1; } - dev_err(dwc->dev, "request %p was not queued to %s\n", + dev_err(dwc->dev, "request %pK was not queued to %s\n", request, ep->name); ret = -EINVAL; goto out0; @@ -2334,7 +2334,7 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep, * would help. Lets hope that if this occurs, someone * fixes the root cause instead of looking away :) */ - dev_err(dwc->dev, "%s's TRB (%p) still owned by HW\n", + dev_err(dwc->dev, "%s's TRB (%pK) still owned by HW\n", dep->name, trb); count = trb->size & DWC3_TRB_SIZE_MASK; diff --git a/drivers/usb/dwc3/io.h b/drivers/usb/dwc3/io.h index 6a79c8e66bbc..d797eb8728de 100644 --- a/drivers/usb/dwc3/io.h +++ b/drivers/usb/dwc3/io.h @@ -41,7 +41,7 @@ static inline u32 dwc3_readl(void __iomem *base, u32 offset) * documentation, so we revert it back to the proper addresses, the * same way they are described on SNPS documentation */ - dwc3_trace(trace_dwc3_readl, "addr %p value %08x", + dwc3_trace(trace_dwc3_readl, "addr %pK value %08x", base - DWC3_GLOBALS_REGS_START + offset, value); return value; @@ -63,7 +63,7 @@ static inline void dwc3_writel(void __iomem *base, u32 offset, u32 value) * documentation, so we revert it back to the proper addresses, the * same way they are described on SNPS documentation */ - dwc3_trace(trace_dwc3_writel, "addr %p value %08x", + dwc3_trace(trace_dwc3_writel, "addr %pK value %08x", base - DWC3_GLOBALS_REGS_START + offset, value); } diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h index 9c10669ab91f..225b2d4f9ecd 100644 --- a/drivers/usb/dwc3/trace.h +++ b/drivers/usb/dwc3/trace.h @@ -125,7 +125,7 @@ DECLARE_EVENT_CLASS(dwc3_log_request, __entry->length = req->request.length; __entry->status = req->request.status; ), - TP_printk("%s: req %p length %u/%u ==> %d", + TP_printk("%s: req %pK length %u/%u ==> %d", __get_str(name), __entry->req, __entry->actual, __entry->length, __entry->status ) @@ -228,7 +228,7 @@ DECLARE_EVENT_CLASS(dwc3_log_trb, __entry->size = trb->size; __entry->ctrl = trb->ctrl; ), - TP_printk("%s: trb %p bph %08x bpl %08x size %08x ctrl %08x", + TP_printk("%s: trb %pK bph %08x bpl %08x size %08x ctrl %08x", __get_str(name), __entry->trb, __entry->bph, __entry->bpl, __entry->size, __entry->ctrl ) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 04985ccbbe6d..a53b23789d7a 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -216,7 +216,7 @@ int usb_add_function(struct usb_configuration *config, { int value = -EINVAL; - DBG(config->cdev, "adding '%s'/%p to config '%s'/%p\n", + DBG(config->cdev, "adding '%s'/%pK to config '%s'/%pK\n", function->name, function, config->label, config); @@ -257,7 +257,7 @@ int usb_add_function(struct usb_configuration *config, done: if (value) - DBG(config->cdev, "adding '%s'/%p --> %d\n", + DBG(config->cdev, "adding '%s'/%pK --> %d\n", function->name, function, value); return value; } @@ -854,7 +854,7 @@ static int set_config(struct usb_composite_dev *cdev, result = f->set_alt(f, tmp, 0); if (result < 0) { - DBG(cdev, "interface %d (%s/%p) alt 0 --> %d\n", + DBG(cdev, "interface %d (%s/%pK) alt 0 --> %d\n", tmp, f->name, f, result); reset_config(cdev); @@ -927,7 +927,7 @@ int usb_add_config(struct usb_composite_dev *cdev, if (!bind) goto done; - DBG(cdev, "adding config #%u '%s'/%p\n", + DBG(cdev, "adding config #%u '%s'/%pK\n", config->bConfigurationValue, config->label, config); @@ -944,7 +944,7 @@ int usb_add_config(struct usb_composite_dev *cdev, struct usb_function, list); list_del(&f->list); if (f->unbind) { - DBG(cdev, "unbind function '%s'/%p\n", + DBG(cdev, "unbind function '%s'/%pK\n", f->name, f); f->unbind(config, f); /* may free memory for "f" */ @@ -955,7 +955,7 @@ int usb_add_config(struct usb_composite_dev *cdev, } else { unsigned i; - DBG(cdev, "cfg %d/%p speeds:%s%s%s\n", + DBG(cdev, "cfg %d/%pK speeds:%s%s%s\n", config->bConfigurationValue, config, config->superspeed ? " super" : "", config->highspeed ? " high" : "", @@ -970,7 +970,7 @@ int usb_add_config(struct usb_composite_dev *cdev, if (!f) continue; - DBG(cdev, " interface %d = %s/%p\n", + DBG(cdev, " interface %d = %s/%pK\n", i, f->name, f); } } @@ -996,14 +996,14 @@ static void remove_config(struct usb_composite_dev *cdev, struct usb_function, list); list_del(&f->list); if (f->unbind) { - DBG(cdev, "unbind function '%s'/%p\n", f->name, f); + DBG(cdev, "unbind function '%s'/%pK\n", f->name, f); f->unbind(config, f); /* may free memory for "f" */ } } list_del(&config->list); if (config->unbind) { - DBG(cdev, "unbind config '%s'/%p\n", config->label, config); + DBG(cdev, "unbind config '%s'/%pK\n", config->label, config); config->unbind(config); /* may free memory for "c" */ } @@ -1411,7 +1411,7 @@ static void composite_setup_complete(struct usb_ep *ep, struct usb_request *req) else if (cdev->os_desc_req == req) cdev->os_desc_pending = false; else - WARN(1, "unknown request %p\n", req); + WARN(1, "unknown request %pK\n", req); } static int composite_ep0_queue(struct usb_composite_dev *cdev, @@ -1426,7 +1426,7 @@ static int composite_ep0_queue(struct usb_composite_dev *cdev, else if (cdev->os_desc_req == req) cdev->os_desc_pending = true; else - WARN(1, "unknown request %p\n", req); + WARN(1, "unknown request %pK\n", req); } return ret; diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index be29dc4bef89..4964bb1a24b1 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -1257,7 +1257,7 @@ static void purge_configs_funcs(struct gadget_info *gi) list_move_tail(&f->list, &cfg->func_list); if (f->unbind) { dev_err(&gi->cdev.gadget->dev, "unbind function" - " '%s'/%p\n", f->name, f); + " '%s'/%pK\n", f->name, f); f->unbind(c, f); } } @@ -1458,7 +1458,7 @@ static void android_work(struct work_struct *data) } if (!uevent_sent) { - pr_info("%s: did not send uevent (%d %d %p)\n", __func__, + pr_info("%s: did not send uevent (%d %d %pK)\n", __func__, gi->connected, gi->sw_connected, cdev->config); } } diff --git a/drivers/usb/gadget/function/f_accessory.c b/drivers/usb/gadget/function/f_accessory.c index 013a9d6702db..61057befc136 100644 --- a/drivers/usb/gadget/function/f_accessory.c +++ b/drivers/usb/gadget/function/f_accessory.c @@ -555,7 +555,7 @@ static int create_bulk_endpoints(struct acc_dev *dev, struct usb_ep *ep; int i; - DBG(cdev, "create_bulk_endpoints dev: %p\n", dev); + DBG(cdev, "create_bulk_endpoints dev: %pK\n", dev); ep = usb_ep_autoconfig(cdev->gadget, in_desc); if (!ep) { @@ -646,7 +646,7 @@ requeue_req: r = -EIO; goto done; } else { - pr_debug("rx %p queue\n", req); + pr_debug("rx %pK queue\n", req); } /* wait for a request to complete */ @@ -669,7 +669,7 @@ copy_data: if (req->actual == 0) goto requeue_req; - pr_debug("rx %p %u\n", req, req->actual); + pr_debug("rx %pK %u\n", req, req->actual); xfer = (req->actual < count) ? req->actual : count; r = xfer; if (copy_to_user(buf, req->buf, xfer)) @@ -969,7 +969,7 @@ __acc_function_bind(struct usb_configuration *c, int id; int ret; - DBG(cdev, "acc_function_bind dev: %p\n", dev); + DBG(cdev, "acc_function_bind dev: %pK\n", dev); if (configfs) { if (acc_string_defs[INTERFACE_STRING_INDEX].id == 0) { @@ -1151,7 +1151,7 @@ static void acc_hid_work(struct work_struct *data) list_for_each_safe(entry, temp, &new_list) { hid = list_entry(entry, struct acc_hid_dev, list); if (acc_hid_init(hid)) { - pr_err("can't add HID device %p\n", hid); + pr_err("can't add HID device %pK\n", hid); acc_hid_delete(hid); } else { spin_lock_irqsave(&dev->lock, flags); diff --git a/drivers/usb/gadget/function/f_acm.c b/drivers/usb/gadget/function/f_acm.c index 2fa1e80a3ce7..651e4afe0520 100644 --- a/drivers/usb/gadget/function/f_acm.c +++ b/drivers/usb/gadget/function/f_acm.c @@ -702,7 +702,7 @@ fail: if (acm->notify_req) gs_free_req(acm->notify, acm->notify_req); - ERROR(cdev, "%s/%p: can't bind, err %d\n", f->name, f, status); + ERROR(cdev, "%s/%pK: can't bind, err %d\n", f->name, f, status); return status; } diff --git a/drivers/usb/gadget/function/f_cdev.c b/drivers/usb/gadget/function/f_cdev.c index 3b7b23cfde44..d45f4be4a075 100644 --- a/drivers/usb/gadget/function/f_cdev.c +++ b/drivers/usb/gadget/function/f_cdev.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2013-2017, The Linux Foundation. All rights reserved. * Linux Foundation chooses to take subject only to the GPLv2 license terms, * and distributes only under these terms. * @@ -846,7 +846,7 @@ static int usb_cser_alloc_requests(struct usb_ep *ep, struct list_head *head, int i; struct usb_request *req; - pr_debug("ep:%p head:%p num:%d size:%d cb:%p", + pr_debug("ep:%pK head:%pK num:%d size:%d cb:%pK", ep, head, num, size, cb); for (i = 0; i < num; i++) { @@ -896,7 +896,7 @@ static void usb_cser_start_rx(struct f_cdev *port) ret = usb_ep_queue(ep, req, GFP_KERNEL); spin_lock_irqsave(&port->port_lock, flags); if (ret) { - pr_err("port(%d):%p usb ep(%s) queue failed\n", + pr_err("port(%d):%pK usb ep(%s) queue failed\n", port->port_num, port, ep->name); list_add(&req->list, pool); break; @@ -911,7 +911,7 @@ static void usb_cser_read_complete(struct usb_ep *ep, struct usb_request *req) struct f_cdev *port = ep->driver_data; unsigned long flags; - pr_debug("ep:(%p)(%s) port:%p req_status:%d req->actual:%u\n", + pr_debug("ep:(%pK)(%s) port:%pK req_status:%d req->actual:%u\n", ep, ep->name, port, req->status, req->actual); if (!port) { pr_err("port is null\n"); @@ -938,7 +938,7 @@ static void usb_cser_write_complete(struct usb_ep *ep, struct usb_request *req) unsigned long flags; struct f_cdev *port = ep->driver_data; - pr_debug("ep:(%p)(%s) port:%p req_stats:%d\n", + pr_debug("ep:(%pK)(%s) port:%pK req_stats:%d\n", ep, ep->name, port, req->status); if (!port) { @@ -973,7 +973,7 @@ static void usb_cser_start_io(struct f_cdev *port) int ret = -ENODEV; unsigned long flags; - pr_debug("port: %p\n", port); + pr_debug("port: %pK\n", port); spin_lock_irqsave(&port->port_lock, flags); if (!port->is_connected) @@ -1016,7 +1016,7 @@ static void usb_cser_stop_io(struct f_cdev *port) struct usb_ep *out; unsigned long flags; - pr_debug("port:%p\n", port); + pr_debug("port:%pK\n", port); in = port->port_usb.in; out = port->port_usb.out; @@ -1059,7 +1059,7 @@ int f_cdev_open(struct inode *inode, struct file *file) } file->private_data = port; - pr_debug("opening port(%s)(%p)\n", port->name, port); + pr_debug("opening port(%s)(%pK)\n", port->name, port); ret = wait_event_interruptible(port->open_wq, port->is_connected); if (ret) { @@ -1072,7 +1072,7 @@ int f_cdev_open(struct inode *inode, struct file *file) spin_unlock_irqrestore(&port->port_lock, flags); usb_cser_start_rx(port); - pr_debug("port(%s)(%p) open is success\n", port->name, port); + pr_debug("port(%s)(%pK) open is success\n", port->name, port); return 0; } @@ -1092,7 +1092,7 @@ int f_cdev_release(struct inode *inode, struct file *file) port->port_open = false; port->cbits_updated = false; spin_unlock_irqrestore(&port->port_lock, flags); - pr_debug("port(%s)(%p) is closed.\n", port->name, port); + pr_debug("port(%s)(%pK) is closed.\n", port->name, port); return 0; } @@ -1116,7 +1116,7 @@ ssize_t f_cdev_read(struct file *file, return -EINVAL; } - pr_debug("read on port(%s)(%p) count:%zu\n", port->name, port, count); + pr_debug("read on port(%s)(%pK) count:%zu\n", port->name, port, count); spin_lock_irqsave(&port->port_lock, flags); current_rx_req = port->current_rx_req; pending_rx_bytes = port->pending_rx_bytes; @@ -1217,7 +1217,7 @@ ssize_t f_cdev_write(struct file *file, } spin_lock_irqsave(&port->port_lock, flags); - pr_debug("write on port(%s)(%p)\n", port->name, port); + pr_debug("write on port(%s)(%pK)\n", port->name, port); if (!port->is_connected) { spin_unlock_irqrestore(&port->port_lock, flags); @@ -1386,7 +1386,7 @@ static long f_cdev_ioctl(struct file *fp, unsigned cmd, case TIOCMBIC: case TIOCMBIS: case TIOCMSET: - pr_debug("TIOCMSET on port(%s)%p\n", port->name, port); + pr_debug("TIOCMSET on port(%s)%pK\n", port->name, port); i = get_user(val, (uint32_t *)arg); if (i) { pr_err("Error getting TIOCMSET value\n"); @@ -1395,7 +1395,7 @@ static long f_cdev_ioctl(struct file *fp, unsigned cmd, ret = f_cdev_tiocmset(port, val, ~val); break; case TIOCMGET: - pr_debug("TIOCMGET on port(%s)%p\n", port->name, port); + pr_debug("TIOCMGET on port(%s)%pK\n", port->name, port); ret = f_cdev_tiocmget(port); if (ret >= 0) { ret = put_user(ret, (uint32_t *)arg); @@ -1445,14 +1445,14 @@ int usb_cser_connect(struct f_cdev *port) return -ENODEV; } - pr_debug("port(%s) (%p)\n", port->name, port); + pr_debug("port(%s) (%pK)\n", port->name, port); cser = &port->port_usb; cser->notify_modem = usb_cser_notify_modem; ret = usb_ep_enable(cser->in); if (ret) { - pr_err("usb_ep_enable failed eptype:IN ep:%p, err:%d", + pr_err("usb_ep_enable failed eptype:IN ep:%pK, err:%d", cser->in, ret); return ret; } @@ -1460,7 +1460,7 @@ int usb_cser_connect(struct f_cdev *port) ret = usb_ep_enable(cser->out); if (ret) { - pr_err("usb_ep_enable failed eptype:OUT ep:%p, err: %d", + pr_err("usb_ep_enable failed eptype:OUT ep:%pK, err: %d", cser->out, ret); cser->in->driver_data = 0; return ret; @@ -1572,7 +1572,7 @@ static struct f_cdev *f_cdev_alloc(char *func_name, int portno) goto err_create_dev; } - pr_info("port_name:%s (%p) portno:(%d)\n", + pr_info("port_name:%s (%pK) portno:(%d)\n", port->name, port, port->port_num); return port; diff --git a/drivers/usb/gadget/function/f_diag.c b/drivers/usb/gadget/function/f_diag.c index aea1e1d0fa11..fe428e8bb781 100644 --- a/drivers/usb/gadget/function/f_diag.c +++ b/drivers/usb/gadget/function/f_diag.c @@ -2,7 +2,7 @@ * Diag Function Device - Route ARM9 and ARM11 DIAG messages * between HOST and DEVICE. * Copyright (C) 2007 Google, Inc. - * Copyright (c) 2008-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2008-2017, The Linux Foundation. All rights reserved. * Author: Brian Swetland * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -244,7 +244,7 @@ static void diag_update_pid_and_serial_num(struct diag_context *ctxt) } update_dload: - pr_debug("%s: dload:%p pid:%x serial_num:%s\n", + pr_debug("%s: dload:%pK pid:%x serial_num:%s\n", __func__, diag_dload, local_diag_dload.pid, local_diag_dload.serial_number); diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 052b6dbc4471..739cf9790cd4 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -699,7 +699,7 @@ static void ffs_epfile_io_complete(struct usb_ep *_ep, struct usb_request *req) ep->status = req->status ? req->status : req->actual; /* Set is_busy false to indicate completion of last request */ ep->is_busy = false; - ffs_log("ep status %d for req %p", ep->status, req); + ffs_log("ep status %d for req %pK", ep->status, req); complete(req->context); } } @@ -1720,12 +1720,12 @@ static void ffs_data_clear(struct ffs_data *ffs) ffs_log("enter: state %d setup_state %d flag %lu", ffs->state, ffs->setup_state, ffs->flags); - pr_debug("%s: ffs->gadget= %p, ffs->flags= %lu\n", + pr_debug("%s: ffs->gadget= %pK, ffs->flags= %lu\n", __func__, ffs->gadget, ffs->flags); ffs_closed(ffs); if (ffs->gadget) - pr_err("%s: ffs:%p ffs->gadget= %p, ffs->flags= %lu\n", + pr_err("%s: ffs:%pK ffs->gadget= %pK, ffs->flags= %lu\n", __func__, ffs, ffs->gadget, ffs->flags); BUG_ON(ffs->gadget); @@ -1814,7 +1814,7 @@ static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev) ffs->gadget = cdev->gadget; - ffs_log("exit: state %d setup_state %d flag %lu gadget %p\n", + ffs_log("exit: state %d setup_state %d flag %lu gadget %pK\n", ffs->state, ffs->setup_state, ffs->flags, ffs->gadget); ffs_data_get(ffs); @@ -1830,7 +1830,7 @@ static void functionfs_unbind(struct ffs_data *ffs) ffs->ep0req = NULL; ffs->gadget = NULL; clear_bit(FFS_FL_BOUND, &ffs->flags); - ffs_log("state %d setup_state %d flag %lu gadget %p\n", + ffs_log("state %d setup_state %d flag %lu gadget %pK\n", ffs->state, ffs->setup_state, ffs->flags, ffs->gadget); ffs_data_put(ffs); } diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c index b3d223a76f07..d8f0f98d00ef 100644 --- a/drivers/usb/gadget/function/f_gsi.c +++ b/drivers/usb/gadget/function/f_gsi.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2016, Linux Foundation. All rights reserved. +/* Copyright (c) 2015-2017, Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -883,7 +883,7 @@ static int gsi_ctrl_dev_open(struct inode *ip, struct file *fp) ctrl_device); if (!c_port) { - log_event_err("%s: gsi ctrl port %p", __func__, c_port); + log_event_err("%s: gsi ctrl port %pK", __func__, c_port); return -ENODEV; } @@ -906,7 +906,7 @@ static int gsi_ctrl_dev_release(struct inode *ip, struct file *fp) ctrl_device); if (!c_port) { - log_event_err("%s: gsi ctrl port %p", __func__, c_port); + log_event_err("%s: gsi ctrl port %pK", __func__, c_port); return -ENODEV; } @@ -931,7 +931,7 @@ gsi_ctrl_dev_read(struct file *fp, char __user *buf, size_t count, loff_t *pos) log_event_dbg("%s: Enter %zu", __func__, count); if (!c_port) { - log_event_err("%s: gsi ctrl port %p", __func__, c_port); + log_event_err("%s: gsi ctrl port %pK", __func__, c_port); return -ENODEV; } @@ -1003,7 +1003,7 @@ static ssize_t gsi_ctrl_dev_write(struct file *fp, const char __user *buf, log_event_dbg("Enter %zu", count); if (!c_port || !req || !req->buf) { - log_event_err("%s: c_port %p req %p req->buf %p", + log_event_err("%s: c_port %pK req %pK req->buf %pK", __func__, c_port, req, req ? req->buf : req); return -ENODEV; } @@ -1063,7 +1063,7 @@ static long gsi_ctrl_dev_ioctl(struct file *fp, unsigned cmd, int val, ret = 0; if (!c_port) { - log_event_err("%s: gsi ctrl port %p", __func__, c_port); + log_event_err("%s: gsi ctrl port %pK", __func__, c_port); return -ENODEV; } @@ -1180,7 +1180,7 @@ static unsigned int gsi_ctrl_dev_poll(struct file *fp, poll_table *wait) unsigned int mask = 0; if (!c_port) { - log_event_err("%s: gsi ctrl port %p", __func__, c_port); + log_event_err("%s: gsi ctrl port %pK", __func__, c_port); return -ENODEV; } @@ -1297,7 +1297,7 @@ static void gsi_rndis_ipa_reset_trigger(struct f_gsi *rndis) unsigned long flags; if (!rndis) { - log_event_err("%s: gsi prot ctx is %p", __func__, rndis); + log_event_err("%s: gsi prot ctx is %pK", __func__, rndis); return; } @@ -1318,7 +1318,7 @@ void gsi_rndis_flow_ctrl_enable(bool enable, struct rndis_params *param) struct gsi_data_port *d_port; if (!rndis) { - log_event_err("%s: gsi prot ctx is %p", __func__, rndis); + log_event_err("%s: gsi prot ctx is %pK", __func__, rndis); return; } @@ -1522,7 +1522,7 @@ gsi_ctrl_set_ntb_cmd_complete(struct usb_ep *ep, struct usb_request *req) struct f_gsi *gsi = req->context; struct gsi_ntb_info *ntb = NULL; - log_event_dbg("dev:%p", gsi); + log_event_dbg("dev:%pK", gsi); req->context = NULL; if (req->status || req->actual != req->length) { @@ -2457,7 +2457,7 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f) /* export host's Ethernet address in CDC format */ random_ether_addr(gsi->d_port.ipa_init_params.device_ethaddr); random_ether_addr(gsi->d_port.ipa_init_params.host_ethaddr); - log_event_dbg("setting host_ethaddr=%pM, device_ethaddr = %pM", + log_event_dbg("setting host_ethaddr=%pKM, device_ethaddr = %pKM", gsi->d_port.ipa_init_params.host_ethaddr, gsi->d_port.ipa_init_params.device_ethaddr); memcpy(gsi->ethaddr, &gsi->d_port.ipa_init_params.host_ethaddr, @@ -2589,7 +2589,7 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f) /* export host's Ethernet address in CDC format */ random_ether_addr(gsi->d_port.ipa_init_params.device_ethaddr); random_ether_addr(gsi->d_port.ipa_init_params.host_ethaddr); - log_event_dbg("setting host_ethaddr=%pM, device_ethaddr = %pM", + log_event_dbg("setting host_ethaddr=%pKM, device_ethaddr = %pKM", gsi->d_port.ipa_init_params.host_ethaddr, gsi->d_port.ipa_init_params.device_ethaddr); diff --git a/drivers/usb/gadget/function/f_mbim.c b/drivers/usb/gadget/function/f_mbim.c index ad66ec0d1492..cdbac89d8734 100644 --- a/drivers/usb/gadget/function/f_mbim.c +++ b/drivers/usb/gadget/function/f_mbim.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -741,7 +741,7 @@ static void mbim_notify_complete(struct usb_ep *ep, struct usb_request *req) struct f_mbim *mbim = req->context; struct usb_cdc_notification *event = req->buf; - pr_debug("dev:%p\n", mbim); + pr_debug("dev:%pK\n", mbim); spin_lock(&mbim->lock); switch (req->status) { @@ -771,7 +771,7 @@ static void mbim_notify_complete(struct usb_ep *ep, struct usb_request *req) mbim_do_notify(mbim); spin_unlock(&mbim->lock); - pr_debug("dev:%p Exit\n", mbim); + pr_debug("dev:%pK Exit\n", mbim); } static void mbim_ep0out_complete(struct usb_ep *ep, struct usb_request *req) @@ -782,7 +782,7 @@ static void mbim_ep0out_complete(struct usb_ep *ep, struct usb_request *req) struct f_mbim *mbim = func_to_mbim(f); struct mbim_ntb_input_size *ntb = NULL; - pr_debug("dev:%p\n", mbim); + pr_debug("dev:%pK\n", mbim); req->context = NULL; if (req->status || req->actual != req->length) { @@ -820,7 +820,7 @@ static void mbim_ep0out_complete(struct usb_ep *ep, struct usb_request *req) invalid: usb_ep_set_halt(ep); - pr_err("dev:%p Failed\n", mbim); + pr_err("dev:%pK Failed\n", mbim); } static void @@ -853,7 +853,7 @@ fmbim_cmd_complete(struct usb_ep *ep, struct usb_request *req) if (!first_command_sent) first_command_sent = true; - pr_debug("dev:%p port#%d\n", dev, dev->port_num); + pr_debug("dev:%pK port#%d\n", dev, dev->port_num); cpkt = mbim_alloc_ctrl_pkt(len, GFP_ATOMIC); if (!cpkt) { @@ -1192,7 +1192,7 @@ static int mbim_set_alt(struct usb_function *f, unsigned intf, unsigned alt) return ret; } - pr_info("Set mbim port in_desc = 0x%p\n", + pr_info("Set mbim port in_desc = 0x%pK\n", mbim->bam_port.in->desc); ret = config_ep_by_speed(cdev->gadget, f, @@ -1204,7 +1204,7 @@ static int mbim_set_alt(struct usb_function *f, unsigned intf, unsigned alt) return ret; } - pr_info("Set mbim port out_desc = 0x%p\n", + pr_info("Set mbim port out_desc = 0x%pK\n", mbim->bam_port.out->desc); pr_debug("Activate mbim\n"); @@ -1829,7 +1829,7 @@ mbim_write(struct file *fp, const char __user *buf, size_t count, loff_t *pos) pr_debug("Enter(%zu)\n", count); if (!dev || !req || !req->buf) { - pr_err("%s: dev %p req %p req->buf %p\n", + pr_err("%s: dev %pK req %pK req->buf %pK\n", __func__, dev, req, req ? req->buf : req); return -ENODEV; } @@ -1851,7 +1851,7 @@ mbim_write(struct file *fp, const char __user *buf, size_t count, loff_t *pos) } if (dev->not_port.notify_state != MBIM_NOTIFY_RESPONSE_AVAILABLE) { - pr_err("dev:%p state=%d error\n", dev, + pr_err("dev:%pK state=%d error\n", dev, dev->not_port.notify_state); mbim_unlock(&dev->write_excl); return -EINVAL; diff --git a/drivers/usb/gadget/function/f_mtp.c b/drivers/usb/gadget/function/f_mtp.c index 33f7304eac84..972ea68b16e4 100644 --- a/drivers/usb/gadget/function/f_mtp.c +++ b/drivers/usb/gadget/function/f_mtp.c @@ -522,7 +522,7 @@ static int mtp_create_bulk_endpoints(struct mtp_dev *dev, struct usb_ep *ep; int i; - DBG(cdev, "create_bulk_endpoints dev: %p\n", dev); + DBG(cdev, "create_bulk_endpoints dev: %pK\n", dev); ep = usb_ep_autoconfig(cdev->gadget, in_desc); if (!ep) { @@ -650,7 +650,7 @@ requeue_req: r = -EIO; goto done; } else { - DBG(cdev, "rx %p queue\n", req); + DBG(cdev, "rx %pK queue\n", req); } /* wait for a request to complete */ @@ -675,7 +675,7 @@ requeue_req: if (req->actual == 0) goto requeue_req; - DBG(cdev, "rx %p %d\n", req, req->actual); + DBG(cdev, "rx %pK %d\n", req, req->actual); xfer = (req->actual < count) ? req->actual : count; r = xfer; if (copy_to_user(buf, req->buf, xfer)) @@ -955,7 +955,7 @@ static void receive_file_work(struct work_struct *data) } if (write_req) { - DBG(cdev, "rx %p %d\n", write_req, write_req->actual); + DBG(cdev, "rx %pK %d\n", write_req, write_req->actual); start_time = ktime_get(); ret = vfs_write(filp, write_req->buf, write_req->actual, &offset); @@ -1393,7 +1393,7 @@ mtp_function_bind(struct usb_configuration *c, struct usb_function *f) struct mtp_instance *fi_mtp; dev->cdev = cdev; - DBG(cdev, "mtp_function_bind dev: %p\n", dev); + DBG(cdev, "mtp_function_bind dev: %pK\n", dev); /* allocate interface ID(s) */ id = usb_interface_id(c, f); diff --git a/drivers/usb/gadget/function/f_obex.c b/drivers/usb/gadget/function/f_obex.c index d6396e0909ee..98a72b7d6b6a 100644 --- a/drivers/usb/gadget/function/f_obex.c +++ b/drivers/usb/gadget/function/f_obex.c @@ -376,7 +376,7 @@ static int obex_bind(struct usb_configuration *c, struct usb_function *f) return 0; fail: - ERROR(cdev, "%s/%p: can't bind, err %d\n", f->name, f, status); + ERROR(cdev, "%s/%pK: can't bind, err %d\n", f->name, f, status); return status; } diff --git a/drivers/usb/gadget/function/f_qc_ecm.c b/drivers/usb/gadget/function/f_qc_ecm.c index 2399d8ec7a9d..005a8d1f8747 100644 --- a/drivers/usb/gadget/function/f_qc_ecm.c +++ b/drivers/usb/gadget/function/f_qc_ecm.c @@ -3,7 +3,7 @@ * * Copyright (C) 2003-2005,2008 David Brownell * Copyright (C) 2008 Nokia Corporation - * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1134,7 +1134,7 @@ ecm_qc_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN], if (ecm->xport != USB_GADGET_XPORT_BAM2BAM_IPA) return status; - pr_debug("setting ecm_ipa, host_ethaddr=%pM, device_ethaddr=%pM", + pr_debug("setting ecm_ipa, host_ethaddr=%pKM, device_ethaddr=%pKM", ipa_params.host_ethaddr, ipa_params.device_ethaddr); status = ecm_ipa_init(&ipa_params); if (status) { diff --git a/drivers/usb/gadget/function/f_qc_rndis.c b/drivers/usb/gadget/function/f_qc_rndis.c index 5ebac7ece209..11c73f584594 100644 --- a/drivers/usb/gadget/function/f_qc_rndis.c +++ b/drivers/usb/gadget/function/f_qc_rndis.c @@ -6,7 +6,7 @@ * Copyright (C) 2008 Nokia Corporation * Copyright (C) 2009 Samsung Electronics * Author: Michal Nazarewicz (mina86@mina86.com) - * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 @@ -1197,7 +1197,7 @@ usb_function *rndis_qc_bind_config_vendor(struct usb_function_instance *fi, /* export host's Ethernet address in CDC format */ random_ether_addr(rndis_ipa_params.host_ethaddr); random_ether_addr(rndis_ipa_params.device_ethaddr); - pr_debug("setting host_ethaddr=%pM, device_ethaddr=%pM\n", + pr_debug("setting host_ethaddr=%pKM, device_ethaddr=%pKM\n", rndis_ipa_params.host_ethaddr, rndis_ipa_params.device_ethaddr); rndis_ipa_supported = true; diff --git a/drivers/usb/gadget/function/f_qdss.c b/drivers/usb/gadget/function/f_qdss.c index 16bd7d890d3e..29263a84bbea 100644 --- a/drivers/usb/gadget/function/f_qdss.c +++ b/drivers/usb/gadget/function/f_qdss.c @@ -1,7 +1,7 @@ /* * f_qdss.c -- QDSS function Driver * - * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -569,7 +569,7 @@ static int qdss_set_alt(struct usb_function *f, unsigned intf, unsigned alt) struct usb_qdss_ch *ch = &qdss->ch; int ret = 0; - pr_debug("qdss_set_alt qdss pointer = %p\n", qdss); + pr_debug("qdss_set_alt qdss pointer = %pK\n", qdss); qdss->gadget = gadget; if (alt != 0) diff --git a/drivers/usb/gadget/function/f_rmnet.c b/drivers/usb/gadget/function/f_rmnet.c index 3458f42ee06e..6b54e8d4fe8b 100644 --- a/drivers/usb/gadget/function/f_rmnet.c +++ b/drivers/usb/gadget/function/f_rmnet.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -466,8 +466,8 @@ static void frmnet_suspend(struct usb_function *f) else remote_wakeup_allowed = f->config->cdev->gadget->remote_wakeup; - pr_debug("%s: dev: %p remote_wakeup: %d\n", - __func__, dev, remote_wakeup_allowed); + pr_debug("%s: dev: %pK remote_wakeup: %d\n", __func__, dev, + remote_wakeup_allowed); if (dev->notify) { usb_ep_fifo_flush(dev->notify); @@ -486,8 +486,8 @@ static void frmnet_resume(struct usb_function *f) else remote_wakeup_allowed = f->config->cdev->gadget->remote_wakeup; - pr_debug("%s: dev: %p remote_wakeup: %d\n", - __func__, dev, remote_wakeup_allowed); + pr_debug("%s: dev: %pK remote_wakeup: %d\n", __func__, dev, + remote_wakeup_allowed); ipa_data_resume(&dev->ipa_port, dev->func_type, remote_wakeup_allowed); } @@ -514,7 +514,7 @@ frmnet_set_alt(struct usb_function *f, unsigned intf, unsigned alt) struct usb_composite_dev *cdev = f->config->cdev; int ret = 0; - pr_debug("%s: dev: %p\n", __func__, dev); + pr_debug("%s:dev:%pK\n", __func__, dev); dev->cdev = cdev; if (dev->notify) { if (dev->notify->driver_data) { @@ -596,7 +596,7 @@ static void frmnet_ctrl_response_available(struct f_rmnet *dev) int ret; struct rmnet_ctrl_pkt *cpkt; - pr_debug("%s: dev: %p\n", __func__, dev); + pr_debug("%s:dev:%pK\n", __func__, dev); spin_lock_irqsave(&dev->lock, flags); if (!atomic_read(&dev->online) || !req || !req->buf) { spin_unlock_irqrestore(&dev->lock, flags); @@ -644,7 +644,7 @@ static void frmnet_connect(struct grmnet *gr) struct f_rmnet *dev; if (!gr) { - pr_err("%s: Invalid grmnet:%p\n", __func__, gr); + pr_err("%s: Invalid grmnet:%pK\n", __func__, gr); return; } @@ -660,7 +660,7 @@ static void frmnet_disconnect(struct grmnet *gr) int status; if (!gr) { - pr_err("%s: Invalid grmnet:%p\n", __func__, gr); + pr_err("%s: Invalid grmnet:%pK\n", __func__, gr); return; } @@ -702,7 +702,7 @@ frmnet_send_cpkt_response(void *gr, void *buf, size_t len) unsigned long flags; if (!gr || !buf) { - pr_err("%s: Invalid grmnet/buf, grmnet:%p buf:%p\n", + pr_err("%s: Invalid grmnet/buf, grmnet:%pK buf:%pK\n", __func__, gr, buf); return -ENODEV; } @@ -716,7 +716,7 @@ frmnet_send_cpkt_response(void *gr, void *buf, size_t len) dev = port_to_rmnet(gr); - pr_debug("%s: dev: %p\n", __func__, dev); + pr_debug("%s: dev: %pK\n", __func__, dev); if (!atomic_read(&dev->online) || !atomic_read(&dev->ctrl_online)) { rmnet_free_ctrl_pkt(cpkt); return 0; @@ -741,7 +741,7 @@ frmnet_cmd_complete(struct usb_ep *ep, struct usb_request *req) pr_err("%s: rmnet dev is null\n", __func__); return; } - pr_debug("%s: dev: %p\n", __func__, dev); + pr_debug("%s: dev: %pK\n", __func__, dev); cdev = dev->cdev; if (dev->port.send_encap_cmd) { @@ -756,7 +756,7 @@ static void frmnet_notify_complete(struct usb_ep *ep, struct usb_request *req) unsigned long flags; struct rmnet_ctrl_pkt *cpkt; - pr_debug("%s: dev: %p\n", __func__, dev); + pr_debug("%s: dev: %pK\n", __func__, dev); switch (status) { case -ECONNRESET: case -ESHUTDOWN: @@ -823,7 +823,7 @@ frmnet_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl) u16 w_length = le16_to_cpu(ctrl->wLength); int ret = -EOPNOTSUPP; - pr_debug("%s: dev: %p\n", __func__, dev); + pr_debug("%s: dev: %pK\n", __func__, dev); if (!atomic_read(&dev->online)) { pr_warn("%s: usb cable is not connected\n", __func__); return -ENOTCONN; diff --git a/drivers/usb/gadget/function/u_bam.c b/drivers/usb/gadget/function/u_bam.c index bbb744b33c3a..7947bb76f512 100644 --- a/drivers/usb/gadget/function/u_bam.c +++ b/drivers/usb/gadget/function/u_bam.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2016, Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2017, Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -231,7 +231,7 @@ static int gbam_alloc_requests(struct usb_ep *ep, struct list_head *head, int i; struct usb_request *req; - pr_debug("%s: ep:%p head:%p num:%d cb:%p", __func__, + pr_debug("%s: ep:%pK head:%pK num:%d cb:%pK", __func__, ep, head, num, cb); for (i = 0; i < num; i++) { @@ -491,7 +491,7 @@ void gbam_data_recv_cb(void *p, struct sk_buff *skb) if (!skb) return; - pr_debug("%s: p:%p#%d d:%p skb_len:%d\n", __func__, + pr_debug("%s: p:%pK#%d d:%pK skb_len:%d\n", __func__, port, port->port_num, d, skb->len); spin_lock_irqsave(&port->port_lock_dl, flags); @@ -532,7 +532,8 @@ void gbam_data_write_done(void *p, struct sk_buff *skb) d->pending_bytes_with_bam -= skb->len; gbam_free_skb_to_pool(port, skb); - pr_debug("%s:port:%p d:%p tom:%lu ppkt:%u pbytes:%u pno:%d\n", __func__, + pr_debug("%s:port:%pK d:%pK tom:%lu ppkt:%u pbytes:%u pno:%d\n", + __func__, port, d, d->to_modem, d->pending_pkts_with_bam, d->pending_bytes_with_bam, port->port_num); @@ -608,7 +609,7 @@ static void gbam_data_write_tobam(struct work_struct *w) d->pending_bytes_with_bam += skb->len; d->to_modem++; - pr_debug("%s: port:%p d:%p tom:%lu ppkts:%u pbytes:%u pno:%d\n", + pr_debug("%s: port:%pK d:%pK tom:%lu ppkts:%u pbytes:%u pno:%d\n", __func__, port, d, d->to_modem, d->pending_pkts_with_bam, d->pending_bytes_with_bam, port->port_num); @@ -1097,7 +1098,7 @@ static void gbam_start_io(struct gbam_port *port) { unsigned long flags; - pr_debug("%s: port:%p\n", __func__, port); + pr_debug("%s: port:%pK\n", __func__, port); if (_gbam_start_io(port, true)) return; @@ -1786,7 +1787,7 @@ static int gbam_port_alloc(int portno) pdrv->driver.owner = THIS_MODULE; platform_driver_register(pdrv); - pr_debug("%s: port:%p portno:%d\n", __func__, port, portno); + pr_debug("%s: port:%pK portno:%d\n", __func__, port, portno); return 0; } @@ -1826,7 +1827,7 @@ static int gbam2bam_port_alloc(int portno) INIT_LIST_HEAD(&d->rx_idle); INIT_WORK(&d->write_tobam_w, gbam_data_write_tobam); - pr_debug("%s: port:%p portno:%d\n", __func__, port, portno); + pr_debug("%s: port:%pK portno:%d\n", __func__, port, portno); return 0; } @@ -1858,7 +1859,7 @@ static ssize_t gbam_read_stats(struct file *file, char __user *ubuf, d = &port->data_ch; temp += scnprintf(buf + temp, DEBUG_BUF_SIZE - temp, - "#PORT:%d port:%p data_ch:%p#\n" + "#PORT:%d port:%pK data_ch:%pK#\n" "dpkts_to_usbhost: %lu\n" "dpkts_to_modem: %lu\n" "dpkts_pwith_bam: %u\n" @@ -1981,7 +1982,7 @@ void gbam_disconnect(struct grmnet *gr, u8 port_num, enum transport_type trans) unsigned long flags, flags_ul, flags_dl; struct bam_ch_info *d; - pr_debug("%s: grmnet:%p port#%d\n", __func__, gr, port_num); + pr_debug("%s: grmnet:%pK port#%d\n", __func__, gr, port_num); if (trans == USB_GADGET_XPORT_BAM2BAM) { pr_err("%s: invalid xport#%d\n", __func__, trans); @@ -2109,7 +2110,7 @@ int gbam_connect(struct grmnet *gr, u8 port_num, int ret; unsigned long flags, flags_ul; - pr_debug("%s: grmnet:%p port#%d\n", __func__, gr, port_num); + pr_debug("%s: grmnet:%pK port#%d\n", __func__, gr, port_num); if (!gr) { pr_err("%s: grmnet port is null\n", __func__); @@ -2254,7 +2255,7 @@ int gbam_connect(struct grmnet *gr, u8 port_num, ret = usb_ep_enable(gr->in); if (ret) { - pr_err("%s: usb_ep_enable failed eptype:IN ep:%p", + pr_err("%s: usb_ep_enable failed eptype:IN ep:%pK", __func__, gr->in); usb_ep_free_request(port->port_usb->out, d->rx_req); d->rx_req = NULL; @@ -2277,7 +2278,7 @@ int gbam_connect(struct grmnet *gr, u8 port_num, if (gr->out) { ret = usb_ep_enable(gr->out); if (ret) { - pr_err("%s: usb_ep_enable failed eptype:OUT ep:%p", + pr_err("%s: usb_ep_enable failed eptype:OUT ep:%pK", __func__, gr->out); gr->in->driver_data = 0; usb_ep_disable(gr->in); diff --git a/drivers/usb/gadget/function/u_bam_data.c b/drivers/usb/gadget/function/u_bam_data.c index e479907e93ef..56bb5724ea52 100644 --- a/drivers/usb/gadget/function/u_bam_data.c +++ b/drivers/usb/gadget/function/u_bam_data.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -166,7 +166,7 @@ static int bam_data_alloc_requests(struct usb_ep *ep, struct list_head *head, struct bam_data_ch_info *d = &port->data_ch; struct usb_request *req; - pr_debug("%s: ep:%p head:%p num:%d cb:%p", __func__, + pr_debug("%s: ep:%pK head:%pK num:%d cb:%pK", __func__, ep, head, num, cb); if (d->alloc_rx_reqs) { @@ -292,7 +292,7 @@ static void bam_data_write_done(void *p, struct sk_buff *skb) d->pending_with_bam--; - pr_debug("%s: port:%p d:%p pbam:%u, pno:%d\n", __func__, + pr_debug("%s: port:%pK d:%pK pbam:%u, pno:%d\n", __func__, port, d, d->pending_with_bam, port->port_num); spin_unlock_irqrestore(&port->port_lock, flags); @@ -526,7 +526,7 @@ static void bam_data_write_toipa(struct work_struct *w) d->pending_with_bam++; - pr_debug("%s: port:%p d:%p pbam:%u pno:%d\n", __func__, + pr_debug("%s: port:%pK d:%pK pbam:%u pno:%d\n", __func__, port, d, d->pending_with_bam, port->port_num); spin_unlock_irqrestore(&port->port_lock, flags); @@ -809,7 +809,7 @@ static void bam2bam_data_disconnect_work(struct work_struct *w) usb_gadget_autopm_put_async(port->gadget); spin_unlock_irqrestore(&port->port_lock, flags); - pr_debug("Disconnect workqueue done (port %p)\n", port); + pr_debug("Disconnect workqueue done (port %pK)\n", port); } /* * This function configured data fifo based on index passed to get bam2bam @@ -1144,7 +1144,7 @@ static void bam2bam_data_connect_work(struct work_struct *w) bam_data_start_rx_transfers(d, port); bam_data_start_endless_tx(port); - pr_debug("Connect workqueue done (port %p)", port); + pr_debug("Connect workqueue done (port %pK)", port); return; disconnect_ipa: @@ -1187,7 +1187,7 @@ void bam_data_start_rx_tx(u8 port_num) } if (!d->rx_req || !d->tx_req) { - pr_err("%s: No request d->rx_req=%p, d->tx_req=%p", __func__, + pr_err("%s: No request d->rx_req=%pK, d->tx_req=%pK", __func__, d->rx_req, d->tx_req); goto out; } @@ -1347,7 +1347,7 @@ void bam_data_disconnect(struct data_port *gr, enum function_type func, return; } - pr_debug("dev:%p port number:%d\n", gr, port_num); + pr_debug("dev:%pK port number:%d\n", gr, port_num); if (!gr) { pr_err("data port is null\n"); @@ -1493,7 +1493,7 @@ int bam_data_connect(struct data_port *gr, enum transport_type trans, return -EINVAL; } - pr_debug("dev:%p port#%d\n", gr, port_num); + pr_debug("dev:%pK port#%d\n", gr, port_num); usb_bam_type = usb_bam_get_bam_type(gr->cdev->gadget->name); @@ -1570,7 +1570,7 @@ int bam_data_connect(struct data_port *gr, enum transport_type trans, ret = usb_ep_enable(gr->in); if (ret) { - pr_err("usb_ep_enable failed eptype:IN ep:%p", gr->in); + pr_err("usb_ep_enable failed eptype:IN ep:%pK", gr->in); goto exit; } @@ -1578,7 +1578,7 @@ int bam_data_connect(struct data_port *gr, enum transport_type trans, ret = usb_ep_enable(gr->out); if (ret) { - pr_err("usb_ep_enable failed eptype:OUT ep:%p", gr->out); + pr_err("usb_ep_enable failed eptype:OUT ep:%pK", gr->out); goto disable_in_ep; } @@ -1849,7 +1849,7 @@ void bam_data_suspend(struct data_port *port_usb, u8 dev_port_num, port_usb->in_ep_desc_backup = port_usb->in->desc; port_usb->out_ep_desc_backup = port_usb->out->desc; - pr_debug("in_ep_desc_backup = %p, out_ep_desc_backup = %p", + pr_debug("in_ep_desc_backup = %pK, out_ep_desc_backup = %pK", port_usb->in_ep_desc_backup, port_usb->out_ep_desc_backup); @@ -1890,7 +1890,7 @@ void bam_data_resume(struct data_port *port_usb, u8 dev_port_num, port_usb->in->desc = port_usb->in_ep_desc_backup; port_usb->out->desc = port_usb->out_ep_desc_backup; - pr_debug("in_ep_desc_backup = %p, out_ep_desc_backup = %p", + pr_debug("in_ep_desc_backup = %pK, out_ep_desc_backup = %pK", port_usb->in_ep_desc_backup, port_usb->out_ep_desc_backup); diff --git a/drivers/usb/gadget/function/u_ctrl_qti.c b/drivers/usb/gadget/function/u_ctrl_qti.c index 287bfeb21ea3..8ef223370827 100644 --- a/drivers/usb/gadget/function/u_ctrl_qti.c +++ b/drivers/usb/gadget/function/u_ctrl_qti.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -112,7 +112,7 @@ static void qti_ctrl_queue_notify(struct qti_ctrl_port *port) spin_lock_irqsave(&port->lock, flags); if (!port->is_open) { - pr_err("%s: rmnet ctrl file handler %p is not open", + pr_err("%s: rmnet ctrl file handler %pK is not open", __func__, port); spin_unlock_irqrestore(&port->lock, flags); return; @@ -165,7 +165,7 @@ static int gqti_ctrl_send_cpkt_tomodem(enum qti_port_type qport, /* drop cpkt if port is not open */ if (!port->is_open) { - pr_debug("rmnet file handler %p(index=%d) is not open", + pr_debug("rmnet file handler %pK(index=%d) is not open", port, port->index); port->drp_cpkt_cnt++; spin_unlock_irqrestore(&port->lock, flags); @@ -206,7 +206,7 @@ int gqti_ctrl_connect(void *gr, enum qti_port_type qport, unsigned intf) struct grmnet *g_rmnet = NULL; unsigned long flags; - pr_debug("%s: port type:%d gadget:%p\n", __func__, qport, gr); + pr_debug("%s: port type:%d gadget:%pK\n", __func__, qport, gr); if (qport >= QTI_NUM_PORTS) { pr_err("%s: Invalid QTI port %d\n", __func__, qport); return -ENODEV; @@ -259,7 +259,7 @@ void gqti_ctrl_disconnect(void *gr, enum qti_port_type qport) struct rmnet_ctrl_pkt *cpkt; struct grmnet *g_rmnet = NULL; - pr_debug("%s: gadget:%p\n", __func__, gr); + pr_debug("%s: gadget:%pK\n", __func__, gr); if (qport >= QTI_NUM_PORTS) { pr_err("%s: Invalid QTI port %d\n", __func__, qport); @@ -650,7 +650,7 @@ static int qti_ctrl_read_stats(struct seq_file *s, void *unused) continue; spin_lock_irqsave(&port->lock, flags); - seq_printf(s, "\n#PORT:%d port: %p\n", i, port); + seq_printf(s, "\n#PORT:%d port: %pK\n", i, port); seq_printf(s, "name: %s\n", port->name); seq_printf(s, "host_to_modem: %d\n", port->host_to_modem); diff --git a/drivers/usb/gadget/function/u_data_ipa.c b/drivers/usb/gadget/function/u_data_ipa.c index 2d0cd30c0641..bf9e0fa9950b 100644 --- a/drivers/usb/gadget/function/u_data_ipa.c +++ b/drivers/usb/gadget/function/u_data_ipa.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -183,7 +183,7 @@ void ipa_data_start_rx_tx(enum ipa_func_type func) } if (!port->rx_req || !port->tx_req) { - pr_err("%s: No request d->rx_req=%p, d->tx_req=%p", __func__, + pr_err("%s: No request d->rx_req=%pK, d->tx_req=%pK", __func__, port->rx_req, port->tx_req); spin_unlock_irqrestore(&port->port_lock, flags); return; @@ -290,7 +290,7 @@ void ipa_data_disconnect(struct gadget_ipa_port *gp, enum ipa_func_type func) unsigned long flags; struct usb_gadget *gadget = NULL; - pr_debug("dev:%p port number:%d\n", gp, func); + pr_debug("dev:%pK port number:%d\n", gp, func); if (func >= USB_IPA_NUM_FUNCS) { pr_err("invalid ipa portno#%d\n", func); return; @@ -667,7 +667,7 @@ static void ipa_data_connect_work(struct work_struct *w) if (gport->in) ipa_data_start_endless_xfer(port, true); - pr_debug("Connect workqueue done (port %p)", port); + pr_debug("Connect workqueue done (port %pK)", port); return; disconnect_usb_bam_ipa_out: @@ -717,7 +717,7 @@ int ipa_data_connect(struct gadget_ipa_port *gp, enum ipa_func_type func, unsigned long flags; int ret; - pr_debug("dev:%p port#%d src_connection_idx:%d dst_connection_idx:%d\n", + pr_debug("dev:%pK port#%d src_connection_idx:%d dst_connection_idx:%d\n", gp, func, src_connection_idx, dst_connection_idx); if (func >= USB_IPA_NUM_FUNCS) { @@ -781,7 +781,7 @@ int ipa_data_connect(struct gadget_ipa_port *gp, enum ipa_func_type func, port->port_usb->in->endless = true; ret = usb_ep_enable(port->port_usb->in); if (ret) { - pr_err("usb_ep_enable failed eptype:IN ep:%p", + pr_err("usb_ep_enable failed eptype:IN ep:%pK", port->port_usb->in); usb_ep_free_request(port->port_usb->in, port->tx_req); port->tx_req = NULL; @@ -794,7 +794,7 @@ int ipa_data_connect(struct gadget_ipa_port *gp, enum ipa_func_type func, port->port_usb->out->endless = true; ret = usb_ep_enable(port->port_usb->out); if (ret) { - pr_err("usb_ep_enable failed eptype:OUT ep:%p", + pr_err("usb_ep_enable failed eptype:OUT ep:%pK", port->port_usb->out); usb_ep_free_request(port->port_usb->out, port->rx_req); port->rx_req = NULL; @@ -953,12 +953,12 @@ void ipa_data_suspend(struct gadget_ipa_port *gp, enum ipa_func_type func, */ if (gp->in) { gp->in_ep_desc_backup = gp->in->desc; - pr_debug("in_ep_desc_backup = %p\n", + pr_debug("in_ep_desc_backup = %pK\n", gp->in_ep_desc_backup); } if (gp->out) { gp->out_ep_desc_backup = gp->out->desc; - pr_debug("out_ep_desc_backup = %p\n", + pr_debug("out_ep_desc_backup = %pK\n", gp->out_ep_desc_backup); } ipa_data_disconnect(gp, func); @@ -1040,7 +1040,7 @@ void ipa_data_resume(struct gadget_ipa_port *gp, enum ipa_func_type func, u8 dst_connection_idx = 0; enum usb_ctrl usb_bam_type; - pr_debug("dev:%p port number:%d\n", gp, func); + pr_debug("dev:%pK port number:%d\n", gp, func); if (func >= USB_IPA_NUM_FUNCS) { pr_err("invalid ipa portno#%d\n", func); @@ -1066,7 +1066,7 @@ void ipa_data_resume(struct gadget_ipa_port *gp, enum ipa_func_type func, /* Restore endpoint descriptors info. */ if (gp->in) { gp->in->desc = gp->in_ep_desc_backup; - pr_debug("in_ep_desc_backup = %p\n", + pr_debug("in_ep_desc_backup = %pK\n", gp->in_ep_desc_backup); dst_connection_idx = usb_bam_get_connection_idx( usb_bam_type, IPA_P_BAM, PEER_PERIPHERAL_TO_USB, @@ -1074,7 +1074,7 @@ void ipa_data_resume(struct gadget_ipa_port *gp, enum ipa_func_type func, } if (gp->out) { gp->out->desc = gp->out_ep_desc_backup; - pr_debug("out_ep_desc_backup = %p\n", + pr_debug("out_ep_desc_backup = %pK\n", gp->out_ep_desc_backup); src_connection_idx = usb_bam_get_connection_idx( usb_bam_type, IPA_P_BAM, USB_TO_PEER_PERIPHERAL, @@ -1174,7 +1174,7 @@ static int ipa_data_port_alloc(enum ipa_func_type func) ipa_data_ports[func] = port; - pr_debug("port:%p with portno:%d allocated\n", port, func); + pr_debug("port:%pK with portno:%d allocated\n", port, func); return 0; } diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c index 74e9f5b5a45d..70c95d0df581 100644 --- a/drivers/usb/gadget/function/u_ether.c +++ b/drivers/usb/gadget/function/u_ether.c @@ -889,7 +889,7 @@ static int get_ether_addr_str(u8 dev_addr[ETH_ALEN], char *str, int len) if (len < 18) return -EINVAL; - snprintf(str, len, "%pM", dev_addr); + snprintf(str, len, "%pKM", dev_addr); return 18; } @@ -971,8 +971,8 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g, free_netdev(net); dev = ERR_PTR(status); } else { - INFO(dev, "MAC %pM\n", net->dev_addr); - INFO(dev, "HOST MAC %pM\n", dev->host_mac); + INFO(dev, "MAC %pKM\n", net->dev_addr); + INFO(dev, "HOST MAC %pKM\n", dev->host_mac); /* * two kinds of host-initiated state changes: @@ -1040,7 +1040,7 @@ int gether_register_netdev(struct net_device *net) dev_dbg(&g->dev, "register_netdev failed, %d\n", status); return status; } else { - INFO(dev, "HOST MAC %pM\n", dev->host_mac); + INFO(dev, "HOST MAC %pKM\n", dev->host_mac); /* two kinds of host-initiated state changes: * - iff DATA transfer is active, carrier is "on" @@ -1056,7 +1056,7 @@ int gether_register_netdev(struct net_device *net) if (status) pr_warn("cannot set self ethernet address: %d\n", status); else - INFO(dev, "MAC %pM\n", dev->dev_mac); + INFO(dev, "MAC %pKM\n", dev->dev_mac); return status; } @@ -1124,7 +1124,7 @@ int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len) return -EINVAL; dev = netdev_priv(net); - snprintf(host_addr, len, "%pm", dev->host_mac); + snprintf(host_addr, len, "%pKm", dev->host_mac); return strlen(host_addr); } diff --git a/drivers/usb/gadget/function/u_qc_ether.c b/drivers/usb/gadget/function/u_qc_ether.c index f933cc13bf9e..2fde4850f8cd 100644 --- a/drivers/usb/gadget/function/u_qc_ether.c +++ b/drivers/usb/gadget/function/u_qc_ether.c @@ -4,7 +4,7 @@ * Copyright (C) 2003-2005,2008 David Brownell * Copyright (C) 2003-2004 Robert Schwebel, Benedikt Spranger * Copyright (C) 2008 Nokia Corporation - * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 @@ -317,8 +317,8 @@ int gether_qc_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN], dev_dbg(&g->dev, "register_netdev failed, %d\n", status); free_netdev(net); } else { - INFO(dev, "MAC %pM\n", net->dev_addr); - INFO(dev, "HOST MAC %pM\n", dev->host_mac); + INFO(dev, "MAC %pKM\n", net->dev_addr); + INFO(dev, "HOST MAC %pKM\n", dev->host_mac); } diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index e0b77946f013..251ebdcccd60 100644 --- a/drivers/usb/gadget/function/u_serial.c +++ b/drivers/usb/gadget/function/u_serial.c @@ -4,7 +4,7 @@ * Copyright (C) 2003 Al Borchers (alborchers@steinerpoint.com) * Copyright (C) 2008 David Brownell * Copyright (C) 2008 by Nokia Corporation - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * This code also borrows from usbserial.c, which is * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com) @@ -862,7 +862,7 @@ static int gs_open(struct tty_struct *tty, struct file *file) spin_lock_irq(&port->port_lock); if (status) { - pr_debug("gs_open: ttyGS%d (%p,%p) no buffer\n", + pr_debug("gs_open: ttyGS%d (%pK,%pK) no buffer\n", port->port_num, tty, file); port->openclose = false; goto exit_unlock_port; @@ -892,7 +892,7 @@ static int gs_open(struct tty_struct *tty, struct file *file) gser->connect(gser); } - pr_debug("gs_open: ttyGS%d (%p,%p)\n", port->port_num, tty, file); + pr_debug("gs_open: ttyGS%d (%pK,%pK)\n", port->port_num, tty, file); status = 0; @@ -928,7 +928,8 @@ static void gs_close(struct tty_struct *tty, struct file *file) goto exit; } - pr_debug("gs_close: ttyGS%d (%p,%p) ...\n", port->port_num, tty, file); + pr_debug("gs_close: ttyGS%d (%pK,%pK) ...\n", + port->port_num, tty, file); /* mark port as closing but in use; we can drop port lock * and sleep if necessary @@ -965,7 +966,7 @@ static void gs_close(struct tty_struct *tty, struct file *file) port->openclose = false; - pr_debug("gs_close: ttyGS%d (%p,%p) done!\n", + pr_debug("gs_close: ttyGS%d (%pK,%pK) done!\n", port->port_num, tty, file); wake_up(&port->close_wait); @@ -982,7 +983,7 @@ static int gs_write(struct tty_struct *tty, const unsigned char *buf, int count) if (!port) return 0; - pr_vdebug("gs_write: ttyGS%d (%p) writing %d bytes\n", + pr_vdebug("gs_write: ttyGS%d (%pK) writing %d bytes\n", port->port_num, tty, count); spin_lock_irqsave(&port->port_lock, flags); @@ -1004,7 +1005,7 @@ static int gs_put_char(struct tty_struct *tty, unsigned char ch) if (!port) return 0; - pr_vdebug("gs_put_char: (%d,%p) char=0x%x, called from %ps\n", + pr_vdebug("gs_put_char: (%d,%pK) char=0x%x, called from %pKs\n", port->port_num, tty, ch, __builtin_return_address(0)); spin_lock_irqsave(&port->port_lock, flags); @@ -1021,7 +1022,7 @@ static void gs_flush_chars(struct tty_struct *tty) if (!port) return; - pr_vdebug("gs_flush_chars: (%d,%p)\n", port->port_num, tty); + pr_vdebug("gs_flush_chars: (%d,%pK)\n", port->port_num, tty); spin_lock_irqsave(&port->port_lock, flags); if (port->port_usb) @@ -1042,7 +1043,7 @@ static int gs_write_room(struct tty_struct *tty) room = gs_buf_space_avail(&port->port_write_buf); spin_unlock_irqrestore(&port->port_lock, flags); - pr_vdebug("gs_write_room: (%d,%p) room=%d\n", + pr_vdebug("gs_write_room: (%d,%pK) room=%d\n", port->port_num, tty, room); return room; @@ -1058,7 +1059,7 @@ static int gs_chars_in_buffer(struct tty_struct *tty) chars = gs_buf_data_avail(&port->port_write_buf); spin_unlock_irqrestore(&port->port_lock, flags); - pr_vdebug("gs_chars_in_buffer: (%d,%p) chars=%d\n", + pr_vdebug("gs_chars_in_buffer: (%d,%pK) chars=%d\n", port->port_num, tty, chars); return chars; diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index b26b96e25a13..8d22fda48618 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -106,7 +106,7 @@ static inline void dbg_hcc_params (struct ehci_hcd *ehci, char *label) {} static void __maybe_unused dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd) { - ehci_dbg(ehci, "%s td %p n%08x %08x t%08x p0=%08x\n", label, qtd, + ehci_dbg(ehci, "%s td %pK n%08x %08x t%08x p0=%08x\n", label, qtd, hc32_to_cpup(ehci, &qtd->hw_next), hc32_to_cpup(ehci, &qtd->hw_alt_next), hc32_to_cpup(ehci, &qtd->hw_token), @@ -124,7 +124,7 @@ dbg_qh (const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) { struct ehci_qh_hw *hw = qh->hw; - ehci_dbg (ehci, "%s qh %p n%08x info %x %x qtd %x\n", label, + ehci_dbg (ehci, "%s qh %pK n%08x info %x %x qtd %x\n", label, qh, hw->hw_next, hw->hw_info1, hw->hw_info2, hw->hw_current); dbg_qtd("overlay", ehci, (struct ehci_qtd *) &hw->hw_qtd_next); } @@ -132,7 +132,7 @@ dbg_qh (const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) static void __maybe_unused dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) { - ehci_dbg (ehci, "%s [%d] itd %p, next %08x, urb %p\n", + ehci_dbg (ehci, "%s [%d] itd %pK, next %08x, urb %pK\n", label, itd->frame, itd, hc32_to_cpu(ehci, itd->hw_next), itd->urb); ehci_dbg (ehci, @@ -163,7 +163,7 @@ dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) static void __maybe_unused dbg_sitd (const char *label, struct ehci_hcd *ehci, struct ehci_sitd *sitd) { - ehci_dbg (ehci, "%s [%d] sitd %p, next %08x, urb %p\n", + ehci_dbg (ehci, "%s [%d] sitd %pK, next %08x, urb %pK\n", label, sitd->frame, sitd, hc32_to_cpu(ehci, sitd->hw_next), sitd->urb); ehci_dbg (ehci, @@ -436,7 +436,7 @@ static void qh_lines ( scratch = hc32_to_cpup(ehci, &hw->hw_info1); hw_curr = (mark == '*') ? hc32_to_cpup(ehci, &hw->hw_current) : 0; temp = scnprintf (next, size, - "qh/%p dev%d %cs ep%d %08x %08x (%08x%c %s nak%d)", + "qh/%pK dev%d %cs ep%d %08x %08x (%08x%c %s nak%d)", qh, scratch & 0x007f, speed_char (scratch), (scratch >> 8) & 0x000f, @@ -464,7 +464,7 @@ static void qh_lines ( mark = '/'; } temp = snprintf (next, size, - "\n\t%p%c%s len=%d %08x urb %p", + "\n\t%pK%c%s len=%d %08x urb %pK", td, mark, ({ char *tmp; switch ((scratch>>8)&0x03) { case 0: tmp = "out"; break; @@ -662,7 +662,7 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) switch (hc32_to_cpu(ehci, tag)) { case Q_TYPE_QH: hw = p.qh->hw; - temp = scnprintf (next, size, " qh%d-%04x/%p", + temp = scnprintf (next, size, " qh%d-%04x/%pK", p.qh->ps.period, hc32_to_cpup(ehci, &hw->hw_info2) @@ -724,20 +724,20 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) break; case Q_TYPE_FSTN: temp = scnprintf (next, size, - " fstn-%8x/%p", p.fstn->hw_prev, + " fstn-%8x/%pK", p.fstn->hw_prev, p.fstn); tag = Q_NEXT_TYPE(ehci, p.fstn->hw_next); p = p.fstn->fstn_next; break; case Q_TYPE_ITD: temp = scnprintf (next, size, - " itd/%p", p.itd); + " itd/%pK", p.itd); tag = Q_NEXT_TYPE(ehci, p.itd->hw_next); p = p.itd->itd_next; break; case Q_TYPE_SITD: temp = scnprintf (next, size, - " sitd%d-%04x/%p", + " sitd%d-%04x/%pK", p.sitd->stream->ps.period, hc32_to_cpup(ehci, &p.sitd->hw_uframe) & 0x0000ffff, @@ -909,7 +909,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) } if (!list_empty(&ehci->async_unlink)) { - temp = scnprintf(next, size, "async unlink qh %p\n", + temp = scnprintf(next, size, "async unlink qh %pK\n", list_first_entry(&ehci->async_unlink, struct ehci_qh, unlink_node)); size -= temp; diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index f7661d9750fd..18a05e4b3c5f 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1000,7 +1000,7 @@ idle_timeout: /* caller was supposed to have unlinked any requests; * that's not our job. just leak this memory. */ - ehci_err (ehci, "qh %p (#%02x) state %d%s\n", + ehci_err (ehci, "qh %pK (#%02x) state %d%s\n", qh, ep->desc.bEndpointAddress, qh->qh_state, list_empty (&qh->qtd_list) ? "" : "(has tds)"); break; diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 54f5332f814d..ed4a20a7ca20 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -264,7 +264,7 @@ ehci_urb_done(struct ehci_hcd *ehci, struct urb *urb, int status) #ifdef EHCI_URB_TRACE ehci_dbg (ehci, - "%s %s urb %p ep%d%s status %d len %d/%d\n", + "%s %s urb %pK ep%d%s status %d len %d/%d\n", __func__, urb->dev->devpath, urb, usb_pipeendpoint (urb->pipe), usb_pipein (urb->pipe) ? "in" : "out", @@ -350,7 +350,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) /* Report Data Buffer Error: non-fatal but useful */ if (token & QTD_STS_DBE) ehci_dbg(ehci, - "detected DataBufferErr for urb %p ep%d%s len %d, qtd %p [qh %p]\n", + "detected DataBufferErr for urb %pK ep%d%s len %d, qtd %pK [qh %pK]\n", urb, usb_endpoint_num(&urb->ep->desc), usb_endpoint_dir_in(&urb->ep->desc) ? "in" : "out", @@ -924,7 +924,7 @@ qh_make ( } break; default: - ehci_dbg(ehci, "bogus dev %p speed %d\n", urb->dev, + ehci_dbg(ehci, "bogus dev %pK speed %d\n", urb->dev, urb->dev->speed); done: qh_destroy(ehci, qh); @@ -1112,7 +1112,7 @@ submit_async ( struct ehci_qtd *qtd; qtd = list_entry(qtd_list->next, struct ehci_qtd, qtd_list); ehci_dbg(ehci, - "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n", + "%s %s urb %pK ep%d%s len %d, qtd %pK [qh %pK]\n", __func__, urb->dev->devpath, urb, epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out", urb->transfer_buffer_length, diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index f9a332775c47..9e69e4567e6a 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -548,7 +548,7 @@ static void qh_link_periodic(struct ehci_hcd *ehci, struct ehci_qh *qh) unsigned period = qh->ps.period; dev_dbg(&qh->ps.udev->dev, - "link qh%d-%04x/%p start %d [%d/%d us]\n", + "link qh%d-%04x/%pK start %d [%d/%d us]\n", period, hc32_to_cpup(ehci, &qh->hw->hw_info2) & (QH_CMASK | QH_SMASK), qh, qh->ps.phase, qh->ps.usecs, qh->ps.c_usecs); @@ -641,7 +641,7 @@ static void qh_unlink_periodic(struct ehci_hcd *ehci, struct ehci_qh *qh) : (qh->ps.usecs * 8); dev_dbg(&qh->ps.udev->dev, - "unlink qh%d-%04x/%p start %d [%d/%d us]\n", + "unlink qh%d-%04x/%pK start %d [%d/%d us]\n", qh->ps.period, hc32_to_cpup(ehci, &qh->hw->hw_info2) & (QH_CMASK | QH_SMASK), qh, qh->ps.phase, qh->ps.usecs, qh->ps.c_usecs); @@ -751,7 +751,7 @@ static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh) * FIXME kill the now-dysfunctional queued urbs */ else { - ehci_err(ehci, "can't reschedule qh %p, err %d\n", + ehci_err(ehci, "can't reschedule qh %pK, err %d\n", qh, rc); } } @@ -869,7 +869,7 @@ static int qh_schedule(struct ehci_hcd *ehci, struct ehci_qh *qh) /* reuse the previous schedule slots, if we can */ if (qh->ps.phase != NO_FRAME) { - ehci_dbg(ehci, "reused qh %p schedule\n", qh); + ehci_dbg(ehci, "reused qh %pK schedule\n", qh); return 0; } @@ -1552,7 +1552,7 @@ iso_stream_schedule ( /* no room in the schedule */ if (!done) { - ehci_dbg(ehci, "iso sched full %p", urb); + ehci_dbg(ehci, "iso sched full %pK", urb); status = -ENOSPC; goto fail; } @@ -1606,7 +1606,7 @@ iso_stream_schedule ( /* Is the schedule about to wrap around? */ if (unlikely(!empty && start < period)) { - ehci_dbg(ehci, "request %p would overflow (%u-%u < %u mod %u)\n", + ehci_dbg(ehci, "request %pK would overflow (%u-%u < %u mod %u)\n", urb, stream->next_uframe, base, period, mod); status = -EFBIG; goto fail; @@ -1635,7 +1635,7 @@ iso_stream_schedule ( /* How many uframes and packets do we need to skip? */ skip = (now2 - start + period - 1) & -period; if (skip >= span) { /* Entirely in the past? */ - ehci_dbg(ehci, "iso underrun %p (%u+%u < %u) [%u]\n", + ehci_dbg(ehci, "iso underrun %pK (%u+%u < %u) [%u]\n", urb, start + base, span - period, now2 + base, base); @@ -1662,7 +1662,7 @@ iso_stream_schedule ( use_start: /* Tried to schedule too far into the future? */ if (unlikely(start + span - period >= mod + wrap)) { - ehci_dbg(ehci, "request %p would overflow (%u+%u >= %u)\n", + ehci_dbg(ehci, "request %pK would overflow (%u+%u >= %u)\n", urb, start, span - period, mod + wrap); status = -EFBIG; goto fail; @@ -1957,7 +1957,7 @@ static int itd_submit (struct ehci_hcd *ehci, struct urb *urb, #ifdef EHCI_URB_TRACE ehci_dbg (ehci, - "%s %s urb %p ep%d%s len %d, %d pkts %d uframes [%p]\n", + "%s %s urb %pK ep%d%s len %d, %d pkts %d uframes [%pK]\n", __func__, urb->dev->devpath, urb, usb_pipeendpoint (urb->pipe), usb_pipein (urb->pipe) ? "in" : "out", @@ -2337,7 +2337,7 @@ static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, #ifdef EHCI_URB_TRACE ehci_dbg (ehci, - "submit %p dev%s ep%d%s-iso len %d\n", + "submit %pK dev%s ep%d%s-iso len %d\n", urb, urb->dev->devpath, usb_pipeendpoint (urb->pipe), usb_pipein (urb->pipe) ? "in" : "out", @@ -2490,7 +2490,7 @@ restart: q = *q_p; break; default: - ehci_dbg(ehci, "corrupt type %d frame %d shadow %p\n", + ehci_dbg(ehci, "corrupt type %d frame %d shadow %pK\n", type, frame, q.ptr); // BUG (); /* FALL THROUGH */ diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c index c3eded317495..56176222b0b6 100644 --- a/drivers/usb/host/ohci-dbg.c +++ b/drivers/usb/host/ohci-dbg.c @@ -256,7 +256,7 @@ static void ohci_dump_td (const struct ohci_hcd *ohci, const char *label, { u32 tmp = hc32_to_cpup (ohci, &td->hwINFO); - ohci_dbg (ohci, "%s td %p%s; urb %p index %d; hw next td %08x\n", + ohci_dbg (ohci, "%s td %pK%s; urb %pK index %d; hw next td %08x\n", label, td, (tmp & TD_DONE) ? " (DONE)" : "", td->urb, td->index, @@ -314,7 +314,7 @@ ohci_dump_ed (const struct ohci_hcd *ohci, const char *label, u32 tmp = hc32_to_cpu (ohci, ed->hwINFO); char *type = ""; - ohci_dbg (ohci, "%s, ed %p state 0x%x type %s; next ed %08x\n", + ohci_dbg (ohci, "%s, ed %pK state 0x%x type %s; next ed %08x\n", label, ed, ed->state, edstring (ed->type), hc32_to_cpup (ohci, &ed->hwNextED)); @@ -415,7 +415,7 @@ show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed) struct td *td; temp = scnprintf (buf, size, - "ed/%p %cs dev%d ep%d%s max %d %08x%s%s %s", + "ed/%pK %cs dev%d ep%d%s max %d %08x%s%s %s", ed, (info & ED_LOWSPEED) ? 'l' : 'f', info & 0x7f, @@ -437,7 +437,7 @@ show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed) cbp = hc32_to_cpup (ohci, &td->hwCBP); be = hc32_to_cpup (ohci, &td->hwBE); temp = scnprintf (buf, size, - "\n\ttd %p %s %d cc=%x urb %p (%08x)", + "\n\ttd %pK %s %d cc=%x urb %pK (%08x)", td, ({ char *pid; switch (info & TD_DP) { @@ -516,7 +516,7 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) next += temp; do { - temp = scnprintf (next, size, " ed%d/%p", + temp = scnprintf (next, size, " ed%d/%pK", ed->interval, ed); size -= temp; next += temp; diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 760cb57e954e..9094bca1bac6 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -278,7 +278,7 @@ static int ohci_urb_enqueue ( ed->interval); if (urb_priv->td_cnt >= urb_priv->length) { ++urb_priv->td_cnt; /* Mark it */ - ohci_dbg(ohci, "iso underrun %p (%u+%u < %u)\n", + ohci_dbg(ohci, "iso underrun %pK (%u+%u < %u)\n", urb, frame, length, next); } @@ -386,7 +386,7 @@ sanitize: /* caller was supposed to have unlinked any requests; * that's not our job. can't recover; must leak ed. */ - ohci_err (ohci, "leak ed %p (#%02x) state %d%s\n", + ohci_err (ohci, "leak ed %pK (#%02x) state %d%s\n", ed, ep->desc.bEndpointAddress, ed->state, list_empty (&ed->td_list) ? "" : " (has tds)"); td_free (ohci, ed->dummy); @@ -1028,7 +1028,7 @@ int ohci_restart(struct ohci_hcd *ohci) case ED_UNLINK: break; default: - ohci_dbg(ohci, "bogus ed %p state %d\n", + ohci_dbg(ohci, "bogus ed %pK state %d\n", ed, ed->state); } diff --git a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c index c9e315c6808a..99576f3a1970 100644 --- a/drivers/usb/host/ohci-mem.c +++ b/drivers/usb/host/ohci-mem.c @@ -109,7 +109,7 @@ td_free (struct ohci_hcd *hc, struct td *td) if (*prev) *prev = td->td_hash; else if ((td->hwINFO & cpu_to_hc32(hc, TD_DONE)) != 0) - ohci_dbg (hc, "no hash for td %p\n", td); + ohci_dbg (hc, "no hash for td %pK\n", td); dma_pool_free (hc->td_cache, td, td->td_dma); } diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c index 641fed609911..4365dc36be8d 100644 --- a/drivers/usb/host/ohci-q.c +++ b/drivers/usb/host/ohci-q.c @@ -143,7 +143,7 @@ static void periodic_link (struct ohci_hcd *ohci, struct ed *ed) { unsigned i; - ohci_dbg(ohci, "link %sed %p branch %d [%dus.], interval %d\n", + ohci_dbg(ohci, "link %sed %pK branch %d [%dus.], interval %d\n", (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "", ed, ed->branch, ed->load, ed->interval); @@ -287,7 +287,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed) } ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval; - ohci_dbg(ohci, "unlink %sed %p branch %d [%dus.], interval %d\n", + ohci_dbg(ohci, "unlink %sed %pK branch %d [%dus.], interval %d\n", (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "", ed, ed->branch, ed->load, ed->interval); } @@ -787,7 +787,7 @@ static int td_done(struct ohci_hcd *ohci, struct urb *urb, struct td *td) if (cc != TD_CC_NOERROR) ohci_dbg(ohci, - "urb %p iso td %p (%d) len %d cc %d\n", + "urb %pK iso td %pK (%d) len %d cc %d\n", urb, td, 1 + td->index, dlen, cc); /* BULK, INT, CONTROL ... drivers see aggregate length/status, @@ -819,7 +819,7 @@ static int td_done(struct ohci_hcd *ohci, struct urb *urb, struct td *td) if (cc != TD_CC_NOERROR && cc < 0x0E) ohci_dbg(ohci, - "urb %p td %p (%d) cc %d, len=%d/%d\n", + "urb %pK td %pK (%d) cc %d, len=%d/%d\n", urb, td, 1 + td->index, cc, urb->actual_length, urb->transfer_buffer_length); @@ -885,7 +885,7 @@ static void ed_halted(struct ohci_hcd *ohci, struct td *td, int cc) /* fallthrough */ default: ohci_dbg (ohci, - "urb %p path %s ep%d%s %08x cc %d --> status %d\n", + "urb %pK path %s ep%d%s %08x cc %d --> status %d\n", urb, urb->dev->devpath, usb_pipeendpoint (urb->pipe), usb_pipein (urb->pipe) ? "in" : "out", diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index 1b28a000d5c6..466ab4fa289e 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c @@ -47,7 +47,7 @@ static int uhci_show_td(struct uhci_hcd *uhci, struct uhci_td *td, char *buf, u32 status, token; status = td_status(uhci, td); - out += sprintf(out, "%*s[%p] link (%08x) ", space, "", td, + out += sprintf(out, "%*s[%pK] link (%08x) ", space, "", td, hc32_to_cpu(uhci, td->link)); out += sprintf(out, "e%d %s%s%s%s%s%s%s%s%s%sLength=%x ", ((status >> 27) & 3), @@ -105,9 +105,9 @@ static int uhci_show_urbp(struct uhci_hcd *uhci, struct urb_priv *urbp, char *ptype; - out += sprintf(out, "urb_priv [%p] ", urbp); - out += sprintf(out, "urb [%p] ", urbp->urb); - out += sprintf(out, "qh [%p] ", urbp->qh); + out += sprintf(out, "urb_priv [%pK] ", urbp); + out += sprintf(out, "urb [%pK] ", urbp->urb); + out += sprintf(out, "qh [%pK] ", urbp->qh); out += sprintf(out, "Dev=%d ", usb_pipedevice(urbp->urb->pipe)); out += sprintf(out, "EP=%x(%s) ", usb_pipeendpoint(urbp->urb->pipe), (usb_pipein(urbp->urb->pipe) ? "IN" : "OUT")); @@ -177,13 +177,13 @@ static int uhci_show_qh(struct uhci_hcd *uhci, default: qtype = "Skel" ; break; } - out += sprintf(out, "%*s[%p] %s QH link (%08x) element (%08x)\n", + out += sprintf(out, "%*s[%pK] %s QH link (%08x) element (%08x)\n", space, "", qh, qtype, hc32_to_cpu(uhci, qh->link), hc32_to_cpu(uhci, element)); if (qh->type == USB_ENDPOINT_XFER_ISOC) out += sprintf(out, - "%*s period %d phase %d load %d us, frame %x desc [%p]\n", + "%*s period %d phase %d load %d us, frame %x desc [%pK]\n", space, "", qh->period, qh->phase, qh->load, qh->iso_frame, qh->iso_packet_desc); else if (qh->type == USB_ENDPOINT_XFER_INT) diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index da6f56d996ce..9ca86cf5c9a9 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c @@ -124,9 +124,9 @@ static struct uhci_td *uhci_alloc_td(struct uhci_hcd *uhci) static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td) { if (!list_empty(&td->list)) - dev_WARN(uhci_dev(uhci), "td %p still in list!\n", td); + dev_WARN(uhci_dev(uhci), "td %pK still in list!\n", td); if (!list_empty(&td->fl_list)) - dev_WARN(uhci_dev(uhci), "td %p still in fl_list!\n", td); + dev_WARN(uhci_dev(uhci), "td %pK still in fl_list!\n", td); dma_pool_free(uhci->td_pool, td, td->dma_handle); } @@ -294,7 +294,7 @@ static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) { WARN_ON(qh->state != QH_STATE_IDLE && qh->udev); if (!list_empty(&qh->queue)) - dev_WARN(uhci_dev(uhci), "qh %p list not empty!\n", qh); + dev_WARN(uhci_dev(uhci), "qh %pK list not empty!\n", qh); list_del(&qh->node); if (qh->udev) { @@ -744,7 +744,7 @@ static void uhci_free_urb_priv(struct uhci_hcd *uhci, struct uhci_td *td, *tmp; if (!list_empty(&urbp->node)) - dev_WARN(uhci_dev(uhci), "urb %p still on QH's list!\n", + dev_WARN(uhci_dev(uhci), "urb %pK still on QH's list!\n", urbp->urb); list_for_each_entry_safe(td, tmp, &urbp->td_list, list) { @@ -1317,7 +1317,7 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, else if (!uhci_frame_before_eq(next, frame + (urb->number_of_packets - 1) * qh->period)) - dev_dbg(uhci_dev(uhci), "iso underrun %p (%u+%u < %u)\n", + dev_dbg(uhci_dev(uhci), "iso underrun %pK (%u+%u < %u)\n", urb, frame, (urb->number_of_packets - 1) * qh->period, diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c index 74c42f722678..34388950f96b 100644 --- a/drivers/usb/host/xhci-dbg.c +++ b/drivers/usb/host/xhci-dbg.c @@ -30,10 +30,10 @@ void xhci_dbg_regs(struct xhci_hcd *xhci) { u32 temp; - xhci_dbg(xhci, "// xHCI capability registers at %p:\n", + xhci_dbg(xhci, "// xHCI capability registers at %pK:\n", xhci->cap_regs); temp = readl(&xhci->cap_regs->hc_capbase); - xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n", + xhci_dbg(xhci, "// @%pK = 0x%x (CAPLENGTH AND HCIVERSION)\n", &xhci->cap_regs->hc_capbase, temp); xhci_dbg(xhci, "// CAPLENGTH: 0x%x\n", (unsigned int) HC_LENGTH(temp)); @@ -42,17 +42,17 @@ void xhci_dbg_regs(struct xhci_hcd *xhci) (unsigned int) HC_VERSION(temp)); #endif - xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs); + xhci_dbg(xhci, "// xHCI operational registers at %pK:\n", xhci->op_regs); temp = readl(&xhci->cap_regs->run_regs_off); - xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n", + xhci_dbg(xhci, "// @%pK = 0x%x RTSOFF\n", &xhci->cap_regs->run_regs_off, (unsigned int) temp & RTSOFF_MASK); - xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs); + xhci_dbg(xhci, "// xHCI runtime registers at %pK:\n", xhci->run_regs); temp = readl(&xhci->cap_regs->db_off); - xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", &xhci->cap_regs->db_off, temp); - xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba); + xhci_dbg(xhci, "// @%pK = 0x%x DBOFF\n", &xhci->cap_regs->db_off, temp); + xhci_dbg(xhci, "// Doorbell array at %pK:\n", xhci->dba); } static void xhci_print_cap_regs(struct xhci_hcd *xhci) @@ -60,7 +60,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci) u32 temp; u32 hci_version; - xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs); + xhci_dbg(xhci, "xHCI capability registers at %pK:\n", xhci->cap_regs); temp = readl(&xhci->cap_regs->hc_capbase); hci_version = HC_VERSION(temp); @@ -157,7 +157,7 @@ static void xhci_print_status(struct xhci_hcd *xhci) static void xhci_print_op_regs(struct xhci_hcd *xhci) { - xhci_dbg(xhci, "xHCI operational registers at %p:\n", xhci->op_regs); + xhci_dbg(xhci, "xHCI operational registers at %pK:\n", xhci->op_regs); xhci_print_command_reg(xhci); xhci_print_status(xhci); } @@ -178,7 +178,7 @@ static void xhci_print_ports(struct xhci_hcd *xhci) addr = &xhci->op_regs->port_status_base; for (i = 0; i < ports; i++) { for (j = 0; j < NUM_PORT_REGS; ++j) { - xhci_dbg(xhci, "%p port %s reg = 0x%x\n", + xhci_dbg(xhci, "%pK port %s reg = 0x%x\n", addr, names[j], (unsigned int) readl(addr)); addr++; @@ -198,35 +198,35 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, int set_num) if (temp == XHCI_INIT_VALUE) return; - xhci_dbg(xhci, " %p: ir_set[%i]\n", ir_set, set_num); + xhci_dbg(xhci, " %pK: ir_set[%i]\n", ir_set, set_num); - xhci_dbg(xhci, " %p: ir_set.pending = 0x%x\n", addr, + xhci_dbg(xhci, " %pK: ir_set.pending = 0x%x\n", addr, (unsigned int)temp); addr = &ir_set->irq_control; temp = readl(addr); - xhci_dbg(xhci, " %p: ir_set.control = 0x%x\n", addr, + xhci_dbg(xhci, " %pK: ir_set.control = 0x%x\n", addr, (unsigned int)temp); addr = &ir_set->erst_size; temp = readl(addr); - xhci_dbg(xhci, " %p: ir_set.erst_size = 0x%x\n", addr, + xhci_dbg(xhci, " %pK: ir_set.erst_size = 0x%x\n", addr, (unsigned int)temp); addr = &ir_set->rsvd; temp = readl(addr); if (temp != XHCI_INIT_VALUE) - xhci_dbg(xhci, " WARN: %p: ir_set.rsvd = 0x%x\n", + xhci_dbg(xhci, " WARN: %pK: ir_set.rsvd = 0x%x\n", addr, (unsigned int)temp); addr = &ir_set->erst_base; temp_64 = xhci_read_64(xhci, addr); - xhci_dbg(xhci, " %p: ir_set.erst_base = @%08llx\n", + xhci_dbg(xhci, " %pK: ir_set.erst_base = @%08llx\n", addr, temp_64); addr = &ir_set->erst_dequeue; temp_64 = xhci_read_64(xhci, addr); - xhci_dbg(xhci, " %p: ir_set.erst_dequeue = @%08llx\n", + xhci_dbg(xhci, " %pK: ir_set.erst_dequeue = @%08llx\n", addr, temp_64); } @@ -235,15 +235,15 @@ void xhci_print_run_regs(struct xhci_hcd *xhci) u32 temp; int i; - xhci_dbg(xhci, "xHCI runtime registers at %p:\n", xhci->run_regs); + xhci_dbg(xhci, "xHCI runtime registers at %pK:\n", xhci->run_regs); temp = readl(&xhci->run_regs->microframe_index); - xhci_dbg(xhci, " %p: Microframe index = 0x%x\n", + xhci_dbg(xhci, " %pK: Microframe index = 0x%x\n", &xhci->run_regs->microframe_index, (unsigned int) temp); for (i = 0; i < 7; ++i) { temp = readl(&xhci->run_regs->rsvd[i]); if (temp != XHCI_INIT_VALUE) - xhci_dbg(xhci, " WARN: %p: Rsvd[%i] = 0x%x\n", + xhci_dbg(xhci, " WARN: %pK: Rsvd[%i] = 0x%x\n", &xhci->run_regs->rsvd[i], i, (unsigned int) temp); } @@ -345,13 +345,13 @@ void xhci_debug_segment(struct xhci_hcd *xhci, struct xhci_segment *seg) void xhci_dbg_ring_ptrs(struct xhci_hcd *xhci, struct xhci_ring *ring) { - xhci_dbg(xhci, "Ring deq = %p (virt), 0x%llx (dma)\n", + xhci_dbg(xhci, "Ring deq = %pK (virt), 0x%llx (dma)\n", ring->dequeue, (unsigned long long)xhci_trb_virt_to_dma(ring->deq_seg, ring->dequeue)); xhci_dbg(xhci, "Ring deq updated %u times\n", ring->deq_updates); - xhci_dbg(xhci, "Ring enq = %p (virt), 0x%llx (dma)\n", + xhci_dbg(xhci, "Ring enq = %pK (virt), 0x%llx (dma)\n", ring->enqueue, (unsigned long long)xhci_trb_virt_to_dma(ring->enq_seg, ring->enqueue)); @@ -441,7 +441,7 @@ static void dbg_rsvd64(struct xhci_hcd *xhci, u64 *ctx, dma_addr_t dma) { int i; for (i = 0; i < 4; ++i) { - xhci_dbg(xhci, "@%p (virt) @%08llx " + xhci_dbg(xhci, "@%pK (virt) @%08llx " "(dma) %#08llx - rsvd64[%d]\n", &ctx[4 + i], (unsigned long long)dma, ctx[4 + i], i); @@ -480,24 +480,24 @@ static void xhci_dbg_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx * int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params); xhci_dbg(xhci, "Slot Context:\n"); - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_info\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - dev_info\n", &slot_ctx->dev_info, (unsigned long long)dma, slot_ctx->dev_info); dma += field_size; - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_info2\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - dev_info2\n", &slot_ctx->dev_info2, (unsigned long long)dma, slot_ctx->dev_info2); dma += field_size; - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - tt_info\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - tt_info\n", &slot_ctx->tt_info, (unsigned long long)dma, slot_ctx->tt_info); dma += field_size; - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_state\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - dev_state\n", &slot_ctx->dev_state, (unsigned long long)dma, slot_ctx->dev_state); dma += field_size; for (i = 0; i < 4; ++i) { - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - rsvd[%d]\n", &slot_ctx->reserved[i], (unsigned long long)dma, slot_ctx->reserved[i], i); dma += field_size; @@ -528,24 +528,24 @@ static void xhci_dbg_ep_ctx(struct xhci_hcd *xhci, xhci_dbg(xhci, "%s Endpoint %02d Context (ep_index %02d):\n", usb_endpoint_out(epaddr) ? "OUT" : "IN", epaddr & USB_ENDPOINT_NUMBER_MASK, i); - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - ep_info\n", &ep_ctx->ep_info, (unsigned long long)dma, ep_ctx->ep_info); dma += field_size; - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info2\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - ep_info2\n", &ep_ctx->ep_info2, (unsigned long long)dma, ep_ctx->ep_info2); dma += field_size; - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08llx - deq\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08llx - deq\n", &ep_ctx->deq, (unsigned long long)dma, ep_ctx->deq); dma += 2*field_size; - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - tx_info\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - tx_info\n", &ep_ctx->tx_info, (unsigned long long)dma, ep_ctx->tx_info); dma += field_size; for (j = 0; j < 3; ++j) { - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - rsvd[%d]\n", &ep_ctx->reserved[j], (unsigned long long)dma, ep_ctx->reserved[j], j); @@ -575,16 +575,16 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci, return; } - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - drop flags\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - drop flags\n", &ctrl_ctx->drop_flags, (unsigned long long)dma, ctrl_ctx->drop_flags); dma += field_size; - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - add flags\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - add flags\n", &ctrl_ctx->add_flags, (unsigned long long)dma, ctrl_ctx->add_flags); dma += field_size; for (i = 0; i < 6; ++i) { - xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd2[%d]\n", + xhci_dbg(xhci, "@%pK (virt) @%08llx (dma) %#08x - rsvd2[%d]\n", &ctrl_ctx->rsvd2[i], (unsigned long long)dma, ctrl_ctx->rsvd2[i], i); dma += field_size; diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 373e9d039457..2b4f3a02f7e8 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -1022,7 +1022,7 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, /* Point to output device context in dcbaa. */ xhci->dcbaa->dev_context_ptrs[slot_id] = cpu_to_le64(dev->out_ctx->dma); - xhci_dbg(xhci, "Set slot id %d dcbaa entry %p to 0x%llx\n", + xhci_dbg(xhci, "Set slot id %d dcbaa entry %pK to 0x%llx\n", slot_id, &xhci->dcbaa->dev_context_ptrs[slot_id], le64_to_cpu(xhci->dcbaa->dev_context_ptrs[slot_id])); @@ -1184,7 +1184,7 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud if (udev->tt->multi) slot_ctx->dev_info |= cpu_to_le32(DEV_MTT); } - xhci_dbg(xhci, "udev->tt = %p\n", udev->tt); + xhci_dbg(xhci, "udev->tt = %pK\n", udev->tt); xhci_dbg(xhci, "udev->ttport = 0x%x\n", udev->ttport); /* Step 4 - ring already allocated */ @@ -2035,15 +2035,15 @@ static int xhci_test_trb_in_td(struct xhci_hcd *xhci, if (seg != result_seg) { xhci_warn(xhci, "WARN: %s TRB math test %d failed!\n", test_name, test_number); - xhci_warn(xhci, "Tested TRB math w/ seg %p and " + xhci_warn(xhci, "Tested TRB math w/ seg %pK and " "input DMA 0x%llx\n", input_seg, (unsigned long long) input_dma); - xhci_warn(xhci, "starting TRB %p (0x%llx DMA), " - "ending TRB %p (0x%llx DMA)\n", + xhci_warn(xhci, "starting TRB %pK (0x%llx DMA), " + "ending TRB %pK (0x%llx DMA)\n", start_trb, start_dma, end_trb, end_dma); - xhci_warn(xhci, "Expected seg %p, got seg %p\n", + xhci_warn(xhci, "Expected seg %pK, got seg %pK\n", result_seg, seg); trb_in_td(xhci, input_seg, start_trb, end_trb, input_dma, true); @@ -2189,7 +2189,7 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, rhub = &xhci->usb2_rhub; } else { xhci_warn(xhci, "Ignoring unknown port speed, " - "Ext Cap %p, revision = 0x%x\n", + "Ext Cap %pK, revision = 0x%x\n", addr, major_revision); /* Ignoring port protocol we can't understand. FIXME */ return; @@ -2202,7 +2202,7 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, port_offset = XHCI_EXT_PORT_OFF(temp); port_count = XHCI_EXT_PORT_COUNT(temp); xhci_dbg_trace(xhci, trace_xhci_dbg_init, - "Ext Cap %p, port offset = %u, " + "Ext Cap %pK, port offset = %u, " "count = %u, revision = 0x%x", addr, port_offset, port_count, major_revision); /* Port count includes the current port offset */ @@ -2264,7 +2264,7 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, for (i = port_offset; i < (port_offset + port_count); i++) { /* Duplicate entry. Ignore the port if the revisions differ. */ if (xhci->port_array[i] != 0) { - xhci_warn(xhci, "Duplicate port entry, Ext Cap %p," + xhci_warn(xhci, "Duplicate port entry, Ext Cap %pK," " port %u\n", addr, i); xhci_warn(xhci, "Port was marked as USB %u, " "duplicated as USB %u\n", @@ -2420,7 +2420,7 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags) NUM_PORT_REGS*i; xhci_dbg_trace(xhci, trace_xhci_dbg_init, "USB 2.0 port at index %u, " - "addr = %p", i, + "addr = %pK", i, xhci->usb2_ports[port_index]); port_index++; if (port_index == xhci->num_usb2_ports) @@ -2441,7 +2441,7 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags) NUM_PORT_REGS*i; xhci_dbg_trace(xhci, trace_xhci_dbg_init, "USB 3.0 port at index %u, " - "addr = %p", i, + "addr = %pK", i, xhci->usb3_ports[port_index]); port_index++; if (port_index == xhci->num_usb3_ports) @@ -2482,7 +2482,7 @@ int xhci_event_ring_setup(struct xhci_hcd *xhci, struct xhci_ring **er, erst->num_entries = ERST_NUM_SEGS; erst->erst_dma_addr = dma; xhci_dbg_trace(xhci, trace_xhci_dbg_init, - "intr# %d: num segs = %i, virt addr = %p, dma addr = 0x%llx", + "intr# %d: num segs = %i, virt addr = %pK, dma addr = 0x%llx", intr_num, erst->num_entries, erst->entries, @@ -2554,7 +2554,7 @@ int xhci_sec_event_ring_setup(struct usb_hcd *hcd, unsigned intr_num) || !xhci->sec_event_ring || !xhci->sec_erst || intr_num > xhci->max_interrupters) { xhci_err(xhci, - "%s:state %x ir_set %p evt_ring %p erst %p intr# %d\n", + "%s:state %x ir_set %pK evt_ring %pK erst %pK intr# %d\n", __func__, xhci->xhc_state, xhci->sec_ir_set, xhci->sec_event_ring, xhci->sec_erst, intr_num); return -EINVAL; @@ -2681,7 +2681,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) memset(xhci->dcbaa, 0, sizeof *(xhci->dcbaa)); xhci->dcbaa->dma = dma; xhci_dbg_trace(xhci, trace_xhci_dbg_init, - "// Device context base array address = 0x%llx (DMA), %p (virt)", + "// Device context base array address = 0x%llx (DMA), %pK (virt)", (unsigned long long)xhci->dcbaa->dma, xhci->dcbaa); xhci_write_64(xhci, dma, &xhci->op_regs->dcbaa_ptr); @@ -2722,7 +2722,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) if (!xhci->cmd_ring) goto fail; xhci_dbg_trace(xhci, trace_xhci_dbg_init, - "Allocated command ring at %p", xhci->cmd_ring); + "Allocated command ring at %pK", xhci->cmd_ring); xhci_dbg_trace(xhci, trace_xhci_dbg_init, "First segment DMA is 0x%llx", (unsigned long long)xhci->cmd_ring->first_seg->dma); diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index a5e600910057..fe529f9f7d28 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -525,7 +525,7 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, "Cycle state = 0x%x", state->new_cycle_state); xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, - "New dequeue segment = %p (virtual)", + "New dequeue segment = %pK (virtual)", state->new_deq_seg); addr = xhci_trb_virt_to_dma(state->new_deq_seg, state->new_deq_ptr); xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, @@ -560,8 +560,8 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, "Cancel (unchain) link TRB"); xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, - "Address = %p (0x%llx dma); " - "in seg %p (0x%llx dma)", + "Address = %pK (0x%llx dma); " + "in seg %pK (0x%llx dma)", cur_trb, (unsigned long long)xhci_trb_virt_to_dma(cur_seg, cur_trb), cur_seg, @@ -697,7 +697,7 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id, * short, don't muck with the stream ID after * submission. */ - xhci_warn(xhci, "WARN Cancelled URB %p " + xhci_warn(xhci, "WARN Cancelled URB %pK " "has invalid stream ID %u.\n", cur_td->urb, cur_td->urb->stream_id); @@ -1040,7 +1040,7 @@ static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id, ep_ring, ep_index); } else { xhci_warn(xhci, "Mismatch between completed Set TR Deq Ptr command & xHCI internal state.\n"); - xhci_warn(xhci, "ep deq seg = %p, deq ptr = %p\n", + xhci_warn(xhci, "ep deq seg = %pK, deq ptr = %pK\n", ep->queued_deq_seg, ep->queued_deq_ptr); } } @@ -1224,7 +1224,7 @@ static void xhci_handle_stopped_cmd_ring(struct xhci_hcd *xhci, i_cmd->status = COMP_CMD_STOP; - xhci_dbg(xhci, "Turn aborted command %p to no-op\n", + xhci_dbg(xhci, "Turn aborted command %pK to no-op\n", i_cmd->command_trb); /* get cycle state from the original cmd trb */ cycle_state = le32_to_cpu( @@ -2595,7 +2595,7 @@ cleanup: URB_SHORT_NOT_OK)) || (status != 0 && !usb_endpoint_xfer_isoc(&urb->ep->desc))) - xhci_dbg(xhci, "Giveback URB %p, len = %d, " + xhci_dbg(xhci, "Giveback URB %pK, len = %d, " "expected = %d, status = %d\n", urb, urb->actual_length, urb->transfer_buffer_length, @@ -4299,7 +4299,7 @@ void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci, int ret; xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, - "Set TR Deq Ptr cmd, new deq seg = %p (0x%llx dma), new deq ptr = %p (0x%llx dma), new cycle = %u", + "Set TR Deq Ptr cmd, new deq seg = %pK (0x%llx dma), new deq ptr = %pK (0x%llx dma), new cycle = %u", deq_state->new_deq_seg, (unsigned long long)deq_state->new_deq_seg->dma, deq_state->new_deq_ptr, @@ -4311,7 +4311,7 @@ void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci, deq_state->new_deq_ptr); if (addr == 0) { xhci_warn(xhci, "WARN Cannot submit Set TR Deq Ptr\n"); - xhci_warn(xhci, "WARN deq seg = %p, deq pt = %p\n", + xhci_warn(xhci, "WARN deq seg = %pK, deq pt = %pK\n", deq_state->new_deq_seg, deq_state->new_deq_ptr); return; } diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h index 59c05653b2ea..4ef95ac3d976 100644 --- a/drivers/usb/host/xhci-trace.h +++ b/drivers/usb/host/xhci-trace.h @@ -103,7 +103,7 @@ DECLARE_EVENT_CLASS(xhci_log_ctx, ((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 32) * ((ctx->type == XHCI_CTX_TYPE_INPUT) + ep_num + 1)); ), - TP_printk("\nctx_64=%d, ctx_type=%u, ctx_dma=@%llx, ctx_va=@%p", + TP_printk("\nctx_64=%d, ctx_type=%u, ctx_dma=@%llx, ctx_va=@%pK", __entry->ctx_64, __entry->ctx_type, (unsigned long long) __entry->ctx_dma, __entry->ctx_va ) @@ -134,7 +134,7 @@ DECLARE_EVENT_CLASS(xhci_log_event, memcpy(__get_dynamic_array(trb), trb_va, sizeof(struct xhci_generic_trb)); ), - TP_printk("\ntrb_dma=@%llx, trb_va=@%p, status=%08x, flags=%08x", + TP_printk("\ntrb_dma=@%llx, trb_va=@%pK, status=%08x, flags=%08x", (unsigned long long) __entry->dma, __entry->va, __entry->status, __entry->flags ) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 8cfc4ca4c050..6e2c2f2bcce2 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -659,7 +659,7 @@ int xhci_run(struct usb_hcd *hcd) temp = readl(&xhci->ir_set->irq_pending); xhci_dbg_trace(xhci, trace_xhci_dbg_init, - "// Enabling event ring interrupter %p by writing 0x%x to irq_pending", + "// Enabling event ring interrupter %pK by writing 0x%x to irq_pending", xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp)); writel(ER_IRQ_ENABLE(temp), &xhci->ir_set->irq_pending); xhci_print_ir_set(xhci, 0); @@ -1458,7 +1458,7 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) exit: return ret; dying: - xhci_dbg(xhci, "Ep 0x%x: URB %p submitted for " + xhci_dbg(xhci, "Ep 0x%x: URB %pK submitted for " "non-responsive xHCI host.\n", urb->ep->desc.bEndpointAddress, urb); ret = -ESHUTDOWN; @@ -1584,7 +1584,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) if ((xhci->xhc_state & XHCI_STATE_DYING) || (xhci->xhc_state & XHCI_STATE_HALTED)) { xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, - "Ep 0x%x: URB %p to be canceled on " + "Ep 0x%x: URB %pK to be canceled on " "non-responsive xHCI host.", urb->ep->desc.bEndpointAddress, urb); /* Let the stop endpoint command watchdog timer (which set this @@ -1607,7 +1607,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) i = urb_priv->td_cnt; if (i < urb_priv->length) xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, - "Cancel URB %p, dev %s, ep 0x%x, " + "Cancel URB %pK, dev %s, ep 0x%x, " "starting at offset 0x%llx", urb, urb->dev->devpath, urb->ep->desc.bEndpointAddress, @@ -1675,7 +1675,7 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, if (xhci->xhc_state & XHCI_STATE_DYING) return -ENODEV; - xhci_dbg(xhci, "%s called for udev %p\n", __func__, udev); + xhci_dbg(xhci, "%s called for udev %pK\n", __func__, udev); drop_flag = xhci_get_endpoint_flag(&ep->desc); if (drop_flag == SLOT_FLAG || drop_flag == EP0_FLAG) { xhci_dbg(xhci, "xHCI %s - can't drop slot or ep 0 %#x\n", @@ -1703,7 +1703,7 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, xhci_get_endpoint_flag(&ep->desc)) { /* Do not warn when called after a usb_device_reset */ if (xhci->devs[udev->slot_id]->eps[ep_index].ring != NULL) - xhci_warn(xhci, "xHCI %s called with disabled ep %p\n", + xhci_warn(xhci, "xHCI %s called with disabled ep %pK\n", __func__, ep); return 0; } @@ -1795,7 +1795,7 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, * ignore this request. */ if (le32_to_cpu(ctrl_ctx->add_flags) & added_ctxs) { - xhci_warn(xhci, "xHCI %s called with enabled ep %p\n", + xhci_warn(xhci, "xHCI %s called with enabled ep %pK\n", __func__, ep); return 0; } @@ -2776,7 +2776,7 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) (xhci->xhc_state & XHCI_STATE_REMOVING)) return -ENODEV; - xhci_dbg(xhci, "%s called for udev %p\n", __func__, udev); + xhci_dbg(xhci, "%s called for udev %pK\n", __func__, udev); virt_dev = xhci->devs[udev->slot_id]; command = xhci_alloc_command(xhci, false, true, GFP_KERNEL); @@ -2873,7 +2873,7 @@ void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) return; xhci = hcd_to_xhci(hcd); - xhci_dbg(xhci, "%s called for udev %p\n", __func__, udev); + xhci_dbg(xhci, "%s called for udev %pK\n", __func__, udev); virt_dev = xhci->devs[udev->slot_id]; /* Free any rings allocated for added endpoints */ for (i = 0; i < 31; ++i) { @@ -2926,7 +2926,7 @@ static void xhci_setup_input_ctx_for_quirk(struct xhci_hcd *xhci, if (addr == 0) { xhci_warn(xhci, "WARN Cannot submit config ep after " "reset ep command\n"); - xhci_warn(xhci, "WARN deq seg = %p, deq ptr = %p\n", + xhci_warn(xhci, "WARN deq seg = %pK, deq ptr = %pK\n", deq_state->new_deq_seg, deq_state->new_deq_ptr); return; @@ -3948,7 +3948,7 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev, xhci_dbg_trace(xhci, trace_xhci_dbg_address, "Op regs DCBAA ptr = %#016llx", temp_64); xhci_dbg_trace(xhci, trace_xhci_dbg_address, - "Slot ID %d dcbaa entry @%p = %#016llx", + "Slot ID %d dcbaa entry @%pK = %#016llx", udev->slot_id, &xhci->dcbaa->dev_context_ptrs[udev->slot_id], (unsigned long long) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 970a30e155cb..f3e17b84efff 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2009-2017, Code Aurora Forum. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1727,7 +1727,7 @@ static int msm_otg_probe(struct platform_device *pdev) writel(0x1, phy_select); } - dev_info(&pdev->dev, "OTG regs = %p\n", motg->regs); + dev_info(&pdev->dev, "OTG regs = %pK\n", motg->regs); motg->irq = platform_get_irq(pdev, 0); if (motg->irq < 0) { diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index c07a7eda42a2..252dd6df5ef1 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -357,7 +357,7 @@ static void queue_pending_output_urbs(struct snd_usb_endpoint *ep) err = usb_submit_urb(ctx->urb, GFP_ATOMIC); if (err < 0) usb_audio_err(ep->chip, - "Unable to submit urb #%d: %d (urb %p)\n", + "Unable to submit urb #%d: %d (urb %pK)\n", ctx->index, err, ctx->urb); else set_bit(ctx->index, &ep->active_mask); @@ -459,7 +459,7 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip, ep->iface == alts->desc.bInterfaceNumber && ep->altsetting == alts->desc.bAlternateSetting) { usb_audio_dbg(ep->chip, - "Re-using EP %x in iface %d,%d @%p\n", + "Re-using EP %x in iface %d,%d @%pK\n", ep_num, ep->iface, ep->altsetting, ep); goto __exit_unlock; } diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index ae8f8660a18d..a0c0a184d02b 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -228,7 +228,7 @@ static int start_endpoints(struct snd_usb_substream *subs, bool can_sleep) if (!test_and_set_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags)) { struct snd_usb_endpoint *ep = subs->data_endpoint; - dev_dbg(&subs->dev->dev, "Starting data EP @%p\n", ep); + dev_dbg(&subs->dev->dev, "Starting data EP @%pK\n", ep); ep->data_subs = subs; err = snd_usb_endpoint_start(ep, can_sleep); @@ -257,7 +257,7 @@ static int start_endpoints(struct snd_usb_substream *subs, bool can_sleep) } } - dev_dbg(&subs->dev->dev, "Starting sync EP @%p\n", ep); + dev_dbg(&subs->dev->dev, "Starting sync EP @%pK\n", ep); ep->sync_slave = subs->data_endpoint; err = snd_usb_endpoint_start(ep, can_sleep); @@ -629,13 +629,13 @@ static int match_endpoint_audioformats(struct snd_usb_substream *subs, if (fp->channels < 1) { dev_dbg(&subs->dev->dev, - "%s: (fmt @%p) no channels\n", __func__, fp); + "%s: (fmt @%pK) no channels\n", __func__, fp); return 0; } if (!(fp->formats & pcm_format_to_bits(pcm_format))) { dev_dbg(&subs->dev->dev, - "%s: (fmt @%p) no match for format %d\n", __func__, + "%s: (fmt @%pK) no match for format %d\n", __func__, fp, pcm_format); return 0; } @@ -648,7 +648,7 @@ static int match_endpoint_audioformats(struct snd_usb_substream *subs, } if (!score) { dev_dbg(&subs->dev->dev, - "%s: (fmt @%p) no match for rate %d\n", __func__, + "%s: (fmt @%pK) no match for rate %d\n", __func__, fp, rate); return 0; } @@ -657,7 +657,7 @@ static int match_endpoint_audioformats(struct snd_usb_substream *subs, score++; dev_dbg(&subs->dev->dev, - "%s: (fmt @%p) score %d\n", __func__, fp, score); + "%s: (fmt @%pK) score %d\n", __func__, fp, score); return score; } diff --git a/sound/usb/usb_audio_qmi_svc.c b/sound/usb/usb_audio_qmi_svc.c index 2cdf4901b8c7..039519c1d822 100644 --- a/sound/usb/usb_audio_qmi_svc.c +++ b/sound/usb/usb_audio_qmi_svc.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -806,7 +806,7 @@ static void uaudio_dev_release(struct kref *kref) { struct uaudio_dev *dev = container_of(kref, struct uaudio_dev, kref); - pr_debug("%s for dev %p\n", __func__, dev); + pr_debug("%s for dev %pK\n", __func__, dev); atomic_set(&dev->in_use, 0);