Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sergei Antonov and committed by
Linus Torvalds
ffbc0671 297cc272

+107 -96
+107 -96
fs/hfsplus/hfsplus_fs.h
··· 369 369 /* attributes.c */ 370 370 int __init hfsplus_create_attr_tree_cache(void); 371 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 376 hfsplus_attr_entry *hfsplus_alloc_attr_entry(void); 373 - void hfsplus_destroy_attr_entry(hfsplus_attr_entry *entry_p); 374 - int hfsplus_attr_bin_cmp_key(const hfsplus_btree_key *, 375 - const hfsplus_btree_key *); 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 *); 377 + void hfsplus_destroy_attr_entry(hfsplus_attr_entry *entry); 378 + int hfsplus_find_attr(struct super_block *sb, u32 cnid, const char *name, 379 + struct hfs_find_data *fd); 380 380 int hfsplus_attr_exists(struct inode *inode, const char *name); 381 - int hfsplus_create_attr(struct inode *, const char *, const void *, size_t); 382 - int hfsplus_delete_attr(struct inode *, const char *); 381 + int hfsplus_create_attr(struct inode *inode, const char *name, 382 + const void *value, size_t size); 383 + int hfsplus_delete_attr(struct inode *inode, const char *name); 383 384 int hfsplus_delete_all_attrs(struct inode *dir, u32 cnid); 384 385 385 386 /* bitmap.c */ 386 - int hfsplus_block_allocate(struct super_block *, u32, u32, u32 *); 387 - int hfsplus_block_free(struct super_block *, u32, u32); 387 + int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset, 388 + u32 *max); 389 + int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count); 388 390 389 391 /* btree.c */ 390 - u32 hfsplus_calc_btree_clump_size(u32, u32, u64, int); 391 - struct hfs_btree *hfs_btree_open(struct super_block *, u32); 392 - void hfs_btree_close(struct hfs_btree *); 393 - int hfs_btree_write(struct hfs_btree *); 394 - struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *); 395 - void hfs_bmap_free(struct hfs_bnode *); 392 + u32 hfsplus_calc_btree_clump_size(u32 block_size, u32 node_size, u64 sectors, 393 + int file_id); 394 + struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id); 395 + void hfs_btree_close(struct hfs_btree *tree); 396 + int hfs_btree_write(struct hfs_btree *tree); 397 + struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree); 398 + void hfs_bmap_free(struct hfs_bnode *node); 396 399 397 400 /* bnode.c */ 398 - void hfs_bnode_read(struct hfs_bnode *, void *, int, int); 399 - u16 hfs_bnode_read_u16(struct hfs_bnode *, int); 400 - u8 hfs_bnode_read_u8(struct hfs_bnode *, int); 401 - void hfs_bnode_read_key(struct hfs_bnode *, void *, int); 402 - void hfs_bnode_write(struct hfs_bnode *, void *, int, int); 403 - void hfs_bnode_write_u16(struct hfs_bnode *, int, u16); 404 - void hfs_bnode_clear(struct hfs_bnode *, int, int); 405 - void hfs_bnode_copy(struct hfs_bnode *, int, 406 - struct hfs_bnode *, int, int); 407 - void hfs_bnode_move(struct hfs_bnode *, int, int, int); 408 - void hfs_bnode_dump(struct hfs_bnode *); 409 - void hfs_bnode_unlink(struct hfs_bnode *); 410 - struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *, u32); 411 - struct hfs_bnode *hfs_bnode_find(struct hfs_btree *, u32); 412 - void hfs_bnode_unhash(struct hfs_bnode *); 413 - void hfs_bnode_free(struct hfs_bnode *); 414 - struct hfs_bnode *hfs_bnode_create(struct hfs_btree *, u32); 415 - void hfs_bnode_get(struct hfs_bnode *); 416 - void hfs_bnode_put(struct hfs_bnode *); 417 - bool hfs_bnode_need_zeroout(struct hfs_btree *); 401 + void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len); 402 + u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off); 403 + u8 hfs_bnode_read_u8(struct hfs_bnode *node, int off); 404 + void hfs_bnode_read_key(struct hfs_bnode *node, void *key, int off); 405 + void hfs_bnode_write(struct hfs_bnode *node, void *buf, int off, int len); 406 + void hfs_bnode_write_u16(struct hfs_bnode *node, int off, u16 data); 407 + void hfs_bnode_clear(struct hfs_bnode *node, int off, int len); 408 + void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst, 409 + struct hfs_bnode *src_node, int src, int len); 410 + void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len); 411 + void hfs_bnode_dump(struct hfs_bnode *node); 412 + void hfs_bnode_unlink(struct hfs_bnode *node); 413 + struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid); 414 + void hfs_bnode_unhash(struct hfs_bnode *node); 415 + struct hfs_bnode *hfs_bnode_find(struct hfs_btree *tree, u32 num); 416 + void hfs_bnode_free(struct hfs_bnode *node); 417 + struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num); 418 + void hfs_bnode_get(struct hfs_bnode *node); 419 + void hfs_bnode_put(struct hfs_bnode *node); 420 + bool hfs_bnode_need_zeroout(struct hfs_btree *tree); 418 421 419 422 /* brec.c */ 420 - u16 hfs_brec_lenoff(struct hfs_bnode *, u16, u16 *); 421 - u16 hfs_brec_keylen(struct hfs_bnode *, u16); 422 - int hfs_brec_insert(struct hfs_find_data *, void *, int); 423 - int hfs_brec_remove(struct hfs_find_data *); 423 + u16 hfs_brec_lenoff(struct hfs_bnode *node, u16 rec, u16 *off); 424 + u16 hfs_brec_keylen(struct hfs_bnode *node, u16 rec); 425 + int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len); 426 + int hfs_brec_remove(struct hfs_find_data *fd); 424 427 425 428 /* bfind.c */ 426 - int hfs_find_init(struct hfs_btree *, struct hfs_find_data *); 427 - void hfs_find_exit(struct hfs_find_data *); 428 - int hfs_find_1st_rec_by_cnid(struct hfs_bnode *, 429 - struct hfs_find_data *, 430 - int *, int *, int *); 431 - int hfs_find_rec_by_key(struct hfs_bnode *, 432 - struct hfs_find_data *, 433 - int *, int *, int *); 434 - int __hfs_brec_find(struct hfs_bnode *, struct hfs_find_data *, 435 - search_strategy_t); 436 - int hfs_brec_find(struct hfs_find_data *, search_strategy_t); 437 - int hfs_brec_read(struct hfs_find_data *, void *, int); 438 - int hfs_brec_goto(struct hfs_find_data *, int); 429 + int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd); 430 + void hfs_find_exit(struct hfs_find_data *fd); 431 + int hfs_find_1st_rec_by_cnid(struct hfs_bnode *bnode, struct hfs_find_data *fd, 432 + int *begin, int *end, int *cur_rec); 433 + int hfs_find_rec_by_key(struct hfs_bnode *bnode, struct hfs_find_data *fd, 434 + int *begin, int *end, int *cur_rec); 435 + int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd, 436 + search_strategy_t rec_found); 437 + int hfs_brec_find(struct hfs_find_data *fd, search_strategy_t do_key_compare); 438 + int hfs_brec_read(struct hfs_find_data *fd, void *rec, int rec_len); 439 + int hfs_brec_goto(struct hfs_find_data *fd, int cnt); 439 440 440 441 /* catalog.c */ 441 - int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *, 442 - const hfsplus_btree_key *); 443 - int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *, 444 - const hfsplus_btree_key *); 445 - void hfsplus_cat_build_key(struct super_block *sb, 446 - hfsplus_btree_key *, u32, struct qstr *); 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 *); 442 + int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *k1, 443 + const hfsplus_btree_key *k2); 444 + int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *k1, 445 + const hfsplus_btree_key *k2); 446 + void hfsplus_cat_build_key(struct super_block *sb, hfsplus_btree_key *key, 447 + u32 parent, struct qstr *str); 452 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 457 /* dir.c */ 455 458 extern const struct inode_operations hfsplus_dir_inode_operations; 456 459 extern const struct file_operations hfsplus_dir_operations; 457 460 458 461 /* extents.c */ 459 - int hfsplus_ext_cmp_key(const hfsplus_btree_key *, const hfsplus_btree_key *); 460 - int hfsplus_ext_write_extent(struct inode *); 461 - int hfsplus_get_block(struct inode *, sector_t, struct buffer_head *, int); 462 - int hfsplus_free_fork(struct super_block *, u32, 463 - struct hfsplus_fork_raw *, int); 464 - int hfsplus_file_extend(struct inode *, bool zeroout); 465 - void hfsplus_file_truncate(struct inode *); 462 + int hfsplus_ext_cmp_key(const hfsplus_btree_key *k1, 463 + const hfsplus_btree_key *k2); 464 + int hfsplus_ext_write_extent(struct inode *inode); 465 + int hfsplus_get_block(struct inode *inode, sector_t iblock, 466 + struct buffer_head *bh_result, int create); 467 + int hfsplus_free_fork(struct super_block *sb, u32 cnid, 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 472 /* inode.c */ 468 473 extern const struct address_space_operations hfsplus_aops; 469 474 extern const struct address_space_operations hfsplus_btree_aops; 470 475 extern const struct dentry_operations hfsplus_dentry_operations; 471 476 472 - void hfsplus_inode_read_fork(struct inode *, struct hfsplus_fork_raw *); 473 - void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *); 474 - int hfsplus_cat_read_inode(struct inode *, struct hfs_find_data *); 475 - int hfsplus_cat_write_inode(struct inode *); 476 - struct inode *hfsplus_new_inode(struct super_block *, umode_t); 477 - void hfsplus_delete_inode(struct inode *); 477 + struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode); 478 + void hfsplus_delete_inode(struct inode *inode); 479 + void hfsplus_inode_read_fork(struct inode *inode, 480 + struct hfsplus_fork_raw *fork); 481 + void hfsplus_inode_write_fork(struct inode *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 485 int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end, 479 486 int datasync); 480 487 ··· 489 482 long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); 490 483 491 484 /* options.c */ 492 - int hfsplus_parse_options(char *, struct hfsplus_sb_info *); 485 + void hfsplus_fill_defaults(struct hfsplus_sb_info *opts); 493 486 int hfsplus_parse_options_remount(char *input, int *force); 494 - void hfsplus_fill_defaults(struct hfsplus_sb_info *); 495 - int hfsplus_show_options(struct seq_file *, struct dentry *); 487 + int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi); 488 + int hfsplus_show_options(struct seq_file *seq, struct dentry *root); 489 + 490 + /* part_tbl.c */ 491 + int hfs_part_find(struct super_block *sb, sector_t *part_start, 492 + sector_t *part_size); 496 493 497 494 /* super.c */ 498 - struct inode *hfsplus_iget(struct super_block *, unsigned long); 495 + struct inode *hfsplus_iget(struct super_block *sb, unsigned long ino); 499 496 void hfsplus_mark_mdb_dirty(struct super_block *sb); 500 497 501 498 /* tables.c */ ··· 508 497 extern u16 hfsplus_compose_table[]; 509 498 510 499 /* unicode.c */ 511 - int hfsplus_strcasecmp(const struct hfsplus_unistr *, 512 - const struct hfsplus_unistr *); 513 - int hfsplus_strcmp(const struct hfsplus_unistr *, 514 - const struct hfsplus_unistr *); 515 - int hfsplus_uni2asc(struct super_block *, 516 - const struct hfsplus_unistr *, char *, int *); 517 - int hfsplus_asc2uni(struct super_block *, 518 - struct hfsplus_unistr *, int, const char *, int); 500 + int hfsplus_strcasecmp(const struct hfsplus_unistr *s1, 501 + const struct hfsplus_unistr *s2); 502 + int hfsplus_strcmp(const struct hfsplus_unistr *s1, 503 + const struct hfsplus_unistr *s2); 504 + int hfsplus_uni2asc(struct super_block *sb, const struct hfsplus_unistr *ustr, 505 + char *astr, int *len_p); 506 + int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr, 507 + int max_unistr_len, const char *astr, int len); 519 508 int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str); 520 - int hfsplus_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 521 - unsigned int len, const char *str, const struct qstr *name); 509 + int hfsplus_compare_dentry(const struct dentry *parent, 510 + const struct dentry *dentry, unsigned int len, 511 + const char *str, const struct qstr *name); 522 512 523 513 /* wrapper.c */ 524 - int hfsplus_read_wrapper(struct super_block *); 525 - int hfs_part_find(struct super_block *, sector_t *, sector_t *); 526 - int hfsplus_submit_bio(struct super_block *sb, sector_t sector, 527 - void *buf, void **data, int rw); 514 + int hfsplus_submit_bio(struct super_block *sb, sector_t sector, void *buf, 515 + void **data, int rw); 516 + int hfsplus_read_wrapper(struct super_block *sb); 528 517 529 518 /* time macros */ 530 519 #define __hfsp_mt2ut(t) (be32_to_cpu(t) - 2082844800U)