[haiku-commits] r36956 - haiku/trunk/src/add-ons/kernel/bus_managers/scsi

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 27 May 2010 22:09:03 +0200 (CEST)

Author: bonefish
Date: 2010-05-27 22:09:03 +0200 (Thu, 27 May 2010)
New Revision: 36956
Changeset: http://dev.haiku-os.org/changeset/36956/haiku

Modified:
   haiku/trunk/src/add-ons/kernel/bus_managers/scsi/virtual_memory.c
Log:
* Added TODO.
* Automatic whitespace cleanup.


Modified: haiku/trunk/src/add-ons/kernel/bus_managers/scsi/virtual_memory.c
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/scsi/virtual_memory.c   
2010-05-27 20:06:42 UTC (rev 36955)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/scsi/virtual_memory.c   
2010-05-27 20:09:03 UTC (rev 36956)
@@ -29,7 +29,7 @@
 {
        size_t cur_idx;
        size_t left_len;
-       
+
        SHOW_FLOW(3, "vec_count=%lu, vec_offset=%lu, len=%lu, max_entries=%lu",
                vec_count, vec_offset, len, max_entries);
 
@@ -47,7 +47,7 @@
                size_t cur_num_entries, cur_mapped_len;
                uint32 tmp_idx;
 
-               SHOW_FLOW( 3, "left_len=%d, vec_count=%d, cur_idx=%d", 
+               SHOW_FLOW( 3, "left_len=%d, vec_count=%d, cur_idx=%d",
                        (int)left_len, (int)vec_count, (int)cur_idx );
 
                // map one iovec
@@ -59,7 +59,7 @@
 
                vec_offset = 0;
 
-               if ((res = get_memory_map(range_start, range_len, 
&map[cur_idx], 
+               if ((res = get_memory_map(range_start, range_len, &map[cur_idx],
                                max_entries - cur_idx)) != B_OK) {
                        // according to docu, no error is ever reported - argh!
                        SHOW_ERROR(1, "invalid io_vec passed (%s)", 
strerror(res));
@@ -69,6 +69,7 @@
                // stupid: get_memory_map does neither tell how many sg blocks
                // are used nor whether there were enough sg blocks at all;
                // -> determine that manually
+               // TODO: Use get_memory_map_etc()!
                cur_mapped_len = 0;
                cur_num_entries = 0;
 
@@ -81,14 +82,14 @@
                }
 
                if (cur_mapped_len == 0) {
-                       panic("get_memory_map() returned empty list; 
left_len=%d, idx=%d/%d", 
+                       panic("get_memory_map() returned empty list; 
left_len=%d, idx=%d/%d",
                                (int)left_len, (int)cur_idx, (int)max_entries);
-                       SHOW_ERROR(2, "get_memory_map() returned empty list; 
left_len=%d, idx=%d/%d", 
+                       SHOW_ERROR(2, "get_memory_map() returned empty list; 
left_len=%d, idx=%d/%d",
                                (int)left_len, (int)cur_idx, (int)max_entries);
                        return B_ERROR;
                }
 
-               SHOW_FLOW( 3, "cur_num_entries=%d, cur_mapped_len=%x", 
+               SHOW_FLOW( 3, "cur_num_entries=%d, cur_mapped_len=%x",
                        (int)cur_num_entries, (int)cur_mapped_len );
 
                // try to combine with previous sg block
@@ -113,7 +114,7 @@
        *num_entries = cur_idx;
        *mapped_len = len - left_len;
 
-       SHOW_FLOW( 3, "num_entries=%d, mapped_len=%x", 
+       SHOW_FLOW( 3, "num_entries=%d, mapped_len=%x",
                (int)*num_entries, (int)*mapped_len );
 
        return B_OK;


Other related posts:

  • » [haiku-commits] r36956 - haiku/trunk/src/add-ons/kernel/bus_managers/scsi - ingo_weinhold