Commit c8372094 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging/mei: remove status member of mei_io_list

status was never writen
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2bcfaa1f
...@@ -38,7 +38,6 @@ void mei_io_list_init(struct mei_io_list *list) ...@@ -38,7 +38,6 @@ void mei_io_list_init(struct mei_io_list *list)
{ {
/* initialize our queue list */ /* initialize our queue list */
INIT_LIST_HEAD(&list->mei_cb.cb_list); INIT_LIST_HEAD(&list->mei_cb.cb_list);
list->status = 0;
} }
/** /**
...@@ -52,8 +51,6 @@ void mei_io_list_flush(struct mei_io_list *list, struct mei_cl *cl) ...@@ -52,8 +51,6 @@ void mei_io_list_flush(struct mei_io_list *list, struct mei_cl *cl)
struct mei_cl_cb *cb_pos = NULL; struct mei_cl_cb *cb_pos = NULL;
struct mei_cl_cb *cb_next = NULL; struct mei_cl_cb *cb_next = NULL;
if (list->status != 0)
return;
if (list_empty(&list->mei_cb.cb_list)) if (list_empty(&list->mei_cb.cb_list))
return; return;
...@@ -338,8 +335,7 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) ...@@ -338,8 +335,7 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
} }
} }
/* remove all waiting requests */ /* remove all waiting requests */
if (dev->write_list.status == 0 && if (!list_empty(&dev->write_list.mei_cb.cb_list)) {
!list_empty(&dev->write_list.mei_cb.cb_list)) {
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
&dev->write_list.mei_cb.cb_list, cb_list) { &dev->write_list.mei_cb.cb_list, cb_list) {
if (cb_pos) { if (cb_pos) {
......
...@@ -198,8 +198,7 @@ static int mei_irq_thread_read_client_message(struct mei_io_list *complete_list, ...@@ -198,8 +198,7 @@ static int mei_irq_thread_read_client_message(struct mei_io_list *complete_list,
unsigned char *buffer = NULL; unsigned char *buffer = NULL;
dev_dbg(&dev->pdev->dev, "start client msg\n"); dev_dbg(&dev->pdev->dev, "start client msg\n");
if (!(dev->read_list.status == 0 && if (list_empty(&dev->read_list.mei_cb.cb_list))
!list_empty(&dev->read_list.mei_cb.cb_list)))
goto quit; goto quit;
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
...@@ -413,8 +412,7 @@ static void mei_client_connect_response(struct mei_device *dev, ...@@ -413,8 +412,7 @@ static void mei_client_connect_response(struct mei_device *dev,
dev->iamthif_state = MEI_IAMTHIF_IDLE; dev->iamthif_state = MEI_IAMTHIF_IDLE;
return; return;
} }
if (!dev->ctrl_rd_list.status && if (!list_empty(&dev->ctrl_rd_list.mei_cb.cb_list)) {
!list_empty(&dev->ctrl_rd_list.mei_cb.cb_list)) {
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
&dev->ctrl_rd_list.mei_cb.cb_list, cb_list) { &dev->ctrl_rd_list.mei_cb.cb_list, cb_list) {
cl = (struct mei_cl *)cb_pos->file_private; cl = (struct mei_cl *)cb_pos->file_private;
...@@ -455,8 +453,7 @@ static void mei_client_disconnect_response(struct mei_device *dev, ...@@ -455,8 +453,7 @@ static void mei_client_disconnect_response(struct mei_device *dev,
rs->host_addr, rs->host_addr,
rs->status); rs->status);
if (!dev->ctrl_rd_list.status && if (!list_empty(&dev->ctrl_rd_list.mei_cb.cb_list)) {
!list_empty(&dev->ctrl_rd_list.mei_cb.cb_list)) {
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
&dev->ctrl_rd_list.mei_cb.cb_list, cb_list) { &dev->ctrl_rd_list.mei_cb.cb_list, cb_list) {
cl = (struct mei_cl *)cb_pos->file_private; cl = (struct mei_cl *)cb_pos->file_private;
...@@ -1238,7 +1235,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list, ...@@ -1238,7 +1235,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
dev_dbg(&dev->pdev->dev, "complete all waiting for write cb.\n"); dev_dbg(&dev->pdev->dev, "complete all waiting for write cb.\n");
list = &dev->write_waiting_list; list = &dev->write_waiting_list;
if (!list->status && !list_empty(&list->mei_cb.cb_list)) { if (!list_empty(&list->mei_cb.cb_list)) {
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
&list->mei_cb.cb_list, cb_list) { &list->mei_cb.cb_list, cb_list) {
cl = (struct mei_cl *)cb_pos->file_private; cl = (struct mei_cl *)cb_pos->file_private;
...@@ -1314,55 +1311,46 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list, ...@@ -1314,55 +1311,46 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
return ~ENODEV; return ~ENODEV;
/* complete control write list CB */ /* complete control write list CB */
if (!dev->ctrl_wr_list.status) { dev_dbg(&dev->pdev->dev, "complete control write list cb.\n");
/* complete control write list CB */ list_for_each_entry_safe(cb_pos, cb_next,
dev_dbg(&dev->pdev->dev, "complete control write list cb.\n");
list_for_each_entry_safe(cb_pos, cb_next,
&dev->ctrl_wr_list.mei_cb.cb_list, cb_list) { &dev->ctrl_wr_list.mei_cb.cb_list, cb_list) {
cl = (struct mei_cl *) cl = (struct mei_cl *) cb_pos->file_private;
cb_pos->file_private; if (!cl) {
if (!cl) { list_del(&cb_pos->cb_list);
list_del(&cb_pos->cb_list); return -ENODEV;
return -ENODEV; }
} switch (cb_pos->major_file_operations) {
switch (cb_pos->major_file_operations) { case MEI_CLOSE:
case MEI_CLOSE: /* send disconnect message */
/* send disconnect message */ ret = _mei_irq_thread_close(dev, slots, cb_pos, cl, cmpl_list);
ret = _mei_irq_thread_close(dev, slots, if (ret)
cb_pos, cl, cmpl_list); return ret;
if (ret)
return ret;
break;
case MEI_READ:
/* send flow control message */
ret = _mei_irq_thread_read(dev, slots,
cb_pos, cl, cmpl_list);
if (ret)
return ret;
break; break;
case MEI_IOCTL: case MEI_READ:
/* connect message */ /* send flow control message */
if (!mei_other_client_is_connecting(dev, ret = _mei_irq_thread_read(dev, slots, cb_pos, cl, cmpl_list);
cl)) if (ret)
continue; return ret;
ret = _mei_irq_thread_ioctl(dev, slots,
cb_pos, cl, cmpl_list);
if (ret)
return ret;
break; break;
case MEI_IOCTL:
/* connect message */
if (!mei_other_client_is_connecting(dev, cl))
continue;
ret = _mei_irq_thread_ioctl(dev, slots, cb_pos, cl, cmpl_list);
if (ret)
return ret;
default: break;
BUG();
}
default:
BUG();
} }
} }
/* complete write list CB */ /* complete write list CB */
if (!dev->write_list.status && if (!list_empty(&dev->write_list.mei_cb.cb_list)) {
!list_empty(&dev->write_list.mei_cb.cb_list)) {
dev_dbg(&dev->pdev->dev, "complete write list cb.\n"); dev_dbg(&dev->pdev->dev, "complete write list cb.\n");
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
&dev->write_list.mei_cb.cb_list, cb_list) { &dev->write_list.mei_cb.cb_list, cb_list) {
...@@ -1621,7 +1609,7 @@ irqreturn_t mei_interrupt_thread_handler(int irq, void *dev_id) ...@@ -1621,7 +1609,7 @@ irqreturn_t mei_interrupt_thread_handler(int irq, void *dev_id)
wake_up_interruptible(&dev->wait_recvd_msg); wake_up_interruptible(&dev->wait_recvd_msg);
bus_message_received = false; bus_message_received = false;
} }
if (complete_list.status || list_empty(&complete_list.mei_cb.cb_list)) if (list_empty(&complete_list.mei_cb.cb_list))
return IRQ_HANDLED; return IRQ_HANDLED;
......
...@@ -231,8 +231,7 @@ struct mei_cl_cb *find_amthi_read_list_entry( ...@@ -231,8 +231,7 @@ struct mei_cl_cb *find_amthi_read_list_entry(
struct mei_cl_cb *cb_pos = NULL; struct mei_cl_cb *cb_pos = NULL;
struct mei_cl_cb *cb_next = NULL; struct mei_cl_cb *cb_next = NULL;
if (!dev->amthi_read_complete_list.status && if (!list_empty(&dev->amthi_read_complete_list.mei_cb.cb_list)) {
!list_empty(&dev->amthi_read_complete_list.mei_cb.cb_list)) {
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
&dev->amthi_read_complete_list.mei_cb.cb_list, cb_list) { &dev->amthi_read_complete_list.mei_cb.cb_list, cb_list) {
cl_temp = (struct mei_cl *)cb_pos->file_private; cl_temp = (struct mei_cl *)cb_pos->file_private;
...@@ -565,8 +564,7 @@ void mei_run_next_iamthif_cmd(struct mei_device *dev) ...@@ -565,8 +564,7 @@ void mei_run_next_iamthif_cmd(struct mei_device *dev)
dev->iamthif_timer = 0; dev->iamthif_timer = 0;
dev->iamthif_file_object = NULL; dev->iamthif_file_object = NULL;
if (dev->amthi_cmd_list.status == 0 && if (!list_empty(&dev->amthi_cmd_list.mei_cb.cb_list)) {
!list_empty(&dev->amthi_cmd_list.mei_cb.cb_list)) {
dev_dbg(&dev->pdev->dev, "complete amthi cmd_list cb.\n"); dev_dbg(&dev->pdev->dev, "complete amthi cmd_list cb.\n");
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
......
...@@ -201,8 +201,7 @@ static struct mei_cl_cb *find_read_list_entry( ...@@ -201,8 +201,7 @@ static struct mei_cl_cb *find_read_list_entry(
struct mei_cl_cb *cb_pos = NULL; struct mei_cl_cb *cb_pos = NULL;
struct mei_cl_cb *cb_next = NULL; struct mei_cl_cb *cb_next = NULL;
if (!dev->read_list.status && if (!list_empty(&dev->read_list.mei_cb.cb_list)) {
!list_empty(&dev->read_list.mei_cb.cb_list)) {
dev_dbg(&dev->pdev->dev, "remove read_list CB\n"); dev_dbg(&dev->pdev->dev, "remove read_list CB\n");
list_for_each_entry_safe(cb_pos, cb_next, list_for_each_entry_safe(cb_pos, cb_next,
......
...@@ -168,7 +168,6 @@ struct mei_cl { ...@@ -168,7 +168,6 @@ struct mei_cl {
struct mei_io_list { struct mei_io_list {
struct mei_cl_cb mei_cb; struct mei_cl_cb mei_cb;
int status;
}; };
/* MEI private device struct */ /* MEI private device struct */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment