'\" t .\" Title: decode_rs8 .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Public Functions Provided .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "DECODE_RS8" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Public Functions Provided" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" decode_rs8 \- Decode codeword (8bit data width) .SH "SYNOPSIS" .HP \w'int\ decode_rs8('u .BI "int decode_rs8(struct\ rs_control\ *\ " "rs" ", uint8_t\ *\ " "data" ", uint16_t\ *\ " "par" ", int\ " "len" ", uint16_t\ *\ " "s" ", int\ " "no_eras" ", int\ *\ " "eras_pos" ", uint16_t\ " "invmsk" ", uint16_t\ *\ " "corr" ");" .SH "ARGUMENTS" .PP \fIrs\fR .RS 4 the rs control structure .RE .PP \fIdata\fR .RS 4 data field of a given type .RE .PP \fIpar\fR .RS 4 received parity data field .RE .PP \fIlen\fR .RS 4 data length .RE .PP \fIs\fR .RS 4 syndrome data field (if NULL, syndrome is calculated) .RE .PP \fIno_eras\fR .RS 4 number of erasures .RE .PP \fIeras_pos\fR .RS 4 position of erasures, can be NULL .RE .PP \fIinvmsk\fR .RS 4 invert data mask (will be xored on data, not on parity!) .RE .PP \fIcorr\fR .RS 4 buffer to store correction bitmask on eras_pos .RE .SH "DESCRIPTION" .PP The syndrome and parity uses a uint16_t data type to enable symbol size > 8\&. The calling code must take care of decoding of the syndrome result and the received parity before calling this code\&. Returns the number of corrected bits or \-EBADMSG for uncorrectable errors\&. .SH "AUTHOR" .PP \fBThomas Gleixner\fR <\&tglx@linutronix.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br