[IMROVE] buffer: improve debug messages
authorNikita Kalyazin <n.kalyazin@samsung.com>
Sun, 7 Jul 2013 09:06:58 +0000 (13:06 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Sun, 7 Jul 2013 09:06:58 +0000 (13:06 +0400)
buffer/buffer_queue.c
driver_new/device_driver.c
driver_new/driver_to_buffer.c

index ce6b991..629fb06 100644 (file)
@@ -150,7 +150,7 @@ int buffer_queue_allocation(size_t subbuffer_size,
        }
        allocated_buffers++;
 
-       print_msg(" Buffer allocated = 0x%x\n", (unsigned long)write_queue.end_ptr->data_buffer);
+       print_msg(" Buffer allocated = 0x%p\n", write_queue.end_ptr->data_buffer);
 
        sync_init(&write_queue.end_ptr->buffer_sync);
 
@@ -180,8 +180,8 @@ int buffer_queue_allocation(size_t subbuffer_size,
                }
                allocated_buffers++;
 
-               print_msg(" Buffer allocated = 0x%x, pages_order = %d\n", 
-                         (unsigned long)buffer_address(write_queue.end_ptr->data_buffer), 
+               print_msg(" Buffer allocated = 0x%p, pages_order = %d\n",
+                         write_queue.end_ptr->data_buffer,
                          pages_order_in_subbuffer);
 
                sync_init(&write_queue.end_ptr->buffer_sync);
index f71ac88..3d7b1dd 100644 (file)
@@ -299,7 +299,7 @@ static long swap_device_ioctl(struct file *filp, unsigned int cmd,
             print_debug("SWAP_DRIVER_BUFFER_UNINITIALIZE\n");
             result = driver_to_buffer_uninitialize();
             if (result < 0)
-                print_err("Buffer uninitialization failed %d\n"< result);
+                   print_err("Buffer uninitialization failed %d\n", result);
 
             break;
         }
@@ -365,7 +365,6 @@ static ssize_t swap_device_splice_read(struct file *filp, loff_t *ppos,
      * swap_device_wait queue if there is no data to be read. */
     DECLARE_WAITQUEUE(wait, current);
     int result;
-    int subbuffers_count;
     struct page *pages[PIPE_DEF_BUFFERS];
     struct partial_page partial[PIPE_DEF_BUFFERS];
     struct splice_pipe_desc spd = {
index 9b82922..5206841 100644 (file)
@@ -256,7 +256,6 @@ int driver_to_buffer_next_buffer_to_read(void)
 
     /* If there is busy_buffer first release it */
     if (busy_buffer) {
-        print_debug(" There are busy subbuffer!\n");
         result = driver_to_buffer_release();
         if (result)
             return result;