aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rslist.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-08-05 00:44:28 -0400
committerLen Brown <len.brown@intel.com>2005-08-05 00:45:14 -0400
commit4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch)
tree5b5b7d296ea58786f53b95e5eac9565ff66890b0 /drivers/acpi/resources/rslist.c
parentc65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff)
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/resources/rslist.c')
-rw-r--r--drivers/acpi/resources/rslist.c279
1 files changed, 149 insertions, 130 deletions
diff --git a/drivers/acpi/resources/rslist.c b/drivers/acpi/resources/rslist.c
index db7bcb4e60e3..103eb31c284e 100644
--- a/drivers/acpi/resources/rslist.c
+++ b/drivers/acpi/resources/rslist.c
@@ -41,13 +41,11 @@
41 * POSSIBILITY OF SUCH DAMAGES. 41 * POSSIBILITY OF SUCH DAMAGES.
42 */ 42 */
43 43
44
45#include <acpi/acpi.h> 44#include <acpi/acpi.h>
46#include <acpi/acresrc.h> 45#include <acpi/acresrc.h>
47 46
48#define _COMPONENT ACPI_RESOURCES 47#define _COMPONENT ACPI_RESOURCES
49 ACPI_MODULE_NAME ("rslist") 48ACPI_MODULE_NAME("rslist")
50
51 49
52/******************************************************************************* 50/*******************************************************************************
53 * 51 *
@@ -61,14 +59,10 @@
61 * a resource descriptor. 59 * a resource descriptor.
62 * 60 *
63 ******************************************************************************/ 61 ******************************************************************************/
64 62u8 acpi_rs_get_resource_type(u8 resource_start_byte)
65u8
66acpi_rs_get_resource_type (
67 u8 resource_start_byte)
68{ 63{
69 64
70 ACPI_FUNCTION_ENTRY (); 65 ACPI_FUNCTION_ENTRY();
71
72 66
73 /* Determine if this is a small or large resource */ 67 /* Determine if this is a small or large resource */
74 68
@@ -79,14 +73,12 @@ acpi_rs_get_resource_type (
79 73
80 return ((u8) (resource_start_byte & ACPI_RDESC_SMALL_MASK)); 74 return ((u8) (resource_start_byte & ACPI_RDESC_SMALL_MASK));
81 75
82
83 case ACPI_RDESC_TYPE_LARGE: 76 case ACPI_RDESC_TYPE_LARGE:
84 77
85 /* Large Resource Type -- All bits are valid */ 78 /* Large Resource Type -- All bits are valid */
86 79
87 return (resource_start_byte); 80 return (resource_start_byte);
88 81
89
90 default: 82 default:
91 /* Invalid type */ 83 /* Invalid type */
92 break; 84 break;
@@ -95,7 +87,6 @@ acpi_rs_get_resource_type (
95 return (0xFF); 87 return (0xFF);
96} 88}
97 89
98
99/******************************************************************************* 90/*******************************************************************************
100 * 91 *
101 * FUNCTION: acpi_rs_byte_stream_to_list 92 * FUNCTION: acpi_rs_byte_stream_to_list
@@ -113,176 +104,189 @@ acpi_rs_get_resource_type (
113 ******************************************************************************/ 104 ******************************************************************************/
114 105
115acpi_status 106acpi_status
116acpi_rs_byte_stream_to_list ( 107acpi_rs_byte_stream_to_list(u8 * byte_stream_buffer,
117 u8 *byte_stream_buffer, 108 u32 byte_stream_buffer_length, u8 * output_buffer)
118 u32 byte_stream_buffer_length,
119 u8 *output_buffer)
120{ 109{
121 acpi_status status; 110 acpi_status status;
122 acpi_size bytes_parsed = 0; 111 acpi_size bytes_parsed = 0;
123 u8 resource_type = 0; 112 u8 resource_type = 0;
124 acpi_size bytes_consumed = 0; 113 acpi_size bytes_consumed = 0;
125 u8 *buffer = output_buffer; 114 u8 *buffer = output_buffer;
126 acpi_size structure_size = 0; 115 acpi_size structure_size = 0;
127 u8 end_tag_processed = FALSE; 116 u8 end_tag_processed = FALSE;
128 struct acpi_resource *resource; 117 struct acpi_resource *resource;
129 118
130 ACPI_FUNCTION_TRACE ("rs_byte_stream_to_list"); 119 ACPI_FUNCTION_TRACE("rs_byte_stream_to_list");
131 120
132 121 while (bytes_parsed < byte_stream_buffer_length && !end_tag_processed) {
133 while (bytes_parsed < byte_stream_buffer_length &&
134 !end_tag_processed) {
135 /* The next byte in the stream is the resource type */ 122 /* The next byte in the stream is the resource type */
136 123
137 resource_type = acpi_rs_get_resource_type (*byte_stream_buffer); 124 resource_type = acpi_rs_get_resource_type(*byte_stream_buffer);
138 125
139 switch (resource_type) { 126 switch (resource_type) {
140 case ACPI_RDESC_TYPE_MEMORY_24: 127 case ACPI_RDESC_TYPE_MEMORY_24:
141 /* 128 /*
142 * 24-Bit Memory Resource 129 * 24-Bit Memory Resource
143 */ 130 */
144 status = acpi_rs_memory24_resource (byte_stream_buffer, 131 status = acpi_rs_memory24_resource(byte_stream_buffer,
145 &bytes_consumed, &buffer, &structure_size); 132 &bytes_consumed,
133 &buffer,
134 &structure_size);
146 break; 135 break;
147 136
148
149 case ACPI_RDESC_TYPE_LARGE_VENDOR: 137 case ACPI_RDESC_TYPE_LARGE_VENDOR:
150 /* 138 /*
151 * Vendor Defined Resource 139 * Vendor Defined Resource
152 */ 140 */
153 status = acpi_rs_vendor_resource (byte_stream_buffer, 141 status = acpi_rs_vendor_resource(byte_stream_buffer,
154 &bytes_consumed, &buffer, &structure_size); 142 &bytes_consumed,
143 &buffer,
144 &structure_size);
155 break; 145 break;
156 146
157
158 case ACPI_RDESC_TYPE_MEMORY_32: 147 case ACPI_RDESC_TYPE_MEMORY_32:
159 /* 148 /*
160 * 32-Bit Memory Range Resource 149 * 32-Bit Memory Range Resource
161 */ 150 */
162 status = acpi_rs_memory32_range_resource (byte_stream_buffer, 151 status =
163 &bytes_consumed, &buffer, &structure_size); 152 acpi_rs_memory32_range_resource(byte_stream_buffer,
153 &bytes_consumed,
154 &buffer,
155 &structure_size);
164 break; 156 break;
165 157
166
167 case ACPI_RDESC_TYPE_FIXED_MEMORY_32: 158 case ACPI_RDESC_TYPE_FIXED_MEMORY_32:
168 /* 159 /*
169 * 32-Bit Fixed Memory Resource 160 * 32-Bit Fixed Memory Resource
170 */ 161 */
171 status = acpi_rs_fixed_memory32_resource (byte_stream_buffer, 162 status =
172 &bytes_consumed, &buffer, &structure_size); 163 acpi_rs_fixed_memory32_resource(byte_stream_buffer,
164 &bytes_consumed,
165 &buffer,
166 &structure_size);
173 break; 167 break;
174 168
175
176 case ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE: 169 case ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE:
177 case ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE: 170 case ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE:
178 /* 171 /*
179 * 64-Bit Address Resource 172 * 64-Bit Address Resource
180 */ 173 */
181 status = acpi_rs_address64_resource (byte_stream_buffer, 174 status = acpi_rs_address64_resource(byte_stream_buffer,
182 &bytes_consumed, &buffer, &structure_size); 175 &bytes_consumed,
176 &buffer,
177 &structure_size);
183 break; 178 break;
184 179
185
186 case ACPI_RDESC_TYPE_DWORD_ADDRESS_SPACE: 180 case ACPI_RDESC_TYPE_DWORD_ADDRESS_SPACE:
187 /* 181 /*
188 * 32-Bit Address Resource 182 * 32-Bit Address Resource
189 */ 183 */
190 status = acpi_rs_address32_resource (byte_stream_buffer, 184 status = acpi_rs_address32_resource(byte_stream_buffer,
191 &bytes_consumed, &buffer, &structure_size); 185 &bytes_consumed,
186 &buffer,
187 &structure_size);
192 break; 188 break;
193 189
194
195 case ACPI_RDESC_TYPE_WORD_ADDRESS_SPACE: 190 case ACPI_RDESC_TYPE_WORD_ADDRESS_SPACE:
196 /* 191 /*
197 * 16-Bit Address Resource 192 * 16-Bit Address Resource
198 */ 193 */
199 status = acpi_rs_address16_resource (byte_stream_buffer, 194 status = acpi_rs_address16_resource(byte_stream_buffer,
200 &bytes_consumed, &buffer, &structure_size); 195 &bytes_consumed,
196 &buffer,
197 &structure_size);
201 break; 198 break;
202 199
203
204 case ACPI_RDESC_TYPE_EXTENDED_XRUPT: 200 case ACPI_RDESC_TYPE_EXTENDED_XRUPT:
205 /* 201 /*
206 * Extended IRQ 202 * Extended IRQ
207 */ 203 */
208 status = acpi_rs_extended_irq_resource (byte_stream_buffer, 204 status =
209 &bytes_consumed, &buffer, &structure_size); 205 acpi_rs_extended_irq_resource(byte_stream_buffer,
206 &bytes_consumed,
207 &buffer,
208 &structure_size);
210 break; 209 break;
211 210
212
213 case ACPI_RDESC_TYPE_IRQ_FORMAT: 211 case ACPI_RDESC_TYPE_IRQ_FORMAT:
214 /* 212 /*
215 * IRQ Resource 213 * IRQ Resource
216 */ 214 */
217 status = acpi_rs_irq_resource (byte_stream_buffer, 215 status = acpi_rs_irq_resource(byte_stream_buffer,
218 &bytes_consumed, &buffer, &structure_size); 216 &bytes_consumed, &buffer,
217 &structure_size);
219 break; 218 break;
220 219
221
222 case ACPI_RDESC_TYPE_DMA_FORMAT: 220 case ACPI_RDESC_TYPE_DMA_FORMAT:
223 /* 221 /*
224 * DMA Resource 222 * DMA Resource
225 */ 223 */
226 status = acpi_rs_dma_resource (byte_stream_buffer, 224 status = acpi_rs_dma_resource(byte_stream_buffer,
227 &bytes_consumed, &buffer, &structure_size); 225 &bytes_consumed, &buffer,
226 &structure_size);
228 break; 227 break;
229 228
230
231 case ACPI_RDESC_TYPE_START_DEPENDENT: 229 case ACPI_RDESC_TYPE_START_DEPENDENT:
232 /* 230 /*
233 * Start Dependent Functions Resource 231 * Start Dependent Functions Resource
234 */ 232 */
235 status = acpi_rs_start_depend_fns_resource (byte_stream_buffer, 233 status =
236 &bytes_consumed, &buffer, &structure_size); 234 acpi_rs_start_depend_fns_resource
235 (byte_stream_buffer, &bytes_consumed, &buffer,
236 &structure_size);
237 break; 237 break;
238 238
239
240 case ACPI_RDESC_TYPE_END_DEPENDENT: 239 case ACPI_RDESC_TYPE_END_DEPENDENT:
241 /* 240 /*
242 * End Dependent Functions Resource 241 * End Dependent Functions Resource
243 */ 242 */
244 status = acpi_rs_end_depend_fns_resource (byte_stream_buffer, 243 status =
245 &bytes_consumed, &buffer, &structure_size); 244 acpi_rs_end_depend_fns_resource(byte_stream_buffer,
245 &bytes_consumed,
246 &buffer,
247 &structure_size);
246 break; 248 break;
247 249
248
249 case ACPI_RDESC_TYPE_IO_PORT: 250 case ACPI_RDESC_TYPE_IO_PORT:
250 /* 251 /*
251 * IO Port Resource 252 * IO Port Resource
252 */ 253 */
253 status = acpi_rs_io_resource (byte_stream_buffer, 254 status = acpi_rs_io_resource(byte_stream_buffer,
254 &bytes_consumed, &buffer, &structure_size); 255 &bytes_consumed, &buffer,
256 &structure_size);
255 break; 257 break;
256 258
257
258 case ACPI_RDESC_TYPE_FIXED_IO_PORT: 259 case ACPI_RDESC_TYPE_FIXED_IO_PORT:
259 /* 260 /*
260 * Fixed IO Port Resource 261 * Fixed IO Port Resource
261 */ 262 */
262 status = acpi_rs_fixed_io_resource (byte_stream_buffer, 263 status = acpi_rs_fixed_io_resource(byte_stream_buffer,
263 &bytes_consumed, &buffer, &structure_size); 264 &bytes_consumed,
265 &buffer,
266 &structure_size);
264 break; 267 break;
265 268
266
267 case ACPI_RDESC_TYPE_SMALL_VENDOR: 269 case ACPI_RDESC_TYPE_SMALL_VENDOR:
268 /* 270 /*
269 * Vendor Specific Resource 271 * Vendor Specific Resource
270 */ 272 */
271 status = acpi_rs_vendor_resource (byte_stream_buffer, 273 status = acpi_rs_vendor_resource(byte_stream_buffer,
272 &bytes_consumed, &buffer, &structure_size); 274 &bytes_consumed,
275 &buffer,
276 &structure_size);
273 break; 277 break;
274 278
275
276 case ACPI_RDESC_TYPE_END_TAG: 279 case ACPI_RDESC_TYPE_END_TAG:
277 /* 280 /*
278 * End Tag 281 * End Tag
279 */ 282 */
280 end_tag_processed = TRUE; 283 end_tag_processed = TRUE;
281 status = acpi_rs_end_tag_resource (byte_stream_buffer, 284 status = acpi_rs_end_tag_resource(byte_stream_buffer,
282 &bytes_consumed, &buffer, &structure_size); 285 &bytes_consumed,
286 &buffer,
287 &structure_size);
283 break; 288 break;
284 289
285
286 default: 290 default:
287 /* 291 /*
288 * Invalid/Unknown resource type 292 * Invalid/Unknown resource type
@@ -291,8 +295,8 @@ acpi_rs_byte_stream_to_list (
291 break; 295 break;
292 } 296 }
293 297
294 if (ACPI_FAILURE (status)) { 298 if (ACPI_FAILURE(status)) {
295 return_ACPI_STATUS (status); 299 return_ACPI_STATUS(status);
296 } 300 }
297 301
298 /* Update the return value and counter */ 302 /* Update the return value and counter */
@@ -305,21 +309,21 @@ acpi_rs_byte_stream_to_list (
305 309
306 /* Set the Buffer to the next structure */ 310 /* Set the Buffer to the next structure */
307 311
308 resource = ACPI_CAST_PTR (struct acpi_resource, buffer); 312 resource = ACPI_CAST_PTR(struct acpi_resource, buffer);
309 resource->length = (u32) ACPI_ALIGN_RESOURCE_SIZE (resource->length); 313 resource->length =
310 buffer += ACPI_ALIGN_RESOURCE_SIZE (structure_size); 314 (u32) ACPI_ALIGN_RESOURCE_SIZE(resource->length);
315 buffer += ACPI_ALIGN_RESOURCE_SIZE(structure_size);
311 } 316 }
312 317
313 /* Check the reason for exiting the while loop */ 318 /* Check the reason for exiting the while loop */
314 319
315 if (!end_tag_processed) { 320 if (!end_tag_processed) {
316 return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG); 321 return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG);
317 } 322 }
318 323
319 return_ACPI_STATUS (AE_OK); 324 return_ACPI_STATUS(AE_OK);
320} 325}
321 326
322
323/******************************************************************************* 327/*******************************************************************************
324 * 328 *
325 * FUNCTION: acpi_rs_list_to_byte_stream 329 * FUNCTION: acpi_rs_list_to_byte_stream
@@ -342,19 +346,16 @@ acpi_rs_byte_stream_to_list (
342 ******************************************************************************/ 346 ******************************************************************************/
343 347
344acpi_status 348acpi_status
345acpi_rs_list_to_byte_stream ( 349acpi_rs_list_to_byte_stream(struct acpi_resource *linked_list,
346 struct acpi_resource *linked_list, 350 acpi_size byte_stream_size_needed,
347 acpi_size byte_stream_size_needed, 351 u8 * output_buffer)
348 u8 *output_buffer)
349{ 352{
350 acpi_status status; 353 acpi_status status;
351 u8 *buffer = output_buffer; 354 u8 *buffer = output_buffer;
352 acpi_size bytes_consumed = 0; 355 acpi_size bytes_consumed = 0;
353 u8 done = FALSE; 356 u8 done = FALSE;
354
355
356 ACPI_FUNCTION_TRACE ("rs_list_to_byte_stream");
357 357
358 ACPI_FUNCTION_TRACE("rs_list_to_byte_stream");
358 359
359 while (!done) { 360 while (!done) {
360 switch (linked_list->id) { 361 switch (linked_list->id) {
@@ -362,58 +363,72 @@ acpi_rs_list_to_byte_stream (
362 /* 363 /*
363 * IRQ Resource 364 * IRQ Resource
364 */ 365 */
365 status = acpi_rs_irq_stream (linked_list, &buffer, &bytes_consumed); 366 status =
367 acpi_rs_irq_stream(linked_list, &buffer,
368 &bytes_consumed);
366 break; 369 break;
367 370
368 case ACPI_RSTYPE_DMA: 371 case ACPI_RSTYPE_DMA:
369 /* 372 /*
370 * DMA Resource 373 * DMA Resource
371 */ 374 */
372 status = acpi_rs_dma_stream (linked_list, &buffer, &bytes_consumed); 375 status =
376 acpi_rs_dma_stream(linked_list, &buffer,
377 &bytes_consumed);
373 break; 378 break;
374 379
375 case ACPI_RSTYPE_START_DPF: 380 case ACPI_RSTYPE_START_DPF:
376 /* 381 /*
377 * Start Dependent Functions Resource 382 * Start Dependent Functions Resource
378 */ 383 */
379 status = acpi_rs_start_depend_fns_stream (linked_list, 384 status = acpi_rs_start_depend_fns_stream(linked_list,
380 &buffer, &bytes_consumed); 385 &buffer,
386 &bytes_consumed);
381 break; 387 break;
382 388
383 case ACPI_RSTYPE_END_DPF: 389 case ACPI_RSTYPE_END_DPF:
384 /* 390 /*
385 * End Dependent Functions Resource 391 * End Dependent Functions Resource
386 */ 392 */
387 status = acpi_rs_end_depend_fns_stream (linked_list, 393 status = acpi_rs_end_depend_fns_stream(linked_list,
388 &buffer, &bytes_consumed); 394 &buffer,
395 &bytes_consumed);
389 break; 396 break;
390 397
391 case ACPI_RSTYPE_IO: 398 case ACPI_RSTYPE_IO:
392 /* 399 /*
393 * IO Port Resource 400 * IO Port Resource
394 */ 401 */
395 status = acpi_rs_io_stream (linked_list, &buffer, &bytes_consumed); 402 status =
403 acpi_rs_io_stream(linked_list, &buffer,
404 &bytes_consumed);
396 break; 405 break;
397 406
398 case ACPI_RSTYPE_FIXED_IO: 407 case ACPI_RSTYPE_FIXED_IO:
399 /* 408 /*
400 * Fixed IO Port Resource 409 * Fixed IO Port Resource
401 */ 410 */
402 status = acpi_rs_fixed_io_stream (linked_list, &buffer, &bytes_consumed); 411 status =
412 acpi_rs_fixed_io_stream(linked_list, &buffer,
413 &bytes_consumed);
403 break; 414 break;
404 415
405 case ACPI_RSTYPE_VENDOR: 416 case ACPI_RSTYPE_VENDOR:
406 /* 417 /*
407 * Vendor Defined Resource 418 * Vendor Defined Resource
408 */ 419 */
409 status = acpi_rs_vendor_stream (linked_list, &buffer, &bytes_consumed); 420 status =
421 acpi_rs_vendor_stream(linked_list, &buffer,
422 &bytes_consumed);
410 break; 423 break;
411 424
412 case ACPI_RSTYPE_END_TAG: 425 case ACPI_RSTYPE_END_TAG:
413 /* 426 /*
414 * End Tag 427 * End Tag
415 */ 428 */
416 status = acpi_rs_end_tag_stream (linked_list, &buffer, &bytes_consumed); 429 status =
430 acpi_rs_end_tag_stream(linked_list, &buffer,
431 &bytes_consumed);
417 432
418 /* An End Tag indicates the end of the Resource Template */ 433 /* An End Tag indicates the end of the Resource Template */
419 434
@@ -424,55 +439,60 @@ acpi_rs_list_to_byte_stream (
424 /* 439 /*
425 * 24-Bit Memory Resource 440 * 24-Bit Memory Resource
426 */ 441 */
427 status = acpi_rs_memory24_stream (linked_list, &buffer, &bytes_consumed); 442 status =
443 acpi_rs_memory24_stream(linked_list, &buffer,
444 &bytes_consumed);
428 break; 445 break;
429 446
430 case ACPI_RSTYPE_MEM32: 447 case ACPI_RSTYPE_MEM32:
431 /* 448 /*
432 * 32-Bit Memory Range Resource 449 * 32-Bit Memory Range Resource
433 */ 450 */
434 status = acpi_rs_memory32_range_stream (linked_list, &buffer, 451 status =
435 &bytes_consumed); 452 acpi_rs_memory32_range_stream(linked_list, &buffer,
453 &bytes_consumed);
436 break; 454 break;
437 455
438 case ACPI_RSTYPE_FIXED_MEM32: 456 case ACPI_RSTYPE_FIXED_MEM32:
439 /* 457 /*
440 * 32-Bit Fixed Memory Resource 458 * 32-Bit Fixed Memory Resource
441 */ 459 */
442 status = acpi_rs_fixed_memory32_stream (linked_list, &buffer, 460 status =
443 &bytes_consumed); 461 acpi_rs_fixed_memory32_stream(linked_list, &buffer,
462 &bytes_consumed);
444 break; 463 break;
445 464
446 case ACPI_RSTYPE_ADDRESS16: 465 case ACPI_RSTYPE_ADDRESS16:
447 /* 466 /*
448 * 16-Bit Address Descriptor Resource 467 * 16-Bit Address Descriptor Resource
449 */ 468 */
450 status = acpi_rs_address16_stream (linked_list, &buffer, 469 status = acpi_rs_address16_stream(linked_list, &buffer,
451 &bytes_consumed); 470 &bytes_consumed);
452 break; 471 break;
453 472
454 case ACPI_RSTYPE_ADDRESS32: 473 case ACPI_RSTYPE_ADDRESS32:
455 /* 474 /*
456 * 32-Bit Address Descriptor Resource 475 * 32-Bit Address Descriptor Resource
457 */ 476 */
458 status = acpi_rs_address32_stream (linked_list, &buffer, 477 status = acpi_rs_address32_stream(linked_list, &buffer,
459 &bytes_consumed); 478 &bytes_consumed);
460 break; 479 break;
461 480
462 case ACPI_RSTYPE_ADDRESS64: 481 case ACPI_RSTYPE_ADDRESS64:
463 /* 482 /*
464 * 64-Bit Address Descriptor Resource 483 * 64-Bit Address Descriptor Resource
465 */ 484 */
466 status = acpi_rs_address64_stream (linked_list, &buffer, 485 status = acpi_rs_address64_stream(linked_list, &buffer,
467 &bytes_consumed); 486 &bytes_consumed);
468 break; 487 break;
469 488
470 case ACPI_RSTYPE_EXT_IRQ: 489 case ACPI_RSTYPE_EXT_IRQ:
471 /* 490 /*
472 * Extended IRQ Resource 491 * Extended IRQ Resource
473 */ 492 */
474 status = acpi_rs_extended_irq_stream (linked_list, &buffer, 493 status =
475 &bytes_consumed); 494 acpi_rs_extended_irq_stream(linked_list, &buffer,
495 &bytes_consumed);
476 break; 496 break;
477 497
478 default: 498 default:
@@ -480,15 +500,15 @@ acpi_rs_list_to_byte_stream (
480 * If we get here, everything is out of sync, 500 * If we get here, everything is out of sync,
481 * so exit with an error 501 * so exit with an error
482 */ 502 */
483 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 503 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
484 "Invalid descriptor type (%X) in resource list\n", 504 "Invalid descriptor type (%X) in resource list\n",
485 linked_list->id)); 505 linked_list->id));
486 status = AE_BAD_DATA; 506 status = AE_BAD_DATA;
487 break; 507 break;
488 } 508 }
489 509
490 if (ACPI_FAILURE (status)) { 510 if (ACPI_FAILURE(status)) {
491 return_ACPI_STATUS (status); 511 return_ACPI_STATUS(status);
492 } 512 }
493 513
494 /* Set the Buffer to point to the open byte */ 514 /* Set the Buffer to point to the open byte */
@@ -497,10 +517,9 @@ acpi_rs_list_to_byte_stream (
497 517
498 /* Point to the next object */ 518 /* Point to the next object */
499 519
500 linked_list = ACPI_PTR_ADD (struct acpi_resource, 520 linked_list = ACPI_PTR_ADD(struct acpi_resource,
501 linked_list, linked_list->length); 521 linked_list, linked_list->length);
502 } 522 }
503 523
504 return_ACPI_STATUS (AE_OK); 524 return_ACPI_STATUS(AE_OK);
505} 525}
506