]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: use kernel-doc consistently
authorIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 23 Dec 2013 16:12:56 +0000 (18:12 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 23 Dec 2013 16:12:56 +0000 (18:12 +0200)
kernel-doc syntax is "@arg: desc", not "@param arg desc".  In addition,
these comments are usually placed around function definitions instead
of function declarations.  Follow these guidelines to shrink the diff.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
src/crush/crush.c
src/crush/mapper.c
src/crush/mapper.h

index 1e83eb866bb77217166fc8c38db34fd584a6c37e..ec7072d24c88516920b4a75f9b1f10655621a8ea 100644 (file)
@@ -23,8 +23,8 @@ const char *crush_bucket_alg_name(int alg)
 
 /**
  * crush_get_bucket_item_weight - Get weight of an item in given bucket
- * @param b bucket pointer
- * @param p item index in bucket
+ * @b: bucket pointer
+ * @p: item index in bucket
  */
 int crush_get_bucket_item_weight(const struct crush_bucket *b, int p)
 {
@@ -97,7 +97,7 @@ void crush_destroy_bucket(struct crush_bucket *b)
 
 /**
  * crush_destroy - Destroy a crush_map
- * @param map crush_map pointer
+ * @map: crush_map pointer
  */
 void crush_destroy(struct crush_map *map)
 {
index 8ca3f7c169cd66b1c4c193d95c2f3717df47616a..705f779d5883d8abf0c6f7ebaaf84145266107c8 100644 (file)
 
 /**
  * crush_find_rule - find a crush_rule id for a given ruleset, type, and size.
- * @param map the crush_map
- * @param ruleset the storage ruleset id (user defined)
- * @param type storage ruleset type (user defined)
- * @param size output set size
+ * @map: the crush_map
+ * @ruleset: the storage ruleset id (user defined)
+ * @type: storage ruleset type (user defined)
+ * @size: output set size
  */
 int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size)
 {
@@ -281,19 +281,19 @@ static int is_out(const struct crush_map *map, const __u32 *weight, int weight_m
 
 /**
  * crush_choose_firstn - choose numrep distinct items of given type
- * @param map the crush_map
- * @param bucket the bucket we are choose an item from
- * @param x crush input value
- * @param numrep the number of items to choose
- * @param type the type of item to choose
- * @param out pointer to output vector
- * @param outpos our position in that vector
- * @param tries number of attempts to make
- * @param recurse_tries number of attempts to have recursive chooseleaf make
- * @param local_tries localized retries
- * @param local_fallback_tries localized fallback retries
- * @param recurse_to_leaf: true if we want one device under each item of given type (chooseleaf instead of choose)
- * @param out2 second output vector for leaf items (if @a recurse_to_leaf)
+ * @map: the crush_map
+ * @bucket: the bucket we are choose an item from
+ * @x: crush input value
+ * @numrep: the number of items to choose
+ * @type: the type of item to choose
+ * @out: pointer to output vector
+ * @outpos: our position in that vector
+ * @tries: number of attempts to make
+ * @recurse_tries: number of attempts to have recursive chooseleaf make
+ * @local_tries: localized retries
+ * @local_fallback_tries: localized fallback retries
+ * @recurse_to_leaf: true if we want one device under each item of given type (chooseleaf instead of choose)
+ * @out2: second output vector for leaf items (if @recurse_to_leaf)
  */
 static int crush_choose_firstn(const struct crush_map *map,
                               struct crush_bucket *bucket,
@@ -640,11 +640,14 @@ static void crush_choose_indep(const struct crush_map *map,
 
 /**
  * crush_do_rule - calculate a mapping with the given input and rule
- * @param map the crush_map
- * @param ruleno the rule id
- * @param x hash input
- * @param result pointer to result vector
- * @param resultmax: maximum result size
+ * @map: the crush_map
+ * @ruleno: the rule id
+ * @x: hash input
+ * @result: pointer to result vector
+ * @result_max: maximum result size
+ * @weight: weight vector (for map leaves)
+ * @weight_max: size of weight vector
+ * @scratch: scratch vector for private use; must be >= 3 * result_max
  */
 int crush_do_rule(const struct crush_map *map,
                  int ruleno, int x, int *result, int result_max,
index 3df32fe084bcca879e0887ffb7ce05726762d901..5dfd5b1125d2b257a4a00d1e77661613ca2227ec 100644 (file)
 #include "crush.h"
 
 extern int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size);
-
-/**
- * crush_do_rule - execute a crush rule to generate a mapping
- *
- * @param map pointer to crush map
- * @param ruleno rule number
- * @param x input
- * @param result pointer to result vector
- * @param result_max max number of requested results
- * @param weights weight vector (for map leaves)
- * @param weight_max size of weight vector
- * @param scrach scratch vector for private use; must be >= 3 * result_max
- */
 extern int crush_do_rule(const struct crush_map *map,
                         int ruleno,
                         int x, int *result, int result_max,