'\" t .\" Title: encode_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 "ENCODE_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" encode_rs8 \- Calculate the parity for data values (8bit data width) .SH "SYNOPSIS" .HP \w'int\ encode_rs8('u .BI "int encode_rs8(struct\ rs_control\ *\ " "rs" ", uint8_t\ *\ " "data" ", int\ " "len" ", uint16_t\ *\ " "par" ", uint16_t\ " "invmsk" ");" .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 \fIlen\fR .RS 4 data length .RE .PP \fIpar\fR .RS 4 parity data, must be initialized by caller (usually all 0) .RE .PP \fIinvmsk\fR .RS 4 invert data mask (will be xored on data) .RE .SH "DESCRIPTION" .PP The parity uses a uint16_t data type to enable symbol size > 8\&. The calling code must take care of encoding of the syndrome result for storage itself\&. .SH "AUTHOR" .PP \fBThomas Gleixner\fR <\&tglx@linutronix.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br