diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-13 19:26:38 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-04-29 18:00:28 -0400 |
commit | c868ae2a1d1ad3a474d2a17295ac1ab190b30061 (patch) | |
tree | 03910a0be52b1ab251e719dfac86cf167d68bc94 /drivers/ieee1394/csr1212.h | |
parent | fd2f3bddaeb20564f32e59f64e5063fbe0c8f4cc (diff) |
ieee1394: csr1212: coding style
Whitespace, line breaks, braces...
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/csr1212.h')
-rw-r--r-- | drivers/ieee1394/csr1212.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/ieee1394/csr1212.h b/drivers/ieee1394/csr1212.h index cc23f3abe0cd..df909ce66304 100644 --- a/drivers/ieee1394/csr1212.h +++ b/drivers/ieee1394/csr1212.h | |||
@@ -224,7 +224,8 @@ struct csr1212_bus_ops { | |||
224 | #define CSR1212_DESCRIPTOR_LEAF_OVERHEAD (1 * sizeof(u32)) | 224 | #define CSR1212_DESCRIPTOR_LEAF_OVERHEAD (1 * sizeof(u32)) |
225 | 225 | ||
226 | #define CSR1212_DESCRIPTOR_LEAF_TYPE(kv) \ | 226 | #define CSR1212_DESCRIPTOR_LEAF_TYPE(kv) \ |
227 | (be32_to_cpu((kv)->value.leaf.data[0]) >> CSR1212_DESCRIPTOR_LEAF_TYPE_SHIFT) | 227 | (be32_to_cpu((kv)->value.leaf.data[0]) >> \ |
228 | CSR1212_DESCRIPTOR_LEAF_TYPE_SHIFT) | ||
228 | #define CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) \ | 229 | #define CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) \ |
229 | (be32_to_cpu((kv)->value.leaf.data[0]) & \ | 230 | (be32_to_cpu((kv)->value.leaf.data[0]) & \ |
230 | CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID_MASK) | 231 | CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID_MASK) |
@@ -364,24 +365,22 @@ extern void csr1212_release_keyval(struct csr1212_keyval *kv); | |||
364 | * This macro allows for looping over the keyval entries in a directory and it | 365 | * This macro allows for looping over the keyval entries in a directory and it |
365 | * ensures that keyvals from remote ConfigROMs are parsed properly. | 366 | * ensures that keyvals from remote ConfigROMs are parsed properly. |
366 | * | 367 | * |
367 | * _csr is a struct csr1212_csr * that points to CSR associated with dir. | 368 | * struct csr1212_csr *_csr points to the CSR associated with dir. |
368 | * _kv is a struct csr1212_keyval * that'll point to the current keyval (loop index). | 369 | * struct csr1212_keyval *_kv points to the current keyval (loop index). |
369 | * _dir is a struct csr1212_keyval * that points to the directory to be looped. | 370 | * struct csr1212_keyval *_dir points to the directory to be looped. |
370 | * _pos is a struct csr1212_dentry * that is used internally for indexing. | 371 | * struct csr1212_dentry *_pos is used internally for indexing. |
371 | * | 372 | * |
372 | * kv will be NULL upon exit of the loop. | 373 | * kv will be NULL upon exit of the loop. |
373 | */ | 374 | */ |
374 | #define csr1212_for_each_dir_entry(_csr, _kv, _dir, _pos) \ | 375 | #define csr1212_for_each_dir_entry(_csr, _kv, _dir, _pos) \ |
375 | for (csr1212_get_keyval((_csr), (_dir)), \ | 376 | for (csr1212_get_keyval((_csr), (_dir)), \ |
376 | _pos = (_dir)->value.directory.dentries_head, \ | 377 | _pos = (_dir)->value.directory.dentries_head, \ |
377 | _kv = (_pos) ? csr1212_get_keyval((_csr), _pos->kv) : NULL; \ | 378 | _kv = (_pos) ? csr1212_get_keyval((_csr), _pos->kv) : NULL;\ |
378 | (_kv) && (_pos); \ | 379 | (_kv) && (_pos); \ |
379 | (_kv->associate == NULL) ? \ | 380 | (_kv->associate == NULL) ? \ |
380 | ((_pos = _pos->next), \ | 381 | ((_pos = _pos->next), (_kv = (_pos) ? \ |
381 | (_kv = (_pos) ? csr1212_get_keyval((_csr), _pos->kv) : \ | 382 | csr1212_get_keyval((_csr), _pos->kv) : \ |
382 | NULL)) : \ | 383 | NULL)) : \ |
383 | (_kv = csr1212_get_keyval((_csr), _kv->associate))) | 384 | (_kv = csr1212_get_keyval((_csr), _kv->associate))) |
384 | 385 | ||
385 | |||
386 | |||
387 | #endif /* __CSR1212_H__ */ | 386 | #endif /* __CSR1212_H__ */ |