Skip to content
Commit a0481fe2 authored by Meng Li's avatar Meng Li Committed by Bruce Ashfield
Browse files

driver: net: dpaa: improve the assignment operation for context cache line



When build RT kernel, there is a below overflow error as below:
error: conversion from 'long unsigned int' to 'unsigned char:2'
changes value from '4' to '0' [-Werror=overflow]
Because in RT kernel, the spinlock define is different from standard
kernel, and cause the size of struct qman_fq is larger than expection.
In this way, the field context_cl with 2 bits space is assigned a value
that is more than 3, and report overflow error during building RT kernel.
According to NXP DPAA manual, there are only 2 bits for the context
cache line, so it is impossible to extend the size of field context_cl.
But because this is only a optimized feature, assign 3 to context_cl if
the calculation result is more that 3.

Signed-off-by: default avatarMeng Li <Meng.Li@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
parent 829d1275
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment