/* Is the length of data set in frame cache? */
if (sce->frame_fl & LIN_CACHE_RESPONSE) {
- sl->rx_expect += sce->dlc;
+ sl->rx_expect += sce->dlc + 1; /* + checksum */
sl->rx_len_unknown = false;
} else {
sl->rx_expect += SLLIN_DATA_MAX + 1; /* + checksum */
* @sl:
* @err: Error flag to be sent.
*/
-void sllin_report_error(struct sllin *sl, int err)
+static void sllin_report_error(struct sllin *sl, int err)
{
switch (err) {
case LIN_ERR_CHECKSUM:
#define SLLIN_STPMSG_CHCKSUM_CLS (1 << 1)
#define SLLIN_STPMSG_CHCKSUM_ENH (1 << 2)
-int sllin_setup_msg(struct sllin *sl, int mode, int id,
+static int sllin_setup_msg(struct sllin *sl, int mode, int id,
unsigned char *data, int len)
{
if (id > LIN_ID_MASK)
sl->data_to_send = false;
}
-int sllin_send_tx_buff(struct sllin *sl)
+static int sllin_send_tx_buff(struct sllin *sl)
{
struct tty_struct *tty = sl->tty;
int remains;
}
#ifdef BREAK_BY_BAUD
-int sllin_send_break(struct sllin *sl)
+static int sllin_send_break(struct sllin *sl)
{
struct tty_struct *tty = sl->tty;
unsigned long break_baud;
}
#else /* BREAK_BY_BAUD */
-int sllin_send_break(struct sllin *sl)
+static int sllin_send_break(struct sllin *sl)
{
struct tty_struct *tty = sl->tty;
int retval;
* sllin_kwthread - kernel worker thread
*****************************************/
-int sllin_kwthread(void *ptr)
+static int sllin_kwthread(void *ptr)
{
struct sllin *sl = (struct sllin *)ptr;
struct tty_struct *tty = sl->tty;