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

Commit 83ce0741 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman
Browse files

mei: fix syntax in comments and debug output



Fix syntax errors in comments and debug strings

Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0631213f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -177,7 +177,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
	unsigned long timeout;
	unsigned long timeout;
	int i;
	int i;


	/* Only Posible if we are in timeout */
	/* Only possible if we are in timeout */
	if (!cl || cl != &dev->iamthif_cl) {
	if (!cl || cl != &dev->iamthif_cl) {
		dev_dbg(&dev->pdev->dev, "bad file ext.\n");
		dev_dbg(&dev->pdev->dev, "bad file ext.\n");
		return -ETIMEDOUT;
		return -ETIMEDOUT;
@@ -249,7 +249,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
	    cb->response_buffer.size);
	    cb->response_buffer.size);
	dev_dbg(&dev->pdev->dev, "amthif cb->buf_idx - %lu\n", cb->buf_idx);
	dev_dbg(&dev->pdev->dev, "amthif cb->buf_idx - %lu\n", cb->buf_idx);


	/* length is being turncated to PAGE_SIZE, however,
	/* length is being truncated to PAGE_SIZE, however,
	 * the buf_idx may point beyond */
	 * the buf_idx may point beyond */
	length = min_t(size_t, length, (cb->buf_idx - *offset));
	length = min_t(size_t, length, (cb->buf_idx - *offset));


+11 −11
Original line number Original line Diff line number Diff line
@@ -154,7 +154,7 @@ int mei_io_cb_alloc_req_buf(struct mei_cl_cb *cb, size_t length)
	return 0;
	return 0;
}
}
/**
/**
 * mei_io_cb_alloc_resp_buf - allocate respose buffer
 * mei_io_cb_alloc_resp_buf - allocate response buffer
 *
 *
 * @cb: io callback structure
 * @cb: io callback structure
 * @length: size of the buffer
 * @length: size of the buffer
@@ -207,7 +207,7 @@ int mei_cl_flush_queues(struct mei_cl *cl)




/**
/**
 * mei_cl_init - initializes intialize cl.
 * mei_cl_init - initializes cl.
 *
 *
 * @cl: host client to be initialized
 * @cl: host client to be initialized
 * @dev: mei device
 * @dev: mei device
@@ -263,10 +263,10 @@ struct mei_cl_cb *mei_cl_find_read_cb(struct mei_cl *cl)
	return NULL;
	return NULL;
}
}


/** mei_cl_link: allocte host id in the host map
/** mei_cl_link: allocate host id in the host map
 *
 *
 * @cl - host client
 * @cl - host client
 * @id - fixed host id or -1 for genereting one
 * @id - fixed host id or -1 for generic one
 *
 *
 * returns 0 on success
 * returns 0 on success
 *	-EINVAL on incorrect values
 *	-EINVAL on incorrect values
@@ -282,19 +282,19 @@ int mei_cl_link(struct mei_cl *cl, int id)


	dev = cl->dev;
	dev = cl->dev;


	/* If Id is not asigned get one*/
	/* If Id is not assigned get one*/
	if (id == MEI_HOST_CLIENT_ID_ANY)
	if (id == MEI_HOST_CLIENT_ID_ANY)
		id = find_first_zero_bit(dev->host_clients_map,
		id = find_first_zero_bit(dev->host_clients_map,
					MEI_CLIENTS_MAX);
					MEI_CLIENTS_MAX);


	if (id >= MEI_CLIENTS_MAX) {
	if (id >= MEI_CLIENTS_MAX) {
		dev_err(&dev->pdev->dev, "id exceded %d", MEI_CLIENTS_MAX) ;
		dev_err(&dev->pdev->dev, "id exceeded %d", MEI_CLIENTS_MAX);
		return -EMFILE;
		return -EMFILE;
	}
	}


	open_handle_count = dev->open_handle_count + dev->iamthif_open_count;
	open_handle_count = dev->open_handle_count + dev->iamthif_open_count;
	if (open_handle_count >= MEI_MAX_OPEN_HANDLE_COUNT) {
	if (open_handle_count >= MEI_MAX_OPEN_HANDLE_COUNT) {
		dev_err(&dev->pdev->dev, "open_handle_count exceded %d",
		dev_err(&dev->pdev->dev, "open_handle_count exceeded %d",
			MEI_MAX_OPEN_HANDLE_COUNT);
			MEI_MAX_OPEN_HANDLE_COUNT);
		return -EMFILE;
		return -EMFILE;
	}
	}
@@ -376,7 +376,7 @@ void mei_host_client_init(struct work_struct *work)




/**
/**
 * mei_cl_disconnect - disconnect host clinet form the me one
 * mei_cl_disconnect - disconnect host client from the me one
 *
 *
 * @cl: host client
 * @cl: host client
 *
 *
@@ -455,7 +455,7 @@ free:
 *
 *
 * @cl: private data of the file object
 * @cl: private data of the file object
 *
 *
 * returns ture if other client is connected, 0 - otherwise.
 * returns true if other client is connected, false - otherwise.
 */
 */
bool mei_cl_is_other_connecting(struct mei_cl *cl)
bool mei_cl_is_other_connecting(struct mei_cl *cl)
{
{
@@ -479,7 +479,7 @@ bool mei_cl_is_other_connecting(struct mei_cl *cl)
}
}


/**
/**
 * mei_cl_connect - connect host clinet to the me one
 * mei_cl_connect - connect host client to the me one
 *
 *
 * @cl: host client
 * @cl: host client
 *
 *
@@ -774,7 +774,7 @@ int mei_cl_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb,
 * @cl: host client
 * @cl: host client
 * @cl: write callback with filled data
 * @cl: write callback with filled data
 *
 *
 * returns numbe of bytes sent on success, <0 on failure.
 * returns number of bytes sent on success, <0 on failure.
 */
 */
int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking)
int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking)
{
{
+2 −2
Original line number Original line Diff line number Diff line
@@ -43,7 +43,7 @@ static ssize_t mei_dbgfs_read_meclients(struct file *fp, char __user *ubuf,


	mutex_lock(&dev->device_lock);
	mutex_lock(&dev->device_lock);


	/*  if the driver is not enabled the list won't b consitent */
	/*  if the driver is not enabled the list won't be consistent */
	if (dev->dev_state != MEI_DEV_ENABLED)
	if (dev->dev_state != MEI_DEV_ENABLED)
		goto out;
		goto out;


@@ -101,7 +101,7 @@ static const struct file_operations mei_dbgfs_fops_devstate = {


/**
/**
 * mei_dbgfs_deregister - Remove the debugfs files and directories
 * mei_dbgfs_deregister - Remove the debugfs files and directories
 * @mei - pointer to mei device private dat
 * @mei - pointer to mei device private data
 */
 */
void mei_dbgfs_deregister(struct mei_device *dev)
void mei_dbgfs_deregister(struct mei_device *dev)
{
{
+9 −9
Original line number Original line Diff line number Diff line
@@ -83,12 +83,12 @@ void mei_hbm_cl_hdr(struct mei_cl *cl, u8 hbm_cmd, void *buf, size_t len)
}
}


/**
/**
 * same_disconn_addr - tells if they have the same address
 * mei_hbm_cl_addr_equal - tells if they have the same address
 *
 *
 * @file: private data of the file object.
 * @cl: - client
 * @disconn: disconnection request.
 * @buf: buffer with cl header
 *
 *
 * returns true if addres are same
 * returns true if addresses are the same
 */
 */
static inline
static inline
bool mei_hbm_cl_addr_equal(struct mei_cl *cl, void *buf)
bool mei_hbm_cl_addr_equal(struct mei_cl *cl, void *buf)
@@ -283,7 +283,7 @@ static int mei_hbm_prop_req(struct mei_device *dev)
}
}


/**
/**
 * mei_hbm_stop_req_prepare - perpare stop request message
 * mei_hbm_stop_req_prepare - prepare stop request message
 *
 *
 * @dev - mei device
 * @dev - mei device
 * @mei_hdr - mei message header
 * @mei_hdr - mei message header
@@ -304,7 +304,7 @@ static void mei_hbm_stop_req_prepare(struct mei_device *dev,
}
}


/**
/**
 * mei_hbm_cl_flow_control_req - sends flow control requst.
 * mei_hbm_cl_flow_control_req - sends flow control request.
 *
 *
 * @dev: the device structure
 * @dev: the device structure
 * @cl: client info
 * @cl: client info
@@ -466,7 +466,7 @@ int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl)
}
}


/**
/**
 * mei_hbm_cl_connect_res - connect resposne from the ME
 * mei_hbm_cl_connect_res - connect response from the ME
 *
 *
 * @dev: the device structure
 * @dev: the device structure
 * @rs: connect response bus message
 * @rs: connect response bus message
@@ -520,8 +520,8 @@ static void mei_hbm_cl_connect_res(struct mei_device *dev,




/**
/**
 * mei_hbm_fw_disconnect_req - disconnect request initiated by me
 * mei_hbm_fw_disconnect_req - disconnect request initiated by ME firmware
 *  host sends disoconnect response
 *  host sends disconnect response
 *
 *
 * @dev: the device structure.
 * @dev: the device structure.
 * @disconnect_req: disconnect request bus message from the me
 * @disconnect_req: disconnect request bus message from the me
+3 −3
Original line number Original line Diff line number Diff line
@@ -31,7 +31,7 @@




/**
/**
 * mei_irq_compl_handler - dispatch complete handelers
 * mei_irq_compl_handler - dispatch complete handlers
 *	for the completed callbacks
 *	for the completed callbacks
 *
 *
 * @dev - mei device
 * @dev - mei device
@@ -338,7 +338,7 @@ int mei_irq_read_handler(struct mei_device *dev,
		goto reset_slots;
		goto reset_slots;
	}
	}


	/* find recepient cl */
	/* find recipient cl */
	list_for_each_entry(cl, &dev->file_list, link) {
	list_for_each_entry(cl, &dev->file_list, link) {
		if (mei_cl_hbm_equal(cl, mei_hdr)) {
		if (mei_cl_hbm_equal(cl, mei_hdr)) {
			cl_dbg(dev, cl, "got a message\n");
			cl_dbg(dev, cl, "got a message\n");
@@ -346,7 +346,7 @@ int mei_irq_read_handler(struct mei_device *dev,
		}
		}
	}
	}


	/* if no recepient cl was found we assume corrupted header\n */
	/* if no recipient cl was found we assume corrupted header */
	if (&cl->link == &dev->file_list) {
	if (&cl->link == &dev->file_list) {
		dev_err(&dev->pdev->dev, "no destination client found 0x%08X\n",
		dev_err(&dev->pdev->dev, "no destination client found 0x%08X\n",
				dev->rd_msg_hdr);
				dev->rd_msg_hdr);
Loading