diff options
author | Sergei Antonov <saproj@gmail.com> | 2014-06-06 17:36:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:10 -0400 |
commit | ffbc0671618e9354ec065144f8a66ec5dd7d5d75 (patch) | |
tree | 0d04a4c1e114f7cf2337d53a1b4b68ee6b2d7485 /fs/hfsplus | |
parent | 297cc27207446e9f054492fff5b561cebc589328 (diff) |
hfsplus: coding style fix for declarations in hfsplus_fs.h
Some function declarations in hfsplus_fs.h were with argument names,
some without, and some were mixed. This patch adds argument names
everywhere, sorts function in order they go in .c files, and moves
hfs_part_find() to a proper section.
Auto-formatting and sorting was done with:
cfunctions *.c | indent -linux | sed "s| \* | \*|"
Signed-off-by: Sergei Antonov <saproj@gmail.com>
Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/hfsplus_fs.h | 203 |
1 files changed, 107 insertions, 96 deletions
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index d5ab79bd2f0f..eb5e059f481a 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h | |||
@@ -369,112 +369,119 @@ typedef int (*search_strategy_t)(struct hfs_bnode *, | |||
369 | /* attributes.c */ | 369 | /* attributes.c */ |
370 | int __init hfsplus_create_attr_tree_cache(void); | 370 | int __init hfsplus_create_attr_tree_cache(void); |
371 | void hfsplus_destroy_attr_tree_cache(void); | 371 | void hfsplus_destroy_attr_tree_cache(void); |
372 | int hfsplus_attr_bin_cmp_key(const hfsplus_btree_key *k1, | ||
373 | const hfsplus_btree_key *k2); | ||
374 | int hfsplus_attr_build_key(struct super_block *sb, hfsplus_btree_key *key, | ||
375 | u32 cnid, const char *name); | ||
372 | hfsplus_attr_entry *hfsplus_alloc_attr_entry(void); | 376 | hfsplus_attr_entry *hfsplus_alloc_attr_entry(void); |
373 | void hfsplus_destroy_attr_entry(hfsplus_attr_entry *entry_p); | 377 | void hfsplus_destroy_attr_entry(hfsplus_attr_entry *entry); |
374 | int hfsplus_attr_bin_cmp_key(const hfsplus_btree_key *, | 378 | int hfsplus_find_attr(struct super_block *sb, u32 cnid, const char *name, |
375 | const hfsplus_btree_key *); | 379 | struct hfs_find_data *fd); |
376 | int hfsplus_attr_build_key(struct super_block *, hfsplus_btree_key *, | ||
377 | u32, const char *); | ||
378 | int hfsplus_find_attr(struct super_block *, u32, | ||
379 | const char *, struct hfs_find_data *); | ||
380 | int hfsplus_attr_exists(struct inode *inode, const char *name); | 380 | int hfsplus_attr_exists(struct inode *inode, const char *name); |
381 | int hfsplus_create_attr(struct inode *, const char *, const void *, size_t); | 381 | int hfsplus_create_attr(struct inode *inode, const char *name, |
382 | int hfsplus_delete_attr(struct inode *, const char *); | 382 | const void *value, size_t size); |
383 | int hfsplus_delete_attr(struct inode *inode, const char *name); | ||
383 | int hfsplus_delete_all_attrs(struct inode *dir, u32 cnid); | 384 | int hfsplus_delete_all_attrs(struct inode *dir, u32 cnid); |
384 | 385 | ||
385 | /* bitmap.c */ | 386 | /* bitmap.c */ |
386 | int hfsplus_block_allocate(struct super_block *, u32, u32, u32 *); | 387 | int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset, |
387 | int hfsplus_block_free(struct super_block *, u32, u32); | 388 | u32 *max); |
389 | int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count); | ||
388 | 390 | ||
389 | /* btree.c */ | 391 | /* btree.c */ |
390 | u32 hfsplus_calc_btree_clump_size(u32, u32, u64, int); | 392 | u32 hfsplus_calc_btree_clump_size(u32 block_size, u32 node_size, u64 sectors, |
391 | struct hfs_btree *hfs_btree_open(struct super_block *, u32); | 393 | int file_id); |
392 | void hfs_btree_close(struct hfs_btree *); | 394 | struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id); |
393 | int hfs_btree_write(struct hfs_btree *); | 395 | void hfs_btree_close(struct hfs_btree *tree); |
394 | struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *); | 396 | int hfs_btree_write(struct hfs_btree *tree); |
395 | void hfs_bmap_free(struct hfs_bnode *); | 397 | struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree); |
398 | void hfs_bmap_free(struct hfs_bnode *node); | ||
396 | 399 | ||
397 | /* bnode.c */ | 400 | /* bnode.c */ |
398 | void hfs_bnode_read(struct hfs_bnode *, void *, int, int); | 401 | void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len); |
399 | u16 hfs_bnode_read_u16(struct hfs_bnode *, int); | 402 | u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off); |
400 | u8 hfs_bnode_read_u8(struct hfs_bnode *, int); | 403 | u8 hfs_bnode_read_u8(struct hfs_bnode *node, int off); |
401 | void hfs_bnode_read_key(struct hfs_bnode *, void *, int); | 404 | void hfs_bnode_read_key(struct hfs_bnode *node, void *key, int off); |
402 | void hfs_bnode_write(struct hfs_bnode *, void *, int, int); | 405 | void hfs_bnode_write(struct hfs_bnode *node, void *buf, int off, int len); |
403 | void hfs_bnode_write_u16(struct hfs_bnode *, int, u16); | 406 | void hfs_bnode_write_u16(struct hfs_bnode *node, int off, u16 data); |
404 | void hfs_bnode_clear(struct hfs_bnode *, int, int); | 407 | void hfs_bnode_clear(struct hfs_bnode *node, int off, int len); |
405 | void hfs_bnode_copy(struct hfs_bnode *, int, | 408 | void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst, |
406 | struct hfs_bnode *, int, int); | 409 | struct hfs_bnode *src_node, int src, int len); |
407 | void hfs_bnode_move(struct hfs_bnode *, int, int, int); | 410 | void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len); |
408 | void hfs_bnode_dump(struct hfs_bnode *); | 411 | void hfs_bnode_dump(struct hfs_bnode *node); |
409 | void hfs_bnode_unlink(struct hfs_bnode *); | 412 | void hfs_bnode_unlink(struct hfs_bnode *node); |
410 | struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *, u32); | 413 | struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid); |
411 | struct hfs_bnode *hfs_bnode_find(struct hfs_btree *, u32); | 414 | void hfs_bnode_unhash(struct hfs_bnode *node); |
412 | void hfs_bnode_unhash(struct hfs_bnode *); | 415 | struct hfs_bnode *hfs_bnode_find(struct hfs_btree *tree, u32 num); |
413 | void hfs_bnode_free(struct hfs_bnode *); | 416 | void hfs_bnode_free(struct hfs_bnode *node); |
414 | struct hfs_bnode *hfs_bnode_create(struct hfs_btree *, u32); | 417 | struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num); |
415 | void hfs_bnode_get(struct hfs_bnode *); | 418 | void hfs_bnode_get(struct hfs_bnode *node); |
416 | void hfs_bnode_put(struct hfs_bnode *); | 419 | void hfs_bnode_put(struct hfs_bnode *node); |
417 | bool hfs_bnode_need_zeroout(struct hfs_btree *); | 420 | bool hfs_bnode_need_zeroout(struct hfs_btree *tree); |
418 | 421 | ||
419 | /* brec.c */ | 422 | /* brec.c */ |
420 | u16 hfs_brec_lenoff(struct hfs_bnode *, u16, u16 *); | 423 | u16 hfs_brec_lenoff(struct hfs_bnode *node, u16 rec, u16 *off); |
421 | u16 hfs_brec_keylen(struct hfs_bnode *, u16); | 424 | u16 hfs_brec_keylen(struct hfs_bnode *node, u16 rec); |
422 | int hfs_brec_insert(struct hfs_find_data *, void *, int); | 425 | int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len); |
423 | int hfs_brec_remove(struct hfs_find_data *); | 426 | int hfs_brec_remove(struct hfs_find_data *fd); |
424 | 427 | ||
425 | /* bfind.c */ | 428 | /* bfind.c */ |
426 | int hfs_find_init(struct hfs_btree *, struct hfs_find_data *); | 429 | int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd); |
427 | void hfs_find_exit(struct hfs_find_data *); | 430 | void hfs_find_exit(struct hfs_find_data *fd); |
428 | int hfs_find_1st_rec_by_cnid(struct hfs_bnode *, | 431 | int hfs_find_1st_rec_by_cnid(struct hfs_bnode *bnode, struct hfs_find_data *fd, |
429 | struct hfs_find_data *, | 432 | int *begin, int *end, int *cur_rec); |
430 | int *, int *, int *); | 433 | int hfs_find_rec_by_key(struct hfs_bnode *bnode, struct hfs_find_data *fd, |
431 | int hfs_find_rec_by_key(struct hfs_bnode *, | 434 | int *begin, int *end, int *cur_rec); |
432 | struct hfs_find_data *, | 435 | int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd, |
433 | int *, int *, int *); | 436 | search_strategy_t rec_found); |
434 | int __hfs_brec_find(struct hfs_bnode *, struct hfs_find_data *, | 437 | int hfs_brec_find(struct hfs_find_data *fd, search_strategy_t do_key_compare); |
435 | search_strategy_t); | 438 | int hfs_brec_read(struct hfs_find_data *fd, void *rec, int rec_len); |
436 | int hfs_brec_find(struct hfs_find_data *, search_strategy_t); | 439 | int hfs_brec_goto(struct hfs_find_data *fd, int cnt); |
437 | int hfs_brec_read(struct hfs_find_data *, void *, int); | ||
438 | int hfs_brec_goto(struct hfs_find_data *, int); | ||
439 | 440 | ||
440 | /* catalog.c */ | 441 | /* catalog.c */ |
441 | int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *, | 442 | int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *k1, |
442 | const hfsplus_btree_key *); | 443 | const hfsplus_btree_key *k2); |
443 | int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *, | 444 | int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *k1, |
444 | const hfsplus_btree_key *); | 445 | const hfsplus_btree_key *k2); |
445 | void hfsplus_cat_build_key(struct super_block *sb, | 446 | void hfsplus_cat_build_key(struct super_block *sb, hfsplus_btree_key *key, |
446 | hfsplus_btree_key *, u32, struct qstr *); | 447 | u32 parent, struct qstr *str); |
447 | int hfsplus_find_cat(struct super_block *, u32, struct hfs_find_data *); | ||
448 | int hfsplus_create_cat(u32, struct inode *, struct qstr *, struct inode *); | ||
449 | int hfsplus_delete_cat(u32, struct inode *, struct qstr *); | ||
450 | int hfsplus_rename_cat(u32, struct inode *, struct qstr *, | ||
451 | struct inode *, struct qstr *); | ||
452 | void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms); | 448 | void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms); |
449 | int hfsplus_find_cat(struct super_block *sb, u32 cnid, | ||
450 | struct hfs_find_data *fd); | ||
451 | int hfsplus_create_cat(u32 cnid, struct inode *dir, struct qstr *str, | ||
452 | struct inode *inode); | ||
453 | int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str); | ||
454 | int hfsplus_rename_cat(u32 cnid, struct inode *src_dir, struct qstr *src_name, | ||
455 | struct inode *dst_dir, struct qstr *dst_name); | ||
453 | 456 | ||
454 | /* dir.c */ | 457 | /* dir.c */ |
455 | extern const struct inode_operations hfsplus_dir_inode_operations; | 458 | extern const struct inode_operations hfsplus_dir_inode_operations; |
456 | extern const struct file_operations hfsplus_dir_operations; | 459 | extern const struct file_operations hfsplus_dir_operations; |
457 | 460 | ||
458 | /* extents.c */ | 461 | /* extents.c */ |
459 | int hfsplus_ext_cmp_key(const hfsplus_btree_key *, const hfsplus_btree_key *); | 462 | int hfsplus_ext_cmp_key(const hfsplus_btree_key *k1, |
460 | int hfsplus_ext_write_extent(struct inode *); | 463 | const hfsplus_btree_key *k2); |
461 | int hfsplus_get_block(struct inode *, sector_t, struct buffer_head *, int); | 464 | int hfsplus_ext_write_extent(struct inode *inode); |
462 | int hfsplus_free_fork(struct super_block *, u32, | 465 | int hfsplus_get_block(struct inode *inode, sector_t iblock, |
463 | struct hfsplus_fork_raw *, int); | 466 | struct buffer_head *bh_result, int create); |
464 | int hfsplus_file_extend(struct inode *, bool zeroout); | 467 | int hfsplus_free_fork(struct super_block *sb, u32 cnid, |
465 | void hfsplus_file_truncate(struct inode *); | 468 | struct hfsplus_fork_raw *fork, int type); |
469 | int hfsplus_file_extend(struct inode *inode, bool zeroout); | ||
470 | void hfsplus_file_truncate(struct inode *inode); | ||
466 | 471 | ||
467 | /* inode.c */ | 472 | /* inode.c */ |
468 | extern const struct address_space_operations hfsplus_aops; | 473 | extern const struct address_space_operations hfsplus_aops; |
469 | extern const struct address_space_operations hfsplus_btree_aops; | 474 | extern const struct address_space_operations hfsplus_btree_aops; |
470 | extern const struct dentry_operations hfsplus_dentry_operations; | 475 | extern const struct dentry_operations hfsplus_dentry_operations; |
471 | 476 | ||
472 | void hfsplus_inode_read_fork(struct inode *, struct hfsplus_fork_raw *); | 477 | struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode); |
473 | void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *); | 478 | void hfsplus_delete_inode(struct inode *inode); |
474 | int hfsplus_cat_read_inode(struct inode *, struct hfs_find_data *); | 479 | void hfsplus_inode_read_fork(struct inode *inode, |
475 | int hfsplus_cat_write_inode(struct inode *); | 480 | struct hfsplus_fork_raw *fork); |
476 | struct inode *hfsplus_new_inode(struct super_block *, umode_t); | 481 | void hfsplus_inode_write_fork(struct inode *inode, |
477 | void hfsplus_delete_inode(struct inode *); | 482 | struct hfsplus_fork_raw *fork); |
483 | int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd); | ||
484 | int hfsplus_cat_write_inode(struct inode *inode); | ||
478 | int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end, | 485 | int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end, |
479 | int datasync); | 486 | int datasync); |
480 | 487 | ||
@@ -482,13 +489,17 @@ int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end, | |||
482 | long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); | 489 | long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
483 | 490 | ||
484 | /* options.c */ | 491 | /* options.c */ |
485 | int hfsplus_parse_options(char *, struct hfsplus_sb_info *); | 492 | void hfsplus_fill_defaults(struct hfsplus_sb_info *opts); |
486 | int hfsplus_parse_options_remount(char *input, int *force); | 493 | int hfsplus_parse_options_remount(char *input, int *force); |
487 | void hfsplus_fill_defaults(struct hfsplus_sb_info *); | 494 | int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi); |
488 | int hfsplus_show_options(struct seq_file *, struct dentry *); | 495 | int hfsplus_show_options(struct seq_file *seq, struct dentry *root); |
496 | |||
497 | /* part_tbl.c */ | ||
498 | int hfs_part_find(struct super_block *sb, sector_t *part_start, | ||
499 | sector_t *part_size); | ||
489 | 500 | ||
490 | /* super.c */ | 501 | /* super.c */ |
491 | struct inode *hfsplus_iget(struct super_block *, unsigned long); | 502 | struct inode *hfsplus_iget(struct super_block *sb, unsigned long ino); |
492 | void hfsplus_mark_mdb_dirty(struct super_block *sb); | 503 | void hfsplus_mark_mdb_dirty(struct super_block *sb); |
493 | 504 | ||
494 | /* tables.c */ | 505 | /* tables.c */ |
@@ -497,23 +508,23 @@ extern u16 hfsplus_decompose_table[]; | |||
497 | extern u16 hfsplus_compose_table[]; | 508 | extern u16 hfsplus_compose_table[]; |
498 | 509 | ||
499 | /* unicode.c */ | 510 | /* unicode.c */ |
500 | int hfsplus_strcasecmp(const struct hfsplus_unistr *, | 511 | int hfsplus_strcasecmp(const struct hfsplus_unistr *s1, |
501 | const struct hfsplus_unistr *); | 512 | const struct hfsplus_unistr *s2); |
502 | int hfsplus_strcmp(const struct hfsplus_unistr *, | 513 | int hfsplus_strcmp(const struct hfsplus_unistr *s1, |
503 | const struct hfsplus_unistr *); | 514 | const struct hfsplus_unistr *s2); |
504 | int hfsplus_uni2asc(struct super_block *, | 515 | int hfsplus_uni2asc(struct super_block *sb, const struct hfsplus_unistr *ustr, |
505 | const struct hfsplus_unistr *, char *, int *); | 516 | char *astr, int *len_p); |
506 | int hfsplus_asc2uni(struct super_block *, | 517 | int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr, |
507 | struct hfsplus_unistr *, int, const char *, int); | 518 | int max_unistr_len, const char *astr, int len); |
508 | int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str); | 519 | int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str); |
509 | int hfsplus_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 520 | int hfsplus_compare_dentry(const struct dentry *parent, |
510 | unsigned int len, const char *str, const struct qstr *name); | 521 | const struct dentry *dentry, unsigned int len, |
522 | const char *str, const struct qstr *name); | ||
511 | 523 | ||
512 | /* wrapper.c */ | 524 | /* wrapper.c */ |
513 | int hfsplus_read_wrapper(struct super_block *); | 525 | int hfsplus_submit_bio(struct super_block *sb, sector_t sector, void *buf, |
514 | int hfs_part_find(struct super_block *, sector_t *, sector_t *); | 526 | void **data, int rw); |
515 | int hfsplus_submit_bio(struct super_block *sb, sector_t sector, | 527 | int hfsplus_read_wrapper(struct super_block *sb); |
516 | void *buf, void **data, int rw); | ||
517 | 528 | ||
518 | /* time macros */ | 529 | /* time macros */ |
519 | #define __hfsp_mt2ut(t) (be32_to_cpu(t) - 2082844800U) | 530 | #define __hfsp_mt2ut(t) (be32_to_cpu(t) - 2082844800U) |