CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Vincent Mailhol <mailhol.vinc...@wanadoo.fr>
CC: "Marc Kleine-Budde" <m...@pengutronix.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   eaea45fc0e7b6ae439526b4a41d91230c8517336
commit: cc4b08c31b5c51352f258032cc65e884b3e61e6a can: do not increase tx_bytes 
statistics for RTR frames
date:   5 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 5 months ago
compiler: m68k-linux-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout cc4b08c31b5c51352f258032cc65e884b3e61e6a
        cppcheck --quiet --enable=style,performance,portability --template=gcc 
FILE

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <l...@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/net/can/usb/mcba_usb.c:176:27: warning: Parameter 'cf' can be 
>> declared with const [constParameter]
           struct can_frame *cf)
                             ^

vim +/cf +176 drivers/net/can/usb/mcba_usb.c

51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  174  
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  175  static inline struct 
mcba_usb_ctx *mcba_usb_get_free_ctx(struct mcba_priv *priv,
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14 @176                               
                         struct can_frame *cf)
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  177  {
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  178       int i = 0;
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  179       struct mcba_usb_ctx 
*ctx = NULL;
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  180  
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  181       for (i = 0; i < 
MCBA_MAX_TX_URBS; i++) {
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  182               if 
(priv->tx_context[i].ndx == MCBA_CTX_FREE) {
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  183                       ctx = 
&priv->tx_context[i];
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  184                       
ctx->ndx = i;
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  185  
cc4b08c31b5c51 Vincent Mailhol    2021-12-07  186                       if (cf)
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  187                               
ctx->can = true;
cc4b08c31b5c51 Vincent Mailhol    2021-12-07  188                       else
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  189                               
ctx->can = false;
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  190  
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  191                       
atomic_dec(&priv->free_ctx_cnt);
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  192                       break;
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  193               }
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  194       }
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  195  
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  196       if 
(!atomic_read(&priv->free_ctx_cnt))
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  197               /* That was the 
last free ctx. Slow down tx path */
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  198               
netif_stop_queue(priv->netdev);
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  199  
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  200       return ctx;
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  201  }
51f3baad7de943 Remigiusz Kołłątaj 2017-04-14  202  

:::::: The code at line 176 was first introduced by commit
:::::: 51f3baad7de943780ce0c17bd7975df567dd6e14 can: mcba_usb: Add support for 
Microchip CAN BUS Analyzer

:::::: TO: Remigiusz Kołłątaj <remigiusz.kolla...@mobica.com>
:::::: CC: Marc Kleine-Budde <m...@pengutronix.de>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to