diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2008-09-05 09:42:08 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2008-09-05 10:51:30 -0400 |
commit | 27eccf46491e1f77f9af9bbe0778122ce6882890 (patch) | |
tree | 21b5cd7aeb9ce1338a07daf13fd14695c492c89e /fs/dlm/config.c | |
parent | f9f2ed486256f3480e4d499ffd6bf730bc5e6fc6 (diff) |
dlm: choose better identifiers
sparc32:
fs/dlm/config.c:397: error: expected identifier or '(' before '{' token
fs/dlm/config.c: In function 'drop_node':
fs/dlm/config.c:589: warning: initialization from incompatible pointer type
fs/dlm/config.c:589: warning: initialization from incompatible pointer type
fs/dlm/config.c: In function 'release_node':
fs/dlm/config.c:601: warning: initialization from incompatible pointer type
fs/dlm/config.c:601: warning: initialization from incompatible pointer type
fs/dlm/config.c: In function 'show_node':
fs/dlm/config.c:717: warning: initialization from incompatible pointer type
fs/dlm/config.c:717: warning: initialization from incompatible pointer type
fs/dlm/config.c: In function 'store_node':
fs/dlm/config.c:726: warning: initialization from incompatible pointer type
fs/dlm/config.c:726: warning: initialization from incompatible pointer type
Cc: Christine Caulfield <ccaulfie@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r-- | fs/dlm/config.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c index 1359be3b0bb6..fd9859f92fad 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c | |||
@@ -380,24 +380,24 @@ static struct config_item_type node_type = { | |||
380 | .ct_owner = THIS_MODULE, | 380 | .ct_owner = THIS_MODULE, |
381 | }; | 381 | }; |
382 | 382 | ||
383 | static struct dlm_cluster *to_cluster(struct config_item *i) | 383 | static struct dlm_cluster *config_item_to_cluster(struct config_item *i) |
384 | { | 384 | { |
385 | return i ? container_of(to_config_group(i), struct dlm_cluster, group) : | 385 | return i ? container_of(to_config_group(i), struct dlm_cluster, group) : |
386 | NULL; | 386 | NULL; |
387 | } | 387 | } |
388 | 388 | ||
389 | static struct dlm_space *to_space(struct config_item *i) | 389 | static struct dlm_space *config_item_to_space(struct config_item *i) |
390 | { | 390 | { |
391 | return i ? container_of(to_config_group(i), struct dlm_space, group) : | 391 | return i ? container_of(to_config_group(i), struct dlm_space, group) : |
392 | NULL; | 392 | NULL; |
393 | } | 393 | } |
394 | 394 | ||
395 | static struct dlm_comm *to_comm(struct config_item *i) | 395 | static struct dlm_comm *config_item_to_comm(struct config_item *i) |
396 | { | 396 | { |
397 | return i ? container_of(i, struct dlm_comm, item) : NULL; | 397 | return i ? container_of(i, struct dlm_comm, item) : NULL; |
398 | } | 398 | } |
399 | 399 | ||
400 | static struct dlm_node *to_node(struct config_item *i) | 400 | static struct dlm_node *config_item_to_node(struct config_item *i) |
401 | { | 401 | { |
402 | return i ? container_of(i, struct dlm_node, item) : NULL; | 402 | return i ? container_of(i, struct dlm_node, item) : NULL; |
403 | } | 403 | } |
@@ -453,7 +453,7 @@ static struct config_group *make_cluster(struct config_group *g, | |||
453 | 453 | ||
454 | static void drop_cluster(struct config_group *g, struct config_item *i) | 454 | static void drop_cluster(struct config_group *g, struct config_item *i) |
455 | { | 455 | { |
456 | struct dlm_cluster *cl = to_cluster(i); | 456 | struct dlm_cluster *cl = config_item_to_cluster(i); |
457 | struct config_item *tmp; | 457 | struct config_item *tmp; |
458 | int j; | 458 | int j; |
459 | 459 | ||
@@ -471,7 +471,7 @@ static void drop_cluster(struct config_group *g, struct config_item *i) | |||
471 | 471 | ||
472 | static void release_cluster(struct config_item *i) | 472 | static void release_cluster(struct config_item *i) |
473 | { | 473 | { |
474 | struct dlm_cluster *cl = to_cluster(i); | 474 | struct dlm_cluster *cl = config_item_to_cluster(i); |
475 | kfree(cl->group.default_groups); | 475 | kfree(cl->group.default_groups); |
476 | kfree(cl); | 476 | kfree(cl); |
477 | } | 477 | } |
@@ -510,7 +510,7 @@ static struct config_group *make_space(struct config_group *g, const char *name) | |||
510 | 510 | ||
511 | static void drop_space(struct config_group *g, struct config_item *i) | 511 | static void drop_space(struct config_group *g, struct config_item *i) |
512 | { | 512 | { |
513 | struct dlm_space *sp = to_space(i); | 513 | struct dlm_space *sp = config_item_to_space(i); |
514 | struct config_item *tmp; | 514 | struct config_item *tmp; |
515 | int j; | 515 | int j; |
516 | 516 | ||
@@ -527,7 +527,7 @@ static void drop_space(struct config_group *g, struct config_item *i) | |||
527 | 527 | ||
528 | static void release_space(struct config_item *i) | 528 | static void release_space(struct config_item *i) |
529 | { | 529 | { |
530 | struct dlm_space *sp = to_space(i); | 530 | struct dlm_space *sp = config_item_to_space(i); |
531 | kfree(sp->group.default_groups); | 531 | kfree(sp->group.default_groups); |
532 | kfree(sp); | 532 | kfree(sp); |
533 | } | 533 | } |
@@ -549,7 +549,7 @@ static struct config_item *make_comm(struct config_group *g, const char *name) | |||
549 | 549 | ||
550 | static void drop_comm(struct config_group *g, struct config_item *i) | 550 | static void drop_comm(struct config_group *g, struct config_item *i) |
551 | { | 551 | { |
552 | struct dlm_comm *cm = to_comm(i); | 552 | struct dlm_comm *cm = config_item_to_comm(i); |
553 | if (local_comm == cm) | 553 | if (local_comm == cm) |
554 | local_comm = NULL; | 554 | local_comm = NULL; |
555 | dlm_lowcomms_close(cm->nodeid); | 555 | dlm_lowcomms_close(cm->nodeid); |
@@ -560,13 +560,13 @@ static void drop_comm(struct config_group *g, struct config_item *i) | |||
560 | 560 | ||
561 | static void release_comm(struct config_item *i) | 561 | static void release_comm(struct config_item *i) |
562 | { | 562 | { |
563 | struct dlm_comm *cm = to_comm(i); | 563 | struct dlm_comm *cm = config_item_to_comm(i); |
564 | kfree(cm); | 564 | kfree(cm); |
565 | } | 565 | } |
566 | 566 | ||
567 | static struct config_item *make_node(struct config_group *g, const char *name) | 567 | static struct config_item *make_node(struct config_group *g, const char *name) |
568 | { | 568 | { |
569 | struct dlm_space *sp = to_space(g->cg_item.ci_parent); | 569 | struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent); |
570 | struct dlm_node *nd; | 570 | struct dlm_node *nd; |
571 | 571 | ||
572 | nd = kzalloc(sizeof(struct dlm_node), GFP_KERNEL); | 572 | nd = kzalloc(sizeof(struct dlm_node), GFP_KERNEL); |
@@ -588,8 +588,8 @@ static struct config_item *make_node(struct config_group *g, const char *name) | |||
588 | 588 | ||
589 | static void drop_node(struct config_group *g, struct config_item *i) | 589 | static void drop_node(struct config_group *g, struct config_item *i) |
590 | { | 590 | { |
591 | struct dlm_space *sp = to_space(g->cg_item.ci_parent); | 591 | struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent); |
592 | struct dlm_node *nd = to_node(i); | 592 | struct dlm_node *nd = config_item_to_node(i); |
593 | 593 | ||
594 | mutex_lock(&sp->members_lock); | 594 | mutex_lock(&sp->members_lock); |
595 | list_del(&nd->list); | 595 | list_del(&nd->list); |
@@ -601,7 +601,7 @@ static void drop_node(struct config_group *g, struct config_item *i) | |||
601 | 601 | ||
602 | static void release_node(struct config_item *i) | 602 | static void release_node(struct config_item *i) |
603 | { | 603 | { |
604 | struct dlm_node *nd = to_node(i); | 604 | struct dlm_node *nd = config_item_to_node(i); |
605 | kfree(nd); | 605 | kfree(nd); |
606 | } | 606 | } |
607 | 607 | ||
@@ -635,7 +635,7 @@ void dlm_config_exit(void) | |||
635 | static ssize_t show_cluster(struct config_item *i, struct configfs_attribute *a, | 635 | static ssize_t show_cluster(struct config_item *i, struct configfs_attribute *a, |
636 | char *buf) | 636 | char *buf) |
637 | { | 637 | { |
638 | struct dlm_cluster *cl = to_cluster(i); | 638 | struct dlm_cluster *cl = config_item_to_cluster(i); |
639 | struct cluster_attribute *cla = | 639 | struct cluster_attribute *cla = |
640 | container_of(a, struct cluster_attribute, attr); | 640 | container_of(a, struct cluster_attribute, attr); |
641 | return cla->show ? cla->show(cl, buf) : 0; | 641 | return cla->show ? cla->show(cl, buf) : 0; |
@@ -645,7 +645,7 @@ static ssize_t store_cluster(struct config_item *i, | |||
645 | struct configfs_attribute *a, | 645 | struct configfs_attribute *a, |
646 | const char *buf, size_t len) | 646 | const char *buf, size_t len) |
647 | { | 647 | { |
648 | struct dlm_cluster *cl = to_cluster(i); | 648 | struct dlm_cluster *cl = config_item_to_cluster(i); |
649 | struct cluster_attribute *cla = | 649 | struct cluster_attribute *cla = |
650 | container_of(a, struct cluster_attribute, attr); | 650 | container_of(a, struct cluster_attribute, attr); |
651 | return cla->store ? cla->store(cl, buf, len) : -EINVAL; | 651 | return cla->store ? cla->store(cl, buf, len) : -EINVAL; |
@@ -654,7 +654,7 @@ static ssize_t store_cluster(struct config_item *i, | |||
654 | static ssize_t show_comm(struct config_item *i, struct configfs_attribute *a, | 654 | static ssize_t show_comm(struct config_item *i, struct configfs_attribute *a, |
655 | char *buf) | 655 | char *buf) |
656 | { | 656 | { |
657 | struct dlm_comm *cm = to_comm(i); | 657 | struct dlm_comm *cm = config_item_to_comm(i); |
658 | struct comm_attribute *cma = | 658 | struct comm_attribute *cma = |
659 | container_of(a, struct comm_attribute, attr); | 659 | container_of(a, struct comm_attribute, attr); |
660 | return cma->show ? cma->show(cm, buf) : 0; | 660 | return cma->show ? cma->show(cm, buf) : 0; |
@@ -663,7 +663,7 @@ static ssize_t show_comm(struct config_item *i, struct configfs_attribute *a, | |||
663 | static ssize_t store_comm(struct config_item *i, struct configfs_attribute *a, | 663 | static ssize_t store_comm(struct config_item *i, struct configfs_attribute *a, |
664 | const char *buf, size_t len) | 664 | const char *buf, size_t len) |
665 | { | 665 | { |
666 | struct dlm_comm *cm = to_comm(i); | 666 | struct dlm_comm *cm = config_item_to_comm(i); |
667 | struct comm_attribute *cma = | 667 | struct comm_attribute *cma = |
668 | container_of(a, struct comm_attribute, attr); | 668 | container_of(a, struct comm_attribute, attr); |
669 | return cma->store ? cma->store(cm, buf, len) : -EINVAL; | 669 | return cma->store ? cma->store(cm, buf, len) : -EINVAL; |
@@ -717,7 +717,7 @@ static ssize_t comm_addr_write(struct dlm_comm *cm, const char *buf, size_t len) | |||
717 | static ssize_t show_node(struct config_item *i, struct configfs_attribute *a, | 717 | static ssize_t show_node(struct config_item *i, struct configfs_attribute *a, |
718 | char *buf) | 718 | char *buf) |
719 | { | 719 | { |
720 | struct dlm_node *nd = to_node(i); | 720 | struct dlm_node *nd = config_item_to_node(i); |
721 | struct node_attribute *nda = | 721 | struct node_attribute *nda = |
722 | container_of(a, struct node_attribute, attr); | 722 | container_of(a, struct node_attribute, attr); |
723 | return nda->show ? nda->show(nd, buf) : 0; | 723 | return nda->show ? nda->show(nd, buf) : 0; |
@@ -726,7 +726,7 @@ static ssize_t show_node(struct config_item *i, struct configfs_attribute *a, | |||
726 | static ssize_t store_node(struct config_item *i, struct configfs_attribute *a, | 726 | static ssize_t store_node(struct config_item *i, struct configfs_attribute *a, |
727 | const char *buf, size_t len) | 727 | const char *buf, size_t len) |
728 | { | 728 | { |
729 | struct dlm_node *nd = to_node(i); | 729 | struct dlm_node *nd = config_item_to_node(i); |
730 | struct node_attribute *nda = | 730 | struct node_attribute *nda = |
731 | container_of(a, struct node_attribute, attr); | 731 | container_of(a, struct node_attribute, attr); |
732 | return nda->store ? nda->store(nd, buf, len) : -EINVAL; | 732 | return nda->store ? nda->store(nd, buf, len) : -EINVAL; |
@@ -771,7 +771,7 @@ static struct dlm_space *get_space(char *name) | |||
771 | i = config_group_find_item(space_list, name); | 771 | i = config_group_find_item(space_list, name); |
772 | mutex_unlock(&space_list->cg_subsys->su_mutex); | 772 | mutex_unlock(&space_list->cg_subsys->su_mutex); |
773 | 773 | ||
774 | return to_space(i); | 774 | return config_item_to_space(i); |
775 | } | 775 | } |
776 | 776 | ||
777 | static void put_space(struct dlm_space *sp) | 777 | static void put_space(struct dlm_space *sp) |
@@ -818,7 +818,7 @@ static struct dlm_comm *get_comm(int nodeid, struct sockaddr_storage *addr) | |||
818 | mutex_lock(&clusters_root.subsys.su_mutex); | 818 | mutex_lock(&clusters_root.subsys.su_mutex); |
819 | 819 | ||
820 | list_for_each_entry(i, &comm_list->cg_children, ci_entry) { | 820 | list_for_each_entry(i, &comm_list->cg_children, ci_entry) { |
821 | cm = to_comm(i); | 821 | cm = config_item_to_comm(i); |
822 | 822 | ||
823 | if (nodeid) { | 823 | if (nodeid) { |
824 | if (cm->nodeid != nodeid) | 824 | if (cm->nodeid != nodeid) |