CC: [email protected]
CC: [email protected]
TO: Dragan Cvetic <[email protected]>
CC: "Greg Kroah-Hartman" <[email protected]>
CC: Derek Kiernan <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   442489c219235991de86d0277b5d859ede6d8792
commit: 6f86ed820178ba35f87712548e6cd43b91608a6c misc: xilinx_sdfec: Add 
ability to configure turbo
date:   12 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 12 months ago
compiler: nds32le-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/misc/xilinx_sdfec.c:248:9: warning: Identical condition 'err', 
>> second condition is always false [identicalConditionAfterEarlyExit]
    return err;
           ^
   drivers/misc/xilinx_sdfec.c:231:6: note: first condition
    if (err)
        ^
   drivers/misc/xilinx_sdfec.c:248:9: note: second condition
    return err;
           ^

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6f86ed820178ba35f87712548e6cd43b91608a6c
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 6f86ed820178ba35f87712548e6cd43b91608a6c
vim +/err +248 drivers/misc/xilinx_sdfec.c

6d54e455689edc Dragan Cvetic 2019-07-27  223  
6f86ed820178ba Dragan Cvetic 2019-07-27  224  static int 
xsdfec_set_turbo(struct xsdfec_dev *xsdfec, void __user *arg)
6f86ed820178ba Dragan Cvetic 2019-07-27  225  {
6f86ed820178ba Dragan Cvetic 2019-07-27  226    struct xsdfec_turbo turbo;
6f86ed820178ba Dragan Cvetic 2019-07-27  227    int err;
6f86ed820178ba Dragan Cvetic 2019-07-27  228    u32 turbo_write;
6f86ed820178ba Dragan Cvetic 2019-07-27  229  
6f86ed820178ba Dragan Cvetic 2019-07-27  230    err = copy_from_user(&turbo, 
arg, sizeof(turbo));
6f86ed820178ba Dragan Cvetic 2019-07-27  231    if (err)
6f86ed820178ba Dragan Cvetic 2019-07-27  232            return -EFAULT;
6f86ed820178ba Dragan Cvetic 2019-07-27  233  
6f86ed820178ba Dragan Cvetic 2019-07-27  234    if (turbo.alg >= 
XSDFEC_TURBO_ALG_MAX)
6f86ed820178ba Dragan Cvetic 2019-07-27  235            return -EINVAL;
6f86ed820178ba Dragan Cvetic 2019-07-27  236  
6f86ed820178ba Dragan Cvetic 2019-07-27  237    if (turbo.scale > 
XSDFEC_TURBO_SCALE_MAX)
6f86ed820178ba Dragan Cvetic 2019-07-27  238            return -EINVAL;
6f86ed820178ba Dragan Cvetic 2019-07-27  239  
6f86ed820178ba Dragan Cvetic 2019-07-27  240    /* Check to see what device 
tree says about the FEC codes */
6f86ed820178ba Dragan Cvetic 2019-07-27  241    if (xsdfec->config.code == 
XSDFEC_LDPC_CODE)
6f86ed820178ba Dragan Cvetic 2019-07-27  242            return -EIO;
6f86ed820178ba Dragan Cvetic 2019-07-27  243  
6f86ed820178ba Dragan Cvetic 2019-07-27  244    turbo_write = ((turbo.scale & 
XSDFEC_TURBO_SCALE_MASK)
6f86ed820178ba Dragan Cvetic 2019-07-27  245                   << 
XSDFEC_TURBO_SCALE_BIT_POS) |
6f86ed820178ba Dragan Cvetic 2019-07-27  246                  turbo.alg;
6f86ed820178ba Dragan Cvetic 2019-07-27  247    xsdfec_regwrite(xsdfec, 
XSDFEC_TURBO_ADDR, turbo_write);
6f86ed820178ba Dragan Cvetic 2019-07-27 @248    return err;
6f86ed820178ba Dragan Cvetic 2019-07-27  249  }
6f86ed820178ba Dragan Cvetic 2019-07-27  250  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to