aboutsummaryrefslogtreecommitdiffstats
path: root/lib/errseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/errseq.c')
-rw-r--r--lib/errseq.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/errseq.c b/lib/errseq.c
index 841fa24e6e00..7b900c2a277a 100644
--- a/lib/errseq.c
+++ b/lib/errseq.c
@@ -41,23 +41,20 @@
41#define ERRSEQ_CTR_INC (1 << (ERRSEQ_SHIFT + 1)) 41#define ERRSEQ_CTR_INC (1 << (ERRSEQ_SHIFT + 1))
42 42
43/** 43/**
44 * __errseq_set - set a errseq_t for later reporting 44 * errseq_set - set a errseq_t for later reporting
45 * @eseq: errseq_t field that should be set 45 * @eseq: errseq_t field that should be set
46 * @err: error to set 46 * @err: error to set (must be between -1 and -MAX_ERRNO)
47 * 47 *
48 * This function sets the error in *eseq, and increments the sequence counter 48 * This function sets the error in *eseq, and increments the sequence counter
49 * if the last sequence was sampled at some point in the past. 49 * if the last sequence was sampled at some point in the past.
50 * 50 *
51 * Any error set will always overwrite an existing error. 51 * Any error set will always overwrite an existing error.
52 * 52 *
53 * Most callers will want to use the errseq_set inline wrapper to efficiently 53 * We do return the latest value here, primarily for debugging purposes. The
54 * handle the common case where err is 0. 54 * return value should not be used as a previously sampled value in later calls
55 * 55 * as it will not have the SEEN flag set.
56 * We do return an errseq_t here, primarily for debugging purposes. The return
57 * value should not be used as a previously sampled value in later calls as it
58 * will not have the SEEN flag set.
59 */ 56 */
60errseq_t __errseq_set(errseq_t *eseq, int err) 57errseq_t errseq_set(errseq_t *eseq, int err)
61{ 58{
62 errseq_t cur, old; 59 errseq_t cur, old;
63 60
@@ -107,7 +104,7 @@ errseq_t __errseq_set(errseq_t *eseq, int err)
107 } 104 }
108 return cur; 105 return cur;
109} 106}
110EXPORT_SYMBOL(__errseq_set); 107EXPORT_SYMBOL(errseq_set);
111 108
112/** 109/**
113 * errseq_sample - grab current errseq_t value 110 * errseq_sample - grab current errseq_t value