Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abc46fb4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: replace %p with %pK"

parents c7d45bb4 7d08f0c4
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
/* 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
@@ -235,10 +235,10 @@ void msm_bam_set_hsic_host_dev(struct device *dev)
	if (dev) {
		/* Hold the device until allowing lpm */
		info[HSIC_CTRL].in_lpm = false;
		log_event_dbg("%s: Getting hsic device %p\n", __func__, dev);
		log_event_dbg("%s: Getting hsic device %pK\n", __func__, dev);
		pm_runtime_get(dev);
	} else if (host_info[HSIC_CTRL].dev) {
		log_event_dbg("%s: Try Putting hsic device %p, lpm:%d\n",
		log_event_dbg("%s: Try Putting hsic device %pK, lpm:%d\n",
				__func__, host_info[HSIC_CTRL].dev,
				info[HSIC_CTRL].in_lpm);
		/* Just release previous device if not already done */
@@ -825,7 +825,7 @@ static bool _hsic_host_bam_resume_core(void)

	/* Exit from "full suspend" in case of hsic host */
	if (host_info[HSIC_CTRL].dev && info[HSIC_CTRL].in_lpm) {
		log_event_dbg("%s: Getting hsic device %p\n", __func__,
		log_event_dbg("%s: Getting hsic device %pK\n", __func__,
			host_info[HSIC_CTRL].dev);
		pm_runtime_get(host_info[HSIC_CTRL].dev);
		info[HSIC_CTRL].in_lpm = false;
@@ -839,7 +839,7 @@ static void _hsic_host_bam_suspend_core(void)
	log_event_dbg("%s: enter\n", __func__);

	if (host_info[HSIC_CTRL].dev && !info[HSIC_CTRL].in_lpm) {
		log_event_dbg("%s: Putting hsic host device %p\n", __func__,
		log_event_dbg("%s: Putting hsic host device %pK\n", __func__,
			host_info[HSIC_CTRL].dev);
		pm_runtime_put(host_info[HSIC_CTRL].dev);
		info[HSIC_CTRL].in_lpm = true;
@@ -1724,7 +1724,7 @@ static bool check_pipes_empty(enum usb_ctrl bam_type, u8 src_idx, u8 dst_idx)
	/* If we have any remaints in the pipes we don't go to sleep */
	prod_pipe = ctx->usb_bam_sps.sps_pipes[src_idx];
	cons_pipe = ctx->usb_bam_sps.sps_pipes[dst_idx];
	log_event_dbg("prod_pipe=%p, cons_pipe=%p\n", prod_pipe, cons_pipe);
	log_event_dbg("prod_pipe=%pK, cons_pipe=%pK\n", prod_pipe, cons_pipe);

	if (!cons_pipe || (!prod_pipe &&
			prod_pipe_connect->pipe_type == USB_BAM_PIPE_BAM2BAM)) {
@@ -2091,7 +2091,7 @@ static bool msm_bam_host_lpm_ok(enum usb_ctrl bam_type)
		}

		/* HSIC host will go now to lpm */
		log_event_dbg("%s: vote for suspend hsic %p\n",
		log_event_dbg("%s: vote for suspend hsic %pK\n",
			__func__, host_info[bam_type].dev);

		for (i = 0; i < ctx->max_connections; i++) {
@@ -2454,7 +2454,7 @@ static void usb_bam_work(struct work_struct *w)
			if (pipe_iter->bam_type == pipe_connect->bam_type &&
			    pipe_iter->dir == PEER_PERIPHERAL_TO_USB &&
			    pipe_iter->enabled) {
				log_event_dbg("%s: Register wakeup on pipe %p\n",
				log_event_dbg("%s: Register wakeup on pipe %pK\n",
					__func__, pipe_iter);
				__usb_bam_register_wake_cb(
					pipe_connect->bam_type, i,
+2 −2
Original line number Diff line number Diff line
@@ -490,7 +490,7 @@ static void android_work(struct work_struct *data)
		}
		pr_info("%s: sent uevent %s\n", __func__, uevent_envp[0]);
	} else {
		pr_info("%s: did not send uevent (%d %d %p)\n", __func__,
		pr_info("%s: did not send uevent (%d %d %pK)\n", __func__,
			 dev->connected, dev->sw_connected, cdev->config);
	}
}
@@ -4244,7 +4244,7 @@ static int usb_diag_update_pid_and_serial_num(u32 pid, const char *snum)
		return -ENODEV;
	}

	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, pid, snum);

	/* update pid */
+3 −3
Original line number Diff line number Diff line
/* 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
@@ -379,7 +379,7 @@ static void msm_hsic_start(void)
		while (seq[0] >= 0 && seq_count > 0) {
			val = readl_relaxed(mhsic->tlmm_regs + seq[0]);
			val |= seq[1];
			dev_dbg(mhsic->dev, "%s: writing %x to %p\n",
			dev_dbg(mhsic->dev, "%s: writing %x to %pK\n",
				__func__, val, mhsic->tlmm_regs + seq[0]);
			writel_relaxed(val, mhsic->tlmm_regs + seq[0]);
			seq += 2;
@@ -948,7 +948,7 @@ static int msm_hsic_probe(struct platform_device *pdev)
		ret = -ENOMEM;
		goto error;
	}
	dev_info(&pdev->dev, "HSIC Peripheral regs = %p\n", mhsic->regs);
	dev_info(&pdev->dev, "HSIC Peripheral regs = %pK\n", mhsic->regs);

	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
	if (!res && pdata->tlmm_init_seq) {
+38 −38
Original line number Diff line number Diff line
@@ -859,7 +859,7 @@ static ssize_t show_device(struct device *dev, struct device_attribute *attr,
	struct usb_gadget *gadget = &udc->gadget;
	int n = 0;

	dbg_trace("[%s] %p\n", __func__, buf);
	dbg_trace("[%s] %pK\n", __func__, buf);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		return 0;
@@ -901,7 +901,7 @@ static ssize_t show_driver(struct device *dev, struct device_attribute *attr,
	struct usb_gadget_driver *driver = udc->driver;
	int n = 0;

	dbg_trace("[%s] %p\n", __func__, buf);
	dbg_trace("[%s] %pK\n", __func__, buf);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		return 0;
@@ -1116,7 +1116,7 @@ static void dbg_usb_op_fail(u8 addr, const char *name,
		list_for_each(ptr, &mep->qh.queue) {
			req = list_entry(ptr, struct ci13xxx_req, queue);
			scnprintf(msg, sizeof(msg),
					"%pa:%08X:%08X\n",
					"%pKa:%08X:%08X\n",
					&req->dma, req->ptr->next,
					req->ptr->token);
			dbg_print(addr, "REQ", 0, msg);
@@ -1139,7 +1139,7 @@ static ssize_t show_events(struct device *dev, struct device_attribute *attr,
	unsigned long flags;
	unsigned i, j, n = 0;

	dbg_trace("[%s] %p\n", __func__, buf);
	dbg_trace("[%s] %pK\n", __func__, buf);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		return 0;
@@ -1174,7 +1174,7 @@ static ssize_t store_events(struct device *dev, struct device_attribute *attr,
{
	unsigned tty;

	dbg_trace("[%s] %p, %d\n", __func__, buf, count);
	dbg_trace("[%s] %pK, %d\n", __func__, buf, count);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		goto done;
@@ -1206,7 +1206,7 @@ static ssize_t show_inters(struct device *dev, struct device_attribute *attr,
	u32 intr;
	unsigned i, j, n = 0;

	dbg_trace("[%s] %p\n", __func__, buf);
	dbg_trace("[%s] %pK\n", __func__, buf);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		return 0;
@@ -1279,7 +1279,7 @@ static ssize_t store_inters(struct device *dev, struct device_attribute *attr,
	unsigned long flags;
	unsigned en, bit;

	dbg_trace("[%s] %p, %d\n", __func__, buf, count);
	dbg_trace("[%s] %pK, %d\n", __func__, buf, count);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		goto done;
@@ -1319,7 +1319,7 @@ static ssize_t show_port_test(struct device *dev,
	unsigned long flags;
	unsigned mode;

	dbg_trace("[%s] %p\n", __func__, buf);
	dbg_trace("[%s] %pK\n", __func__, buf);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		return 0;
@@ -1345,7 +1345,7 @@ static ssize_t store_port_test(struct device *dev,
	unsigned long flags;
	unsigned mode;

	dbg_trace("[%s] %p, %d\n", __func__, buf, count);
	dbg_trace("[%s] %pK, %d\n", __func__, buf, count);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		goto done;
@@ -1379,7 +1379,7 @@ static ssize_t show_qheads(struct device *dev, struct device_attribute *attr,
	unsigned long flags;
	unsigned i, j, n = 0;

	dbg_trace("[%s] %p\n", __func__, buf);
	dbg_trace("[%s] %pK\n", __func__, buf);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		return 0;
@@ -1419,7 +1419,7 @@ static ssize_t show_registers(struct device *dev,
	u32 *dump;
	unsigned i, k, n = 0;

	dbg_trace("[%s] %p\n", __func__, buf);
	dbg_trace("[%s] %pK\n", __func__, buf);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		return 0;
@@ -1457,7 +1457,7 @@ static ssize_t store_registers(struct device *dev,
	struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
	unsigned long addr, data, flags;

	dbg_trace("[%s] %p, %d\n", __func__, buf, count);
	dbg_trace("[%s] %pK, %d\n", __func__, buf, count);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		goto done;
@@ -1493,7 +1493,7 @@ static ssize_t show_requests(struct device *dev, struct device_attribute *attr,
	struct ci13xxx_req *req = NULL;
	unsigned i, j, n = 0, qSize = sizeof(struct ci13xxx_td)/sizeof(u32);

	dbg_trace("[%s] %p\n", __func__, buf);
	dbg_trace("[%s] %pK\n", __func__, buf);
	if (attr == NULL || buf == NULL) {
		dev_err(dev, "[%s] EINVAL\n", __func__);
		return 0;
@@ -1603,7 +1603,7 @@ static ssize_t print_dtds(struct device *dev,
	list_for_each(ptr, &mEp->qh.queue) {
		req = list_entry(ptr, struct ci13xxx_req, queue);

		pr_info("\treq:%pa next:%08x token:%08x page0:%08x status:%d\n",
		pr_info("\treq:%pKa next:%08x token:%08x page0:%08x status:%d\n",
				&req->dma, req->ptr->next, req->ptr->token,
				req->ptr->page[0], req->req.status);
	}
@@ -1827,7 +1827,7 @@ static void ep_prime_timer_func(unsigned long data)
				mep->qh.ptr->td.next, mep->qh.ptr->td.token);
		list_for_each(ptr, &mep->qh.queue) {
			req = list_entry(ptr, struct ci13xxx_req, queue);
			pr_info("\treq:%pa:%08xtkn:%08xpage0:%08xsts:%d\n",
			pr_info("\treq:%pKa:%08xtkn:%08xpage0:%08xsts:%d\n",
					&req->dma, req->ptr->next,
					req->ptr->token, req->ptr->page[0],
					req->req.status);
@@ -1861,7 +1861,7 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq)
	unsigned length = mReq->req.length;
	struct ci13xxx *udc = _udc;

	trace("%p, %p", mEp, mReq);
	trace("%pK, %pK", mEp, mReq);

	/* don't queue twice */
	if (mReq->req.status == -EALREADY)
@@ -2079,7 +2079,7 @@ done:
 */
static int _hardware_dequeue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq)
{
	trace("%p, %p", mEp, mReq);
	trace("%pK, %pK", mEp, mReq);

	if (mReq->req.status != -EALREADY)
		return -EINVAL;
@@ -2281,7 +2281,7 @@ static int _ep_nuke(struct ci13xxx_ep *mEp)
__releases(mEp->lock)
__acquires(mEp->lock)
{
	trace("%p", mEp);
	trace("%pK", mEp);

	if (mEp == NULL)
		return -EINVAL;
@@ -2328,7 +2328,7 @@ static int _gadget_stop_activity(struct usb_gadget *gadget)
	struct ci13xxx    *udc = container_of(gadget, struct ci13xxx, gadget);
	unsigned long flags;

	trace("%p", gadget);
	trace("%pK", gadget);

	if (gadget == NULL)
		return -EINVAL;
@@ -2372,7 +2372,7 @@ __acquires(udc->lock)
{
	int retval;

	trace("%p", udc);
	trace("%pK", udc);

	if (udc == NULL) {
		err("EINVAL");
@@ -2474,7 +2474,7 @@ static void isr_suspend_handler(struct ci13xxx *udc)
 */
static void isr_get_status_complete(struct usb_ep *ep, struct usb_request *req)
{
	trace("%p, %p", ep, req);
	trace("%pK, %pK", ep, req);

	if (ep == NULL || req == NULL) {
		err("EINVAL");
@@ -2501,7 +2501,7 @@ __acquires(mEp->lock)
	struct usb_request *req = udc->status;
	int dir, num, retval;

	trace("%p, %p", mEp, setup);
	trace("%pK, %pK", mEp, setup);

	if (mEp == NULL || setup == NULL)
		return -EINVAL;
@@ -2543,7 +2543,7 @@ isr_setup_status_complete(struct usb_ep *ep, struct usb_request *req)
	struct ci13xxx *udc = req->context;
	unsigned long flags;

	trace("%p, %p", ep, req);
	trace("%pK, %pK", ep, req);

	spin_lock_irqsave(udc->lock, flags);
	if (udc->test_mode)
@@ -2564,7 +2564,7 @@ __acquires(mEp->lock)
	int retval;
	struct ci13xxx_ep *mEp;

	trace("%p", udc);
	trace("%pK", udc);

	mEp = (udc->ep0_dir == TX) ? &udc->ep0out : &udc->ep0in;
	udc->status->context = udc;
@@ -2595,7 +2595,7 @@ __acquires(mEp->lock)
	int req_dequeue = 1;
	struct ci13xxx *udc = _udc;

	trace("%p", mEp);
	trace("%pK", mEp);

	if (list_empty(&mEp->qh.queue))
		return 0;
@@ -2693,7 +2693,7 @@ __acquires(udc->lock)
	unsigned i;
	u8 tmode = 0;

	trace("%p", udc);
	trace("%pK", udc);

	if (udc == NULL) {
		err("EINVAL");
@@ -2896,7 +2896,7 @@ static int ep_enable(struct usb_ep *ep,
	unsigned long flags;
	unsigned mult = 0;

	trace("ep = %p, desc = %p", ep, desc);
	trace("ep = %pK, desc = %pK", ep, desc);

	if (ep == NULL || desc == NULL)
		return -EINVAL;
@@ -2959,7 +2959,7 @@ static int ep_disable(struct usb_ep *ep)
	int direction, retval = 0;
	unsigned long flags;

	trace("%p", ep);
	trace("%pK", ep);

	if (ep == NULL)
		return -EINVAL;
@@ -3006,7 +3006,7 @@ static struct usb_request *ep_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
	struct ci13xxx_ep  *mEp  = container_of(ep, struct ci13xxx_ep, ep);
	struct ci13xxx_req *mReq = NULL;

	trace("%p, %i", ep, gfp_flags);
	trace("%pK, %i", ep, gfp_flags);

	if (ep == NULL) {
		err("EINVAL");
@@ -3042,7 +3042,7 @@ static void ep_free_request(struct usb_ep *ep, struct usb_request *req)
	struct ci13xxx_req *mReq = container_of(req, struct ci13xxx_req, req);
	unsigned long flags;

	trace("%p, %p", ep, req);
	trace("%pK, %pK", ep, req);

	if (ep == NULL || req == NULL) {
		err("EINVAL");
@@ -3077,7 +3077,7 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req,
	unsigned long flags;
	struct ci13xxx *udc = _udc;

	trace("%p, %p, %X", ep, req, gfp_flags);
	trace("%pK, %pK, %X", ep, req, gfp_flags);

	spin_lock_irqsave(mEp->lock, flags);
	if (ep == NULL || req == NULL || mEp->desc == NULL) {
@@ -3210,7 +3210,7 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req)
	struct ci13xxx *udc = _udc;
	unsigned long flags;

	trace("%p, %p", ep, req);
	trace("%pK, %pK", ep, req);

	if (udc->udc_driver->in_lpm && udc->udc_driver->in_lpm(udc)) {
		dev_err(udc->transceiver->dev,
@@ -3288,7 +3288,7 @@ static int ep_set_halt(struct usb_ep *ep, int value)
	int direction, retval = 0;
	unsigned long flags;

	trace("%p, %i", ep, value);
	trace("%pK, %i", ep, value);

	if (ep == NULL || mEp->desc == NULL)
		return -EINVAL;
@@ -3339,7 +3339,7 @@ static int ep_set_wedge(struct usb_ep *ep)
	struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep);
	unsigned long flags;

	trace("%p", ep);
	trace("%pK", ep);

	if (ep == NULL || mEp->desc == NULL)
		return -EINVAL;
@@ -3365,7 +3365,7 @@ static void ep_fifo_flush(struct usb_ep *ep)
	struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep);
	unsigned long flags;

	trace("%p", ep);
	trace("%pK", ep);

	if (ep == NULL) {
		err("%02X: -EINVAL", _usb_addr(mEp));
@@ -3558,7 +3558,7 @@ static int ci13xxx_start(struct usb_gadget *gadget,
	unsigned long flags;
	int retval = -ENOMEM;

	trace("%p", driver);
	trace("%pK", driver);

	if (driver             == NULL ||
	    driver->setup      == NULL ||
@@ -3646,7 +3646,7 @@ static int ci13xxx_stop(struct usb_gadget *gadget,
	struct ci13xxx *udc = _udc;
	unsigned long flags;

	trace("%p", driver);
	trace("%pK", driver);

	if (driver             == NULL ||
	    driver->unbind     == NULL ||
@@ -3776,7 +3776,7 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev,
	struct ci13xxx_platform_data *pdata;
	int retval = 0, i, j;

	trace("%p, %p, %p", dev, regs, driver->name);
	trace("%pK, %pK, %pK", dev, regs, driver->name);

	if (dev == NULL || regs == NULL || driver == NULL ||
			driver->name == NULL)
+9 −9
Original line number Diff line number Diff line
@@ -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);

@@ -251,7 +251,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);
		}
	}
@@ -998,13 +998,13 @@ static void unbind_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" */
		}
	}
	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" */
	}
Loading