All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH 4/4] staging: media: zoran: replace dprintk with zrdev_dbg
Date: Sat, 07 May 2022 06:40:24 +0800	[thread overview]
Message-ID: <202205070633.LxhxdJzI-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 19749 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220423051839.293361-1-ian@linux.cowan.aero>
References: <20220423051839.293361-1-ian@linux.cowan.aero>
TO: Ian Cowan <ian@linux.cowan.aero>
TO: clabbe(a)baylibre.com
CC: mchehab(a)kernel.org
CC: gregkh(a)linuxfoundation.org
CC: dan.carpenter(a)oracle.com
CC: mjpeg-users(a)lists.sourceforge.net
CC: linux-media(a)vger.kernel.org
CC: linux-staging(a)lists.linux.dev
CC: ian(a)linux.cowan.aero

Hi Ian,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/intel-lab-lkp/linux/commits/Ian-Cowan/staging-media-zoran-add-zrdev_dbg-macros/20220425-092814
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 1efba7ef1d7da5944493728c5375fef5b2130de4
:::::: branch date: 12 days ago
:::::: commit date: 12 days ago
config: riscv-randconfig-c006-20220505 (https://download.01.org/0day-ci/archive/20220507/202205070633.LxhxdJzI-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/6febc7a1b1d282fb5090a6a6f6945dce452bce98
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ian-Cowan/staging-media-zoran-add-zrdev_dbg-macros/20220425-092814
        git checkout 6febc7a1b1d282fb5090a6a6f6945dce452bce98
        # save the config file
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                 ^
   drivers/thunderbolt/tunnel.c:1553:7: note: 'tunnel' is non-null
           if (!tunnel)
                ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   drivers/thunderbolt/tunnel.c:1553:2: note: '?' condition is false
           if (!tunnel)
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   drivers/thunderbolt/tunnel.c:1553:2: note: Taking false branch
           if (!tunnel)
           ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/thunderbolt/tunnel.c:1556:2: note: Assuming field 'deinit' is null
           if (tunnel->deinit)
           ^
   include/linux/compiler.h:56:45: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
   drivers/thunderbolt/tunnel.c:1556:2: note: '?' condition is false
           if (tunnel->deinit)
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                 ^
   drivers/thunderbolt/tunnel.c:1556:14: note: Field 'deinit' is null
           if (tunnel->deinit)
                       ^
   drivers/thunderbolt/tunnel.c:1556:2: note: '?' condition is false
           if (tunnel->deinit)
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   drivers/thunderbolt/tunnel.c:1556:2: note: Taking false branch
           if (tunnel->deinit)
           ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/thunderbolt/tunnel.c:1559:14: note: Assuming 'i' is < field 'npaths'
           for (i = 0; i < tunnel->npaths; i++) {
                       ^~~~~~~~~~~~~~~~~~
   drivers/thunderbolt/tunnel.c:1559:2: note: Loop condition is true.  Entering loop body
           for (i = 0; i < tunnel->npaths; i++) {
           ^
   drivers/thunderbolt/tunnel.c:1560:3: note: Array access (via field 'paths') results in a null pointer dereference
                   if (tunnel->paths[i])
                   ^
   include/linux/compiler.h:56:46: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                ^~~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
   Suppressed 43 warnings (36 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   61 warnings generated.
   drivers/staging/media/zoran/videocodec.c:69:4: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                           snprintf(codec->name + res, sizeof(codec->name) - res, "[%d]", h->attached);
                           ^~~~~~~~
   drivers/staging/media/zoran/videocodec.c:69:4: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
                           snprintf(codec->name + res, sizeof(codec->name) - res, "[%d]", h->attached);
                           ^~~~~~~~
   Suppressed 60 warnings (53 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   72 warnings generated.
>> drivers/staging/media/zoran/zr36060.c:97:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:97:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:133:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:133:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:248:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:248:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:277:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:277:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:303:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:303:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(ptr->codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:463:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:463:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:481:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:481:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:641:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:641:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:758:16: warning: Value stored to 'zr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct zoran *zr = videocodec_to_zoran(codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:758:16: note: Value stored to 'zr' during its initialization is never read
           struct zoran *zr = videocodec_to_zoran(codec);
                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/media/zoran/zr36060.c:799:2: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           snprintf(ptr->name, sizeof(ptr->name), "zr36060[%d]", zr36060_codecs);
           ^~~~~~~~
   drivers/staging/media/zoran/zr36060.c:799:2: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
           snprintf(ptr->name, sizeof(ptr->name), "zr36060[%d]", zr36060_codecs);
           ^~~~~~~~
   drivers/staging/media/zoran/zr36060.c:810:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memcpy(ptr->h_samp_ratio, zr36060_decimation_h, 8);
           ^~~~~~
   drivers/staging/media/zoran/zr36060.c:810:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
           memcpy(ptr->h_samp_ratio, zr36060_decimation_h, 8);
           ^~~~~~
   drivers/staging/media/zoran/zr36060.c:811:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memcpy(ptr->v_samp_ratio, zr36060_decimation_v, 8);
           ^~~~~~
   drivers/staging/media/zoran/zr36060.c:811:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
           memcpy(ptr->v_samp_ratio, zr36060_decimation_v, 8);
           ^~~~~~
   Suppressed 60 warnings (53 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   97 warnings generated.
   net/ipv6/udp_offload.c:94:3: warning: Call to function 'memmove' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memmove(packet_start-frag_hdr_sz, packet_start, unfrag_len);
                   ^~~~~~~
   net/ipv6/udp_offload.c:94:3: note: Call to function 'memmove' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memmove_s' in case of C11
                   memmove(packet_start-frag_hdr_sz, packet_start, unfrag_len);
                   ^~~~~~~
   Suppressed 96 warnings (89 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   90 warnings generated.
   Suppressed 90 warnings (83 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   90 warnings generated.
   Suppressed 90 warnings (83 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   55 warnings generated.
   drivers/iio/potentiometer/ad5272.c:49:8: warning: Excessive padding in 'struct ad5272_data' (102 padding bytes, where 38 is optimal). 
   Optimal fields order: 
   buf, 
   client, 
   cfg, 
   lock, 
   consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
   struct ad5272_data {
   ~~~~~~~^~~~~~~~~~~~~
   drivers/iio/potentiometer/ad5272.c:49:8: note: Excessive padding in 'struct ad5272_data' (102 padding bytes, where 38 is optimal). Optimal fields order: buf, client, cfg, lock, consider reordering the fields or adding explicit padding members
   struct ad5272_data {

vim +/zr +97 drivers/staging/media/zoran/zr36060.c

61c3b19f7b9eb7 Corentin Labbe        2020-09-25   93  
5e195bbddabdd9 Corentin Labbe        2020-09-25   94  /* wait if codec is ready to proceed (end of processing) or time is over */
5e195bbddabdd9 Corentin Labbe        2020-09-25   95  static void zr36060_wait_end(struct zr36060 *ptr)
61c3b19f7b9eb7 Corentin Labbe        2020-09-25   96  {
6febc7a1b1d282 Ian Cowan             2022-04-23  @97  	struct zoran *zr = videocodec_to_zoran(ptr->codec);
61c3b19f7b9eb7 Corentin Labbe        2020-09-25   98  	int i = 0;
61c3b19f7b9eb7 Corentin Labbe        2020-09-25   99  
c602f29dd17cad Mauro Carvalho Chehab 2020-10-01  100  	while (zr36060_read_status(ptr) & ZR060_CFSR_BUSY) {
61c3b19f7b9eb7 Corentin Labbe        2020-09-25  101  		udelay(1);
61c3b19f7b9eb7 Corentin Labbe        2020-09-25  102  		if (i++ > 200000) {	// 200ms, there is for sure something wrong!!!
6febc7a1b1d282 Ian Cowan             2022-04-23  103  			zrdev_dbg(zr, "%s: timeout at wait_end (last status: 0x%02x)\n",
61c3b19f7b9eb7 Corentin Labbe        2020-09-25  104  				  ptr->name, ptr->status);
61c3b19f7b9eb7 Corentin Labbe        2020-09-25  105  			break;
61c3b19f7b9eb7 Corentin Labbe        2020-09-25  106  		}
61c3b19f7b9eb7 Corentin Labbe        2020-09-25  107  	}
61c3b19f7b9eb7 Corentin Labbe        2020-09-25  108  }
61c3b19f7b9eb7 Corentin Labbe        2020-09-25  109  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

             reply	other threads:[~2022-05-06 22:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06 22:40 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-06  5:03 [PATCH 4/4] staging: media: zoran: replace dprintk with zrdev_dbg kernel test robot
2022-04-23  5:18 Ian Cowan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202205070633.LxhxdJzI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.