hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/lib/reed_solomon/reed_solomon.c
....@@ -340,7 +340,8 @@
340340 * @data: data field of a given type
341341 * @par: received parity data field
342342 * @len: data length
343
- * @s: syndrome data field (if NULL, syndrome is calculated)
343
+ * @s: syndrome data field, must be in index form
344
+ * (if NULL, syndrome is calculated)
344345 * @no_eras: number of erasures
345346 * @eras_pos: position of erasures, can be NULL
346347 * @invmsk: invert data mask (will be xored on data, not on parity!)
....@@ -354,7 +355,8 @@
354355 * decoding, so the caller has to ensure that decoder invocations are
355356 * serialized.
356357 *
357
- * Returns the number of corrected bits or -EBADMSG for uncorrectable errors.
358
+ * Returns the number of corrected symbols or -EBADMSG for uncorrectable
359
+ * errors. The count includes errors in the parity.
358360 */
359361 int decode_rs8(struct rs_control *rsc, uint8_t *data, uint16_t *par, int len,
360362 uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk,
....@@ -391,7 +393,8 @@
391393 * @data: data field of a given type
392394 * @par: received parity data field
393395 * @len: data length
394
- * @s: syndrome data field (if NULL, syndrome is calculated)
396
+ * @s: syndrome data field, must be in index form
397
+ * (if NULL, syndrome is calculated)
395398 * @no_eras: number of erasures
396399 * @eras_pos: position of erasures, can be NULL
397400 * @invmsk: invert data mask (will be xored on data, not on parity!)
....@@ -403,7 +406,8 @@
403406 * decoding, so the caller has to ensure that decoder invocations are
404407 * serialized.
405408 *
406
- * Returns the number of corrected bits or -EBADMSG for uncorrectable errors.
409
+ * Returns the number of corrected symbols or -EBADMSG for uncorrectable
410
+ * errors. The count includes errors in the parity.
407411 */
408412 int decode_rs16(struct rs_control *rsc, uint16_t *data, uint16_t *par, int len,
409413 uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk,