mei: add error messages for open count errors
Subsystems (2)
PATCH 1/3 mei: add error messages for open count errors
Signed-off-by Tomas Winkler <[email protected]>
--- drivers/misc/mei/main.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
drivers/misc/mei/main.c +8 -2
@@ -239,12 +239,18 @@ static int mei_open(struct inode *inode, struct file *file) goto out_unlock; } err = -EMFILE ; -if (dev->open_handle_count >=MEI_MAX_OPEN_HANDLE_COUNT ) +if (dev->open_handle_count >=MEI_MAX_OPEN_HANDLE_COUNT ) { +dev_err (&dev->pdev->dev,"open_handle_count exceded %d" , +MEI_MAX_OPEN_HANDLE_COUNT ); goto out_unlock; + } cl_id =find_first_zero_bit (dev->host_clients_map,MEI_CLIENTS_MAX ); -if (cl_id >=MEI_CLIENTS_MAX ) +if (cl_id >=MEI_CLIENTS_MAX ) { +dev_err (&dev->pdev->dev,"client_id exceded %d" , +MEI_CLIENTS_MAX ) ; goto out_unlock; + } cl->host_client_id = cl_id;
Signature · 1 line
1.7.4.4
PATCH 2/3 mei: struct mei_message_data doesn't have to be packed
Signed-off-by Tomas Winkler <[email protected]>
--- drivers/misc/mei/mei_dev.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/misc/mei/mei_dev.h +1 -1
@@ -140,7 +140,7 @@ enum mei_cb_major_types {struct mei_message_data {u32 size;unsigned char *data; -} __packed; +};struct mei_cl_cb {
Signature · 1 line
1.7.4.4
Re: [char-misc-next 2/3] mei: struct mei_message_data doesn't have to be packed
Quoted 10 lines · On Tue, 11 Sep 2012 00:43:21 +0300 Tomas Winkler <[email protected]>…
Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/mei_dev.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/misc/mei/mei_dev.h +0
-0
drivers/misc/mei/mei_dev.h enum mei_cb_major_types { · line 143
Quoted 5 lines
drivers/misc/mei/mei_dev.h +1
-1@@ -140,7 +140,7 @@ enum mei_cb_major_types {struct mei_message_data {u32 size;unsigned char *data; -} __packed; +};
Explanation would be useful especially for this one. The others are obvious although a one line comment would still be good form perhaps.
PATCH 3/3 mei: don't print buffer as a string
In reply to Tomas Winklernon readable junk was printed to the logs
we will add proper buffer dumping mechanism later if needed
Signed-off-by Tomas Winkler <[email protected]>
--- drivers/misc/mei/interrupt.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-)
drivers/misc/mei/interrupt.c +1 -8
@@ -221,17 +221,10 @@ static int mei_irq_thread_read_client_message(struct mei_io_list *complete_list, cl->status =0 ;list_del (&cb_pos->cb_list);dev_dbg (&dev->pdev->dev, -"completed read host client = %d," -"ME client = %d, " -"data length = %lu\n" , +"completed read H cl = %d, ME cl = %d, length = %lu\n" , cl->host_client_id, cl->me_client_id, cb_pos->information); - - *(cb_pos->response_buffer.data + - cb_pos->information) ='\0' ; -dev_dbg (&dev->pdev->dev,"cb_pos->res_buffer - %s\n" , - cb_pos->response_buffer.data);list_add_tail (&cb_pos->cb_list, &complete_list->mei_cb.cb_list); }
Signature · 1 line
1.7.4.4