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:Meng Li <Meng.Li@windriver.com> Signed-off-by:
Bruce Ashfield <bruce.ashfield@gmail.com>
Loading
Please register or sign in to comment