Re: [PATCH 8/9] scsi_debug: change store from vmalloc to sgl
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20211231020829.29147-9-dgilbert(a)interlog.com>
References: <20211231020829.29147-9-dgilbert(a)interlog.com>
TO: Douglas Gilbert <dgilbert(a)interlog.com>
Hi Douglas,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next v5.16-rc7 next-20211224]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Douglas-Gilbert/scsi_debug-colle...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago
config: x86_64-randconfig-m001-20211230 (https://download.01.org/0day-ci/archive/20220101/202201010609.ZMDBG5yX-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/scsi/scsi_debug.c:3352 prot_verify_read() warn: returning -1 instead of -ENOMEM is sloppy
vim +3352 drivers/scsi/scsi_debug.c
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3335
87c715dcde633f Douglas Gilbert 2020-04-21 3336 static int prot_verify_read(struct scsi_cmnd *scp, sector_t start_sec,
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3337 unsigned int sectors, u32 ei_lba)
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3338 {
f7be677227a537 Martin K. Petersen 2021-06-08 3339 int ret = 0;
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3340 unsigned int i;
49adea5162df30 Douglas Gilbert 2021-12-30 3341 const u32 lb_size = sdebug_sector_size;
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3342 sector_t sector;
49adea5162df30 Douglas Gilbert 2021-12-30 3343 u64 lba, lba_start, block, rem, sgl_i;
87c715dcde633f Douglas Gilbert 2020-04-21 3344 struct sdeb_store_info *sip = devip2sip((struct sdebug_dev_info *)
b6ff8ca733500a Douglas Gilbert 2020-05-12 3345 scp->device->hostdata, true);
87c715dcde633f Douglas Gilbert 2020-04-21 3346 struct t10_pi_tuple *sdt;
49adea5162df30 Douglas Gilbert 2021-12-30 3347 struct scatterlist *store_sgl;
49adea5162df30 Douglas Gilbert 2021-12-30 3348 u8 *arr;
49adea5162df30 Douglas Gilbert 2021-12-30 3349
49adea5162df30 Douglas Gilbert 2021-12-30 3350 arr = kzalloc(lb_size, GFP_ATOMIC);
49adea5162df30 Douglas Gilbert 2021-12-30 3351 if (!arr)
49adea5162df30 Douglas Gilbert 2021-12-30 @3352 return -1; /* mkp, is this correct? */
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3353
c45eabec08776d Akinobu Mita 2014-02-26 3354 for (i = 0; i < sectors; i++, ei_lba++) {
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3355 sector = start_sec + i;
49adea5162df30 Douglas Gilbert 2021-12-30 3356 lba = sector;
87c715dcde633f Douglas Gilbert 2020-04-21 3357 sdt = dif_store(sip, sector);
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3358
51d648af589221 Akinobu Mita 2013-09-18 3359 if (sdt->app_tag == cpu_to_be16(0xffff))
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3360 continue;
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3361
f7be677227a537 Martin K. Petersen 2021-06-08 3362 /*
f7be677227a537 Martin K. Petersen 2021-06-08 3363 * Because scsi_debug acts as both initiator and
f7be677227a537 Martin K. Petersen 2021-06-08 3364 * target we proceed to verify the PI even if
f7be677227a537 Martin K. Petersen 2021-06-08 3365 * RDPROTECT=3. This is done so the "initiator" knows
f7be677227a537 Martin K. Petersen 2021-06-08 3366 * which type of error to return. Otherwise we would
f7be677227a537 Martin K. Petersen 2021-06-08 3367 * have to iterate over the PI twice.
f7be677227a537 Martin K. Petersen 2021-06-08 3368 */
f7be677227a537 Martin K. Petersen 2021-06-08 3369 if (scp->cmnd[1] >> 5) { /* RDPROTECT */
49adea5162df30 Douglas Gilbert 2021-12-30 3370 block = do_div(lba, sdebug_store_sectors);
49adea5162df30 Douglas Gilbert 2021-12-30 3371 lba_start = block * lb_size;
49adea5162df30 Douglas Gilbert 2021-12-30 3372 sgl_i = lba_start >> sip->elem_pow2;
49adea5162df30 Douglas Gilbert 2021-12-30 3373 rem = lba_start - (sgl_i ? (sgl_i << sip->elem_pow2) : 0);
49adea5162df30 Douglas Gilbert 2021-12-30 3374 store_sgl = sip->sgl + sgl_i;
49adea5162df30 Douglas Gilbert 2021-12-30 3375
49adea5162df30 Douglas Gilbert 2021-12-30 3376 ret = sg_copy_buffer(store_sgl, sip->n_elem - sgl_i, arr, lb_size, rem, true);
49adea5162df30 Douglas Gilbert 2021-12-30 3377
49adea5162df30 Douglas Gilbert 2021-12-30 3378 ret = dif_verify(sdt, arr, sector, ei_lba);
49adea5162df30 Douglas Gilbert 2021-12-30 3379
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3380 if (ret) {
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3381 dif_errors++;
49adea5162df30 Douglas Gilbert 2021-12-30 3382 goto fini;
f7be677227a537 Martin K. Petersen 2021-06-08 3383 }
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3384 }
bb8c063c6afcd9 Akinobu Mita 2013-09-18 3385 }
c6a44287417de1 Martin K. Petersen 2009-01-04 3386
87c715dcde633f Douglas Gilbert 2020-04-21 3387 dif_copy_prot(scp, start_sec, sectors, true);
c6a44287417de1 Martin K. Petersen 2009-01-04 3388 dix_reads++;
c6a44287417de1 Martin K. Petersen 2009-01-04 3389
49adea5162df30 Douglas Gilbert 2021-12-30 3390 fini:
49adea5162df30 Douglas Gilbert 2021-12-30 3391 kfree(arr);
f7be677227a537 Martin K. Petersen 2021-06-08 3392 return ret;
c6a44287417de1 Martin K. Petersen 2009-01-04 3393 }
c6a44287417de1 Martin K. Petersen 2009-01-04 3394
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 2 weeks
security/keys/dh.c:400:2: warning: Potential leak of memory pointed to by 'outbuf' [clang-analyzer-unix.Malloc]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kees Cook <keescook(a)chromium.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4f3d93c6eaff6b84e43b63e0d7a119c5920e1020
commit: a52f8a59aef46b59753e583bf4b28fccb069ce64 fortify: Explicitly disable Clang support
date: 3 months ago
:::::: branch date: 19 hours ago
:::::: commit date: 3 months ago
config: i386-randconfig-c001-20211231 (https://download.01.org/0day-ci/archive/20220101/202201010451.8UTyZYpc-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 441de75f69e975b0c7690044560520f8538b4efb)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a52f8a59aef46b59753e583bf4b28fccb069ce64
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^
arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is true. Entering loop body
for (j = 0 ; j < 3 ; j++)
^
arch/x86/kernel/cpu/intel.c:920:4: note: '?' condition is false
if (regs[j] & (1 << 31))
^
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))
^
arch/x86/kernel/cpu/intel.c:920:4: note: Assuming the condition is false
if (regs[j] & (1 << 31))
^
include/linux/compiler.h:56:44: 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) ? \
^~~~
arch/x86/kernel/cpu/intel.c:920:4: note: '?' condition is false
if (regs[j] & (1 << 31))
^
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) ? \
^
arch/x86/kernel/cpu/intel.c:920:4: note: Taking false branch
if (regs[j] & (1 << 31))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is true. Entering loop body
for (j = 0 ; j < 3 ; j++)
^
arch/x86/kernel/cpu/intel.c:920:4: note: '?' condition is false
if (regs[j] & (1 << 31))
^
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))
^
arch/x86/kernel/cpu/intel.c:920:4: note: Assuming the condition is false
if (regs[j] & (1 << 31))
^
include/linux/compiler.h:56:44: 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) ? \
^~~~
arch/x86/kernel/cpu/intel.c:920:4: note: '?' condition is false
if (regs[j] & (1 << 31))
^
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) ? \
^
arch/x86/kernel/cpu/intel.c:920:4: note: Taking false branch
if (regs[j] & (1 << 31))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is false. Execution continues on line 924
for (j = 0 ; j < 3 ; j++)
^
arch/x86/kernel/cpu/intel.c:924:8: note: The value 1 is assigned to 'j'
for (j = 1 ; j < 16 ; j++)
^~~~~
arch/x86/kernel/cpu/intel.c:924:3: note: Loop condition is true. Entering loop body
for (j = 1 ; j < 16 ; j++)
^
arch/x86/kernel/cpu/intel.c:925:4: note: 1st function call argument is an uninitialized value
intel_tlb_lookup(desc[j]);
^ ~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
>> security/keys/dh.c:400:2: warning: Potential leak of memory pointed to by 'outbuf' [clang-analyzer-unix.Malloc]
crypto_free_kpp(tfm);
^
security/keys/dh.c:245:6: note: Assuming 'params' is non-null
if (!params || (!buffer && buflen)) {
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
security/keys/dh.c:245:6: note: Left side of '||' is false
if (!params || (!buffer && buflen)) {
^
security/keys/dh.c:245:18: note: Assuming 'buffer' is null
if (!params || (!buffer && buflen)) {
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
security/keys/dh.c:245:18: note: Left side of '&&' is true
if (!params || (!buffer && buflen)) {
^
security/keys/dh.c:245:2: note: Assuming the condition is true
if (!params || (!buffer && buflen)) {
^
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))
^~~~
security/keys/dh.c:245:2: note: '?' condition is false
if (!params || (!buffer && buflen)) {
^
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))
^
security/keys/dh.c:245:7: note: 'params' is non-null
if (!params || (!buffer && buflen)) {
^
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) ? \
^~~~
security/keys/dh.c:245:6: note: Left side of '||' is false
if (!params || (!buffer && buflen)) {
^
security/keys/dh.c:245:19: note: 'buffer' is null
if (!params || (!buffer && buflen)) {
^
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) ? \
^~~~
security/keys/dh.c:245:18: note: Left side of '&&' is true
if (!params || (!buffer && buflen)) {
^
security/keys/dh.c:245:2: note: '?' condition is false
if (!params || (!buffer && buflen)) {
^
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) ? \
^
security/keys/dh.c:245:2: note: Taking false branch
if (!params || (!buffer && buflen)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
security/keys/dh.c:249:2: note: '?' condition is false
if (copy_from_user(&pcopy, params, sizeof(pcopy)) != 0) {
^
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/char/ipmi/ipmi_msghandler.c:711:2: note: Memory is released
kfree(intf);
^~~~~~~~~~~
include/linux/kref.h:65:3: note: Returning; memory was released
release(kref);
^~~~~~~~~~~~~
drivers/char/ipmi/ipmi_msghandler.c:4682:4: note: Returning; memory was released
kref_put(&intf->refcount, intf_free);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/ipmi/ipmi_msghandler.c:4693:2: note: Calling 'spinlock_check'
spin_lock_irqsave(&intf->seq_lock, flags);
^
include/linux/spinlock.h:393:24: note: expanded from macro 'spin_lock_irqsave'
raw_spin_lock_irqsave(spinlock_check(lock), flags); \
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:256:34: note: expanded from macro 'raw_spin_lock_irqsave'
flags = _raw_spin_lock_irqsave(lock); \
^~~~
include/linux/spinlock.h:338:2: note: Use of memory after it is freed
return &lock->rlock;
^ ~~~~~~~~~~~~
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/video/backlight/qcom-wled.c:1124:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = regmap_update_bits(wled->regmap, addr,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/backlight/qcom-wled.c:1124:3: note: Value stored to 'rc' is never read
rc = regmap_update_bits(wled->regmap, addr,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/input/touchscreen/elants_i2c.c:137:8: warning: Excessive padding in 'struct elants_data' (44 padding bytes, where 12 is optimal).
Optimal fields order:
buf,
test_version,
fw_version,
client,
input,
vcc33,
vccio,
reset_gpio,
x_res,
y_res,
x_max,
y_max,
phy_x,
phy_y,
state,
chip_id,
iap_mode,
prop,
cmd_done,
sysfs_mutex,
hw_version,
solution_version,
bc_version,
iap_version,
major_res,
wake_irq_enabled,
keep_power_in_suspend,
cmd_resp,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct elants_data {
~~~~~~~^~~~~~~~~~~~~
drivers/input/touchscreen/elants_i2c.c:137:8: note: Excessive padding in 'struct elants_data' (44 padding bytes, where 12 is optimal). Optimal fields order: buf, test_version, fw_version, client, input, vcc33, vccio, reset_gpio, x_res, y_res, x_max, y_max, phy_x, phy_y, state, chip_id, iap_mode, prop, cmd_done, sysfs_mutex, hw_version, solution_version, bc_version, iap_version, major_res, wake_irq_enabled, keep_power_in_suspend, cmd_resp, consider reordering the fields or adding explicit padding members
struct elants_data {
~~~~~~~^~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
>> fs/pstore/ram.c:244:30: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
tmp_prz->corrected_bytes +=
~~~~~~~~~~~~~~~~~~~~~~~~ ^
fs/pstore/ram.c:194:9: note: Assuming field 'dump_read_cnt' is >= field 'max_dump_cnt'
while (cxt->dump_read_cnt < cxt->max_dump_cnt && !prz) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/pstore/ram.c:194:48: note: Left side of '&&' is false
while (cxt->dump_read_cnt < cxt->max_dump_cnt && !prz) {
^
fs/pstore/ram.c:210:6: note: Left side of '&&' is true
if (!prz_ok(prz) && !cxt->console_read_cnt++)
^
fs/pstore/ram.c:210:22: note: Assuming the condition is false
if (!prz_ok(prz) && !cxt->console_read_cnt++)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
fs/pstore/ram.c:210:2: note: '?' condition is false
if (!prz_ok(prz) && !cxt->console_read_cnt++)
^
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))
^
fs/pstore/ram.c:210:6: note: Left side of '&&' is true
if (!prz_ok(prz) && !cxt->console_read_cnt++)
^
fs/pstore/ram.c:210:22: note: Assuming the condition is false
if (!prz_ok(prz) && !cxt->console_read_cnt++)
^
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) ? \
^~~~
fs/pstore/ram.c:210:2: note: '?' condition is false
if (!prz_ok(prz) && !cxt->console_read_cnt++)
^
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) ? \
^
fs/pstore/ram.c:210:2: note: Taking false branch
if (!prz_ok(prz) && !cxt->console_read_cnt++)
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/pstore/ram.c:213:6: note: Left side of '&&' is true
if (!prz_ok(prz) && !cxt->pmsg_read_cnt++)
^
fs/pstore/ram.c:213:22: note: Assuming the condition is true
if (!prz_ok(prz) && !cxt->pmsg_read_cnt++)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
fs/pstore/ram.c:213:2: note: '?' condition is false
if (!prz_ok(prz) && !cxt->pmsg_read_cnt++)
^
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))
^
fs/pstore/ram.c:213:6: note: Left side of '&&' is true
if (!prz_ok(prz) && !cxt->pmsg_read_cnt++)
^
fs/pstore/ram.c:213:2: note: '?' condition is false
if (!prz_ok(prz) && !cxt->pmsg_read_cnt++)
^
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) ? \
^
fs/pstore/ram.c:213:2: note: Taking false branch
if (!prz_ok(prz) && !cxt->pmsg_read_cnt++)
--
^
net/ipv4/tcp_ipv4.c:2915:6: note: Assuming field 'skc_state' is equal to TCP_TIME_WAIT
if (sk->sk_state == TCP_TIME_WAIT) {
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/ipv4/tcp_ipv4.c:2915:2: note: '?' condition is false
if (sk->sk_state == TCP_TIME_WAIT) {
^
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))
^
net/ipv4/tcp_ipv4.c:2915:10: note: Field 'skc_state' is equal to TCP_TIME_WAIT
if (sk->sk_state == TCP_TIME_WAIT) {
^
include/net/sock.h:376:31: note: expanded from macro 'sk_state'
#define sk_state __sk_common.skc_state
^
net/ipv4/tcp_ipv4.c:2915:2: note: '?' condition is true
if (sk->sk_state == TCP_TIME_WAIT) {
^
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) ? \
^
net/ipv4/tcp_ipv4.c:2915:2: note: Taking true branch
if (sk->sk_state == TCP_TIME_WAIT) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/ipv4/tcp_ipv4.c:2931:2: note: Assuming the condition is false
if (sk_fullsock(sk))
^
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))
^~~~
net/ipv4/tcp_ipv4.c:2931:2: note: '?' condition is false
if (sk_fullsock(sk))
^
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))
^
net/ipv4/tcp_ipv4.c:2931:2: note: '?' condition is true
if (sk_fullsock(sk))
^
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) ? \
^
net/ipv4/tcp_ipv4.c:2931:2: note: Taking true branch
if (sk_fullsock(sk))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/ipv4/tcp_ipv4.c:2932:3: note: 2nd function call argument is an uninitialized value
unlock_sock_fast(sk, slow);
^ ~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
Suppressed 10 warnings (10 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
kernel/kallsyms.c:436:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(buffer, name);
^~~~~~
kernel/kallsyms.c:436:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(buffer, name);
^~~~~~
Suppressed 3 warnings (2 in non-user code, 1 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.
3 warnings generated.
>> drivers/media/dvb-frontends/au8522_common.c:111:56: warning: The expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
ret = hybrid_tuner_request_state(struct au8522_state, (*state),
^
drivers/media/tuners/tuner-i2c.h:146:3: note: expanded from macro 'hybrid_tuner_request_state'
state->i2c_props.count++; \
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/dvb-frontends/au8522_common.c:111:8: note: Left side of '&&' is false
ret = hybrid_tuner_request_state(struct au8522_state, (*state),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/dvb-frontends/au8522_common.c:111:8: note: '?' condition is true
ret = hybrid_tuner_request_state(struct au8522_state, (*state),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
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/media/dvb-frontends/au8522_common.c:111:8: note: Left side of '&&' is false
ret = hybrid_tuner_request_state(struct au8522_state, (*state),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/dvb-frontends/au8522_common.c:111:8: note: Taking false branch
ret = hybrid_tuner_request_state(struct au8522_state, (*state),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:305:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/media/dvb-frontends/au8522_common.c:111:8: note: Loop condition is false. Exiting loop
ret = hybrid_tuner_request_state(struct au8522_state, (*state),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
--
^
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/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:69:2: note: '?' condition is false
if (IS_ERR(st))
^
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/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:69:2: note: Taking false branch
if (IS_ERR(st))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:72:2: note: Assuming the condition is false
if (is_switching_user(crtc, st->crtc)) {
^
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/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:72:2: note: '?' condition is false
if (is_switching_user(crtc, st->crtc)) {
^
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/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:72:2: note: Assuming the condition is false
if (is_switching_user(crtc, st->crtc)) {
^
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: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/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:72:2: note: '?' condition is true
if (is_switching_user(crtc, st->crtc)) {
^
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/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:72:2: note: Taking true branch
if (is_switching_user(crtc, st->crtc)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:74:21: note: Passing null pointer value via 1st parameter 'crtc'
drm_crtc_index(crtc), pipe->id);
^
include/drm/drm_print.h:516:34: note: expanded from macro 'DRM_DEBUG_ATOMIC'
__drm_dbg(DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c:74:6: note: Calling 'drm_crtc_index'
drm_crtc_index(crtc), pipe->id);
^
include/drm/drm_print.h:516:34: note: expanded from macro 'DRM_DEBUG_ATOMIC'
__drm_dbg(DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/drm/drm_crtc.h:1268:9: note: Access to field 'index' results in a dereference of a null pointer (loaded from variable 'crtc')
return crtc->index;
^~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
>> drivers/media/tuners/mxl5007t.c:853:63: warning: The expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
instance = hybrid_tuner_request_state(struct mxl5007t_state, state,
^
drivers/media/tuners/tuner-i2c.h:146:3: note: expanded from macro 'hybrid_tuner_request_state'
state->i2c_props.count++; \
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mxl5007t.c:853:13: note: Left side of '&&' is false
instance = hybrid_tuner_request_state(struct mxl5007t_state, state,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/tuners/mxl5007t.c:853:13: note: '?' condition is true
instance = hybrid_tuner_request_state(struct mxl5007t_state, state,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
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/media/tuners/mxl5007t.c:853:13: note: Left side of '&&' is false
instance = hybrid_tuner_request_state(struct mxl5007t_state, state,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/tuners/mxl5007t.c:853:13: note: Taking false branch
instance = hybrid_tuner_request_state(struct mxl5007t_state, state,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:305:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/media/tuners/mxl5007t.c:853:13: note: Loop condition is false. Exiting loop
instance = hybrid_tuner_request_state(struct mxl5007t_state, state,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
--
^
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/media/tuners/max2165.c:65:2: note: Taking true branch
if (ret != 2) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/media/tuners/max2165.c:66:3: note: Assuming 'debug' is 0
dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
^
drivers/media/tuners/max2165.c:24:3: note: expanded from macro 'dprintk'
if (debug) \
^~~~~~~~~~
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/media/tuners/max2165.c:66:3: note: '?' condition is false
dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
^
drivers/media/tuners/max2165.c:24:3: note: expanded from macro 'dprintk'
if (debug) \
^
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/media/tuners/max2165.c:66:3: note: 'debug' is 0
dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
^
drivers/media/tuners/max2165.c:24:7: note: expanded from macro 'dprintk'
if (debug) \
^~~~~
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/media/tuners/max2165.c:66:3: note: '?' condition is false
dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
^
drivers/media/tuners/max2165.c:24:3: note: expanded from macro 'dprintk'
if (debug) \
^
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/media/tuners/max2165.c:66:3: note: Taking false branch
dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
^
drivers/media/tuners/max2165.c:24:3: note: expanded from macro 'dprintk'
if (debug) \
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/media/tuners/max2165.c:66:3: note: Loop condition is false. Exiting loop
dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
^
drivers/media/tuners/max2165.c:23:2: note: expanded from macro 'dprintk'
do { \
^
drivers/media/tuners/max2165.c:67:3: note: Returning without writing to '*p_data'
return -EIO;
^
drivers/media/tuners/max2165.c:101:3: note: Returning from 'max2165_read_reg'
max2165_read_reg(priv, REG_ROM_TABLE_DATA, &dat[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/max2165.c:99:2: note: Loop condition is false. Execution continues on line 104
for (i = 0; i < 3; i++) {
^
drivers/media/tuners/max2165.c:108:36: note: The left operand of '&' is a garbage value
priv->bb_filter_7mhz_cfg = dat[2] & 0x0F;
~~~~~~ ^
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
>> drivers/media/dvb-frontends/cx24117.c:1133:56: warning: The expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
ret = hybrid_tuner_request_state(struct cx24117_priv, (*priv),
^
drivers/media/tuners/tuner-i2c.h:146:3: note: expanded from macro 'hybrid_tuner_request_state'
state->i2c_props.count++; \
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/dvb-frontends/cx24117.c:1133:8: note: Left side of '&&' is false
ret = hybrid_tuner_request_state(struct cx24117_priv, (*priv),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/dvb-frontends/cx24117.c:1133:8: note: '?' condition is true
ret = hybrid_tuner_request_state(struct cx24117_priv, (*priv),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
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/media/dvb-frontends/cx24117.c:1133:8: note: Left side of '&&' is false
ret = hybrid_tuner_request_state(struct cx24117_priv, (*priv),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/dvb-frontends/cx24117.c:1133:8: note: Taking false branch
ret = hybrid_tuner_request_state(struct cx24117_priv, (*priv),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:305:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/media/dvb-frontends/cx24117.c:1133:8: note: Loop condition is false. Exiting loop
ret = hybrid_tuner_request_state(struct cx24117_priv, (*priv),
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
--
drivers/mtd/ubi/vtbl.c:531:3: note: '?' condition is true
if (be32_to_cpu(vtbl[i].reserved_pebs) == 0)
^
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/mtd/ubi/vtbl.c:531:3: note: Taking true branch
if (be32_to_cpu(vtbl[i].reserved_pebs) == 0)
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/mtd/ubi/vtbl.c:532:4: note: Execution continues on line 528
continue; /* Empty record */
^
drivers/mtd/ubi/vtbl.c:528:14: note: Assuming 'i' is >= field 'vtbl_slots'
for (i = 0; i < ubi->vtbl_slots; i++) {
^~~~~~~~~~~~~~~~~~~
drivers/mtd/ubi/vtbl.c:528:2: note: Loop condition is false. Execution continues on line 626
for (i = 0; i < ubi->vtbl_slots; i++) {
^
drivers/mtd/ubi/vtbl.c:626:8: note: Calling 'kzalloc'
vol = kzalloc(sizeof(struct ubi_volume), GFP_KERNEL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h:721:9: note: Uninitialized value stored to field 'data_pad'
return kmalloc(size, flags | __GFP_ZERO);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/ubi/vtbl.c:626:8: note: Returning from 'kzalloc'
vol = kzalloc(sizeof(struct ubi_volume), GFP_KERNEL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/ubi/vtbl.c:627:6: note: Assuming 'vol' is non-null
if (!vol)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/mtd/ubi/vtbl.c:627:2: note: '?' condition is false
if (!vol)
^
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/mtd/ubi/vtbl.c:627:7: note: 'vol' is non-null
if (!vol)
^
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/mtd/ubi/vtbl.c:627:2: note: '?' condition is false
if (!vol)
^
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/mtd/ubi/vtbl.c:627:2: note: Taking false branch
if (!vol)
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/mtd/ubi/vtbl.c:639:45: note: The right operand of '-' is a garbage value
(long long)vol->used_ebs * (ubi->leb_size - vol->data_pad);
^ ~~~~~~~~~~~~~
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
drivers/media/tuners/tda18271-fe.c:473:2: warning: Value stored to 'bcal' is never read [clang-analyzer-deadcode.DeadStores]
bcal = 0;
^ ~
drivers/media/tuners/tda18271-fe.c:473:2: note: Value stored to 'bcal' is never read
bcal = 0;
^ ~
>> drivers/media/tuners/tda18271-fe.c:1255:62: warning: The expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
instance = hybrid_tuner_request_state(struct tda18271_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:146:3: note: expanded from macro 'hybrid_tuner_request_state'
state->i2c_props.count++; \
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/tda18271-fe.c:1255:13: note: Left side of '&&' is false
instance = hybrid_tuner_request_state(struct tda18271_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/tuners/tda18271-fe.c:1255:13: note: '?' condition is true
instance = hybrid_tuner_request_state(struct tda18271_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
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/media/tuners/tda18271-fe.c:1255:13: note: Left side of '&&' is false
instance = hybrid_tuner_request_state(struct tda18271_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/tuners/tda18271-fe.c:1255:13: note: Taking false branch
instance = hybrid_tuner_request_state(struct tda18271_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:305:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/media/tuners/tda18271-fe.c:1255:13: note: Loop condition is false. Exiting loop
instance = hybrid_tuner_request_state(struct tda18271_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
--
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/chips/cfi_util.c:78:2: note: '?' condition is true
if (map_bankwidth_is_large(map)) {
^
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/mtd/chips/cfi_util.c:78:2: note: Taking false branch
if (map_bankwidth_is_large(map)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/mtd/chips/cfi_util.c:91:2: note: Control jumps to 'case 4:' at line 99
switch (chip_mode) {
^
drivers/mtd/chips/cfi_util.c:100:12: note: '?' condition is true
onecmd = cpu_to_cfi32(map, cmd);
^
include/linux/mtd/cfi_endian.h:30:30: note: expanded from macro 'cpu_to_cfi32'
#define cpu_to_cfi32(map, x) _cpu_to_cfi(32, (map)->swap, (x))
^
include/linux/mtd/cfi_endian.h:36:31: note: expanded from macro '_cpu_to_cfi'
#define _cpu_to_cfi(w, s, x) (cfi_host(s)?(x):_swap_to_cfi(w, s, x))
^
include/linux/mtd/cfi_endian.h:25:22: note: expanded from macro 'cfi_host'
#define cfi_host(s) (cfi_default(s) == CFI_HOST_ENDIAN)
^
include/linux/mtd/cfi_endian.h:22:25: note: expanded from macro 'cfi_default'
#define cfi_default(s) ((s)?:CFI_DEFAULT_ENDIAN)
^
drivers/mtd/chips/cfi_util.c:100:12: note: Assuming the condition is true
onecmd = cpu_to_cfi32(map, cmd);
^
include/linux/mtd/cfi_endian.h:30:30: note: expanded from macro 'cpu_to_cfi32'
#define cpu_to_cfi32(map, x) _cpu_to_cfi(32, (map)->swap, (x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mtd/cfi_endian.h:36:31: note: expanded from macro '_cpu_to_cfi'
#define _cpu_to_cfi(w, s, x) (cfi_host(s)?(x):_swap_to_cfi(w, s, x))
^~~~~~~~~~~
include/linux/mtd/cfi_endian.h:25:22: note: expanded from macro 'cfi_host'
#define cfi_host(s) (cfi_default(s) == CFI_HOST_ENDIAN)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mtd/cfi_endian.h:22:24: note: expanded from macro 'cfi_default'
#define cfi_default(s) ((s)?:CFI_DEFAULT_ENDIAN)
^
drivers/mtd/chips/cfi_util.c:100:12: note: '?' condition is true
onecmd = cpu_to_cfi32(map, cmd);
^
include/linux/mtd/cfi_endian.h:30:30: note: expanded from macro 'cpu_to_cfi32'
#define cpu_to_cfi32(map, x) _cpu_to_cfi(32, (map)->swap, (x))
^
include/linux/mtd/cfi_endian.h:36:31: note: expanded from macro '_cpu_to_cfi'
#define _cpu_to_cfi(w, s, x) (cfi_host(s)?(x):_swap_to_cfi(w, s, x))
^
include/linux/mtd/cfi_endian.h:25:21: note: expanded from macro 'cfi_host'
#define cfi_host(s) (cfi_default(s) == CFI_HOST_ENDIAN)
^
drivers/mtd/chips/cfi_util.c:101:3: note: Execution continues on line 106
break;
^
drivers/mtd/chips/cfi_util.c:106:2: note: Control jumps to 'case 2:' at line 116
switch (chips_per_word) {
^
drivers/mtd/chips/cfi_util.c:117:21: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long'
onecmd |= (onecmd << (chip_mode * 8));
^ ~~~~~~~~~~~~~~~
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
>> drivers/gpu/drm/drm_atomic.c:106:2: warning: Attempt to free released memory [clang-analyzer-unix.Malloc]
kfree(state->connectors);
^
drivers/gpu/drm/drm_atomic.c:163:6: note: Assuming field 'atomic_state_alloc' is null
if (!config->funcs->atomic_state_alloc) {
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/gpu/drm/drm_atomic.c:163:2: note: '?' condition is false
if (!config->funcs->atomic_state_alloc) {
^
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/gpu/drm/drm_atomic.c:163:22: note: Field 'atomic_state_alloc' is null
if (!config->funcs->atomic_state_alloc) {
^
drivers/gpu/drm/drm_atomic.c:163:2: note: '?' condition is true
if (!config->funcs->atomic_state_alloc) {
^
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/gpu/drm/drm_atomic.c:163:2: note: Taking true branch
if (!config->funcs->atomic_state_alloc) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/gpu/drm/drm_atomic.c:167:7: note: Assuming 'state' is non-null
if (!state)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/gpu/drm/drm_atomic.c:167:3: note: '?' condition is false
if (!state)
^
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/gpu/drm/drm_atomic.c:167:8: note: 'state' is non-null
if (!state)
^
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/gpu/drm/drm_atomic.c:167:3: note: '?' condition is false
if (!state)
^
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/gpu/drm/drm_atomic.c:167:3: note: Taking false branch
if (!state)
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/gpu/drm/drm_atomic.c:169:7: note: Calling 'drm_atomic_state_init'
if (drm_atomic_state_init(dev, state) < 0) {
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/gpu/drm/drm_atomic.c:134:2: note: '?' condition is false
if (!state->crtcs)
--
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))
^
net/sunrpc/auth_gss/auth_gss_internal.h:19:15: note: 'q' is <= 'end'
if (unlikely(q > end || q < p))
^
include/linux/compiler.h:48:41: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/linux/compiler.h:33:34: note: expanded from macro '__branch_check__'
______r = __builtin_expect(!!(x), expect); \
^
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) ? \
^~~~
net/sunrpc/auth_gss/auth_gss_internal.h:19:15: note: Left side of '||' is false
if (unlikely(q > end || q < p))
^
net/sunrpc/auth_gss/auth_gss_internal.h:19:15: note: 'q' is <= 'end'
include/linux/compiler.h:48:68: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/linux/compiler.h:35:19: note: expanded from macro '__branch_check__'
expect, is_constant); \
^~~~~~~~~~~
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) ? \
^~~~
net/sunrpc/auth_gss/auth_gss_internal.h:19:15: note: Left side of '||' is false
if (unlikely(q > end || q < p))
^
net/sunrpc/auth_gss/auth_gss_internal.h:19:2: note: '?' condition is false
if (unlikely(q > end || q < p))
^
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) ? \
^
net/sunrpc/auth_gss/auth_gss_internal.h:19:2: note: Taking false branch
if (unlikely(q > end || q < p))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/sunrpc/auth_gss/auth_gss.c:714:6: note: Returning from 'simple_get_bytes'
p = simple_get_bytes(buf, end, &id, sizeof(id));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/sunrpc/auth_gss/auth_gss.c:715:2: note: '?' condition is false
if (IS_ERR(p)) {
^
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))
^
net/sunrpc/auth_gss/auth_gss.c:715:2: note: '?' condition is true
if (IS_ERR(p)) {
^
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) ? \
^
net/sunrpc/auth_gss/auth_gss.c:715:2: note: Taking true branch
if (IS_ERR(p)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/sunrpc/auth_gss/auth_gss.c:717:3: note: Control jumps to line 775
goto err;
^
net/sunrpc/auth_gss/auth_gss.c:775:2: note: Memory is released
kfree(buf);
^~~~~~~~~~
net/sunrpc/auth_gss/auth_gss.c:777:2: note: Use of memory after it is freed
return err;
^ ~~~
>> net/sunrpc/auth_gss/auth_gss.c:1006:2: warning: Potential leak of memory pointed to by 'gss_auth' [clang-analyzer-unix.Malloc]
if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL)))
^
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:71:4: note: expanded from macro '__trace_if_value'
(__if_trace.miss_hit[0]++,0); \
^
net/sunrpc/auth_gss/auth_gss.c:1004:6: note: Assuming the condition is false
if (!try_module_get(THIS_MODULE))
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/sunrpc/auth_gss/auth_gss.c:1004:2: note: '?' condition is false
if (!try_module_get(THIS_MODULE))
^
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))
^
net/sunrpc/auth_gss/auth_gss.c:1004:6: note: Assuming the condition is false
if (!try_module_get(THIS_MODULE))
^
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) ? \
^~~~
net/sunrpc/auth_gss/auth_gss.c:1004:2: note: '?' condition is false
if (!try_module_get(THIS_MODULE))
^
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) ? \
^
net/sunrpc/auth_gss/auth_gss.c:1004:2: note: Taking false branch
if (!try_module_get(THIS_MODULE))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/sunrpc/auth_gss/auth_gss.c:1006:19: note: Memory is allocated
if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL)))
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/sunrpc/auth_gss/auth_gss.c:1006:8: note: Assuming 'gss_auth' is non-null
if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL)))
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/sunrpc/auth_gss/auth_gss.c:1006:2: note: '?' condition is false
if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL)))
^
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))
^
net/sunrpc/auth_gss/auth_gss.c:1006:8: note: Assuming 'gss_auth' is non-null
if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL)))
^
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) ? \
^~~~
net/sunrpc/auth_gss/auth_gss.c:1006:2: note: '?' condition is false
if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL)))
^
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) ? \
^
net/sunrpc/auth_gss/auth_gss.c:1006:2: note: Potential leak of memory pointed to by 'gss_auth'
if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL)))
^
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:71:4: note: expanded from macro '__trace_if_value'
(__if_trace.miss_hit[0]++,0); \
^
>> net/sunrpc/auth_gss/auth_gss.c:1354:2: warning: Potential leak of memory pointed to by 'cred' [clang-analyzer-unix.Malloc]
if (!(cred = kzalloc(sizeof(*cred), gfp)))
^
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:71:4: note: expanded from macro '__trace_if_value'
(__if_trace.miss_hit[0]++,0); \
^
net/sunrpc/auth_gss/auth_gss.c:1350:30: note: Left side of '&&' is false
struct gss_auth *gss_auth = container_of(auth, struct gss_auth, rpc_auth);
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
net/sunrpc/auth_gss/auth_gss.c:1350:30: note: '?' condition is true
struct gss_auth *gss_auth = container_of(auth, struct gss_auth, rpc_auth);
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
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))
^
net/sunrpc/auth_gss/auth_gss.c:1350:30: note: Left side of '&&' is false
struct gss_auth *gss_auth = container_of(auth, struct gss_auth, rpc_auth);
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
net/sunrpc/auth_gss/auth_gss.c:1350:30: note: Taking false branch
struct gss_auth *gss_auth = container_of(auth, struct gss_auth, rpc_auth);
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:305:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/sunrpc/auth_gss/auth_gss.c:1350:30: note: Loop condition is false. Exiting loop
struct gss_auth *gss_auth = container_of(auth, struct gss_auth, rpc_auth);
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:305:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:295:2: note: expanded from macro '__compiletime_assert'
do { \
^
net/sunrpc/auth_gss/auth_gss.c:1354:15: note: Calling 'kzalloc'
if (!(cred = kzalloc(sizeof(*cred), gfp)))
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/slab.h:721:9: note: Memory is allocated
return kmalloc(size, flags | __GFP_ZERO);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/sunrpc/auth_gss/auth_gss.c:1354:15: note: Returned allocated memory
if (!(cred = kzalloc(sizeof(*cred), gfp)))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
--
^
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) ? \
^
security/keys/encrypted-keys/encrypted.c:420:9: note: Taking true branch
} else if (!strncmp(epayload->master_desc, KEY_USER_PREFIX,
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
security/keys/encrypted-keys/encrypted.c:422:10: note: Calling 'request_user_key'
mkey = request_user_key(epayload->master_desc +
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/keys/encrypted-keys/encrypted.c:308:2: note: Assuming the condition is false
if (IS_ERR(ukey))
^
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))
^~~~
security/keys/encrypted-keys/encrypted.c:308:2: note: '?' condition is false
if (IS_ERR(ukey))
^
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))
^
security/keys/encrypted-keys/encrypted.c:308:2: note: Assuming the condition is false
if (IS_ERR(ukey))
^
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: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) ? \
^~~~
security/keys/encrypted-keys/encrypted.c:308:2: note: '?' condition is true
if (IS_ERR(ukey))
^
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) ? \
^
security/keys/encrypted-keys/encrypted.c:308:2: note: Taking true branch
if (IS_ERR(ukey))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
security/keys/encrypted-keys/encrypted.c:309:3: note: Control jumps to line 323
goto error;
^
security/keys/encrypted-keys/encrypted.c:422:10: note: Returning from 'request_user_key'
mkey = request_user_key(epayload->master_desc +
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/keys/encrypted-keys/encrypted.c:428:2: note: '?' condition is false
if (IS_ERR(mkey)) {
^
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))
^
security/keys/encrypted-keys/encrypted.c:428:2: note: '?' condition is false
if (IS_ERR(mkey)) {
^
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) ? \
^
security/keys/encrypted-keys/encrypted.c:428:2: note: Taking false branch
if (IS_ERR(mkey)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
security/keys/encrypted-keys/encrypted.c:440:2: note: 1st function call argument is an uninitialized value
dump_master_key(*master_key, *master_keylen);
^ ~~~~~~~~~~~
>> security/keys/encrypted-keys/encrypted.c:821:2: warning: Potential leak of memory pointed to by 'epayload' [clang-analyzer-unix.Malloc]
kfree_sensitive(datablob);
^
security/keys/encrypted-keys/encrypted.c:793:6: note: Assuming 'datalen' is > 0
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
security/keys/encrypted-keys/encrypted.c:793:6: note: Left side of '||' is false
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
security/keys/encrypted-keys/encrypted.c:793:22: note: Assuming 'datalen' is <= 32767
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
security/keys/encrypted-keys/encrypted.c:793:6: note: Left side of '||' is false
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
security/keys/encrypted-keys/encrypted.c:793:41: note: Assuming field 'data' is non-null
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
security/keys/encrypted-keys/encrypted.c:793:2: note: '?' condition is false
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
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))
^
security/keys/encrypted-keys/encrypted.c:793:6: note: 'datalen' is > 0
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
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) ? \
^~~~
security/keys/encrypted-keys/encrypted.c:793:6: note: Left side of '||' is false
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
security/keys/encrypted-keys/encrypted.c:793:22: note: 'datalen' is <= 32767
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
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) ? \
^~~~
security/keys/encrypted-keys/encrypted.c:793:6: note: Left side of '||' is false
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
security/keys/encrypted-keys/encrypted.c:793:48: note: Field 'data' is non-null
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
security/keys/encrypted-keys/encrypted.c:793:2: note: '?' condition is false
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
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) ? \
^
security/keys/encrypted-keys/encrypted.c:793:2: note: Taking false branch
if (datalen <= 0 || datalen > 32767 || !prep->data)
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
security/keys/encrypted-keys/encrypted.c:797:6: note: Assuming 'datablob' is non-null
if (!datablob)
^
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: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))
^
security/keys/encrypted-keys/encrypted.c:462:2: note: '?' condition is true
if (IS_ERR(req))
^
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) ? \
^
security/keys/encrypted-keys/encrypted.c:462:2: note: Taking true branch
if (IS_ERR(req))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
security/keys/encrypted-keys/encrypted.c:463:3: note: Control jumps to line 485
goto out;
^
security/keys/encrypted-keys/encrypted.c:930:8: note: Returned allocated memory
ret = derived_key_encrypt(epayload, derived_key, sizeof derived_key);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/keys/encrypted-keys/encrypted.c:931:6: note: 'ret' is >= 0
if (ret < 0)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
security/keys/encrypted-keys/encrypted.c:931:2: note: '?' condition is false
if (ret < 0)
^
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))
^
security/keys/encrypted-keys/encrypted.c:931:6: note: 'ret' is >= 0
if (ret < 0)
^
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) ? \
^~~~
security/keys/encrypted-keys/encrypted.c:931:2: note: '?' condition is false
if (ret < 0)
^
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) ? \
^
security/keys/encrypted-keys/encrypted.c:931:2: note: Taking false branch
if (ret < 0)
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
security/keys/encrypted-keys/encrypted.c:935:6: note: Assuming 'ret' is >= 0
if (ret < 0)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
security/keys/encrypted-keys/encrypted.c:935:2: note: Potential leak of memory pointed to by 'ret'
if (ret < 0)
^
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))
^
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
>> drivers/media/tuners/xc5000.c:1378:60: warning: The expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
instance = hybrid_tuner_request_state(struct xc5000_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:146:3: note: expanded from macro 'hybrid_tuner_request_state'
state->i2c_props.count++; \
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/xc5000.c:1372:2: note: Assuming 'debug' is < 1
dprintk(1, "%s(%d-%04x)\n", __func__,
^
drivers/media/tuners/xc5000.c:36:41: note: expanded from macro 'dprintk'
#define dprintk(level, fmt, arg...) if (debug >= level) \
~~~~^~~~~~~~~~~~~~~
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/media/tuners/xc5000.c:1372:2: note: '?' condition is false
dprintk(1, "%s(%d-%04x)\n", __func__,
^
drivers/media/tuners/xc5000.c:36:37: note: expanded from macro 'dprintk'
#define dprintk(level, fmt, arg...) if (debug >= level) \
^
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/media/tuners/xc5000.c:1372:2: note: 'debug' is < 1
dprintk(1, "%s(%d-%04x)\n", __func__,
^
drivers/media/tuners/xc5000.c:36:41: note: expanded from macro 'dprintk'
#define dprintk(level, fmt, arg...) if (debug >= level) \
^~~~~
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/media/tuners/xc5000.c:1372:2: note: '?' condition is false
dprintk(1, "%s(%d-%04x)\n", __func__,
^
drivers/media/tuners/xc5000.c:36:37: note: expanded from macro 'dprintk'
#define dprintk(level, fmt, arg...) if (debug >= level) \
^
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/media/tuners/xc5000.c:1372:2: note: Taking false branch
dprintk(1, "%s(%d-%04x)\n", __func__,
^
drivers/media/tuners/xc5000.c:36:37: note: expanded from macro 'dprintk'
#define dprintk(level, fmt, arg...) if (debug >= level) \
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/media/tuners/xc5000.c:1378:13: note: Left side of '&&' is false
instance = hybrid_tuner_request_state(struct xc5000_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/tuners/xc5000.c:1378:13: note: '?' condition is true
instance = hybrid_tuner_request_state(struct xc5000_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
--
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (1 in non-user code, 1 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.
4 warnings generated.
lib/zstd/fse_compress.c:114:2: warning: Value stored to 'workspace' is never read [clang-analyzer-deadcode.DeadStores]
workspace = (U32 *)workspace + spaceUsed32;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/zstd/fse_compress.c:114:2: note: Value stored to 'workspace' is never read
workspace = (U32 *)workspace + spaceUsed32;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/zstd/fse_compress.c:115:2: warning: Value stored to 'workspaceSize' is never read [clang-analyzer-deadcode.DeadStores]
workspaceSize -= (spaceUsed32 << 2);
^ ~~~~~~~~~~~~~~~~~~
lib/zstd/fse_compress.c:115:2: note: Value stored to 'workspaceSize' is never read
workspaceSize -= (spaceUsed32 << 2);
^ ~~~~~~~~~~~~~~~~~~
lib/zstd/fse_compress.c:755:2: warning: Value stored to 'srcSize' is never read [clang-analyzer-deadcode.DeadStores]
srcSize -= 2;
^ ~
lib/zstd/fse_compress.c:755:2: note: Value stored to 'srcSize' is never read
srcSize -= 2;
^ ~
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
drivers/gpu/drm/drm_crtc_helper.c:635:2: warning: Value stored to 'count' is never read [clang-analyzer-deadcode.DeadStores]
count = 0;
^ ~
drivers/gpu/drm/drm_crtc_helper.c:635:2: note: Value stored to 'count' is never read
count = 0;
^ ~
drivers/gpu/drm/drm_crtc_helper.c:681:2: warning: Value stored to 'count' is never read [clang-analyzer-deadcode.DeadStores]
count = 0;
^ ~
drivers/gpu/drm/drm_crtc_helper.c:681:2: note: Value stored to 'count' is never read
count = 0;
^ ~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/media/tuners/mt20xx.c:253:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:253:2: note: Value stored to 'ret' is never read
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:263:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,4);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:263:2: note: Value stored to 'ret' is never read
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,4);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:265:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+5,4);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:265:2: note: Value stored to 'ret' is never read
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+5,4);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:383:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+1,4);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:383:2: note: Value stored to 'ret' is never read
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+1,4);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:391:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+5,6);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:391:2: note: Value stored to 'ret' is never read
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+5,6);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:395:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+12,2);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/mt20xx.c:395:2: note: Value stored to 'ret' is never read
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+12,2);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
>> drivers/media/tuners/tda9887.c:684:61: warning: The expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
instance = hybrid_tuner_request_state(struct tda9887_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:146:3: note: expanded from macro 'hybrid_tuner_request_state'
state->i2c_props.count++; \
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/tda9887.c:684:13: note: Left side of '&&' is false
instance = hybrid_tuner_request_state(struct tda9887_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/tuners/tda9887.c:684:13: note: '?' condition is true
instance = hybrid_tuner_request_state(struct tda9887_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
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/media/tuners/tda9887.c:684:13: note: Left side of '&&' is false
instance = hybrid_tuner_request_state(struct tda9887_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/media/tuners/tda9887.c:684:13: note: Taking false branch
instance = hybrid_tuner_request_state(struct tda9887_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:305:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:297:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/media/tuners/tda9887.c:684:13: note: Loop condition is false. Exiting loop
instance = hybrid_tuner_request_state(struct tda9887_priv, priv,
^
drivers/media/tuners/tuner-i2c.h:122:2: note: expanded from macro 'hybrid_tuner_request_state'
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
^
include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
--
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/crypto/fname.c:367:2: note: Loop condition is false. Exiting loop
BUILD_BUG_ON(FSCRYPT_NOKEY_NAME_MAX_ENCODED > NAME_MAX);
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:317:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:305:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:295:2: note: expanded from macro '__compiletime_assert'
do { \
^
fs/crypto/fname.c:372:6: note: Assuming the condition is true
if (iname->len <= sizeof(nokey_name.bytes)) {
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
fs/crypto/fname.c:372:2: note: '?' condition is false
if (iname->len <= sizeof(nokey_name.bytes)) {
^
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))
^
fs/crypto/fname.c:372:2: note: '?' condition is true
if (iname->len <= sizeof(nokey_name.bytes)) {
^
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) ? \
^
fs/crypto/fname.c:372:2: note: Taking true branch
if (iname->len <= sizeof(nokey_name.bytes)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/crypto/fname.c:383:15: note: Calling 'fscrypt_base64url_encode'
oname->len = fscrypt_base64url_encode((const u8 *)&nokey_name, size,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/crypto/fname.c:208:14: note: Assuming 'i' is < 'srclen'
for (i = 0; i < srclen; i++) {
^~~~~~~~~~
fs/crypto/fname.c:208:2: note: Loop condition is true. Entering loop body
for (i = 0; i < srclen; i++) {
^
fs/crypto/fname.c:211:3: note: Loop condition is false. Exiting loop
do {
^
fs/crypto/fname.c:208:26: note: The value 1 is assigned to 'i'
for (i = 0; i < srclen; i++) {
^~~
fs/crypto/fname.c:208:14: note: Assuming 'i' is < 'srclen'
for (i = 0; i < srclen; i++) {
^~~~~~~~~~
fs/crypto/fname.c:208:2: note: Loop condition is true. Entering loop body
for (i = 0; i < srclen; i++) {
^
fs/crypto/fname.c:209:18: note: The right operand of '|' is a garbage value
ac = (ac << 8) | src[i];
^ ~~~~~~
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
fs/cifs/smb2pdu.c:577:3: warning: Value stored to 'pneg_ctxt' is never read [clang-analyzer-deadcode.DeadStores]
pneg_ctxt += ctxt_len;
^ ~~~~~~~~
fs/cifs/smb2pdu.c:577:3: note: Value stored to 'pneg_ctxt' is never read
pneg_ctxt += ctxt_len;
^ ~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
>> fs/cifs/cifsacl.c:267:21: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
dst->authority[i] = src->authority[i];
^
fs/cifs/cifsacl.c:1261:2: note: Assuming 'dacloffset' is not equal to 0
if (dacloffset) {
^
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))
^~~~
fs/cifs/cifsacl.c:1261:2: note: '?' condition is false
if (dacloffset) {
^
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))
^
fs/cifs/cifsacl.c:1261:6: note: 'dacloffset' is not equal to 0
if (dacloffset) {
^
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) ? \
^~~~
fs/cifs/cifsacl.c:1261:2: note: '?' condition is true
if (dacloffset) {
^
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) ? \
^
fs/cifs/cifsacl.c:1261:2: note: Taking true branch
if (dacloffset) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/cifs/cifsacl.c:1263:3: note: '?' condition is false
if (end_of_acl < (char *)dacl_ptr + le16_to_cpu(dacl_ptr->size)) {
^
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))
^
fs/cifs/cifsacl.c:1263:3: note: Assuming the condition is false
if (end_of_acl < (char *)dacl_ptr + le16_to_cpu(dacl_ptr->size)) {
^
include/linux/compiler.h:56:44: 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) ? \
^~~~
fs/cifs/cifsacl.c:1263:3: note: '?' condition is false
if (end_of_acl < (char *)dacl_ptr + le16_to_cpu(dacl_ptr->size)) {
^
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) ? \
^
fs/cifs/cifsacl.c:1263:3: note: Taking false branch
if (end_of_acl < (char *)dacl_ptr + le16_to_cpu(dacl_ptr->size)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/cifs/cifsacl.c:1274:6: note: Assuming 'pnmode' is null
if (pnmode && *pnmode != NO_CHANGE_64) { /* chmod */
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
fs/cifs/cifsacl.c:1274:13: note: Left side of '&&' is false
if (pnmode && *pnmode != NO_CHANGE_64) { /* chmod */
vim +/outbuf +400 security/keys/dh.c
f1c316a3ab9d24 Stephan Mueller 2016-08-19 226
f1c316a3ab9d24 Stephan Mueller 2016-08-19 227 long __keyctl_dh_compute(struct keyctl_dh_params __user *params,
f1c316a3ab9d24 Stephan Mueller 2016-08-19 228 char __user *buffer, size_t buflen,
f1c316a3ab9d24 Stephan Mueller 2016-08-19 229 struct keyctl_kdf_params *kdfcopy)
ddbb4114872436 Mat Martineau 2016-04-12 230 {
ddbb4114872436 Mat Martineau 2016-04-12 231 long ret;
7cbe0932c2f201 Mat Martineau 2017-06-08 232 ssize_t dlen;
7cbe0932c2f201 Mat Martineau 2017-06-08 233 int secretlen;
7cbe0932c2f201 Mat Martineau 2017-06-08 234 int outlen;
ddbb4114872436 Mat Martineau 2016-04-12 235 struct keyctl_dh_params pcopy;
7cbe0932c2f201 Mat Martineau 2017-06-08 236 struct dh dh_inputs;
7cbe0932c2f201 Mat Martineau 2017-06-08 237 struct scatterlist outsg;
7cbe0932c2f201 Mat Martineau 2017-06-08 238 struct dh_completion compl;
7cbe0932c2f201 Mat Martineau 2017-06-08 239 struct crypto_kpp *tfm;
7cbe0932c2f201 Mat Martineau 2017-06-08 240 struct kpp_request *req;
7cbe0932c2f201 Mat Martineau 2017-06-08 241 uint8_t *secret;
7cbe0932c2f201 Mat Martineau 2017-06-08 242 uint8_t *outbuf;
f1c316a3ab9d24 Stephan Mueller 2016-08-19 243 struct kdf_sdesc *sdesc = NULL;
ddbb4114872436 Mat Martineau 2016-04-12 244
ddbb4114872436 Mat Martineau 2016-04-12 245 if (!params || (!buffer && buflen)) {
ddbb4114872436 Mat Martineau 2016-04-12 246 ret = -EINVAL;
7cbe0932c2f201 Mat Martineau 2017-06-08 247 goto out1;
ddbb4114872436 Mat Martineau 2016-04-12 248 }
ddbb4114872436 Mat Martineau 2016-04-12 249 if (copy_from_user(&pcopy, params, sizeof(pcopy)) != 0) {
ddbb4114872436 Mat Martineau 2016-04-12 250 ret = -EFAULT;
7cbe0932c2f201 Mat Martineau 2017-06-08 251 goto out1;
ddbb4114872436 Mat Martineau 2016-04-12 252 }
ddbb4114872436 Mat Martineau 2016-04-12 253
f1c316a3ab9d24 Stephan Mueller 2016-08-19 254 if (kdfcopy) {
f1c316a3ab9d24 Stephan Mueller 2016-08-19 255 char *hashname;
f1c316a3ab9d24 Stephan Mueller 2016-08-19 256
4f9dabfaf8df97 Eric Biggers 2017-07-13 257 if (memchr_inv(kdfcopy->__spare, 0, sizeof(kdfcopy->__spare))) {
4f9dabfaf8df97 Eric Biggers 2017-07-13 258 ret = -EINVAL;
4f9dabfaf8df97 Eric Biggers 2017-07-13 259 goto out1;
4f9dabfaf8df97 Eric Biggers 2017-07-13 260 }
4f9dabfaf8df97 Eric Biggers 2017-07-13 261
f1c316a3ab9d24 Stephan Mueller 2016-08-19 262 if (buflen > KEYCTL_KDF_MAX_OUTPUT_LEN ||
f1c316a3ab9d24 Stephan Mueller 2016-08-19 263 kdfcopy->otherinfolen > KEYCTL_KDF_MAX_OI_LEN) {
f1c316a3ab9d24 Stephan Mueller 2016-08-19 264 ret = -EMSGSIZE;
7cbe0932c2f201 Mat Martineau 2017-06-08 265 goto out1;
f1c316a3ab9d24 Stephan Mueller 2016-08-19 266 }
f1c316a3ab9d24 Stephan Mueller 2016-08-19 267
f1c316a3ab9d24 Stephan Mueller 2016-08-19 268 /* get KDF name string */
f1c316a3ab9d24 Stephan Mueller 2016-08-19 269 hashname = strndup_user(kdfcopy->hashname, CRYPTO_MAX_ALG_NAME);
f1c316a3ab9d24 Stephan Mueller 2016-08-19 270 if (IS_ERR(hashname)) {
f1c316a3ab9d24 Stephan Mueller 2016-08-19 271 ret = PTR_ERR(hashname);
7cbe0932c2f201 Mat Martineau 2017-06-08 272 goto out1;
f1c316a3ab9d24 Stephan Mueller 2016-08-19 273 }
f1c316a3ab9d24 Stephan Mueller 2016-08-19 274
f1c316a3ab9d24 Stephan Mueller 2016-08-19 275 /* allocate KDF from the kernel crypto API */
f1c316a3ab9d24 Stephan Mueller 2016-08-19 276 ret = kdf_alloc(&sdesc, hashname);
f1c316a3ab9d24 Stephan Mueller 2016-08-19 277 kfree(hashname);
f1c316a3ab9d24 Stephan Mueller 2016-08-19 278 if (ret)
7cbe0932c2f201 Mat Martineau 2017-06-08 279 goto out1;
4693fc734d675c Stephan Mueller 2016-05-26 280 }
4693fc734d675c Stephan Mueller 2016-05-26 281
7cbe0932c2f201 Mat Martineau 2017-06-08 282 memset(&dh_inputs, 0, sizeof(dh_inputs));
ddbb4114872436 Mat Martineau 2016-04-12 283
7cbe0932c2f201 Mat Martineau 2017-06-08 284 dlen = dh_data_from_key(pcopy.prime, &dh_inputs.p);
7cbe0932c2f201 Mat Martineau 2017-06-08 285 if (dlen < 0) {
7cbe0932c2f201 Mat Martineau 2017-06-08 286 ret = dlen;
7cbe0932c2f201 Mat Martineau 2017-06-08 287 goto out1;
7cbe0932c2f201 Mat Martineau 2017-06-08 288 }
7cbe0932c2f201 Mat Martineau 2017-06-08 289 dh_inputs.p_size = dlen;
ddbb4114872436 Mat Martineau 2016-04-12 290
7cbe0932c2f201 Mat Martineau 2017-06-08 291 dlen = dh_data_from_key(pcopy.base, &dh_inputs.g);
7cbe0932c2f201 Mat Martineau 2017-06-08 292 if (dlen < 0) {
7cbe0932c2f201 Mat Martineau 2017-06-08 293 ret = dlen;
7cbe0932c2f201 Mat Martineau 2017-06-08 294 goto out2;
ddbb4114872436 Mat Martineau 2016-04-12 295 }
7cbe0932c2f201 Mat Martineau 2017-06-08 296 dh_inputs.g_size = dlen;
ddbb4114872436 Mat Martineau 2016-04-12 297
8c0f9f5b309d62 Lubomir Rintel 2018-09-24 298 dlen = dh_data_from_key(pcopy.private, &dh_inputs.key);
7cbe0932c2f201 Mat Martineau 2017-06-08 299 if (dlen < 0) {
7cbe0932c2f201 Mat Martineau 2017-06-08 300 ret = dlen;
7cbe0932c2f201 Mat Martineau 2017-06-08 301 goto out2;
ddbb4114872436 Mat Martineau 2016-04-12 302 }
7cbe0932c2f201 Mat Martineau 2017-06-08 303 dh_inputs.key_size = dlen;
ddbb4114872436 Mat Martineau 2016-04-12 304
7cbe0932c2f201 Mat Martineau 2017-06-08 305 secretlen = crypto_dh_key_len(&dh_inputs);
7cbe0932c2f201 Mat Martineau 2017-06-08 306 secret = kmalloc(secretlen, GFP_KERNEL);
7cbe0932c2f201 Mat Martineau 2017-06-08 307 if (!secret) {
ddbb4114872436 Mat Martineau 2016-04-12 308 ret = -ENOMEM;
7cbe0932c2f201 Mat Martineau 2017-06-08 309 goto out2;
7cbe0932c2f201 Mat Martineau 2017-06-08 310 }
7cbe0932c2f201 Mat Martineau 2017-06-08 311 ret = crypto_dh_encode_key(secret, secretlen, &dh_inputs);
7cbe0932c2f201 Mat Martineau 2017-06-08 312 if (ret)
7cbe0932c2f201 Mat Martineau 2017-06-08 313 goto out3;
7cbe0932c2f201 Mat Martineau 2017-06-08 314
85d7311f1908b9 Eric Biggers 2018-06-30 315 tfm = crypto_alloc_kpp("dh", 0, 0);
7cbe0932c2f201 Mat Martineau 2017-06-08 316 if (IS_ERR(tfm)) {
7cbe0932c2f201 Mat Martineau 2017-06-08 317 ret = PTR_ERR(tfm);
7cbe0932c2f201 Mat Martineau 2017-06-08 318 goto out3;
7cbe0932c2f201 Mat Martineau 2017-06-08 319 }
7cbe0932c2f201 Mat Martineau 2017-06-08 320
7cbe0932c2f201 Mat Martineau 2017-06-08 321 ret = crypto_kpp_set_secret(tfm, secret, secretlen);
7cbe0932c2f201 Mat Martineau 2017-06-08 322 if (ret)
7cbe0932c2f201 Mat Martineau 2017-06-08 323 goto out4;
7cbe0932c2f201 Mat Martineau 2017-06-08 324
7cbe0932c2f201 Mat Martineau 2017-06-08 325 outlen = crypto_kpp_maxsize(tfm);
7cbe0932c2f201 Mat Martineau 2017-06-08 326
7cbe0932c2f201 Mat Martineau 2017-06-08 327 if (!kdfcopy) {
7cbe0932c2f201 Mat Martineau 2017-06-08 328 /*
7cbe0932c2f201 Mat Martineau 2017-06-08 329 * When not using a KDF, buflen 0 is used to read the
7cbe0932c2f201 Mat Martineau 2017-06-08 330 * required buffer length
7cbe0932c2f201 Mat Martineau 2017-06-08 331 */
7cbe0932c2f201 Mat Martineau 2017-06-08 332 if (buflen == 0) {
7cbe0932c2f201 Mat Martineau 2017-06-08 333 ret = outlen;
7cbe0932c2f201 Mat Martineau 2017-06-08 334 goto out4;
7cbe0932c2f201 Mat Martineau 2017-06-08 335 } else if (outlen > buflen) {
7cbe0932c2f201 Mat Martineau 2017-06-08 336 ret = -EOVERFLOW;
7cbe0932c2f201 Mat Martineau 2017-06-08 337 goto out4;
7cbe0932c2f201 Mat Martineau 2017-06-08 338 }
ddbb4114872436 Mat Martineau 2016-04-12 339 }
ddbb4114872436 Mat Martineau 2016-04-12 340
7cbe0932c2f201 Mat Martineau 2017-06-08 341 outbuf = kzalloc(kdfcopy ? (outlen + kdfcopy->otherinfolen) : outlen,
f1c316a3ab9d24 Stephan Mueller 2016-08-19 342 GFP_KERNEL);
7cbe0932c2f201 Mat Martineau 2017-06-08 343 if (!outbuf) {
ddbb4114872436 Mat Martineau 2016-04-12 344 ret = -ENOMEM;
7cbe0932c2f201 Mat Martineau 2017-06-08 345 goto out4;
ddbb4114872436 Mat Martineau 2016-04-12 346 }
ddbb4114872436 Mat Martineau 2016-04-12 347
7cbe0932c2f201 Mat Martineau 2017-06-08 348 sg_init_one(&outsg, outbuf, outlen);
7cbe0932c2f201 Mat Martineau 2017-06-08 349
7cbe0932c2f201 Mat Martineau 2017-06-08 350 req = kpp_request_alloc(tfm, GFP_KERNEL);
7cbe0932c2f201 Mat Martineau 2017-06-08 351 if (!req) {
7cbe0932c2f201 Mat Martineau 2017-06-08 352 ret = -ENOMEM;
7cbe0932c2f201 Mat Martineau 2017-06-08 353 goto out5;
7cbe0932c2f201 Mat Martineau 2017-06-08 354 }
7cbe0932c2f201 Mat Martineau 2017-06-08 355
7cbe0932c2f201 Mat Martineau 2017-06-08 356 kpp_request_set_input(req, NULL, 0);
7cbe0932c2f201 Mat Martineau 2017-06-08 357 kpp_request_set_output(req, &outsg, outlen);
7cbe0932c2f201 Mat Martineau 2017-06-08 358 init_completion(&compl.completion);
7cbe0932c2f201 Mat Martineau 2017-06-08 359 kpp_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG |
7cbe0932c2f201 Mat Martineau 2017-06-08 360 CRYPTO_TFM_REQ_MAY_SLEEP,
7cbe0932c2f201 Mat Martineau 2017-06-08 361 dh_crypto_done, &compl);
7cbe0932c2f201 Mat Martineau 2017-06-08 362
7cbe0932c2f201 Mat Martineau 2017-06-08 363 /*
7cbe0932c2f201 Mat Martineau 2017-06-08 364 * For DH, generate_public_key and generate_shared_secret are
7cbe0932c2f201 Mat Martineau 2017-06-08 365 * the same calculation
7cbe0932c2f201 Mat Martineau 2017-06-08 366 */
7cbe0932c2f201 Mat Martineau 2017-06-08 367 ret = crypto_kpp_generate_public_key(req);
7cbe0932c2f201 Mat Martineau 2017-06-08 368 if (ret == -EINPROGRESS) {
7cbe0932c2f201 Mat Martineau 2017-06-08 369 wait_for_completion(&compl.completion);
7cbe0932c2f201 Mat Martineau 2017-06-08 370 ret = compl.err;
7cbe0932c2f201 Mat Martineau 2017-06-08 371 if (ret)
7cbe0932c2f201 Mat Martineau 2017-06-08 372 goto out6;
7cbe0932c2f201 Mat Martineau 2017-06-08 373 }
7cbe0932c2f201 Mat Martineau 2017-06-08 374
7cbe0932c2f201 Mat Martineau 2017-06-08 375 if (kdfcopy) {
f1c316a3ab9d24 Stephan Mueller 2016-08-19 376 /*
f1c316a3ab9d24 Stephan Mueller 2016-08-19 377 * Concatenate SP800-56A otherinfo past DH shared secret -- the
f1c316a3ab9d24 Stephan Mueller 2016-08-19 378 * input to the KDF is (DH shared secret || otherinfo)
f1c316a3ab9d24 Stephan Mueller 2016-08-19 379 */
7cbe0932c2f201 Mat Martineau 2017-06-08 380 if (copy_from_user(outbuf + req->dst_len, kdfcopy->otherinfo,
f1c316a3ab9d24 Stephan Mueller 2016-08-19 381 kdfcopy->otherinfolen) != 0) {
f1c316a3ab9d24 Stephan Mueller 2016-08-19 382 ret = -EFAULT;
7cbe0932c2f201 Mat Martineau 2017-06-08 383 goto out6;
f1c316a3ab9d24 Stephan Mueller 2016-08-19 384 }
f1c316a3ab9d24 Stephan Mueller 2016-08-19 385
7cbe0932c2f201 Mat Martineau 2017-06-08 386 ret = keyctl_dh_compute_kdf(sdesc, buffer, buflen, outbuf,
7cbe0932c2f201 Mat Martineau 2017-06-08 387 req->dst_len + kdfcopy->otherinfolen,
7cbe0932c2f201 Mat Martineau 2017-06-08 388 outlen - req->dst_len);
7cbe0932c2f201 Mat Martineau 2017-06-08 389 } else if (copy_to_user(buffer, outbuf, req->dst_len) == 0) {
7cbe0932c2f201 Mat Martineau 2017-06-08 390 ret = req->dst_len;
f1c316a3ab9d24 Stephan Mueller 2016-08-19 391 } else {
ddbb4114872436 Mat Martineau 2016-04-12 392 ret = -EFAULT;
f1c316a3ab9d24 Stephan Mueller 2016-08-19 393 }
ddbb4114872436 Mat Martineau 2016-04-12 394
7cbe0932c2f201 Mat Martineau 2017-06-08 395 out6:
7cbe0932c2f201 Mat Martineau 2017-06-08 396 kpp_request_free(req);
7cbe0932c2f201 Mat Martineau 2017-06-08 397 out5:
453431a54934d9 Waiman Long 2020-08-06 398 kfree_sensitive(outbuf);
7cbe0932c2f201 Mat Martineau 2017-06-08 399 out4:
7cbe0932c2f201 Mat Martineau 2017-06-08 @400 crypto_free_kpp(tfm);
7cbe0932c2f201 Mat Martineau 2017-06-08 401 out3:
453431a54934d9 Waiman Long 2020-08-06 402 kfree_sensitive(secret);
7cbe0932c2f201 Mat Martineau 2017-06-08 403 out2:
7cbe0932c2f201 Mat Martineau 2017-06-08 404 dh_free_data(&dh_inputs);
7cbe0932c2f201 Mat Martineau 2017-06-08 405 out1:
f1c316a3ab9d24 Stephan Mueller 2016-08-19 406 kdf_dealloc(sdesc);
ddbb4114872436 Mat Martineau 2016-04-12 407 return ret;
ddbb4114872436 Mat Martineau 2016-04-12 408 }
f1c316a3ab9d24 Stephan Mueller 2016-08-19 409
:::::: The code at line 400 was first introduced by commit
:::::: 7cbe0932c2f2014d6e24e716e79ea3910b468950 KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API
:::::: TO: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
:::::: CC: James Morris <james.l.morris(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 2 weeks
[xiang-erofs:dev-test 5/10] fs/erofs/data.c:143:15: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: Xiang Gao <xiang(a)kernel.org>
CC: linux-erofs(a)lists.ozlabs.org
TO: Gao Xiang <hsiangkao(a)linux.alibaba.com>
CC: Yue Hu <huyue2(a)yulong.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
head: ab92184ff8f12979f3d3dd5ed601ed85770d81ba
commit: 469407a3b5ed9390cfacb0363d1cc926a51f6a14 [5/10] erofs: clean up erofs_map_blocks tracepoints
:::::: branch date: 27 hours ago
:::::: commit date: 3 weeks ago
config: x86_64-randconfig-c007-20211231 (https://download.01.org/0day-ci/archive/20220101/202201010313.1fIwX6wo-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7cd109b92c72855937273a6c8ab19016fbe27d33)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git/commit/?i...
git remote add xiang-erofs https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
git fetch --no-tags xiang-erofs dev-test
git checkout 469407a3b5ed9390cfacb0363d1cc926a51f6a14
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
nilfs_dispose_segment_list(&segments);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nilfs2/recovery.c:406:2: note: Loop condition is true. Entering loop body
while (!list_empty(head)) {
^
fs/nilfs2/recovery.c:411:3: note: Memory is released
kfree(ent);
^~~~~~~~~~
fs/nilfs2/recovery.c:406:2: note: Loop condition is true. Entering loop body
while (!list_empty(head)) {
^
fs/nilfs2/recovery.c:410:3: note: Calling 'list_del'
list_del(&ent->list);
^~~~~~~~~~~~~~~~~~~~
include/linux/list.h:149:14: note: Use of memory after it is freed
entry->next = LIST_POISON1;
~~~~~~~~~~~ ^
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 with check filters).
6 warnings generated.
arch/x86/kernel/cpu/intel.c:925:4: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
intel_tlb_lookup(desc[j]);
^ ~~~~~~~
arch/x86/kernel/cpu/intel.c:909:6: note: Assuming field 'cpuid_level' is >= 2
if (c->cpuid_level < 2)
^~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/intel.c:909:2: note: Taking false branch
if (c->cpuid_level < 2)
^
arch/x86/kernel/cpu/intel.c:915:15: note: Assuming 'i' is < 'n'
for (i = 0 ; i < n ; i++) {
^~~~~
arch/x86/kernel/cpu/intel.c:915:2: note: Loop condition is true. Entering loop body
for (i = 0 ; i < n ; i++) {
^
arch/x86/kernel/cpu/intel.c:916:3: note: Calling 'cpuid'
cpuid(2, ®s[0], ®s[1], ®s[2], ®s[3]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/processor.h:604:2: note: Calling 'native_cpuid'
__cpuid(eax, ebx, ecx, edx);
^
arch/x86/include/asm/processor.h:579:19: note: expanded from macro '__cpuid'
#define __cpuid native_cpuid
^
arch/x86/include/asm/processor.h:604:2: note: Returning from 'native_cpuid'
__cpuid(eax, ebx, ecx, edx);
^
arch/x86/include/asm/processor.h:579:19: note: expanded from macro '__cpuid'
#define __cpuid native_cpuid
^
arch/x86/kernel/cpu/intel.c:916:3: note: Returning from 'cpuid'
cpuid(2, ®s[0], ®s[1], ®s[2], ®s[3]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is true. Entering loop body
for (j = 0 ; j < 3 ; j++)
^
arch/x86/kernel/cpu/intel.c:920:8: note: Assuming the condition is false
if (regs[j] & (1 << 31))
^~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/intel.c:920:4: note: Taking false branch
if (regs[j] & (1 << 31))
^
arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is true. Entering loop body
for (j = 0 ; j < 3 ; j++)
^
arch/x86/kernel/cpu/intel.c:920:8: note: Assuming the condition is false
if (regs[j] & (1 << 31))
^~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/intel.c:920:4: note: Taking false branch
if (regs[j] & (1 << 31))
^
arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is true. Entering loop body
for (j = 0 ; j < 3 ; j++)
^
arch/x86/kernel/cpu/intel.c:920:8: note: Assuming the condition is false
if (regs[j] & (1 << 31))
^~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/intel.c:920:4: note: Taking false branch
if (regs[j] & (1 << 31))
^
arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is false. Execution continues on line 924
for (j = 0 ; j < 3 ; j++)
^
arch/x86/kernel/cpu/intel.c:924:8: note: The value 1 is assigned to 'j'
for (j = 1 ; j < 16 ; j++)
^~~~~
arch/x86/kernel/cpu/intel.c:924:3: note: Loop condition is true. Entering loop body
for (j = 1 ; j < 16 ; j++)
^
arch/x86/kernel/cpu/intel.c:925:4: note: 1st function call argument is an uninitialized value
intel_tlb_lookup(desc[j]);
^ ~~~~~~~
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
>> fs/erofs/data.c:143:15: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
map->m_llen = map->m_plen;
^
fs/erofs/data.c:201:8: note: Calling 'erofs_map_blocks'
ret = erofs_map_blocks(inode, &map, EROFS_GET_BLOCKS_RAW);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/erofs/data.c:81:2: note: Calling 'trace_erofs_map_blocks_enter'
trace_erofs_map_blocks_enter(inode, map, flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/events/erofs.h:172:1: note: Taking false branch
DEFINE_EVENT(erofs__map_blocks_enter, erofs_map_blocks_enter,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:419:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:247:3: note: expanded from macro '__DECLARE_TRACE'
if (static_key_false(&__tracepoint_##name.key)) \
^
include/trace/events/erofs.h:172:1: note: Left side of '&&' is true
DEFINE_EVENT(erofs__map_blocks_enter, erofs_map_blocks_enter,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:419:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:251:7: note: expanded from macro '__DECLARE_TRACE'
if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/kconfig.h:24:22: note: expanded from macro '__or'
#define __or(x, y) ___or(x, y)
^
include/linux/kconfig.h:25:23: note: expanded from macro '___or'
#define ___or(x, y) ____or(__ARG_PLACEHOLDER_##x, y)
^
include/linux/kconfig.h:26:65: note: expanded from macro '____or'
#define ____or(arg1_or_junk, y) __take_second_arg(arg1_or_junk 1, y)
^
include/trace/events/erofs.h:172:1: note: Loop condition is false. Exiting loop
DEFINE_EVENT(erofs__map_blocks_enter, erofs_map_blocks_enter,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:420:15: note: expanded from macro 'DECLARE_TRACE'
cpu_online(raw_smp_processor_id()), \
^
arch/x86/include/asm/smp.h:166:33: note: expanded from macro 'raw_smp_processor_id'
#define raw_smp_processor_id() this_cpu_read(cpu_number)
^
include/linux/percpu-defs.h:507:29: note: expanded from macro 'this_cpu_read'
#define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
^
include/linux/percpu-defs.h:319:2: note: expanded from macro '__pcpu_size_call_return'
__verify_pcpu_ptr(&(variable)); \
^
include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr'
#define __verify_pcpu_ptr(ptr) \
^
include/trace/events/erofs.h:172:1: note: Control jumps to 'case 4:' at line 172
DEFINE_EVENT(erofs__map_blocks_enter, erofs_map_blocks_enter,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:420:15: note: expanded from macro 'DECLARE_TRACE'
cpu_online(raw_smp_processor_id()), \
^
arch/x86/include/asm/smp.h:166:33: note: expanded from macro 'raw_smp_processor_id'
#define raw_smp_processor_id() this_cpu_read(cpu_number)
^
include/linux/percpu-defs.h:507:29: note: expanded from macro 'this_cpu_read'
#define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
^
include/linux/percpu-defs.h:320:2: note: expanded from macro '__pcpu_size_call_return'
switch(sizeof(variable)) { \
^
include/trace/events/erofs.h:172:1: note: Execution continues on line 172
DEFINE_EVENT(erofs__map_blocks_enter, erofs_map_blocks_enter,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:420:15: note: expanded from macro 'DECLARE_TRACE'
cpu_online(raw_smp_processor_id()), \
^
arch/x86/include/asm/smp.h:166:33: note: expanded from macro 'raw_smp_processor_id'
#define raw_smp_processor_id() this_cpu_read(cpu_number)
^
include/linux/percpu-defs.h:507:29: note: expanded from macro 'this_cpu_read'
#define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
^
include/linux/percpu-defs.h:323:42: note: expanded from macro '__pcpu_size_call_return'
case 4: pscr_ret__ = stem##4(variable); break; \
^
include/trace/events/erofs.h:172:1: note: Assuming the condition is false
vim +143 fs/erofs/data.c
81781b02f9845b drivers/staging/erofs/data.c Gao Xiang 2018-07-26 68
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 69 static int erofs_map_blocks(struct inode *inode,
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 70 struct erofs_map_blocks *map, int flags)
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 71 {
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 72 struct super_block *sb = inode->i_sb;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 73 struct erofs_inode *vi = EROFS_I(inode);
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 74 struct erofs_inode_chunk_index *idx;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 75 struct page *page;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 76 u64 chunknr;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 77 unsigned int unit;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 78 erofs_off_t pos;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 79 int err = 0;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 80
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 81 trace_erofs_map_blocks_enter(inode, map, flags);
dfeab2e95a75a4 fs/erofs/data.c Gao Xiang 2021-10-14 82 map->m_deviceid = 0;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 83 if (map->m_la >= inode->i_size) {
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 84 /* leave out-of-bound access unmapped */
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 85 map->m_flags = 0;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 86 map->m_plen = 0;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 87 goto out;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 88 }
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 89
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 90 if (vi->datalayout != EROFS_INODE_CHUNK_BASED) {
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 91 err = erofs_map_blocks_flatmode(inode, map, flags);
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 92 goto out;
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 93 }
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 94
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 95 if (vi->chunkformat & EROFS_CHUNK_FORMAT_INDEXES)
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 96 unit = sizeof(*idx); /* chunk index */
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 97 else
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 98 unit = EROFS_BLOCK_MAP_ENTRY_SIZE; /* block map */
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 99
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 100 chunknr = map->m_la >> vi->chunkbits;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 101 pos = ALIGN(iloc(EROFS_SB(sb), vi->nid) + vi->inode_isize +
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 102 vi->xattr_isize, unit) + unit * chunknr;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 103
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 104 page = erofs_get_meta_page(inode->i_sb, erofs_blknr(pos));
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 105 if (IS_ERR(page)) {
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 106 err = PTR_ERR(page);
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 107 goto out;
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 108 }
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 109 map->m_la = chunknr << vi->chunkbits;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 110 map->m_plen = min_t(erofs_off_t, 1UL << vi->chunkbits,
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 111 roundup(inode->i_size - map->m_la, EROFS_BLKSIZ));
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 112
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 113 /* handle block map */
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 114 if (!(vi->chunkformat & EROFS_CHUNK_FORMAT_INDEXES)) {
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 115 __le32 *blkaddr = page_address(page) + erofs_blkoff(pos);
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 116
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 117 if (le32_to_cpu(*blkaddr) == EROFS_NULL_ADDR) {
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 118 map->m_flags = 0;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 119 } else {
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 120 map->m_pa = blknr_to_addr(le32_to_cpu(*blkaddr));
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 121 map->m_flags = EROFS_MAP_MAPPED;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 122 }
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 123 goto out_unlock;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 124 }
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 125 /* parse chunk indexes */
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 126 idx = page_address(page) + erofs_blkoff(pos);
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 127 switch (le32_to_cpu(idx->blkaddr)) {
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 128 case EROFS_NULL_ADDR:
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 129 map->m_flags = 0;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 130 break;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 131 default:
dfeab2e95a75a4 fs/erofs/data.c Gao Xiang 2021-10-14 132 map->m_deviceid = le16_to_cpu(idx->device_id) &
dfeab2e95a75a4 fs/erofs/data.c Gao Xiang 2021-10-14 133 EROFS_SB(sb)->device_id_mask;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 134 map->m_pa = blknr_to_addr(le32_to_cpu(idx->blkaddr));
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 135 map->m_flags = EROFS_MAP_MAPPED;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 136 break;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 137 }
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 138 out_unlock:
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 139 unlock_page(page);
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 140 put_page(page);
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 141 out:
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 142 if (!err)
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 @143 map->m_llen = map->m_plen;
469407a3b5ed93 fs/erofs/data.c Gao Xiang 2021-12-09 144 trace_erofs_map_blocks_exit(inode, map, flags, 0);
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 145 return err;
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 146 }
c5aa903a59db27 fs/erofs/data.c Gao Xiang 2021-08-20 147
:::::: The code at line 143 was first introduced by commit
:::::: c5aa903a59db274554718cddfda9039913409ec9 erofs: support reading chunk-based uncompressed files
:::::: TO: Gao Xiang <hsiangkao(a)linux.alibaba.com>
:::::: CC: Gao Xiang <hsiangkao(a)linux.alibaba.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 2 weeks
[PATCH] coccinelle: misc: fix swap.cocci warnings
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov(a)linux.com>
CC: Julia Lawall <Julia.Lawall(a)inria.fr>
CC: Michael Ellerman <mpe(a)ellerman.id.au>
CC: Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
CC: Paul Mackerras <paulus(a)samba.org>
CC: Xiongwei Song <sxwjean(a)gmail.com>
CC: Nathan Chancellor <nathan(a)kernel.org>
CC: linuxppc-dev(a)lists.ozlabs.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp(a)intel.com>
arch/powerpc/kernel/fadump.c:1285:34-35: WARNING opportunity for swap()
Check for opencoded swap() implementation.
Generated by: scripts/coccinelle/misc/swap.cocci
CC: Denis Efremov <efremov(a)linux.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4f3d93c6eaff6b84e43b63e0d7a119c5920e1020
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
:::::: branch date: 15 hours ago
:::::: commit date: 8 months ago
Please take the patch only if it's a positive warning. Thanks!
fadump.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1280,11 +1280,9 @@ static void sort_and_merge_mem_ranges(st
if (mem_ranges[idx].base > mem_ranges[j].base)
idx = j;
}
- if (idx != i) {
- tmp_range = mem_ranges[idx];
- mem_ranges[idx] = mem_ranges[i];
- mem_ranges[i] = tmp_range;
- }
+ if (idx != i)
+
+ swap(mem_ranges[idx], mem_ranges[i]);
}
/* Merge adjacent reserved ranges */
4 months, 2 weeks
drivers/media/platform/qcom/camss/camss-csid-170.c:398:3: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Robert Foss <robert.foss(a)linaro.org>
CC: Mauro Carvalho Chehab <mchehab(a)kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Andrey Konovalov <andrey.konovalov(a)linaro.org>
CC: Hans Verkuil <hverkuil(a)xs4all.nl>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9bad743e8d221c1be8fa80f0e76102234e472ac3
commit: eebe6d00e9bf1216fb381b64146e1b7e50d90b3f media: camss: Add support for CSID hardware version Titan 170
date: 9 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 9 months ago
config: riscv-randconfig-c006-20211227 (https://download.01.org/0day-ci/archive/20211231/202112311200.pZVCaQQC-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 511726c64d3b6cca66f7c54d457d586aa3129f67)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eebe6d00e9bf1216fb381b64146e1b7e50d90b3f
# save the config file to linux build tree
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(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~
drivers/iio/adc/qcom-pm8xxx-xoadc.c:759:16: note: Left side of '&&' is false
while (hwchan && hwchan->datasheet_name) {
^
drivers/iio/adc/qcom-pm8xxx-xoadc.c:767:7: note: Access to field 'datasheet_name' results in a dereference of a null pointer (loaded from variable 'hwchan')
if (!hwchan->datasheet_name) {
^~~~~~
Suppressed 13 warnings (6 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.
13 warnings generated.
drivers/media/i2c/ov772x.c:583:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov772x.c:583:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 12 warnings (5 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.
12 warnings generated.
Suppressed 12 warnings (5 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.
13 warnings generated.
Suppressed 13 warnings (6 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.
12 warnings generated.
Suppressed 12 warnings (5 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.
13 warnings generated.
drivers/media/i2c/mt9m001.c:591:2: warning: Value stored to 'data' is never read [clang-analyzer-deadcode.DeadStores]
data = reg_write(client, MT9M001_CHIP_ENABLE, 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/mt9m001.c:591:2: note: Value stored to 'data' is never read
data = reg_write(client, MT9M001_CHIP_ENABLE, 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 12 warnings (5 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.
14 warnings generated.
drivers/media/i2c/mt9m111.c:631:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/mt9m111.c:631:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 13 warnings (6 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.
14 warnings generated.
Suppressed 14 warnings (7 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.
14 warnings generated.
drivers/iio/gyro/adxrs450.c:73:8: warning: Excessive padding in 'struct adxrs450_state' (80 padding bytes, where 16 is optimal).
Optimal fields order:
tx,
rx,
us,
buf_lock,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct adxrs450_state {
~~~~~~~^~~~~~~~~~~~~~~~
drivers/iio/gyro/adxrs450.c:73:8: note: Excessive padding in 'struct adxrs450_state' (80 padding bytes, where 16 is optimal). Optimal fields order: tx, rx, us, buf_lock, consider reordering the fields or adding explicit padding members
struct adxrs450_state {
~~~~~~~^~~~~~~~~~~~~~~~
Suppressed 13 warnings (6 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.
11 warnings generated.
Suppressed 11 warnings (4 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.
12 warnings generated.
Suppressed 12 warnings (5 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.
12 warnings generated.
Suppressed 12 warnings (5 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.
12 warnings generated.
Suppressed 12 warnings (5 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.
13 warnings generated.
Suppressed 13 warnings (6 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.
12 warnings generated.
Suppressed 12 warnings (5 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.
12 warnings generated.
Suppressed 12 warnings (5 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.
12 warnings generated.
drivers/leds/leds-pca9532.c:514:23: warning: Value stored to 'data' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct pca9532_data *data = i2c_get_clientdata(client);
^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/leds-pca9532.c:514:23: note: Value stored to 'data' during its initialization is never read
struct pca9532_data *data = i2c_get_clientdata(client);
^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 11 warnings (4 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.
11 warnings generated.
Suppressed 11 warnings (4 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.
12 warnings generated.
Suppressed 12 warnings (5 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.
17 warnings generated.
>> drivers/media/platform/qcom/camss/camss-csid-170.c:398:3: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
val = 0;
^ ~
drivers/media/platform/qcom/camss/camss-csid-170.c:398:3: note: Value stored to 'val' is never read
val = 0;
^ ~
>> drivers/media/platform/qcom/camss/camss-csid-170.c:478:2: warning: Value stored to 'hw_gen' is never read [clang-analyzer-deadcode.DeadStores]
hw_gen = (hw_version >> HW_VERSION_GENERATION) & 0xF;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/camss/camss-csid-170.c:478:2: note: Value stored to 'hw_gen' is never read
hw_gen = (hw_version >> HW_VERSION_GENERATION) & 0xF;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/qcom/camss/camss-csid-170.c:479:2: warning: Value stored to 'hw_rev' is never read [clang-analyzer-deadcode.DeadStores]
hw_rev = (hw_version >> HW_VERSION_REVISION) & 0xFFF;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/camss/camss-csid-170.c:479:2: note: Value stored to 'hw_rev' is never read
hw_rev = (hw_version >> HW_VERSION_REVISION) & 0xFFF;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/qcom/camss/camss-csid-170.c:480:2: warning: Value stored to 'hw_step' is never read [clang-analyzer-deadcode.DeadStores]
hw_step = (hw_version >> HW_VERSION_STEPPING) & 0xFFFF;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/camss/camss-csid-170.c:480:2: note: Value stored to 'hw_step' is never read
hw_step = (hw_version >> HW_VERSION_STEPPING) & 0xFFFF;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 13 warnings (6 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.
13 warnings generated.
drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c:32:5: warning: Value stored to 'hw_version' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
u8 hw_version = readl_relaxed(csiphy->base +
^~~~~~~~~~
drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c:32:5: note: Value stored to 'hw_version' during its initialization is never read
u8 hw_version = readl_relaxed(csiphy->base +
^~~~~~~~~~
Suppressed 12 warnings (5 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.
13 warnings generated.
Suppressed 13 warnings (6 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.
13 warnings generated.
Suppressed 13 warnings (6 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.
13 warnings generated.
Suppressed 13 warnings (6 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.
12 warnings generated.
drivers/media/dvb-frontends/si2165.c:528:34: warning: Value stored to 'c' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/dvb-frontends/si2165.c:528:34: note: Value stored to 'c' during its initialization is never read
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
^ ~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 11 warnings (4 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.
11 warnings generated.
Suppressed 11 warnings (4 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.
23 warnings generated.
drivers/media/dvb-frontends/rtl2832.c:145:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:145:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:175:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:175:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:214:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:214:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:248:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:248:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:372:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:372:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:394:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:394:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:528:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:528:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:640:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:640:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:787:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:787:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:803:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:803:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/dvb-frontends/rtl2832.c:949:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
vim +/val +398 drivers/media/platform/qcom/camss/camss-csid-170.c
eebe6d00e9bf12 Robert Foss 2021-03-16 328
eebe6d00e9bf12 Robert Foss 2021-03-16 329 static void csid_configure_stream(struct csid_device *csid, u8 enable)
eebe6d00e9bf12 Robert Foss 2021-03-16 330 {
eebe6d00e9bf12 Robert Foss 2021-03-16 331 struct csid_testgen_config *tg = &csid->testgen;
eebe6d00e9bf12 Robert Foss 2021-03-16 332 u32 val;
eebe6d00e9bf12 Robert Foss 2021-03-16 333 u32 phy_sel = 0;
eebe6d00e9bf12 Robert Foss 2021-03-16 334 u8 lane_cnt = csid->phy.lane_cnt;
eebe6d00e9bf12 Robert Foss 2021-03-16 335 struct v4l2_mbus_framefmt *input_format = &csid->fmt[MSM_CSID_PAD_SRC];
eebe6d00e9bf12 Robert Foss 2021-03-16 336 const struct csid_format *format = csid_get_fmt_entry(csid->formats, csid->nformats,
eebe6d00e9bf12 Robert Foss 2021-03-16 337 input_format->code);
eebe6d00e9bf12 Robert Foss 2021-03-16 338
eebe6d00e9bf12 Robert Foss 2021-03-16 339 if (!lane_cnt)
eebe6d00e9bf12 Robert Foss 2021-03-16 340 lane_cnt = 4;
eebe6d00e9bf12 Robert Foss 2021-03-16 341
eebe6d00e9bf12 Robert Foss 2021-03-16 342 if (!tg->enabled)
eebe6d00e9bf12 Robert Foss 2021-03-16 343 phy_sel = csid->phy.csiphy_id;
eebe6d00e9bf12 Robert Foss 2021-03-16 344
eebe6d00e9bf12 Robert Foss 2021-03-16 345 if (enable) {
eebe6d00e9bf12 Robert Foss 2021-03-16 346 u8 vc = 0; /* Virtual Channel 0 */
eebe6d00e9bf12 Robert Foss 2021-03-16 347 u8 dt_id = vc * 4;
eebe6d00e9bf12 Robert Foss 2021-03-16 348
eebe6d00e9bf12 Robert Foss 2021-03-16 349 if (tg->enabled) {
eebe6d00e9bf12 Robert Foss 2021-03-16 350 /* Config Test Generator */
eebe6d00e9bf12 Robert Foss 2021-03-16 351 vc = 0xa;
eebe6d00e9bf12 Robert Foss 2021-03-16 352
eebe6d00e9bf12 Robert Foss 2021-03-16 353 /* configure one DT, infinite frames */
eebe6d00e9bf12 Robert Foss 2021-03-16 354 val = vc << TPG_VC_CFG0_VC_NUM;
eebe6d00e9bf12 Robert Foss 2021-03-16 355 val |= INTELEAVING_MODE_ONE_SHOT << TPG_VC_CFG0_LINE_INTERLEAVING_MODE;
eebe6d00e9bf12 Robert Foss 2021-03-16 356 val |= 0 << TPG_VC_CFG0_NUM_FRAMES;
eebe6d00e9bf12 Robert Foss 2021-03-16 357 writel_relaxed(val, csid->base + CSID_TPG_VC_CFG0);
eebe6d00e9bf12 Robert Foss 2021-03-16 358
eebe6d00e9bf12 Robert Foss 2021-03-16 359 val = 0x740 << TPG_VC_CFG1_H_BLANKING_COUNT;
eebe6d00e9bf12 Robert Foss 2021-03-16 360 val |= 0x3ff << TPG_VC_CFG1_V_BLANKING_COUNT;
eebe6d00e9bf12 Robert Foss 2021-03-16 361 writel_relaxed(val, csid->base + CSID_TPG_VC_CFG1);
eebe6d00e9bf12 Robert Foss 2021-03-16 362
eebe6d00e9bf12 Robert Foss 2021-03-16 363 writel_relaxed(0x12345678, csid->base + CSID_TPG_LFSR_SEED);
eebe6d00e9bf12 Robert Foss 2021-03-16 364
eebe6d00e9bf12 Robert Foss 2021-03-16 365 val = input_format->height & 0x1fff << TPG_DT_n_CFG_0_FRAME_HEIGHT;
eebe6d00e9bf12 Robert Foss 2021-03-16 366 val |= input_format->width & 0x1fff << TPG_DT_n_CFG_0_FRAME_WIDTH;
eebe6d00e9bf12 Robert Foss 2021-03-16 367 writel_relaxed(val, csid->base + CSID_TPG_DT_n_CFG_0(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 368
eebe6d00e9bf12 Robert Foss 2021-03-16 369 val = DATA_TYPE_RAW_10BIT << TPG_DT_n_CFG_1_DATA_TYPE;
eebe6d00e9bf12 Robert Foss 2021-03-16 370 writel_relaxed(val, csid->base + CSID_TPG_DT_n_CFG_1(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 371
eebe6d00e9bf12 Robert Foss 2021-03-16 372 val = tg->mode << TPG_DT_n_CFG_2_PAYLOAD_MODE;
eebe6d00e9bf12 Robert Foss 2021-03-16 373 val |= 0xBE << TPG_DT_n_CFG_2_USER_SPECIFIED_PAYLOAD;
eebe6d00e9bf12 Robert Foss 2021-03-16 374 val |= format->decode_format << TPG_DT_n_CFG_2_ENCODE_FORMAT;
eebe6d00e9bf12 Robert Foss 2021-03-16 375 writel_relaxed(val, csid->base + CSID_TPG_DT_n_CFG_2(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 376
eebe6d00e9bf12 Robert Foss 2021-03-16 377 writel_relaxed(0, csid->base + CSID_TPG_COLOR_BARS_CFG);
eebe6d00e9bf12 Robert Foss 2021-03-16 378
eebe6d00e9bf12 Robert Foss 2021-03-16 379 writel_relaxed(0, csid->base + CSID_TPG_COLOR_BOX_CFG);
eebe6d00e9bf12 Robert Foss 2021-03-16 380 }
eebe6d00e9bf12 Robert Foss 2021-03-16 381
eebe6d00e9bf12 Robert Foss 2021-03-16 382 val = 1 << RDI_CFG0_BYTE_CNTR_EN;
eebe6d00e9bf12 Robert Foss 2021-03-16 383 val |= 1 << RDI_CFG0_FORMAT_MEASURE_EN;
eebe6d00e9bf12 Robert Foss 2021-03-16 384 val |= 1 << RDI_CFG0_TIMESTAMP_EN;
eebe6d00e9bf12 Robert Foss 2021-03-16 385 val |= DECODE_FORMAT_PAYLOAD_ONLY << RDI_CFG0_DECODE_FORMAT;
eebe6d00e9bf12 Robert Foss 2021-03-16 386 val |= DATA_TYPE_RAW_10BIT << RDI_CFG0_DATA_TYPE;
eebe6d00e9bf12 Robert Foss 2021-03-16 387 val |= vc << RDI_CFG0_VIRTUAL_CHANNEL;
eebe6d00e9bf12 Robert Foss 2021-03-16 388 val |= dt_id << RDI_CFG0_DT_ID;
eebe6d00e9bf12 Robert Foss 2021-03-16 389 writel_relaxed(val, csid->base + CSID_RDI_CFG0(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 390
eebe6d00e9bf12 Robert Foss 2021-03-16 391 /* CSID_TIMESTAMP_STB_POST_IRQ */
eebe6d00e9bf12 Robert Foss 2021-03-16 392 val = 2 << RDI_CFG1_TIMESTAMP_STB_SEL;
eebe6d00e9bf12 Robert Foss 2021-03-16 393 writel_relaxed(val, csid->base + CSID_RDI_CFG1(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 394
eebe6d00e9bf12 Robert Foss 2021-03-16 395 val = 1;
eebe6d00e9bf12 Robert Foss 2021-03-16 396 writel_relaxed(val, csid->base + CSID_RDI_FRM_DROP_PERIOD(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 397
eebe6d00e9bf12 Robert Foss 2021-03-16 @398 val = 0;
eebe6d00e9bf12 Robert Foss 2021-03-16 399 writel_relaxed(0, csid->base + CSID_RDI_FRM_DROP_PATTERN(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 400
eebe6d00e9bf12 Robert Foss 2021-03-16 401 val = 1;
eebe6d00e9bf12 Robert Foss 2021-03-16 402 writel_relaxed(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PERIOD(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 403
eebe6d00e9bf12 Robert Foss 2021-03-16 404 val = 0;
eebe6d00e9bf12 Robert Foss 2021-03-16 405 writel_relaxed(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PATTERN(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 406
eebe6d00e9bf12 Robert Foss 2021-03-16 407 val = 1;
eebe6d00e9bf12 Robert Foss 2021-03-16 408 writel_relaxed(val, csid->base + CSID_RDI_RPP_PIX_DROP_PERIOD(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 409
eebe6d00e9bf12 Robert Foss 2021-03-16 410 val = 0;
eebe6d00e9bf12 Robert Foss 2021-03-16 411 writel_relaxed(val, csid->base + CSID_RDI_RPP_PIX_DROP_PATTERN(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 412
eebe6d00e9bf12 Robert Foss 2021-03-16 413 val = 1;
eebe6d00e9bf12 Robert Foss 2021-03-16 414 writel_relaxed(val, csid->base + CSID_RDI_RPP_LINE_DROP_PERIOD(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 415
eebe6d00e9bf12 Robert Foss 2021-03-16 416 val = 0;
eebe6d00e9bf12 Robert Foss 2021-03-16 417 writel_relaxed(val, csid->base + CSID_RDI_RPP_LINE_DROP_PATTERN(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 418
eebe6d00e9bf12 Robert Foss 2021-03-16 419 val = 0;
eebe6d00e9bf12 Robert Foss 2021-03-16 420 writel_relaxed(val, csid->base + CSID_RDI_CTRL(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 421
eebe6d00e9bf12 Robert Foss 2021-03-16 422 val = readl_relaxed(csid->base + CSID_RDI_CFG0(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 423 val |= 1 << RDI_CFG0_ENABLE;
eebe6d00e9bf12 Robert Foss 2021-03-16 424 writel_relaxed(val, csid->base + CSID_RDI_CFG0(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 425 }
eebe6d00e9bf12 Robert Foss 2021-03-16 426
eebe6d00e9bf12 Robert Foss 2021-03-16 427 if (tg->enabled) {
eebe6d00e9bf12 Robert Foss 2021-03-16 428 val = enable << TPG_CTRL_TEST_EN;
eebe6d00e9bf12 Robert Foss 2021-03-16 429 val |= 1 << TPG_CTRL_FS_PKT_EN;
eebe6d00e9bf12 Robert Foss 2021-03-16 430 val |= 1 << TPG_CTRL_FE_PKT_EN;
eebe6d00e9bf12 Robert Foss 2021-03-16 431 val |= (lane_cnt - 1) << TPG_CTRL_NUM_ACTIVE_LANES;
eebe6d00e9bf12 Robert Foss 2021-03-16 432 val |= 0x64 << TPG_CTRL_CYCLES_BETWEEN_PKTS;
eebe6d00e9bf12 Robert Foss 2021-03-16 433 val |= 0xA << TPG_CTRL_NUM_TRAIL_BYTES;
eebe6d00e9bf12 Robert Foss 2021-03-16 434 writel_relaxed(val, csid->base + CSID_TPG_CTRL);
eebe6d00e9bf12 Robert Foss 2021-03-16 435 }
eebe6d00e9bf12 Robert Foss 2021-03-16 436
eebe6d00e9bf12 Robert Foss 2021-03-16 437 val = (lane_cnt - 1) << CSI2_RX_CFG0_NUM_ACTIVE_LANES;
eebe6d00e9bf12 Robert Foss 2021-03-16 438 val |= csid->phy.lane_assign << CSI2_RX_CFG0_DL0_INPUT_SEL;
eebe6d00e9bf12 Robert Foss 2021-03-16 439 val |= phy_sel << CSI2_RX_CFG0_PHY_NUM_SEL;
eebe6d00e9bf12 Robert Foss 2021-03-16 440 writel_relaxed(val, csid->base + CSID_CSI2_RX_CFG0);
eebe6d00e9bf12 Robert Foss 2021-03-16 441
eebe6d00e9bf12 Robert Foss 2021-03-16 442 val = 1 << CSI2_RX_CFG1_PACKET_ECC_CORRECTION_EN;
eebe6d00e9bf12 Robert Foss 2021-03-16 443 val |= 1 << CSI2_RX_CFG1_MISR_EN;
eebe6d00e9bf12 Robert Foss 2021-03-16 444 writel_relaxed(val, csid->base + CSID_CSI2_RX_CFG1); // csi2_vc_mode_shift_val ?
eebe6d00e9bf12 Robert Foss 2021-03-16 445
eebe6d00e9bf12 Robert Foss 2021-03-16 446 /* error irqs start at BIT(11) */
eebe6d00e9bf12 Robert Foss 2021-03-16 447 writel_relaxed(~0u, csid->base + CSID_CSI2_RX_IRQ_MASK);
eebe6d00e9bf12 Robert Foss 2021-03-16 448
eebe6d00e9bf12 Robert Foss 2021-03-16 449 /* RDI irq */
eebe6d00e9bf12 Robert Foss 2021-03-16 450 writel_relaxed(~0u, csid->base + CSID_TOP_IRQ_MASK);
eebe6d00e9bf12 Robert Foss 2021-03-16 451
eebe6d00e9bf12 Robert Foss 2021-03-16 452 val = 1 << RDI_CTRL_HALT_CMD;
eebe6d00e9bf12 Robert Foss 2021-03-16 453 writel_relaxed(val, csid->base + CSID_RDI_CTRL(0));
eebe6d00e9bf12 Robert Foss 2021-03-16 454 }
eebe6d00e9bf12 Robert Foss 2021-03-16 455
eebe6d00e9bf12 Robert Foss 2021-03-16 456 static int csid_configure_testgen_pattern(struct csid_device *csid, s32 val)
eebe6d00e9bf12 Robert Foss 2021-03-16 457 {
eebe6d00e9bf12 Robert Foss 2021-03-16 458 if (val > 0 && val <= csid->testgen.nmodes)
eebe6d00e9bf12 Robert Foss 2021-03-16 459 csid->testgen.mode = val;
eebe6d00e9bf12 Robert Foss 2021-03-16 460
eebe6d00e9bf12 Robert Foss 2021-03-16 461 return 0;
eebe6d00e9bf12 Robert Foss 2021-03-16 462 }
eebe6d00e9bf12 Robert Foss 2021-03-16 463
eebe6d00e9bf12 Robert Foss 2021-03-16 464 /*
eebe6d00e9bf12 Robert Foss 2021-03-16 465 * csid_hw_version - CSID hardware version query
eebe6d00e9bf12 Robert Foss 2021-03-16 466 * @csid: CSID device
eebe6d00e9bf12 Robert Foss 2021-03-16 467 *
eebe6d00e9bf12 Robert Foss 2021-03-16 468 * Return HW version or error
eebe6d00e9bf12 Robert Foss 2021-03-16 469 */
eebe6d00e9bf12 Robert Foss 2021-03-16 470 static u32 csid_hw_version(struct csid_device *csid)
eebe6d00e9bf12 Robert Foss 2021-03-16 471 {
eebe6d00e9bf12 Robert Foss 2021-03-16 472 u32 hw_version;
eebe6d00e9bf12 Robert Foss 2021-03-16 473 u32 hw_gen;
eebe6d00e9bf12 Robert Foss 2021-03-16 474 u32 hw_rev;
eebe6d00e9bf12 Robert Foss 2021-03-16 475 u32 hw_step;
eebe6d00e9bf12 Robert Foss 2021-03-16 476
eebe6d00e9bf12 Robert Foss 2021-03-16 477 hw_version = readl_relaxed(csid->base + CSID_HW_VERSION);
eebe6d00e9bf12 Robert Foss 2021-03-16 @478 hw_gen = (hw_version >> HW_VERSION_GENERATION) & 0xF;
eebe6d00e9bf12 Robert Foss 2021-03-16 @479 hw_rev = (hw_version >> HW_VERSION_REVISION) & 0xFFF;
eebe6d00e9bf12 Robert Foss 2021-03-16 @480 hw_step = (hw_version >> HW_VERSION_STEPPING) & 0xFFFF;
eebe6d00e9bf12 Robert Foss 2021-03-16 481 dev_dbg(csid->camss->dev, "CSID HW Version = %u.%u.%u\n",
eebe6d00e9bf12 Robert Foss 2021-03-16 482 hw_gen, hw_rev, hw_step);
eebe6d00e9bf12 Robert Foss 2021-03-16 483
eebe6d00e9bf12 Robert Foss 2021-03-16 484 return hw_version;
eebe6d00e9bf12 Robert Foss 2021-03-16 485 }
eebe6d00e9bf12 Robert Foss 2021-03-16 486
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 2 weeks
drivers/gpu/drm/msm/msm_gem.c:1137:2: warning: Address of local auto-variable assigned to a function parameter. [autoVariables]
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Christian König" <christian.koenig(a)amd.com>
CC: Rob Clark <robdclark(a)gmail.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 012e332286e2bb9f6ac77d195f17e74b2963d663
commit: b3ed524f84f573ece1aa2f26e9db3c34a593e0d1 drm/msm: allow compile_test on !ARM
date: 3 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 3 months ago
compiler: nds32le-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/gpu/drm/msm/msm_gem.c:1137:2: warning: Address of local auto-variable assigned to a function parameter. [autoVariables]
*obj = &msm_obj->base;
^
>> drivers/gpu/drm/msm/msm_gem_submit.c:100:32: warning: Local variable submit_bo shadows outer function [shadowFunction]
struct drm_msm_gem_submit_bo submit_bo;
^
drivers/gpu/drm/msm/msm_gem_submit.c:405:12: note: Shadowed declaration
static int submit_bo(struct msm_gem_submit *submit, uint32_t idx,
^
drivers/gpu/drm/msm/msm_gem_submit.c:100:32: note: Shadow variable
struct drm_msm_gem_submit_bo submit_bo;
^
>> drivers/gpu/drm/msm/msm_gem_submit.c:452:35: warning: Local variable submit_reloc shadows outer function [shadowFunction]
struct drm_msm_gem_submit_reloc submit_reloc = relocs[i];
^
drivers/gpu/drm/msm/msm_gem_submit.c:425:12: note: Shadowed declaration
static int submit_reloc(struct msm_gem_submit *submit, struct msm_gem_object *obj,
^
drivers/gpu/drm/msm/msm_gem_submit.c:452:35: note: Shadow variable
struct drm_msm_gem_submit_reloc submit_reloc = relocs[i];
^
vim +1137 drivers/gpu/drm/msm/msm_gem.c
3c9edd9c85f53e Thomas Zimmermann 2020-09-23 1105
05b849111c0745 Rob Clark 2013-09-28 1106 static int msm_gem_new_impl(struct drm_device *dev,
05b849111c0745 Rob Clark 2013-09-28 1107 uint32_t size, uint32_t flags,
3cbdc8d8b7f39a Akhil P Oommen 2020-07-10 1108 struct drm_gem_object **obj)
c8afe684c95cd1 Rob Clark 2013-06-26 1109 {
d12e339044a00e Jonathan Marek 2021-04-23 1110 struct msm_drm_private *priv = dev->dev_private;
c8afe684c95cd1 Rob Clark 2013-06-26 1111 struct msm_gem_object *msm_obj;
c8afe684c95cd1 Rob Clark 2013-06-26 1112
c8afe684c95cd1 Rob Clark 2013-06-26 1113 switch (flags & MSM_BO_CACHE_MASK) {
c8afe684c95cd1 Rob Clark 2013-06-26 1114 case MSM_BO_UNCACHED:
c8afe684c95cd1 Rob Clark 2013-06-26 1115 case MSM_BO_CACHED:
c8afe684c95cd1 Rob Clark 2013-06-26 1116 case MSM_BO_WC:
c8afe684c95cd1 Rob Clark 2013-06-26 1117 break;
d12e339044a00e Jonathan Marek 2021-04-23 1118 case MSM_BO_CACHED_COHERENT:
d12e339044a00e Jonathan Marek 2021-04-23 1119 if (priv->has_cached_coherent)
d12e339044a00e Jonathan Marek 2021-04-23 1120 break;
e181ad43887c6b Gustavo A. R. Silva 2021-07-12 1121 fallthrough;
c8afe684c95cd1 Rob Clark 2013-06-26 1122 default:
6a41da17e87dee Mamta Shukla 2018-10-20 1123 DRM_DEV_ERROR(dev->dev, "invalid cache flag: %x\n",
c8afe684c95cd1 Rob Clark 2013-06-26 1124 (flags & MSM_BO_CACHE_MASK));
05b849111c0745 Rob Clark 2013-09-28 1125 return -EINVAL;
c8afe684c95cd1 Rob Clark 2013-06-26 1126 }
c8afe684c95cd1 Rob Clark 2013-06-26 1127
667ce33e57d0de Rob Clark 2016-09-28 1128 msm_obj = kzalloc(sizeof(*msm_obj), GFP_KERNEL);
05b849111c0745 Rob Clark 2013-09-28 1129 if (!msm_obj)
05b849111c0745 Rob Clark 2013-09-28 1130 return -ENOMEM;
c8afe684c95cd1 Rob Clark 2013-06-26 1131
c8afe684c95cd1 Rob Clark 2013-06-26 1132 msm_obj->flags = flags;
4cd33c48ea25ba Rob Clark 2016-05-17 1133 msm_obj->madv = MSM_MADV_WILLNEED;
c8afe684c95cd1 Rob Clark 2013-06-26 1134
4b85f7f5cf776b Rob Clark 2017-06-13 1135 INIT_LIST_HEAD(&msm_obj->vmas);
4b85f7f5cf776b Rob Clark 2017-06-13 1136
05b849111c0745 Rob Clark 2013-09-28 @1137 *obj = &msm_obj->base;
3c9edd9c85f53e Thomas Zimmermann 2020-09-23 1138 (*obj)->funcs = &msm_gem_object_funcs;
05b849111c0745 Rob Clark 2013-09-28 1139
05b849111c0745 Rob Clark 2013-09-28 1140 return 0;
05b849111c0745 Rob Clark 2013-09-28 1141 }
05b849111c0745 Rob Clark 2013-09-28 1142
:::::: The code at line 1137 was first introduced by commit
:::::: 05b849111c07454fd2f5b074ca7eb56ccdb8828c drm/msm: prime support
:::::: TO: Rob Clark <robdclark(a)gmail.com>
:::::: CC: Rob Clark <robdclark(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 2 weeks
[smfrench-smb3:for-next 7/12] fs/cifs/smb1ops.c:229 cifs_get_next_mid() error: uninitialized symbol 'reconnect'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Steve French <stfrench(a)microsoft.com>
tree: git://github.com/smfrench/smb3-kernel.git for-next
head: 3fe0b5a99f6e0726eb88cee160ee96b002d2a60d
commit: 5ef98b085643f129a3e5a818b6b539f97e038946 [7/12] cifs: take cifs_tcp_ses_lock for status checks
:::::: branch date: 6 hours ago
:::::: commit date: 19 hours ago
config: i386-randconfig-m021-20211230 (https://download.01.org/0day-ci/archive/20211231/202112310745.OYSjA6DO-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
fs/cifs/smb1ops.c:229 cifs_get_next_mid() error: uninitialized symbol 'reconnect'.
vim +/reconnect +229 fs/cifs/smb1ops.c
a891f0f895f4a7 Pavel Shilovsky 2012-05-23 139
88257360605f93 Pavel Shilovsky 2012-05-23 140 /*
88257360605f93 Pavel Shilovsky 2012-05-23 141 * Find a free multiplex id (SMB mid). Otherwise there could be
88257360605f93 Pavel Shilovsky 2012-05-23 142 * mid collisions which might cause problems, demultiplexing the
88257360605f93 Pavel Shilovsky 2012-05-23 143 * wrong response to this request. Multiplex ids could collide if
88257360605f93 Pavel Shilovsky 2012-05-23 144 * one of a series requests takes much longer than the others, or
88257360605f93 Pavel Shilovsky 2012-05-23 145 * if a very large number of long lived requests (byte range
88257360605f93 Pavel Shilovsky 2012-05-23 146 * locks or FindNotify requests) are pending. No more than
88257360605f93 Pavel Shilovsky 2012-05-23 147 * 64K-1 requests can be outstanding at one time. If no
88257360605f93 Pavel Shilovsky 2012-05-23 148 * mids are available, return zero. A future optimization
88257360605f93 Pavel Shilovsky 2012-05-23 149 * could make the combination of mids and uid the key we use
88257360605f93 Pavel Shilovsky 2012-05-23 150 * to demultiplex on (rather than mid alone).
88257360605f93 Pavel Shilovsky 2012-05-23 151 * In addition to the above check, the cifs demultiplex
88257360605f93 Pavel Shilovsky 2012-05-23 152 * code already used the command code as a secondary
88257360605f93 Pavel Shilovsky 2012-05-23 153 * check of the frame and if signing is negotiated the
88257360605f93 Pavel Shilovsky 2012-05-23 154 * response would be discarded if the mid were the same
88257360605f93 Pavel Shilovsky 2012-05-23 155 * but the signature was wrong. Since the mid is not put in the
88257360605f93 Pavel Shilovsky 2012-05-23 156 * pending queue until later (when it is about to be dispatched)
88257360605f93 Pavel Shilovsky 2012-05-23 157 * we do have to limit the number of outstanding requests
88257360605f93 Pavel Shilovsky 2012-05-23 158 * to somewhat less than 64K-1 although it is hard to imagine
88257360605f93 Pavel Shilovsky 2012-05-23 159 * so many threads being in the vfs at one time.
88257360605f93 Pavel Shilovsky 2012-05-23 160 */
88257360605f93 Pavel Shilovsky 2012-05-23 161 static __u64
88257360605f93 Pavel Shilovsky 2012-05-23 162 cifs_get_next_mid(struct TCP_Server_Info *server)
88257360605f93 Pavel Shilovsky 2012-05-23 163 {
88257360605f93 Pavel Shilovsky 2012-05-23 164 __u64 mid = 0;
88257360605f93 Pavel Shilovsky 2012-05-23 165 __u16 last_mid, cur_mid;
5ef98b085643f1 Shyam Prasad N 2021-07-19 166 bool collision, reconnect;
88257360605f93 Pavel Shilovsky 2012-05-23 167
88257360605f93 Pavel Shilovsky 2012-05-23 168 spin_lock(&GlobalMid_Lock);
88257360605f93 Pavel Shilovsky 2012-05-23 169
88257360605f93 Pavel Shilovsky 2012-05-23 170 /* mid is 16 bit only for CIFS/SMB */
88257360605f93 Pavel Shilovsky 2012-05-23 171 cur_mid = (__u16)((server->CurrentMid) & 0xffff);
88257360605f93 Pavel Shilovsky 2012-05-23 172 /* we do not want to loop forever */
88257360605f93 Pavel Shilovsky 2012-05-23 173 last_mid = cur_mid;
88257360605f93 Pavel Shilovsky 2012-05-23 174 cur_mid++;
03d9a9fe3f3aec Roberto Bergantinos Corpas 2019-10-14 175 /* avoid 0xFFFF MID */
03d9a9fe3f3aec Roberto Bergantinos Corpas 2019-10-14 176 if (cur_mid == 0xffff)
03d9a9fe3f3aec Roberto Bergantinos Corpas 2019-10-14 177 cur_mid++;
88257360605f93 Pavel Shilovsky 2012-05-23 178
88257360605f93 Pavel Shilovsky 2012-05-23 179 /*
88257360605f93 Pavel Shilovsky 2012-05-23 180 * This nested loop looks more expensive than it is.
88257360605f93 Pavel Shilovsky 2012-05-23 181 * In practice the list of pending requests is short,
88257360605f93 Pavel Shilovsky 2012-05-23 182 * fewer than 50, and the mids are likely to be unique
88257360605f93 Pavel Shilovsky 2012-05-23 183 * on the first pass through the loop unless some request
88257360605f93 Pavel Shilovsky 2012-05-23 184 * takes longer than the 64 thousand requests before it
88257360605f93 Pavel Shilovsky 2012-05-23 185 * (and it would also have to have been a request that
88257360605f93 Pavel Shilovsky 2012-05-23 186 * did not time out).
88257360605f93 Pavel Shilovsky 2012-05-23 187 */
88257360605f93 Pavel Shilovsky 2012-05-23 188 while (cur_mid != last_mid) {
88257360605f93 Pavel Shilovsky 2012-05-23 189 struct mid_q_entry *mid_entry;
88257360605f93 Pavel Shilovsky 2012-05-23 190 unsigned int num_mids;
88257360605f93 Pavel Shilovsky 2012-05-23 191
88257360605f93 Pavel Shilovsky 2012-05-23 192 collision = false;
88257360605f93 Pavel Shilovsky 2012-05-23 193 if (cur_mid == 0)
88257360605f93 Pavel Shilovsky 2012-05-23 194 cur_mid++;
88257360605f93 Pavel Shilovsky 2012-05-23 195
88257360605f93 Pavel Shilovsky 2012-05-23 196 num_mids = 0;
88257360605f93 Pavel Shilovsky 2012-05-23 197 list_for_each_entry(mid_entry, &server->pending_mid_q, qhead) {
88257360605f93 Pavel Shilovsky 2012-05-23 198 ++num_mids;
88257360605f93 Pavel Shilovsky 2012-05-23 199 if (mid_entry->mid == cur_mid &&
88257360605f93 Pavel Shilovsky 2012-05-23 200 mid_entry->mid_state == MID_REQUEST_SUBMITTED) {
88257360605f93 Pavel Shilovsky 2012-05-23 201 /* This mid is in use, try a different one */
88257360605f93 Pavel Shilovsky 2012-05-23 202 collision = true;
88257360605f93 Pavel Shilovsky 2012-05-23 203 break;
88257360605f93 Pavel Shilovsky 2012-05-23 204 }
88257360605f93 Pavel Shilovsky 2012-05-23 205 }
88257360605f93 Pavel Shilovsky 2012-05-23 206
88257360605f93 Pavel Shilovsky 2012-05-23 207 /*
88257360605f93 Pavel Shilovsky 2012-05-23 208 * if we have more than 32k mids in the list, then something
88257360605f93 Pavel Shilovsky 2012-05-23 209 * is very wrong. Possibly a local user is trying to DoS the
88257360605f93 Pavel Shilovsky 2012-05-23 210 * box by issuing long-running calls and SIGKILL'ing them. If
88257360605f93 Pavel Shilovsky 2012-05-23 211 * we get to 2^16 mids then we're in big trouble as this
88257360605f93 Pavel Shilovsky 2012-05-23 212 * function could loop forever.
88257360605f93 Pavel Shilovsky 2012-05-23 213 *
88257360605f93 Pavel Shilovsky 2012-05-23 214 * Go ahead and assign out the mid in this situation, but force
88257360605f93 Pavel Shilovsky 2012-05-23 215 * an eventual reconnect to clean out the pending_mid_q.
88257360605f93 Pavel Shilovsky 2012-05-23 216 */
88257360605f93 Pavel Shilovsky 2012-05-23 217 if (num_mids > 32768)
5ef98b085643f1 Shyam Prasad N 2021-07-19 218 reconnect = true;
88257360605f93 Pavel Shilovsky 2012-05-23 219
88257360605f93 Pavel Shilovsky 2012-05-23 220 if (!collision) {
88257360605f93 Pavel Shilovsky 2012-05-23 221 mid = (__u64)cur_mid;
88257360605f93 Pavel Shilovsky 2012-05-23 222 server->CurrentMid = mid;
88257360605f93 Pavel Shilovsky 2012-05-23 223 break;
88257360605f93 Pavel Shilovsky 2012-05-23 224 }
88257360605f93 Pavel Shilovsky 2012-05-23 225 cur_mid++;
88257360605f93 Pavel Shilovsky 2012-05-23 226 }
88257360605f93 Pavel Shilovsky 2012-05-23 227 spin_unlock(&GlobalMid_Lock);
5ef98b085643f1 Shyam Prasad N 2021-07-19 228
5ef98b085643f1 Shyam Prasad N 2021-07-19 @229 if (reconnect) {
5ef98b085643f1 Shyam Prasad N 2021-07-19 230 spin_lock(&cifs_tcp_ses_lock);
5ef98b085643f1 Shyam Prasad N 2021-07-19 231 server->tcpStatus = CifsNeedReconnect;
5ef98b085643f1 Shyam Prasad N 2021-07-19 232 spin_unlock(&cifs_tcp_ses_lock);
5ef98b085643f1 Shyam Prasad N 2021-07-19 233 }
5ef98b085643f1 Shyam Prasad N 2021-07-19 234
88257360605f93 Pavel Shilovsky 2012-05-23 235 return mid;
88257360605f93 Pavel Shilovsky 2012-05-23 236 }
88257360605f93 Pavel Shilovsky 2012-05-23 237
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 2 weeks
Re: [PATCH 3/5] erofs: use meta buffers for super operations
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20211229041405.45921-4-hsiangkao(a)linux.alibaba.com>
References: <20211229041405.45921-4-hsiangkao(a)linux.alibaba.com>
TO: Gao Xiang <hsiangkao(a)linux.alibaba.com>
TO: linux-erofs(a)lists.ozlabs.org
TO: Chao Yu <yuchao0(a)huawei.com>, Chao Yu <chao(a)kernel.org>
TO: Liu Bo <bo.liu(a)linux.alibaba.com>
CC: LKML <linux-kernel(a)vger.kernel.org>
CC: Gao Xiang <hsiangkao(a)linux.alibaba.com>
Hi Gao,
I love your patch! Perhaps something to improve:
[auto build test WARNING on xiang-erofs/dev-test]
[also build test WARNING on next-20211224]
[cannot apply to v5.16-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gao-Xiang/erofs-get-rid-of-erofs...
base: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20211230 (https://download.01.org/0day-ci/archive/20211231/202112310650.TDDinvVT-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
fs/erofs/super.c:153 erofs_read_metadata() warn: possible memory leak of 'buffer'
vim +/buffer +153 fs/erofs/super.c
5efe5137f05bbb drivers/staging/erofs/super.c Gao Xiang 2019-06-13 125
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 126 #ifdef CONFIG_EROFS_FS_ZIP
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 127 /* read variable-sized metadata, offset will be aligned by 4-byte */
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 128 static void *erofs_read_metadata(struct super_block *sb, struct erofs_buf *buf,
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 129 erofs_off_t *offset, int *lengthp)
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 130 {
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 131 u8 *buffer, *ptr;
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 132 int len, i, cnt;
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 133
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 134 *offset = round_up(*offset, 4);
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 135 ptr = erofs_read_metabuf(buf, sb, erofs_blknr(*offset), EROFS_KMAP);
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 136 if (IS_ERR(ptr))
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 137 return ptr;
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 138
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 139 len = le16_to_cpu(*(__le16 *)&ptr[erofs_blkoff(*offset)]);
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 140 if (!len)
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 141 len = U16_MAX + 1;
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 142 buffer = kmalloc(len, GFP_KERNEL);
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 143 if (!buffer)
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 144 return ERR_PTR(-ENOMEM);
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 145 *offset += sizeof(__le16);
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 146 *lengthp = len;
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 147
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 148 for (i = 0; i < len; i += cnt) {
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 149 cnt = min(EROFS_BLKSIZ - (int)erofs_blkoff(*offset), len - i);
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 150 ptr = erofs_read_metabuf(buf, sb, erofs_blknr(*offset),
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 151 EROFS_KMAP);
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 152 if (IS_ERR(ptr))
6477e408d41152 fs/erofs/super.c Gao Xiang 2021-12-29 @153 return ptr;
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 154 memcpy(buffer + i, ptr + erofs_blkoff(*offset), cnt);
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 155 *offset += cnt;
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 156 }
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 157 return buffer;
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 158 }
14373711dd54be fs/erofs/super.c Gao Xiang 2021-03-29 159
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 2 weeks
fs/cifs/cifsacl.c:267:21: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kees Cook <keescook(a)chromium.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: eec4df26e24e978e49ccf9bcf49ca0f2ccdaeffe
commit: a52f8a59aef46b59753e583bf4b28fccb069ce64 fortify: Explicitly disable Clang support
date: 3 months ago
:::::: branch date: 28 hours ago
:::::: commit date: 3 months ago
config: i386-randconfig-c001-20211208 (https://download.01.org/0day-ci/archive/20211231/202112310632.lzS1FTV2-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a52f8a59aef46b59753e583bf4b28fccb069ce64
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
net/core/datagram.c:299:3: note: '?' condition is false
if (skb)
^
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) ? \
^
net/core/datagram.c:299:3: note: Taking false branch
if (skb)
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/core/datagram.c:302:7: note: Assuming the condition is false
if (*err != -EAGAIN)
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/core/datagram.c:302:3: note: '?' condition is false
if (*err != -EAGAIN)
^
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))
^
net/core/datagram.c:302:3: note: '?' condition is false
if (*err != -EAGAIN)
^
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) ? \
^
net/core/datagram.c:302:3: note: Taking false branch
if (*err != -EAGAIN)
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/core/datagram.c:304:11: note: Assuming 'timeo' is not equal to 0
} while (timeo &&
^~~~~
net/core/datagram.c:304:11: note: Left side of '&&' is true
net/core/datagram.c:305:5: note: 5th function call argument is an uninitialized value
!__skb_wait_for_more_packets(sk, sk_queue, err,
^
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
fs/cifs/smb2transport.c:430:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = generate_key(ses, ptriplet->encryption.label,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/cifs/smb2transport.c:430:3: note: Value stored to 'rc' is never read
rc = generate_key(ses, ptriplet->encryption.label,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
fs/cifs/smb2misc.c:505:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = SMB2_lease_break(0, tlink_tcon(lw->tlink), lw->lease_key,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/cifs/smb2misc.c:505:2: note: Value stored to 'rc' is never read
rc = SMB2_lease_break(0, tlink_tcon(lw->tlink), lw->lease_key,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
fs/cifs/smb2pdu.c:577:3: warning: Value stored to 'pneg_ctxt' is never read [clang-analyzer-deadcode.DeadStores]
pneg_ctxt += ctxt_len;
^ ~~~~~~~~
fs/cifs/smb2pdu.c:577:3: note: Value stored to 'pneg_ctxt' is never read
pneg_ctxt += ctxt_len;
^ ~~~~~~~~
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
15 warnings generated.
>> fs/cifs/cifsacl.c:267:21: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
dst->authority[i] = src->authority[i];
^
fs/cifs/cifsacl.c:1261:2: note: Assuming 'dacloffset' is not equal to 0
if (dacloffset) {
^
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))
^~~~
fs/cifs/cifsacl.c:1261:2: note: '?' condition is false
if (dacloffset) {
^
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))
^
fs/cifs/cifsacl.c:1261:6: note: 'dacloffset' is not equal to 0
if (dacloffset) {
^
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) ? \
^~~~
fs/cifs/cifsacl.c:1261:2: note: '?' condition is true
if (dacloffset) {
^
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) ? \
^
fs/cifs/cifsacl.c:1261:2: note: Taking true branch
if (dacloffset) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/cifs/cifsacl.c:1263:3: note: '?' condition is false
if (end_of_acl < (char *)dacl_ptr + le16_to_cpu(dacl_ptr->size)) {
^
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))
^
fs/cifs/cifsacl.c:1263:3: note: Assuming the condition is false
if (end_of_acl < (char *)dacl_ptr + le16_to_cpu(dacl_ptr->size)) {
^
include/linux/compiler.h:56:44: 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) ? \
^~~~
fs/cifs/cifsacl.c:1263:3: note: '?' condition is false
if (end_of_acl < (char *)dacl_ptr + le16_to_cpu(dacl_ptr->size)) {
^
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) ? \
^
fs/cifs/cifsacl.c:1263:3: note: Taking false branch
if (end_of_acl < (char *)dacl_ptr + le16_to_cpu(dacl_ptr->size)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/cifs/cifsacl.c:1274:6: note: Assuming 'pnmode' is null
if (pnmode && *pnmode != NO_CHANGE_64) { /* chmod */
^
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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
fs/cifs/cifsacl.c:1274:13: note: Left side of '&&' is false
if (pnmode && *pnmode != NO_CHANGE_64) { /* chmod */
vim +267 fs/cifs/cifsacl.c
3514de3fd5fab5 Steve French 2016-10-13 257
f5065508897a92 Shyam Prasad N 2021-02-12 258 static __u16
36960e440ccf94 Jeff Layton 2012-11-03 259 cifs_copy_sid(struct cifs_sid *dst, const struct cifs_sid *src)
36960e440ccf94 Jeff Layton 2012-11-03 260 {
36f87ee70f754d Jeff Layton 2012-11-25 261 int i;
f5065508897a92 Shyam Prasad N 2021-02-12 262 __u16 size = 1 + 1 + 6;
36f87ee70f754d Jeff Layton 2012-11-25 263
36f87ee70f754d Jeff Layton 2012-11-25 264 dst->revision = src->revision;
30c9d6cca52624 Jeff Layton 2012-11-25 265 dst->num_subauth = min_t(u8, src->num_subauth, SID_MAX_SUB_AUTHORITIES);
36f87ee70f754d Jeff Layton 2012-11-25 266 for (i = 0; i < NUM_AUTHS; ++i)
36f87ee70f754d Jeff Layton 2012-11-25 @267 dst->authority[i] = src->authority[i];
36f87ee70f754d Jeff Layton 2012-11-25 268 for (i = 0; i < dst->num_subauth; ++i)
36f87ee70f754d Jeff Layton 2012-11-25 269 dst->sub_auth[i] = src->sub_auth[i];
f5065508897a92 Shyam Prasad N 2021-02-12 270 size += (dst->num_subauth * 4);
f5065508897a92 Shyam Prasad N 2021-02-12 271
f5065508897a92 Shyam Prasad N 2021-02-12 272 return size;
36960e440ccf94 Jeff Layton 2012-11-03 273 }
36960e440ccf94 Jeff Layton 2012-11-03 274
:::::: The code at line 267 was first introduced by commit
:::::: 36f87ee70f754d04e55518853e6fb30ed4732dda cifs: make cifs_copy_sid handle a source sid with variable size subauth arrays
:::::: TO: Jeff Layton <jlayton(a)redhat.com>
:::::: CC: Steve French <smfrench(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 2 weeks