[chrome-os:chromeos-5.10 25/29] block/genhd.c:2190:11: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides bound...
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
TO: cros-kernel-buildreports(a)googlegroups.com
TO: Guenter Roeck <groeck(a)google.com>
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: 13491710253d86e7fa5deb854bd304b1dd06ab9e
commit: 56f22b8f6853d26be82709a978e89db6856af6b4 [25/29] BACKPORT: Kbuild: move to -std=gnu11
:::::: branch date: 2 days ago
:::::: commit date: 11 days ago
config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220529/202205292339.FqYKTHJZ-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0fbe3f3f486e01448121f7931a4ca29fac1504ab)
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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout 56f22b8f6853d26be82709a978e89db6856af6b4
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~~
block/genhd.c:84:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(buf, BDEVNAME_SIZE, "%s%d", hd->disk_name, partno);
^~~~~~~~
block/genhd.c:99:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(stat, 0, sizeof(struct disk_stats));
^~~~~~
block/genhd.c:99:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(stat, 0, sizeof(struct disk_stats));
^~~~~~
block/genhd.c:637:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(tbuf, BDEVT_SIZE, "%02x%02x", MAJOR(devt), MINOR(devt));
^~~~~~~~
block/genhd.c:637:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(tbuf, BDEVT_SIZE, "%02x%02x", MAJOR(devt), MINOR(devt));
^~~~~~~~
block/genhd.c:638:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(buf, BDEVT_SIZE, "%-9s", tbuf);
^~~~~~~~
block/genhd.c:638:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(buf, BDEVT_SIZE, "%-9s", tbuf);
^~~~~~~~
block/genhd.c:640:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(buf, BDEVT_SIZE, "%03x:%05x", MAJOR(devt), MINOR(devt));
^~~~~~~~
block/genhd.c:640:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(buf, BDEVT_SIZE, "%03x:%05x", MAJOR(devt), MINOR(devt));
^~~~~~~~
block/genhd.c:965:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(page, "\n");
^~~~~~~
block/genhd.c:965:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(page, "\n");
^~~~~~~
block/genhd.c:1242:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", disk->minors);
^~~~~~~
block/genhd.c:1242:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", disk->minors);
^~~~~~~
block/genhd.c:1250:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", disk_max_parts(disk));
^~~~~~~
block/genhd.c:1250:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", disk_max_parts(disk));
^~~~~~~
block/genhd.c:1258:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
block/genhd.c:1258:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
block/genhd.c:1267:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
block/genhd.c:1267:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
block/genhd.c:1276:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", get_disk_ro(disk) ? 1 : 0);
^~~~~~~
block/genhd.c:1276:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", get_disk_ro(disk) ? 1 : 0);
^~~~~~~
block/genhd.c:1284:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%llu\n",
^~~~~~~
block/genhd.c:1284:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%llu\n",
^~~~~~~
block/genhd.c:1302:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf,
^~~~~~~
block/genhd.c:1302:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf,
^~~~~~~
block/genhd.c:1344:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%8u %8u\n", inflight[0], inflight[1]);
^~~~~~~
block/genhd.c:1344:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%8u %8u\n", inflight[0], inflight[1]);
^~~~~~~
block/genhd.c:1352:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%x\n", disk->flags);
^~~~~~~
block/genhd.c:1352:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%x\n", disk->flags);
^~~~~~~
block/genhd.c:1361:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", queue_alignment_offset(disk->queue));
^~~~~~~
block/genhd.c:1361:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", queue_alignment_offset(disk->queue));
^~~~~~~
block/genhd.c:1370:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue));
^~~~~~~
block/genhd.c:1370:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue));
^~~~~~~
>> block/genhd.c:2190:11: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pos += sprintf(buf + pos, "%s%s",
^~~~~~~
block/genhd.c:2190:11: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pos += sprintf(buf + pos, "%s%s",
^~~~~~~
block/genhd.c:2195:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pos += sprintf(buf + pos, "\n");
^~~~~~~
block/genhd.c:2195:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pos += sprintf(buf + pos, "\n");
^~~~~~~
block/genhd.c:2223:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "-1\n");
^~~~~~~
block/genhd.c:2223:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "-1\n");
^~~~~~~
block/genhd.c:2225:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%ld\n", disk->ev->poll_msecs);
^~~~~~~
block/genhd.c:2225:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%ld\n", disk->ev->poll_msecs);
^~~~~~~
block/genhd.c:2235:17: warning: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
if (!count || !sscanf(buf, "%ld", &intv))
^~~~~~
block/genhd.c:2235:17: note: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11
if (!count || !sscanf(buf, "%ld", &intv))
^~~~~~
Suppressed 52 warnings (52 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
42 warnings generated.
Suppressed 42 warnings (42 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.
59 warnings generated.
drivers/gpio/gpiolib-cdev.c:213:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&ghd, 0, sizeof(ghd));
^~~~~~
drivers/gpio/gpiolib-cdev.c:213:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&ghd, 0, sizeof(ghd));
^~~~~~
drivers/gpio/gpiolib-cdev.c:539:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&le, 0, sizeof(le));
^~~~~~
drivers/gpio/gpiolib-cdev.c:539:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&le, 0, sizeof(le));
^~~~~~
drivers/gpio/gpiolib-cdev.c:663:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&le, 0, sizeof(le));
^~~~~~
drivers/gpio/gpiolib-cdev.c:663:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&le, 0, sizeof(le));
^~~~~~
drivers/gpio/gpiolib-cdev.c:1243:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EIO;
^ ~~~~
drivers/gpio/gpiolib-cdev.c:1243:4: note: Value stored to 'ret' is never read
ret = -EIO;
^ ~~~~
drivers/gpio/gpiolib-cdev.c:1553:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EIO;
^ ~~~~
drivers/gpio/gpiolib-cdev.c:1553:4: note: Value stored to 'ret' is never read
ret = -EIO;
^ ~~~~
drivers/gpio/gpiolib-cdev.c:1596:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&ghd, 0, sizeof(ghd));
^~~~~~
drivers/gpio/gpiolib-cdev.c:1596:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&ghd, 0, sizeof(ghd));
^~~~~~
drivers/gpio/gpiolib-cdev.c:1638:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&ge, 0, sizeof(ge));
^~~~~~
drivers/gpio/gpiolib-cdev.c:1638:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&ge, 0, sizeof(ge));
^~~~~~
drivers/gpio/gpiolib-cdev.c:1837:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(info_v1->name, info_v2->name, sizeof(info_v1->name));
--
^
fs/fscache/cookie.c:254:61: note: Assuming 'aux_data_len' is <= 255
if (!index_key || !index_key_len || index_key_len > 255 || aux_data_len > 255)
^~~~~~~~~~~~~~~~~~
fs/fscache/cookie.c:254:2: note: Taking false branch
if (!index_key || !index_key_len || index_key_len > 255 || aux_data_len > 255)
^
fs/fscache/cookie.c:256:6: note: Assuming 'aux_data' is null
if (!aux_data || !aux_data_len) {
^~~~~~~~~
fs/fscache/cookie.c:256:16: note: Left side of '||' is true
if (!aux_data || !aux_data_len) {
^
fs/fscache/cookie.c:257:3: note: Null pointer value stored to 'aux_data'
aux_data = NULL;
^~~~~~~~~~~~~~~
fs/fscache/cookie.c:261:2: note: Loop condition is false. Exiting loop
fscache_stat(&fscache_n_acquires);
^
fs/fscache/internal.h:299:28: note: expanded from macro 'fscache_stat'
#define fscache_stat(stat) do {} while (0)
^
fs/fscache/cookie.c:264:6: note: Assuming 'parent' is non-null
if (!parent) {
^~~~~~~
fs/fscache/cookie.c:264:2: note: Taking false branch
if (!parent) {
^
fs/fscache/cookie.c:271:9: note: Assuming the condition is false
BUG_ON(!def->name[0]);
^
include/asm-generic/bug.h:63:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
fs/fscache/cookie.c:271:2: note: Taking false branch
BUG_ON(!def->name[0]);
^
include/asm-generic/bug.h:63:32: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
fs/fscache/cookie.c:271:2: note: Loop condition is false. Exiting loop
BUG_ON(!def->name[0]);
^
include/asm-generic/bug.h:63:27: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
fs/fscache/cookie.c:273:9: note: Assuming field 'type' is not equal to 0
BUG_ON(def->type == FSCACHE_COOKIE_TYPE_INDEX &&
^
include/asm-generic/bug.h:63:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
~~~~~~~~~^~~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
fs/fscache/cookie.c:273:48: note: Left side of '&&' is false
BUG_ON(def->type == FSCACHE_COOKIE_TYPE_INDEX &&
^
fs/fscache/cookie.c:273:2: note: Taking false branch
BUG_ON(def->type == FSCACHE_COOKIE_TYPE_INDEX &&
^
include/asm-generic/bug.h:63:32: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
fs/fscache/cookie.c:273:2: note: Loop condition is false. Exiting loop
BUG_ON(def->type == FSCACHE_COOKIE_TYPE_INDEX &&
^
include/asm-generic/bug.h:63:27: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
fs/fscache/cookie.c:278:7: note: Passing null pointer value via 5th parameter 'aux_data'
aux_data, aux_data_len,
^~~~~~~~
fs/fscache/cookie.c:276:14: note: Calling 'fscache_alloc_cookie'
candidate = fscache_alloc_cookie(parent, def,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/cookie.c:135:6: note: Assuming 'cookie' is non-null
if (!cookie)
^~~~~~~
fs/fscache/cookie.c:135:2: note: Taking false branch
if (!cookie)
^
fs/fscache/cookie.c:141:2: note: Taking false branch
if (fscache_set_key(cookie, index_key, index_key_len) < 0)
^
fs/fscache/cookie.c:144:6: note: Assuming the condition is true
if (cookie->aux_len <= sizeof(cookie->inline_aux)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/cookie.c:144:2: note: Taking true branch
if (cookie->aux_len <= sizeof(cookie->inline_aux)) {
^
fs/fscache/cookie.c:145:3: note: Null pointer passed as 2nd argument to memory copy function
memcpy(cookie->inline_aux, aux_data, cookie->aux_len);
^ ~~~~~~~~
Suppressed 48 warnings (48 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.
48 warnings generated.
>> drivers/gpio/gpiolib-sysfs.c:69:11: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
status = sprintf(buf, "%s\n",
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:69:11: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
status = sprintf(buf, "%s\n",
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:253:13: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
status = sprintf(buf, "%s\n", trigger_types[i].name);
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:253:13: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
status = sprintf(buf, "%s\n", trigger_types[i].name);
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:339:11: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
status = sprintf(buf, "%d\n",
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:339:11: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
status = sprintf(buf, "%d\n",
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:418:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", chip->base);
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:418:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", chip->base);
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:427:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", chip->label ? : "");
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:427:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", chip->label ? : "");
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:436:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", chip->ngpio);
^~~~~~~
drivers/gpio/gpiolib-sysfs.c:436:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", chip->ngpio);
^~~~~~~
Suppressed 42 warnings (42 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
60 warnings generated.
drivers/regulator/virtual.c:111:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->min_uV);
^~~~~~~
drivers/regulator/virtual.c:111:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->min_uV);
^~~~~~~
drivers/regulator/virtual.c:137:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->max_uV);
^~~~~~~
drivers/regulator/virtual.c:137:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->max_uV);
^~~~~~~
drivers/regulator/virtual.c:163:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->min_uA);
^~~~~~~
drivers/regulator/virtual.c:163:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->min_uA);
^~~~~~~
drivers/regulator/virtual.c:189:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->max_uA);
^~~~~~~
drivers/regulator/virtual.c:189:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->max_uA);
^~~~~~~
drivers/regulator/virtual.c:218:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "fast\n");
^~~~~~~
drivers/regulator/virtual.c:218:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "fast\n");
^~~~~~~
drivers/regulator/virtual.c:220:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "normal\n");
^~~~~~~
drivers/regulator/virtual.c:220:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "normal\n");
^~~~~~~
drivers/regulator/virtual.c:222:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "idle\n");
^~~~~~~
drivers/regulator/virtual.c:222:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "idle\n");
^~~~~~~
drivers/regulator/virtual.c:224:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "standby\n");
^~~~~~~
drivers/regulator/virtual.c:224:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "standby\n");
--
23 warnings generated.
Suppressed 23 warnings (23 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.
51 warnings generated.
fs/gfs2/main.c:45:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&ip->i_res, 0, sizeof(ip->i_res));
^~~~~~
fs/gfs2/main.c:45:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&ip->i_res, 0, sizeof(ip->i_res));
^~~~~~
Suppressed 50 warnings (50 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.
56 warnings generated.
Suppressed 56 warnings (56 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.
59 warnings generated.
fs/gfs2/aops.c:457:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize);
^~~~~~
fs/gfs2/aops.c:457:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize);
^~~~~~
fs/gfs2/aops.c:458:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(kaddr + dsize, 0, PAGE_SIZE - dsize);
^~~~~~
fs/gfs2/aops.c:458:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(kaddr + dsize, 0, PAGE_SIZE - dsize);
^~~~~~
fs/gfs2/aops.c:530:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(buf + copied, p + offset, amt);
^~~~~~
fs/gfs2/aops.c:530:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(buf + copied, p + offset, amt);
^~~~~~
Suppressed 56 warnings (56 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.
49 warnings generated.
Suppressed 49 warnings (49 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.
49 warnings generated.
fs/exfat/namei.c:537:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&info->crtime, 0, sizeof(info->crtime));
^~~~~~
fs/exfat/namei.c:537:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&info->crtime, 0, sizeof(info->crtime));
^~~~~~
fs/exfat/namei.c:538:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&info->mtime, 0, sizeof(info->mtime));
^~~~~~
fs/exfat/namei.c:538:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&info->mtime, 0, sizeof(info->mtime));
^~~~~~
fs/exfat/namei.c:539:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&info->atime, 0, sizeof(info->atime));
^~~~~~
fs/exfat/namei.c:539:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&info->atime, 0, sizeof(info->atime));
^~~~~~
Suppressed 46 warnings (46 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.
45 warnings generated.
Suppressed 45 warnings (45 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.
55 warnings generated.
drivers/pcmcia/socket_sysfs.c:41:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "32-bit\n");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:41:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "32-bit\n");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:42:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "16-bit\n");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:42:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "16-bit\n");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:54:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d.%dV\n", s->socket.Vcc / 10,
^~~~~~~
drivers/pcmcia/socket_sysfs.c:54:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d.%dV\n", s->socket.Vcc / 10,
^~~~~~~
drivers/pcmcia/socket_sysfs.c:56:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "X.XV\n");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:56:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "X.XV\n");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:66:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d.%dV\n", s->socket.Vpp / 10, s->socket.Vpp % 10);
^~~~~~~
drivers/pcmcia/socket_sysfs.c:66:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d.%dV\n", s->socket.Vpp / 10, s->socket.Vpp % 10);
^~~~~~~
drivers/pcmcia/socket_sysfs.c:76:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d.%dV\n", s->socket.Vcc / 10, s->socket.Vcc % 10);
^~~~~~~
drivers/pcmcia/socket_sysfs.c:76:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d.%dV\n", s->socket.Vcc / 10, s->socket.Vcc % 10);
^~~~~~~
>> drivers/pcmcia/socket_sysfs.c:101:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", s->state & SOCKET_SUSPEND ? "off" : "on");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:101:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", s->state & SOCKET_SUSPEND ? "off" : "on");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:148:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "0x%04x\n", s->irq_mask);
^~~~~~~
drivers/pcmcia/socket_sysfs.c:148:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "0x%04x\n", s->irq_mask);
^~~~~~~
drivers/pcmcia/socket_sysfs.c:162:8: warning: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = sscanf(buf, "0x%x\n", &mask);
^~~~~~
drivers/pcmcia/socket_sysfs.c:162:8: note: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11
ret = sscanf(buf, "0x%x\n", &mask);
^~~~~~
drivers/pcmcia/socket_sysfs.c:180:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", s->resource_setup_done ? "yes" : "no");
^~~~~~~
drivers/pcmcia/socket_sysfs.c:180:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", s->resource_setup_done ? "yes" : "no");
^~~~~~~
Suppressed 45 warnings (45 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
24 warnings generated.
Suppressed 24 warnings (24 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.
26 warnings generated.
drivers/leds/trigger/ledtrig-heartbeat.c:99:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", heartbeat_data->invert);
^~~~~~~
drivers/leds/trigger/ledtrig-heartbeat.c:99:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", heartbeat_data->invert);
^~~~~~~
Suppressed 25 warnings (25 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.
26 warnings generated.
drivers/leds/trigger/ledtrig-cpu.c:54:7: warning: Value stored to 'is_active' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
bool is_active = trig->is_active;
^~~~~~~~~ ~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-cpu.c:54:7: note: Value stored to 'is_active' during its initialization is never read
bool is_active = trig->is_active;
^~~~~~~~~ ~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-cpu.c:155:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(trig->name, MAX_NAME_LEN, "cpu%d", cpu);
^~~~~~~~
drivers/leds/trigger/ledtrig-cpu.c:155:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(trig->name, MAX_NAME_LEN, "cpu%d", cpu);
^~~~~~~~
Suppressed 24 warnings (24 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
23 warnings generated.
Suppressed 23 warnings (23 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.
54 warnings generated.
drivers/video/fbdev/core/fbcvt.c:233:3: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores]
off += scnprintf(buf + off, size - off,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/fbdev/core/fbcvt.c:233:3: note: Value stored to 'off' is never read
off += scnprintf(buf + off, size - off,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/fbdev/core/fbcvt.c:252:4: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores]
off += scnprintf(buf + off, size - off, "-R");
--
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq.c:190:9: note: '?' condition is true
return policy && cpumask_test_cpu(cpu, policy->cpus) ? policy : NULL;
^
drivers/cpufreq/cpufreq.c:190:2: note: Returning pointer, which participates in a condition later
return policy && cpumask_test_cpu(cpu, policy->cpus) ? policy : NULL;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq.c:1583:11: note: Returning from 'cpufreq_cpu_get_raw'
policy = cpufreq_cpu_get_raw(cpu);
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq.c:1584:7: note: 'policy' is non-null
if (!policy) {
^~~~~~
drivers/cpufreq/cpufreq.c:1584:2: note: Taking false branch
if (!policy) {
^
drivers/cpufreq/cpufreq.c:1590:2: note: Taking true branch
if (has_target())
^
drivers/cpufreq/cpufreq.c:1595:2: note: Taking true branch
if (policy_is_inactive(policy)) {
^
drivers/cpufreq/cpufreq.c:1596:3: note: Taking true branch
if (has_target())
^
drivers/cpufreq/cpufreq.c:1597:4: note: Null pointer passed as 2nd argument to string copy function
strncpy(policy->last_governor, policy->governor->name,
^ ~~~~~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq.c:2447:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(policy, cpu_policy, sizeof(*policy));
^~~~~~
drivers/cpufreq/cpufreq.c:2447:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(policy, cpu_policy, sizeof(*policy));
^~~~~~
drivers/cpufreq/cpufreq.c:2477:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&new_data.cpuinfo, &policy->cpuinfo, sizeof(policy->cpuinfo));
^~~~~~
drivers/cpufreq/cpufreq.c:2477:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&new_data.cpuinfo, &policy->cpuinfo, sizeof(policy->cpuinfo));
^~~~~~
drivers/cpufreq/cpufreq.c:2874:3: warning: Call to function 'strncpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
strncpy(default_governor, gov->name, CPUFREQ_NAME_LEN);
^~~~~~~
drivers/cpufreq/cpufreq.c:2874:3: note: Call to function 'strncpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'strncpy_s' in case of C11
strncpy(default_governor, gov->name, CPUFREQ_NAME_LEN);
^~~~~~~
Suppressed 51 warnings (51 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.
45 warnings generated.
Suppressed 45 warnings (45 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.
59 warnings generated.
drivers/pcmcia/ds.c:105:11: warning: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
fields = sscanf(buf, "%hx %hx %hx %hhx %hhx %hhx %x %x %x %x",
^~~~~~
drivers/pcmcia/ds.c:105:11: note: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11
fields = sscanf(buf, "%hx %hx %hx %hhx %hhx %hhx %x %x %x %x",
^~~~~~
drivers/pcmcia/ds.c:121:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(dynid->id.prod_id_hash, prod_id_hash, sizeof(__u32) * 4);
^~~~~~
drivers/pcmcia/ds.c:121:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(dynid->id.prod_id_hash, prod_id_hash, sizeof(__u32) * 4);
^~~~~~
drivers/pcmcia/ds.c:1018:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pcmcia_device_attr(func_id, has_func_id, "0x%02x\n");
^
drivers/pcmcia/ds.c:1006:23: note: expanded from macro 'pcmcia_device_attr'
return p_dev->test ? sprintf(buf, format, p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1018:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pcmcia_device_attr(func_id, has_func_id, "0x%02x\n");
^
drivers/pcmcia/ds.c:1006:23: note: expanded from macro 'pcmcia_device_attr'
return p_dev->test ? sprintf(buf, format, p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1019:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pcmcia_device_attr(manf_id, has_manf_id, "0x%04x\n");
^
drivers/pcmcia/ds.c:1006:23: note: expanded from macro 'pcmcia_device_attr'
return p_dev->test ? sprintf(buf, format, p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1019:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pcmcia_device_attr(manf_id, has_manf_id, "0x%04x\n");
^
drivers/pcmcia/ds.c:1006:23: note: expanded from macro 'pcmcia_device_attr'
return p_dev->test ? sprintf(buf, format, p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1020:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pcmcia_device_attr(card_id, has_card_id, "0x%04x\n");
^
drivers/pcmcia/ds.c:1006:23: note: expanded from macro 'pcmcia_device_attr'
return p_dev->test ? sprintf(buf, format, p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1020:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pcmcia_device_attr(card_id, has_card_id, "0x%04x\n");
^
drivers/pcmcia/ds.c:1006:23: note: expanded from macro 'pcmcia_device_attr'
return p_dev->test ? sprintf(buf, format, p_dev->field) : -ENODEV; \
^~~~~~~
>> drivers/pcmcia/ds.c:1021:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pcmcia_device_stringattr(prod_id1, prod_id[0]);
^
drivers/pcmcia/ds.c:1014:24: note: expanded from macro 'pcmcia_device_stringattr'
return p_dev->field ? sprintf(buf, "%s\n", p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1021:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pcmcia_device_stringattr(prod_id1, prod_id[0]);
^
drivers/pcmcia/ds.c:1014:24: note: expanded from macro 'pcmcia_device_stringattr'
return p_dev->field ? sprintf(buf, "%s\n", p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1022:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pcmcia_device_stringattr(prod_id2, prod_id[1]);
^
drivers/pcmcia/ds.c:1014:24: note: expanded from macro 'pcmcia_device_stringattr'
return p_dev->field ? sprintf(buf, "%s\n", p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1022:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pcmcia_device_stringattr(prod_id2, prod_id[1]);
^
drivers/pcmcia/ds.c:1014:24: note: expanded from macro 'pcmcia_device_stringattr'
return p_dev->field ? sprintf(buf, "%s\n", p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1023:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pcmcia_device_stringattr(prod_id3, prod_id[2]);
^
drivers/pcmcia/ds.c:1014:24: note: expanded from macro 'pcmcia_device_stringattr'
return p_dev->field ? sprintf(buf, "%s\n", p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1023:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pcmcia_device_stringattr(prod_id3, prod_id[2]);
^
drivers/pcmcia/ds.c:1014:24: note: expanded from macro 'pcmcia_device_stringattr'
return p_dev->field ? sprintf(buf, "%s\n", p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1024:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pcmcia_device_stringattr(prod_id4, prod_id[3]);
^
drivers/pcmcia/ds.c:1014:24: note: expanded from macro 'pcmcia_device_stringattr'
return p_dev->field ? sprintf(buf, "%s\n", p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1024:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pcmcia_device_stringattr(prod_id4, prod_id[3]);
^
drivers/pcmcia/ds.c:1014:24: note: expanded from macro 'pcmcia_device_stringattr'
return p_dev->field ? sprintf(buf, "%s\n", p_dev->field) : -ENODEV; \
^~~~~~~
drivers/pcmcia/ds.c:1030:25: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return p_dev->socket ? sprintf(buf, "0x%02x\n", p_dev->func) : -ENODEV;
^~~~~~~
drivers/pcmcia/ds.c:1030:25: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return p_dev->socket ? sprintf(buf, "0x%02x\n", p_dev->func) : -ENODEV;
^~~~~~~
drivers/pcmcia/ds.c:1042:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
str += sprintf(str, "%pr\n", p_dev->resource[i]);
^~~~~~~
drivers/pcmcia/ds.c:1042:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
str += sprintf(str, "%pr\n", p_dev->resource[i]);
^~~~~~~
drivers/pcmcia/ds.c:1053:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "off\n");
^~~~~~~
drivers/pcmcia/ds.c:1053:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "off\n");
^~~~~~~
drivers/pcmcia/ds.c:1055:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "on\n");
^~~~~~~
drivers/pcmcia/ds.c:1055:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "on\n");
^~~~~~~
drivers/pcmcia/ds.c:1089:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "pcmcia:m%04Xc%04Xf%02Xfn%02Xpfn%02X"
^~~~~~~
drivers/pcmcia/ds.c:1089:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "pcmcia:m%04Xc%04Xf%02Xfn%02Xpfn%02X"
^~~~~~~
Suppressed 45 warnings (45 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.
52 warnings generated.
arch/x86/events/intel/uncore.c:102:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s", event->config);
^~~~~~~
arch/x86/events/intel/uncore.c:102:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s", event->config);
^~~~~~~
arch/x86/events/intel/uncore.c:861:4: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sprintf(pmu->name, "uncore_%s", pmu->type->name);
^~~~~~~
arch/x86/events/intel/uncore.c:861:4: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sprintf(pmu->name, "uncore_%s", pmu->type->name);
^~~~~~~
arch/x86/events/intel/uncore.c:863:4: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sprintf(pmu->name, "uncore");
^~~~~~~
arch/x86/events/intel/uncore.c:863:4: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sprintf(pmu->name, "uncore");
^~~~~~~
arch/x86/events/intel/uncore.c:865:3: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sprintf(pmu->name, "uncore_%s_%d", pmu->type->name,
--
^~~~~~
drivers/acpi/apei/erst.c:1046:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(rcd, 0, sizeof(*rcd));
^~~~~~
drivers/acpi/apei/erst.c:1047:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(rcd->hdr.signature, CPER_SIG_RECORD, CPER_SIG_SIZE);
^~~~~~
drivers/acpi/apei/erst.c:1047:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(rcd->hdr.signature, CPER_SIG_RECORD, CPER_SIG_SIZE);
^~~~~~
Suppressed 45 warnings (45 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.
41 warnings generated.
drivers/input/serio/serio.c:347:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", serio->name);
^~~~~~~
drivers/input/serio/serio.c:347:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", serio->name);
^~~~~~~
drivers/input/serio/serio.c:354:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "serio:ty%02Xpr%02Xid%02Xex%02X\n",
^~~~~~~
drivers/input/serio/serio.c:354:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "serio:ty%02Xpr%02Xid%02Xex%02X\n",
^~~~~~~
drivers/input/serio/serio.c:361:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%02x\n", serio->id.type);
^~~~~~~
drivers/input/serio/serio.c:361:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%02x\n", serio->id.type);
^~~~~~~
drivers/input/serio/serio.c:367:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%02x\n", serio->id.proto);
^~~~~~~
drivers/input/serio/serio.c:367:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%02x\n", serio->id.proto);
^~~~~~~
drivers/input/serio/serio.c:373:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%02x\n", serio->id.id);
^~~~~~~
drivers/input/serio/serio.c:373:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%02x\n", serio->id.id);
^~~~~~~
drivers/input/serio/serio.c:379:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%02x\n", serio->id.extra);
^~~~~~~
drivers/input/serio/serio.c:379:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%02x\n", serio->id.extra);
^~~~~~~
drivers/input/serio/serio.c:416:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", serio->manual_bind ? "manual" : "auto");
^~~~~~~
drivers/input/serio/serio.c:416:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", serio->manual_bind ? "manual" : "auto");
^~~~~~~
drivers/input/serio/serio.c:440:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", serio->firmware_id);
^~~~~~~
drivers/input/serio/serio.c:440:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", serio->firmware_id);
^~~~~~~
drivers/input/serio/serio.c:738:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)");
^~~~~~~
drivers/input/serio/serio.c:738:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)");
^~~~~~~
drivers/input/serio/serio.c:745:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", serio_drv->manual_bind ? "manual" : "auto");
^~~~~~~
drivers/input/serio/serio.c:745:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", serio_drv->manual_bind ? "manual" : "auto");
^~~~~~~
Suppressed 31 warnings (31 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.
48 warnings generated.
drivers/iio/industrialio-event.c:298:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", val);
^~~~~~~
drivers/iio/industrialio-event.c:298:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", val);
^~~~~~~
drivers/iio/industrialio-event.c:520:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ev_int->group.attrs,
^~~~~~
drivers/iio/industrialio-event.c:520:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ev_int->group.attrs,
^~~~~~
Suppressed 46 warnings (46 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.
31 warnings generated.
Suppressed 31 warnings (31 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.
58 warnings generated.
drivers/iio/industrialio-buffer.c:229:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", to_iio_dev_attr(attr)->c->scan_index);
^~~~~~~
drivers/iio/industrialio-buffer.c:229:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", to_iio_dev_attr(attr)->c->scan_index);
^~~~~~~
>> drivers/iio/industrialio-buffer.c:247:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s:%c%d/%dX%d>>%u\n",
^~~~~~~
drivers/iio/industrialio-buffer.c:247:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s:%c%d/%dX%d>>%u\n",
^~~~~~~
drivers/iio/industrialio-buffer.c:255:11: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s:%c%d/%d>>%u\n",
^~~~~~~
drivers/iio/industrialio-buffer.c:255:11: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s:%c%d/%d>>%u\n",
^~~~~~~
drivers/iio/industrialio-buffer.c:275:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", ret);
^~~~~~~
drivers/iio/industrialio-buffer.c:275:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", ret);
^~~~~~~
drivers/iio/industrialio-buffer.c:420:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", buffer->scan_timestamp);
^~~~~~~
drivers/iio/industrialio-buffer.c:420:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", buffer->scan_timestamp);
^~~~~~~
drivers/iio/industrialio-buffer.c:509:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", buffer->length);
^~~~~~~
drivers/iio/industrialio-buffer.c:509:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", buffer->length);
^~~~~~~
drivers/iio/industrialio-buffer.c:552:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", iio_buffer_is_active(buffer));
^~~~~~~
drivers/iio/industrialio-buffer.c:552:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", iio_buffer_is_active(buffer));
^~~~~~~
drivers/iio/industrialio-buffer.c:710:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(config, 0, sizeof(*config));
^~~~~~
drivers/iio/industrialio-buffer.c:710:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(config, 0, sizeof(*config));
^~~~~~
drivers/iio/industrialio-buffer.c:723:2: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, buffer_list) {
^
include/linux/list.h:656:13: note: expanded from macro 'list_for_each_entry'
pos = list_next_entry(pos, member))
^
include/linux/list.h:555:2: note: expanded from macro 'list_next_entry'
list_entry((pos)->member.next, typeof(*(pos)), member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:854:25: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^
drivers/iio/industrialio-buffer.c:1168:8: note: Calling 'strtobool'
ret = strtobool(buf, &requested_state);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/string.h:189:9: note: Value assigned to 'requested_state', which participates in a condition later
return kstrtobool(s, res);
^~~~~~~~~~~~~~~~~~
drivers/iio/industrialio-buffer.c:1168:8: note: Returning from 'strtobool'
ret = strtobool(buf, &requested_state);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/industrialio-buffer.c:1169:6: note: Assuming 'ret' is >= 0
if (ret < 0)
^~~~~~~
drivers/iio/industrialio-buffer.c:1169:2: note: Taking false branch
if (ret < 0)
^
drivers/iio/industrialio-buffer.c:1177:6: note: Assuming 'inlist' is not equal to 'requested_state'
if (inlist == requested_state)
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/industrialio-buffer.c:1177:2: note: Taking false branch
if (inlist == requested_state)
^
drivers/iio/industrialio-buffer.c:1180:6: note: Assuming 'requested_state' is true
if (requested_state)
^~~~~~~~~~~~~~~
drivers/iio/industrialio-buffer.c:1180:2: note: Taking true branch
if (requested_state)
^
drivers/iio/industrialio-buffer.c:1181:9: note: Calling '__iio_update_buffers'
ret = __iio_update_buffers(indio_dev, buffer, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/industrialio-buffer.c:1063:42: note: Left side of '&&' is false
struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
^
include/linux/iio/iio-opaque.h:34:2: note: expanded from macro 'to_iio_dev_opaque'
container_of(indio_dev, struct iio_dev_opaque, indio_dev)
^
include/linux/kernel.h:855:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/iio/industrialio-buffer.c:1063:42: note: Taking false branch
struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
^
include/linux/iio/iio-opaque.h:34:2: note: expanded from macro 'to_iio_dev_opaque'
container_of(indio_dev, struct iio_dev_opaque, indio_dev)
--
^
net/sctp/sm_sideeffect.c:771:6: note: Assuming field 'dst' is null
if (t->dst)
^~~~~~
net/sctp/sm_sideeffect.c:771:2: note: Taking false branch
if (t->dst)
^
net/sctp/sm_sideeffect.c:781:6: note: Assuming field 'rto_pending' is not equal to 0
if (t->rto_pending == 0)
^~~~~~~~~~~~~~~~~~~
net/sctp/sm_sideeffect.c:781:2: note: Taking false branch
if (t->rto_pending == 0)
^
net/sctp/sm_sideeffect.c:784:41: note: Access to field 'skb' results in a dereference of a null pointer (loaded from variable 'chunk')
hbinfo = (struct sctp_sender_hb_info *)chunk->skb->data;
^~~~~
net/sctp/sm_sideeffect.c:962:9: warning: Access to field 'chunk_end' results in a dereference of a null pointer (loaded from variable 'chunk') [clang-analyzer-core.NullDereference]
while (chunk->chunk_end > chunk->skb->data) {
^
net/sctp/sm_sideeffect.c:1268:21: note: 'chunk' initialized to a null pointer value
struct sctp_chunk *chunk = NULL, *new_obj;
^~~~~
net/sctp/sm_sideeffect.c:1279:6: note: Assuming 'event_type' is equal to SCTP_EVENT_T_TIMEOUT
if (SCTP_EVENT_T_TIMEOUT != event_type)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/sctp/sm_sideeffect.c:1279:2: note: Taking false branch
if (SCTP_EVENT_T_TIMEOUT != event_type)
^
net/sctp/sm_sideeffect.c:1289:2: note: Loop condition is true. Entering loop body
while (NULL != (cmd = sctp_next_cmd(commands))) {
^
net/sctp/sm_sideeffect.c:1290:3: note: Control jumps to 'case SCTP_CMD_PROCESS_OPERR:' at line 1721
switch (cmd->verb) {
^
net/sctp/sm_sideeffect.c:1722:43: note: Passing null pointer value via 3rd parameter 'chunk'
sctp_cmd_process_operr(commands, asoc, chunk);
^~~~~
net/sctp/sm_sideeffect.c:1722:4: note: Calling 'sctp_cmd_process_operr'
sctp_cmd_process_operr(commands, asoc, chunk);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/sctp/sm_sideeffect.c:962:9: note: Access to field 'chunk_end' results in a dereference of a null pointer (loaded from variable 'chunk')
while (chunk->chunk_end > chunk->skb->data) {
^~~~~
net/sctp/sm_sideeffect.c:1685:25: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
chunk->subh.sack_hdr = &sackh;
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
net/sctp/sm_sideeffect.c:1268:21: note: 'chunk' initialized to a null pointer value
struct sctp_chunk *chunk = NULL, *new_obj;
^~~~~
net/sctp/sm_sideeffect.c:1279:6: note: Assuming 'event_type' is equal to SCTP_EVENT_T_TIMEOUT
if (SCTP_EVENT_T_TIMEOUT != event_type)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/sctp/sm_sideeffect.c:1279:2: note: Taking false branch
if (SCTP_EVENT_T_TIMEOUT != event_type)
^
net/sctp/sm_sideeffect.c:1289:2: note: Loop condition is true. Entering loop body
while (NULL != (cmd = sctp_next_cmd(commands))) {
^
net/sctp/sm_sideeffect.c:1290:3: note: Control jumps to 'case SCTP_CMD_PROCESS_CTSN:' at line 1678
switch (cmd->verb) {
^
net/sctp/sm_sideeffect.c:1685:25: note: Dereference of null pointer
chunk->subh.sack_hdr = &sackh;
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
net/sctp/sm_sideeffect.c:1695:20: warning: Access to field 'pdiscard' results in a dereference of a null pointer (loaded from variable 'chunk') [clang-analyzer-core.NullDereference]
chunk->pdiscard = 1;
~~~~~ ^
net/sctp/sm_sideeffect.c:1268:21: note: 'chunk' initialized to a null pointer value
struct sctp_chunk *chunk = NULL, *new_obj;
^~~~~
net/sctp/sm_sideeffect.c:1279:6: note: Assuming 'event_type' is equal to SCTP_EVENT_T_TIMEOUT
if (SCTP_EVENT_T_TIMEOUT != event_type)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/sctp/sm_sideeffect.c:1279:2: note: Taking false branch
if (SCTP_EVENT_T_TIMEOUT != event_type)
^
net/sctp/sm_sideeffect.c:1289:2: note: Loop condition is true. Entering loop body
while (NULL != (cmd = sctp_next_cmd(commands))) {
^
net/sctp/sm_sideeffect.c:1290:3: note: Control jumps to 'case SCTP_CMD_DISCARD_PACKET:' at line 1690
switch (cmd->verb) {
^
net/sctp/sm_sideeffect.c:1695:20: note: Access to field 'pdiscard' results in a dereference of a null pointer (loaded from variable 'chunk')
chunk->pdiscard = 1;
~~~~~ ^
Suppressed 110 warnings (110 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
53 warnings generated.
mm/swap_state.c:196:9: warning: Value stored to 'entry' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
void *entry = xas_store(&xas, shadow);
^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
mm/swap_state.c:196:9: note: Value stored to 'entry' during its initialization is never read
void *entry = xas_store(&xas, shadow);
^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
>> mm/swap_state.c:902:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", enable_vma_readahead ? "true" : "false");
^~~~~~~
mm/swap_state.c:902:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", enable_vma_readahead ? "true" : "false");
^~~~~~~
Suppressed 51 warnings (51 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.
94 warnings generated.
net/sched/sch_choke.c:321:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(q->tab, 0, (q->tab_mask + 1) * sizeof(struct sk_buff *));
^~~~~~
net/sched/sch_choke.c:321:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(q->tab, 0, (q->tab_mask + 1) * sizeof(struct sk_buff *));
^~~~~~
Suppressed 93 warnings (93 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.
90 warnings generated.
Suppressed 90 warnings (90 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.
77 warnings generated.
Suppressed 77 warnings (77 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.
117 warnings generated.
net/sched/cls_flow.c:89:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
return flow->basic.ip_proto;
^
net/sched/cls_flow.c:298:27: note: Left side of '||' is false
struct flow_head *head = rcu_dereference_bh(tp->root);
^
include/linux/rcupdate.h:574:31: note: expanded from macro 'rcu_dereference_bh'
#define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
^
include/linux/rcupdate.h:518:2: note: expanded from macro 'rcu_dereference_bh_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)
^
include/linux/rcupdate.h:369:48: note: expanded from macro '__rcu_dereference_check'
typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
^
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:3: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
net/sched/cls_flow.c:298:27: note: Left side of '||' is false
struct flow_head *head = rcu_dereference_bh(tp->root);
^
include/linux/rcupdate.h:574:31: note: expanded from macro 'rcu_dereference_bh'
#define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
^
include/linux/rcupdate.h:518:2: note: expanded from macro 'rcu_dereference_bh_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)
^
include/linux/rcupdate.h:369:48: note: expanded from macro '__rcu_dereference_check'
typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
^
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:3: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
net/sched/cls_flow.c:298:27: note: Left side of '||' is false
struct flow_head *head = rcu_dereference_bh(tp->root);
^
include/linux/rcupdate.h:574:31: note: expanded from macro 'rcu_dereference_bh'
#define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
^
include/linux/rcupdate.h:518:2: note: expanded from macro 'rcu_dereference_bh_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)
^
include/linux/rcupdate.h:369:48: note: expanded from macro '__rcu_dereference_check'
typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
^
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:3: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
net/sched/cls_flow.c:298:27: note: Left side of '||' is true
struct flow_head *head = rcu_dereference_bh(tp->root);
^
include/linux/rcupdate.h:574:31: note: expanded from macro 'rcu_dereference_bh'
#define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
^
include/linux/rcupdate.h:518:2: note: expanded from macro 'rcu_dereference_bh_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)
^
include/linux/rcupdate.h:369:48: note: expanded from macro '__rcu_dereference_check'
typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
--
^~~~~~
fs/cifs/smb2transport.c:134:4: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(key, chan->signkey, SMB3_SIGN_KEY_SIZE);
^~~~~~
fs/cifs/smb2transport.c:134:4: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(key, chan->signkey, SMB3_SIGN_KEY_SIZE);
^~~~~~
fs/cifs/smb2transport.c:234:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(smb2_signature, 0x0, SMB2_HMACSHA256_SIZE);
^~~~~~
fs/cifs/smb2transport.c:234:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(smb2_signature, 0x0, SMB2_HMACSHA256_SIZE);
^~~~~~
fs/cifs/smb2transport.c:235:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:235:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:288:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:288:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:308:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(prfhash, 0x0, SMB2_HMACSHA256_SIZE);
^~~~~~
fs/cifs/smb2transport.c:308:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(prfhash, 0x0, SMB2_HMACSHA256_SIZE);
^~~~~~
fs/cifs/smb2transport.c:309:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(key, 0x0, key_size);
^~~~~~
fs/cifs/smb2transport.c:309:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(key, 0x0, key_size);
^~~~~~
fs/cifs/smb2transport.c:378:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(key, hashptr, key_size);
^~~~~~
fs/cifs/smb2transport.c:378:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(key, hashptr, key_size);
^~~~~~
fs/cifs/smb2transport.c:429:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ses->chans[0].signkey, ses->smb3signingkey,
^~~~~~
fs/cifs/smb2transport.c:429:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ses->chans[0].signkey, ses->smb3signingkey,
^~~~~~
fs/cifs/smb2transport.c:432:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = generate_key(ses, ptriplet->encryption.label,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/cifs/smb2transport.c:432:3: note: Value stored to 'rc' is never read
rc = generate_key(ses, ptriplet->encryption.label,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/cifs/smb2transport.c:562:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(smb3_signature, 0x0, SMB2_CMACAES_SIZE);
^~~~~~
fs/cifs/smb2transport.c:562:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(smb3_signature, 0x0, SMB2_CMACAES_SIZE);
^~~~~~
fs/cifs/smb2transport.c:563:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:563:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:604:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:604:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:634:3: warning: Call to function 'strncpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'strncpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
strncpy(shdr->Signature, "BSRSPYL", 8);
^~~~~~~
fs/cifs/smb2transport.c:634:3: note: Call to function 'strncpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'strncpy_s' in case of C11
strncpy(shdr->Signature, "BSRSPYL", 8);
^~~~~~~
fs/cifs/smb2transport.c:672:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(server_response_sig, shdr->Signature, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:672:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(server_response_sig, shdr->Signature, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:674:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(shdr->Signature, 0, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:674:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(shdr->Signature, 0, SMB2_SIGNATURE_SIZE);
^~~~~~
fs/cifs/smb2transport.c:718:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(temp, 0, sizeof(struct mid_q_entry));
^~~~~~
fs/cifs/smb2transport.c:718:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(temp, 0, sizeof(struct mid_q_entry));
^~~~~~
Suppressed 90 warnings (90 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.
34 warnings generated.
>> drivers/iio/industrialio-trigger.c:53:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", trig->name);
^~~~~~~
drivers/iio/industrialio-trigger.c:53:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", trig->name);
^~~~~~~
drivers/iio/industrialio-trigger.c:380:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", indio_dev->trig->name);
^~~~~~~
drivers/iio/industrialio-trigger.c:380:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", indio_dev->trig->name);
^~~~~~~
Suppressed 32 warnings (32 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.
32 warnings generated.
Suppressed 32 warnings (32 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.
32 warnings generated.
Suppressed 32 warnings (32 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.
33 warnings generated.
Suppressed 33 warnings (33 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.
48 warnings generated.
Suppressed 48 warnings (48 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.
114 warnings generated.
kernel/sched/core.c:3461:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&p->se.statistics, 0, sizeof(p->se.statistics));
^~~~~~
kernel/sched/core.c:3461:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&p->se.statistics, 0, sizeof(p->se.statistics));
^~~~~~
kernel/sched/core.c:3656:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&p->sched_info, 0, sizeof(p->sched_info));
^~~~~~
kernel/sched/core.c:3656:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&p->sched_info, 0, sizeof(p->sched_info));
^~~~~~
kernel/sched/core.c:4658:16: warning: Value stored to 'preempt_disable_ip' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned long preempt_disable_ip = get_preempt_disable_ip(current);
^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:4658:16: note: Value stored to 'preempt_disable_ip' during its initialization is never read
unsigned long preempt_disable_ip = get_preempt_disable_ip(current);
^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:4926:35: warning: Access to field 'core_cookie' results in a dereference of a null pointer (loaded from variable 'max') [clang-analyzer-core.NullDereference]
cookie = rq->core->core_cookie = max->core_cookie;
^
kernel/sched/core.c:7146:2: note: Calling 'schedule'
schedule();
^~~~~~~~~~
kernel/sched/core.c:5472:3: note: Loop condition is false. Exiting loop
preempt_disable();
^
include/linux/preempt.h:169:27: note: expanded from macro 'preempt_disable'
#define preempt_disable() \
^
kernel/sched/core.c:5473:3: note: Calling '__schedule'
__schedule(false);
^~~~~~~~~~~~~~~~~
kernel/sched/core.c:5286:8: note: Loop condition is false. Exiting loop
cpu = smp_processor_id();
^
include/linux/smp.h:244:29: note: expanded from macro 'smp_processor_id'
# define smp_processor_id() __smp_processor_id()
^
arch/x86/include/asm/smp.h:159:30: note: expanded from macro '__smp_processor_id'
#define __smp_processor_id() __this_cpu_read(cpu_number)
^
include/linux/percpu-defs.h:446:2: note: expanded from macro '__this_cpu_read'
raw_cpu_read(pcp); \
^
include/linux/percpu-defs.h:420:28: note: expanded from macro 'raw_cpu_read'
#define raw_cpu_read(pcp) __pcpu_size_call_return(raw_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) \
^
kernel/sched/core.c:5286:8: note: Control jumps to 'case 4:' at line 5286
cpu = smp_processor_id();
^
include/linux/smp.h:244:29: note: expanded from macro 'smp_processor_id'
# define smp_processor_id() __smp_processor_id()
^
arch/x86/include/asm/smp.h:159:30: note: expanded from macro '__smp_processor_id'
#define __smp_processor_id() __this_cpu_read(cpu_number)
^
include/linux/percpu-defs.h:446:2: note: expanded from macro '__this_cpu_read'
raw_cpu_read(pcp); \
^
include/linux/percpu-defs.h:420:28: note: expanded from macro 'raw_cpu_read'
#define raw_cpu_read(pcp) __pcpu_size_call_return(raw_cpu_read_, pcp)
^
include/linux/percpu-defs.h:320:2: note: expanded from macro '__pcpu_size_call_return'
switch(sizeof(variable)) { \
^
kernel/sched/core.c:5286:8: note: Execution continues on line 5286
cpu = smp_processor_id();
--
25 warnings generated.
crypto/michael_mic.c:68:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy((u8 *)&mctx->pending + mctx->pending_len, data, flen);
^~~~~~
crypto/michael_mic.c:68:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy((u8 *)&mctx->pending + mctx->pending_len, data, flen);
^~~~~~
crypto/michael_mic.c:90:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&mctx->pending, data, len);
^~~~~~
crypto/michael_mic.c:90:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&mctx->pending, data, len);
^~~~~~
Suppressed 23 warnings (23 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.
34 warnings generated.
crypto/ansi_cprng.c:105:4: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(tmp, ctx->DT, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:105:4: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(tmp, ctx->DT, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:139:4: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ctx->last_rand_data, ctx->rand_data,
^~~~~~
crypto/ansi_cprng.c:139:4: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ctx->last_rand_data, ctx->rand_data,
^~~~~~
crypto/ansi_cprng.c:218:4: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(buf, 0, nbytes);
^~~~~~
crypto/ansi_cprng.c:218:4: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(buf, 0, nbytes);
^~~~~~
crypto/ansi_cprng.c:245:5: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(buf, 0, nbytes);
^~~~~~
crypto/ansi_cprng.c:245:5: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(buf, 0, nbytes);
^~~~~~
crypto/ansi_cprng.c:252:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ptr, ctx->rand_data, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:252:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ptr, ctx->rand_data, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:291:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ctx->V, V, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:291:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ctx->V, V, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:293:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ctx->V, DEFAULT_V_SEED, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:293:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ctx->V, DEFAULT_V_SEED, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:296:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ctx->DT, DT, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:296:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ctx->DT, DT, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:298:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(ctx->DT, 0, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:298:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(ctx->DT, 0, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:300:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(ctx->rand_data, 0, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:300:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(ctx->rand_data, 0, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:301:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(ctx->last_rand_data, 0, DEFAULT_BLK_SZ);
^~~~~~
crypto/ansi_cprng.c:301:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(ctx->last_rand_data, 0, DEFAULT_BLK_SZ);
^~~~~~
Suppressed 23 warnings (23 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.
46 warnings generated.
drivers/gnss/core.c:358:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", gnss_type_name(gdev));
^~~~~~~
drivers/gnss/core.c:358:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", gnss_type_name(gdev));
^~~~~~~
Suppressed 45 warnings (45 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.
58 warnings generated.
Suppressed 58 warnings (58 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.
24 warnings generated.
Suppressed 24 warnings (24 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.
56 warnings generated.
>> drivers/counter/counter.c:55:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", e->items[index]);
^~~~~~~
drivers/counter/counter.c:55:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", e->items[index]);
^~~~~~~
drivers/counter/counter.c:94:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
len += sprintf(buf + len, "%s\n", e->items[i]);
^~~~~~~
drivers/counter/counter.c:94:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
len += sprintf(buf + len, "%s\n", e->items[i]);
^~~~~~~
drivers/counter/counter.c:118:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", e->items[index]);
^~~~~~~
drivers/counter/counter.c:118:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", e->items[index]);
^~~~~~~
drivers/counter/counter.c:157:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
len += sprintf(buf + len, "%s\n", e->items[i]);
^~~~~~~
drivers/counter/counter.c:157:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
len += sprintf(buf + len, "%s\n", e->items[i]);
^~~~~~~
drivers/counter/counter.c:180:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", e->items[index]);
^~~~~~~
drivers/counter/counter.c:180:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", e->items[index]);
^~~~~~~
drivers/counter/counter.c:217:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
len += sprintf(buf + len, "%s\n", e->items[i]);
^~~~~~~
drivers/counter/counter.c:217:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
len += sprintf(buf + len, "%s\n", e->items[i]);
^~~~~~~
drivers/counter/counter.c:311:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", counter_signal_value_str[val]);
^~~~~~~
drivers/counter/counter.c:311:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", counter_signal_value_str[val]);
^~~~~~~
drivers/counter/counter.c:324:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", comp->name);
^~~~~~~
drivers/counter/counter.c:324:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", comp->name);
^~~~~~~
drivers/counter/counter.c:563:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", counter_synapse_action_str[action]);
^~~~~~~
drivers/counter/counter.c:563:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", counter_synapse_action_str[action]);
^~~~~~~
drivers/counter/counter.c:615:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
len += sprintf(buf + len, "%s\n",
^~~~~~~
drivers/counter/counter.c:615:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
len += sprintf(buf + len, "%s\n",
^~~~~~~
drivers/counter/counter.c:722:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%lu\n", val);
^~~~~~~
drivers/counter/counter.c:722:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%lu\n", val);
^~~~~~~
drivers/counter/counter.c:776:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", counter_count_function_str[function]);
^~~~~~~
drivers/counter/counter.c:776:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", counter_count_function_str[function]);
^~~~~~~
drivers/counter/counter.c:900:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
len += sprintf(buf + len, "%s\n",
^~~~~~~
drivers/counter/counter.c:900:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
len += sprintf(buf + len, "%s\n",
^~~~~~~
drivers/counter/counter.c:1051:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%zu\n", comp->size);
^~~~~~~
drivers/counter/counter.c:1051:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%zu\n", comp->size);
^~~~~~~
Suppressed 42 warnings (42 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.
95 warnings generated.
net/phonet/socket.c:207:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&sa, 0, sizeof(sa));
^~~~~~
net/phonet/socket.c:207:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&sa, 0, sizeof(sa));
^~~~~~
net/phonet/socket.c:321:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(addr, 0, sizeof(struct sockaddr_pn));
^~~~~~
net/phonet/socket.c:321:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(addr, 0, sizeof(struct sockaddr_pn));
^~~~~~
net/phonet/socket.c:479:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&try_sa, 0, sizeof(struct sockaddr_pn));
--
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:47:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pci_config_attr(device, "0x%04x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:47:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pci_config_attr(device, "0x%04x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:48:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pci_config_attr(subsystem_vendor, "0x%04x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:48:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pci_config_attr(subsystem_vendor, "0x%04x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:49:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pci_config_attr(subsystem_device, "0x%04x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:49:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pci_config_attr(subsystem_device, "0x%04x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:50:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pci_config_attr(revision, "0x%02x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:50:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pci_config_attr(revision, "0x%02x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:51:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pci_config_attr(class, "0x%06x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:51:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pci_config_attr(class, "0x%06x\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:52:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pci_config_attr(irq, "%u\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:52:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pci_config_attr(irq, "%u\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:53:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
pci_config_attr(untrusted, "%u\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:53:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
pci_config_attr(untrusted, "%u\n");
^
drivers/pci/pci-sysfs.c:42:9: note: expanded from macro 'pci_config_attr'
return sprintf(buf, format_string, pdev->field); \
^~~~~~~
drivers/pci/pci-sysfs.c:60:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", pdev->broken_parity_status);
^~~~~~~
drivers/pci/pci-sysfs.c:60:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", pdev->broken_parity_status);
^~~~~~~
drivers/pci/pci-sysfs.c:146:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
str += sprintf(str, "0x%016llx 0x%016llx 0x%016llx\n",
^~~~~~~
drivers/pci/pci-sysfs.c:146:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
str += sprintf(str, "0x%016llx 0x%016llx 0x%016llx\n",
^~~~~~~
>> drivers/pci/pci-sysfs.c:160:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n",
^~~~~~~
drivers/pci/pci-sysfs.c:160:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n",
^~~~~~~
drivers/pci/pci-sysfs.c:170:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", pcie_get_width_cap(pdev));
^~~~~~~
drivers/pci/pci-sysfs.c:170:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", pcie_get_width_cap(pdev));
^~~~~~~
drivers/pci/pci-sysfs.c:188:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", pci_speed_string(speed));
^~~~~~~
drivers/pci/pci-sysfs.c:188:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", pci_speed_string(speed));
^~~~~~~
drivers/pci/pci-sysfs.c:203:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n",
^~~~~~~
drivers/pci/pci-sysfs.c:203:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n",
^~~~~~~
drivers/pci/pci-sysfs.c:220:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", sec_bus);
^~~~~~~
drivers/pci/pci-sysfs.c:220:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", sec_bus);
^~~~~~~
drivers/pci/pci-sysfs.c:236:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", sub_bus);
^~~~~~~
drivers/pci/pci-sysfs.c:236:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", sub_bus);
^~~~~~~
drivers/pci/pci-sysfs.c:246:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", pci_ari_enabled(pci_dev->bus));
^~~~~~~
drivers/pci/pci-sysfs.c:246:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", pci_ari_enabled(pci_dev->bus));
^~~~~~~
drivers/pci/pci-sysfs.c:255:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02X\n",
^~~~~~~
drivers/pci/pci-sysfs.c:255:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02X\n",
^~~~~~~
drivers/pci/pci-sysfs.c:297:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", atomic_read(&pdev->enable_cnt));
^~~~~~~
drivers/pci/pci-sysfs.c:297:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", atomic_read(&pdev->enable_cnt));
^~~~~~~
drivers/pci/pci-sysfs.c:343:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", fls64(pdev->dma_mask));
^~~~~~~
drivers/pci/pci-sysfs.c:343:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", fls64(pdev->dma_mask));
^~~~~~~
drivers/pci/pci-sysfs.c:351:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", fls64(dev->coherent_dma_mask));
^~~~~~~
drivers/pci/pci-sysfs.c:351:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", fls64(dev->coherent_dma_mask));
^~~~~~~
drivers/pci/pci-sysfs.c:361:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", subordinate ?
^~~~~~~
drivers/pci/pci-sysfs.c:361:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", subordinate ?
^~~~~~~
drivers/pci/pci-sysfs.c:518:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", pdev->d3cold_allowed);
^~~~~~~
drivers/pci/pci-sysfs.c:518:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", pdev->d3cold_allowed);
^~~~~~~
drivers/pci/pci-sysfs.c:653:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", (pdev == vga_dev));
^~~~~~~
drivers/pci/pci-sysfs.c:653:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", (pdev == vga_dev));
^~~~~~~
drivers/pci/pci-sysfs.c:655:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n",
^~~~~~~
drivers/pci/pci-sysfs.c:655:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n",
^~~~~~~
drivers/pci/pci-sysfs.c:1147:3: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sprintf(res_attr_name, "resource%d_wc", num);
^~~~~~~
drivers/pci/pci-sysfs.c:1147:3: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sprintf(res_attr_name, "resource%d_wc", num);
^~~~~~~
drivers/pci/pci-sysfs.c:1151:3: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sprintf(res_attr_name, "resource%d", num);
^~~~~~~
drivers/pci/pci-sysfs.c:1151:3: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sprintf(res_attr_name, "resource%d", num);
--
^
fs/io_uring.c:3568:12: note: Calling 'iov_iter_count'
io_size = iov_iter_count(iter);
^~~~~~~~~~~~~~~~~~~~
include/linux/uio.h:234:2: note: Undefined or garbage value returned to caller
return i->count;
^ ~~~~~~~~
Suppressed 91 warnings (90 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.
46 warnings generated.
Suppressed 46 warnings (46 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.
46 warnings generated.
Suppressed 46 warnings (46 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.
49 warnings generated.
crypto/seqiv.c:33:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(req->iv, subreq->iv, crypto_aead_ivsize(geniv));
^~~~~~
crypto/seqiv.c:33:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(req->iv, subreq->iv, crypto_aead_ivsize(geniv));
^~~~~~
Suppressed 48 warnings (48 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.
65 warnings generated.
fs/ocfs2/aops.c:103:4: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(kaddr + (bh_result->b_size * iblock),
^~~~~~
fs/ocfs2/aops.c:103:4: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(kaddr + (bh_result->b_size * iblock),
^~~~~~
fs/ocfs2/aops.c:247:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(kaddr, di->id2.i_data.id_data, size);
^~~~~~
fs/ocfs2/aops.c:247:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(kaddr, di->id2.i_data.id_data, size);
^~~~~~
fs/ocfs2/aops.c:249:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(kaddr + size, 0, PAGE_SIZE - size);
^~~~~~
fs/ocfs2/aops.c:249:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(kaddr + size, 0, PAGE_SIZE - size);
^~~~~~
fs/ocfs2/aops.c:557:4: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(kaddr + cluster_start, 0, from - cluster_start);
^~~~~~
fs/ocfs2/aops.c:557:4: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(kaddr + cluster_start, 0, from - cluster_start);
^~~~~~
fs/ocfs2/aops.c:559:4: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(kaddr + to, 0, cluster_end - to);
^~~~~~
fs/ocfs2/aops.c:559:4: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(kaddr + to, 0, cluster_end - to);
^~~~~~
fs/ocfs2/aops.c:561:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(kaddr + cluster_start, 0, cluster_end - cluster_start);
^~~~~~
fs/ocfs2/aops.c:561:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(kaddr + cluster_start, 0, cluster_end - cluster_start);
^~~~~~
fs/ocfs2/aops.c:983:4: warning: Value stored to 'map_from' is never read [clang-analyzer-deadcode.DeadStores]
map_from = cluster_start;
^ ~~~~~~~~~~~~~
fs/ocfs2/aops.c:983:4: note: Value stored to 'map_from' is never read
map_from = cluster_start;
^ ~~~~~~~~~~~~~
fs/ocfs2/aops.c:984:4: warning: Value stored to 'map_to' is never read [clang-analyzer-deadcode.DeadStores]
map_to = cluster_end;
^ ~~~~~~~~~~~
fs/ocfs2/aops.c:984:4: note: Value stored to 'map_to' is never read
map_to = cluster_end;
^ ~~~~~~~~~~~
fs/ocfs2/aops.c:994:3: warning: Value stored to 'map_from' is never read [clang-analyzer-deadcode.DeadStores]
map_from = cluster_start;
^ ~~~~~~~~~~~~~
fs/ocfs2/aops.c:994:3: note: Value stored to 'map_from' is never read
map_from = cluster_start;
^ ~~~~~~~~~~~~~
fs/ocfs2/aops.c:995:3: warning: Value stored to 'map_to' is never read [clang-analyzer-deadcode.DeadStores]
map_to = cluster_end;
^ ~~~~~~~~~~~
fs/ocfs2/aops.c:995:3: note: Value stored to 'map_to' is never read
map_to = cluster_end;
^ ~~~~~~~~~~~
fs/ocfs2/aops.c:1678:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = 0;
^ ~
fs/ocfs2/aops.c:1678:4: note: Value stored to 'ret' is never read
ret = 0;
^ ~
fs/ocfs2/aops.c:1944:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(di->id2.i_data.id_data + pos, kaddr + pos, *copied);
^~~~~~
fs/ocfs2/aops.c:1944:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(di->id2.i_data.id_data + pos, kaddr + pos, *copied);
^~~~~~
Suppressed 53 warnings (53 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.
51 warnings generated.
>> drivers/misc/uacce/uacce.c:303:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", uacce->api_ver);
^~~~~~~
drivers/misc/uacce/uacce.c:303:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", uacce->api_ver);
^~~~~~~
drivers/misc/uacce/uacce.c:311:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", uacce->flags);
^~~~~~~
drivers/misc/uacce/uacce.c:311:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", uacce->flags);
^~~~~~~
drivers/misc/uacce/uacce.c:323:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/misc/uacce/uacce.c:323:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
drivers/misc/uacce/uacce.c:332:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", uacce->algs);
^~~~~~~
drivers/misc/uacce/uacce.c:332:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", uacce->algs);
^~~~~~~
drivers/misc/uacce/uacce.c:340:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%lu\n",
^~~~~~~
drivers/misc/uacce/uacce.c:340:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%lu\n",
^~~~~~~
drivers/misc/uacce/uacce.c:349:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%lu\n",
^~~~~~~
drivers/misc/uacce/uacce.c:349:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%lu\n",
^~~~~~~
Suppressed 45 warnings (45 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.
61 warnings generated.
fs/reiserfs/inode.c:403:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(p, 0, inode->i_sb->s_blocksize);
^~~~~~
fs/reiserfs/inode.c:403:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(p, 0, inode->i_sb->s_blocksize);
^~~~~~
fs/reiserfs/inode.c:424:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(p, ih_item_body(bh, ih) + path.pos_in_item, chars);
^~~~~~
fs/reiserfs/inode.c:424:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(p, ih_item_body(bh, ih) + path.pos_in_item, chars);
^~~~~~
fs/reiserfs/inode.c:1140:3: warning: Value stored to 'bh' is never read [clang-analyzer-deadcode.DeadStores]
bh = get_last_bh(&path);
^
fs/reiserfs/inode.c:1140:3: note: Value stored to 'bh' is never read
fs/reiserfs/inode.c:1142:3: warning: Value stored to 'item' is never read [clang-analyzer-deadcode.DeadStores]
item = tp_item_body(&path);
^ ~~~~~~~~~~~~~~~~~~~
fs/reiserfs/inode.c:1142:3: note: Value stored to 'item' is never read
item = tp_item_body(&path);
^ ~~~~~~~~~~~~~~~~~~~
fs/reiserfs/inode.c:1520:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(INODE_PKEY(inode), 0, KEY_SIZE);
^~~~~~
fs/reiserfs/inode.c:1520:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(INODE_PKEY(inode), 0, KEY_SIZE);
^~~~~~
fs/reiserfs/inode.c:1964:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(INODE_PKEY(inode), &ih.ih_key, KEY_SIZE);
^~~~~~
fs/reiserfs/inode.c:1964:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(INODE_PKEY(inode), &ih.ih_key, KEY_SIZE);
^~~~~~
fs/reiserfs/inode.c:2456:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ih_item_body(bh, ih) + pos_in_item, p + bytes_copied,
^~~~~~
fs/reiserfs/inode.c:2456:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ih_item_body(bh, ih) + pos_in_item, p + bytes_copied,
^~~~~~
fs/reiserfs/inode.c:3199:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = try_to_release_page(page, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/reiserfs/inode.c:3199:3: note: Value stored to 'ret' is never read
ret = try_to_release_page(page, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/reiserfs/reiserfs.h:1282:17: warning: The left operand of '&' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
v2->v = (v2->v & cpu_to_le64(15ULL << 60)) | cpu_to_le64(offset);
^
fs/reiserfs/inode.c:1938:9: note: Assuming field 't_trans_id' is not equal to 0
BUG_ON(!th->t_trans_id);
^
include/asm-generic/bug.h:63:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
fs/reiserfs/inode.c:1938:2: note: Taking false branch
BUG_ON(!th->t_trans_id);
^
include/asm-generic/bug.h:63:32: note: expanded from macro 'BUG_ON'
--
^
drivers/net/can/softing/softing_main.c:702:9: note: expanded from macro 'DEV_ATTR_RO_STR'
return sprintf(buf, "%s\n", card->member); \
^~~~~~~
drivers/net/can/softing/softing_main.c:709:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
DEV_ATTR_RO_STR(hardware, pdat->name);
^
drivers/net/can/softing/softing_main.c:702:9: note: expanded from macro 'DEV_ATTR_RO_STR'
return sprintf(buf, "%s\n", card->member); \
^~~~~~~
drivers/net/can/softing/softing_main.c:710:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
DEV_ATTR_RO(hardware_version, id.hw_version);
^
drivers/net/can/softing/softing_main.c:693:9: note: expanded from macro 'DEV_ATTR_RO'
return sprintf(buf, "%u\n", card->member); \
^~~~~~~
drivers/net/can/softing/softing_main.c:710:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
DEV_ATTR_RO(hardware_version, id.hw_version);
^
drivers/net/can/softing/softing_main.c:693:9: note: expanded from macro 'DEV_ATTR_RO'
return sprintf(buf, "%u\n", card->member); \
^~~~~~~
drivers/net/can/softing/softing_main.c:711:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
DEV_ATTR_RO(license, id.license);
^
drivers/net/can/softing/softing_main.c:693:9: note: expanded from macro 'DEV_ATTR_RO'
return sprintf(buf, "%u\n", card->member); \
^~~~~~~
drivers/net/can/softing/softing_main.c:711:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
DEV_ATTR_RO(license, id.license);
^
drivers/net/can/softing/softing_main.c:693:9: note: expanded from macro 'DEV_ATTR_RO'
return sprintf(buf, "%u\n", card->member); \
^~~~~~~
Suppressed 90 warnings (90 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.
61 warnings generated.
drivers/hwmon/adm1025.c:168:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", IN_FROM_REG(data->in[index],
^~~~~~~
drivers/hwmon/adm1025.c:168:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", IN_FROM_REG(data->in[index],
^~~~~~~
drivers/hwmon/adm1025.c:177:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", IN_FROM_REG(data->in_min[index],
^~~~~~~
drivers/hwmon/adm1025.c:177:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", IN_FROM_REG(data->in_min[index],
^~~~~~~
drivers/hwmon/adm1025.c:186:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", IN_FROM_REG(data->in_max[index],
^~~~~~~
drivers/hwmon/adm1025.c:186:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", IN_FROM_REG(data->in_max[index],
^~~~~~~
drivers/hwmon/adm1025.c:195:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[index]));
^~~~~~~
drivers/hwmon/adm1025.c:195:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[index]));
^~~~~~~
drivers/hwmon/adm1025.c:203:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[index]));
^~~~~~~
drivers/hwmon/adm1025.c:203:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[index]));
^~~~~~~
drivers/hwmon/adm1025.c:211:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[index]));
^~~~~~~
drivers/hwmon/adm1025.c:211:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[index]));
^~~~~~~
drivers/hwmon/adm1025.c:330:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", data->alarms);
^~~~~~~
drivers/hwmon/adm1025.c:330:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", data->alarms);
^~~~~~~
drivers/hwmon/adm1025.c:339:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1);
^~~~~~~
drivers/hwmon/adm1025.c:339:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1);
^~~~~~~
drivers/hwmon/adm1025.c:355:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm));
^~~~~~~
drivers/hwmon/adm1025.c:355:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm));
^~~~~~~
drivers/hwmon/adm1025.c:363:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", data->vrm);
^~~~~~~
drivers/hwmon/adm1025.c:363:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", data->vrm);
^~~~~~~
Suppressed 51 warnings (51 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.
49 warnings generated.
>> fs/filesystems.c:220:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
len += sprintf(buf+len, "%s\t%s\n",
^~~~~~~
fs/filesystems.c:220:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
len += sprintf(buf+len, "%s\t%s\n",
^~~~~~~
Suppressed 48 warnings (48 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.
52 warnings generated.
fs/namespace.c:2235:13: warning: Access to field 'd_inode' results in a dereference of a null pointer (loaded from variable 'dentry') [clang-analyzer-core.NullDereference]
inode_lock(dentry->d_inode);
^
fs/namespace.c:3715:1: note: Calling '__se_sys_pivot_root'
SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
^
include/linux/syscalls.h:214:36: note: expanded from macro 'SYSCALL_DEFINE2'
#define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:230:2: note: expanded from macro '__SYSCALL_DEFINEx'
__X64_SYS_STUBx(x, name, __VA_ARGS__) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:96:2: note: expanded from macro '__X64_SYS_STUBx'
__SYS_STUBx(x64, sys##name, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:79:10: note: expanded from macro '__SYS_STUBx'
return __se_##name(__VA_ARGS__); \
^~~~~~~~~~~~~~~~~~~~~~~~
note: expanded from here
fs/namespace.c:3715:1: note: Calling '__do_sys_pivot_root'
SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
^
include/linux/syscalls.h:214:36: note: expanded from macro 'SYSCALL_DEFINE2'
#define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:234:14: note: expanded from macro '__SYSCALL_DEFINEx'
long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: expanded from here
fs/namespace.c:3723:6: note: Assuming the condition is false
if (!may_mount())
^~~~~~~~~~~~
fs/namespace.c:3723:2: note: Taking false branch
if (!may_mount())
^
fs/namespace.c:3728:6: note: Assuming 'error' is 0
if (error)
^~~~~
fs/namespace.c:3728:2: note: Taking false branch
if (error)
^
fs/namespace.c:3733:6: note: Assuming 'error' is 0
if (error)
^~~~~
fs/namespace.c:3733:2: note: Taking false branch
if (error)
^
fs/namespace.c:3737:6: note: Assuming 'error' is 0
if (error)
^~~~~
fs/namespace.c:3737:2: note: Taking false branch
if (error)
^
fs/namespace.c:3741:11: note: Calling 'lock_mount'
old_mp = lock_mount(&old);
^~~~~~~~~~~~~~~~
fs/namespace.c:2236:6: note: Assuming the condition is true
if (unlikely(cant_mount(dentry))) {
^
include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^~~~
fs/namespace.c:2236:2: note: Taking false branch
if (unlikely(cant_mount(dentry))) {
^
fs/namespace.c:2242:14: note: 'mnt' is non-null
if (likely(!mnt)) {
^
include/linux/compiler.h:77:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/namespace.c:2242:2: note: Taking false branch
if (likely(!mnt)) {
^
fs/namespace.c:2255:2: note: Null pointer value stored to 'dentry'
dentry = path->dentry = dget(mnt->mnt_root);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/namespace.c:2256:2: note: Control jumps to line 2235
goto retry;
^
fs/namespace.c:2235:13: note: Access to field 'd_inode' results in a dereference of a null pointer (loaded from variable 'dentry')
inode_lock(dentry->d_inode);
^~~~~~
Suppressed 51 warnings (51 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.
69 warnings generated.
drivers/net/phy/micrel.c:459:28: warning: Value stored to 'of_node' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
const struct device_node *of_node = dev->of_node;
^~~~~~~ ~~~~~~~~~~~~
drivers/net/phy/micrel.c:459:28: note: Value stored to 'of_node' during its initialization is never read
const struct device_node *of_node = dev->of_node;
^~~~~~~ ~~~~~~~~~~~~
drivers/net/phy/micrel.c:682:28: warning: Value stored to 'of_node' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
const struct device_node *of_node = dev->of_node;
^~~~~~~ ~~~~~~~~~~~~
drivers/net/phy/micrel.c:682:28: note: Value stored to 'of_node' during its initialization is never read
const struct device_node *of_node = dev->of_node;
^~~~~~~ ~~~~~~~~~~~~
drivers/net/phy/micrel.c:878:22: warning: Value stored to 'of_node' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device_node *of_node = dev->of_node;
^~~~~~~ ~~~~~~~~~~~~
drivers/net/phy/micrel.c:878:22: note: Value stored to 'of_node' during its initialization is never read
struct device_node *of_node = dev->of_node;
^~~~~~~ ~~~~~~~~~~~~
drivers/net/phy/micrel.c:942:2: warning: Value stored to 'regval' is never read [clang-analyzer-deadcode.DeadStores]
regval = phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/micrel.c:942:2: note: Value stored to 'regval' is never read
regval = phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 65 warnings (65 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.
66 warnings generated.
drivers/net/phy/microchip.c:40:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = phy_write(phydev, LAN88XX_INT_MASK, 0x7FFF);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/microchip.c:40:3: note: Value stored to 'rc' is never read
rc = phy_write(phydev, LAN88XX_INT_MASK, 0x7FFF);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/microchip.c:41:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = phy_read(phydev, LAN88XX_INT_STS);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/microchip.c:41:3: note: Value stored to 'rc' is never read
rc = phy_read(phydev, LAN88XX_INT_STS);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 64 warnings (64 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.
47 warnings generated.
>> drivers/hwmon/dell-smm-hwmon.c:660:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", labels[type]);
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:660:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", labels[type]);
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:673:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", temp * 1000);
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:673:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", temp * 1000);
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:704:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s%s\n", (dock ? "Docking " : ""), labels[type]);
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:704:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s%s\n", (dock ? "Docking " : ""), labels[type]);
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:716:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", fan_speed);
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:716:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", fan_speed);
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:728:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", clamp_val(status * i8k_pwm_mult, 0, 255));
^~~~~~~
drivers/hwmon/dell-smm-hwmon.c:728:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", clamp_val(status * i8k_pwm_mult, 0, 255));
^~~~~~~
Suppressed 42 warnings (42 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.
46 warnings generated.
Suppressed 46 warnings (46 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.
56 warnings generated.
fs/ext2/dir.c:449:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = ext2_commit_chunk(page, pos, len);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext2/dir.c:449:2: note: Value stored to 'err' is never read
err = ext2_commit_chunk(page, pos, len);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext2/dir.c:538:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(de->name, name, namelen);
^~~~~~
fs/ext2/dir.c:538:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(de->name, name, namelen);
^~~~~~
fs/ext2/dir.c:619:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(kaddr, 0, chunk_size);
^~~~~~
fs/ext2/dir.c:619:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(kaddr, 0, chunk_size);
^~~~~~
fs/ext2/dir.c:623:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy (de->name, ".\0\0", 4);
^~~~~~
fs/ext2/dir.c:623:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy (de->name, ".\0\0", 4);
^~~~~~
fs/ext2/dir.c:631:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy (de->name, "..\0", 4);
^~~~~~
fs/ext2/dir.c:631:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy (de->name, "..\0", 4);
^~~~~~
Suppressed 51 warnings (51 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.
46 warnings generated.
Suppressed 46 warnings (46 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.
50 warnings generated.
fs/reiserfs/bitmap.c:1198:14: warning: Value stored to 'start' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
b_blocknr_t start = hint->search_start;
^~~~~ ~~~~~~~~~~~~~~~~~~
fs/reiserfs/bitmap.c:1198:14: note: Value stored to 'start' during its initialization is never read
b_blocknr_t start = hint->search_start;
^~~~~ ~~~~~~~~~~~~~~~~~~
fs/reiserfs/bitmap.c:1199:14: warning: Value stored to 'finish' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
b_blocknr_t finish = SB_BLOCK_COUNT(s) - 1;
^~~~~~
fs/reiserfs/bitmap.c:1199:14: note: Value stored to 'finish' during its initialization is never read
b_blocknr_t finish = SB_BLOCK_COUNT(s) - 1;
^~~~~~
fs/reiserfs/bitmap.c:1463:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(bitmap, 0xff, sizeof(*bitmap) * bmap_nr);
^~~~~~
fs/reiserfs/bitmap.c:1463:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(bitmap, 0xff, sizeof(*bitmap) * bmap_nr);
^~~~~~
Suppressed 47 warnings (47 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.
55 warnings generated.
Suppressed 55 warnings (55 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.
55 warnings generated.
Suppressed 55 warnings (55 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.
70 warnings generated.
fs/orangefs/xattr.c:141:4: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(buffer, cx->val, cx->length);
--
^
fs/ext4/namei.c:4029:6: note: Assuming field 'bh' is non-null
if (!new.bh || le32_to_cpu(new.de->inode) != new.inode->i_ino)
^~~~~~~
fs/ext4/namei.c:4029:6: note: Left side of '||' is false
fs/ext4/namei.c:4029:17: note: Access to field 'inode' results in a dereference of a null pointer (loaded from field 'de')
if (!new.bh || le32_to_cpu(new.de->inode) != new.inode->i_ino)
^
include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^
include/uapi/linux/byteorder/little_endian.h:34:50: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^~
Suppressed 54 warnings (54 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
58 warnings generated.
drivers/input/touchscreen/wdt87xx_i2c.c:270:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(buf, &rx_buf[2], rx_len);
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:270:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(buf, &rx_buf[2], rx_len);
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:310:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(buf, &rx_buf[2], rx_len);
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:310:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(buf, &rx_buf[2], rx_len);
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:343:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&tx_buf[tx_len], buf, buf_size);
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:343:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&tx_buf[tx_len], buf, buf_size);
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:586:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&pkt_buf[CMD_DATA_OFFSET], data, packet_size);
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:586:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&pkt_buf[CMD_DATA_OFFSET], data, packet_size);
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:665:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(cmd_buf, 0, sizeof(cmd_buf));
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:665:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(cmd_buf, 0, sizeof(cmd_buf));
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:674:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(pkt_buf, 0, sizeof(pkt_buf));
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:674:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(pkt_buf, 0, sizeof(pkt_buf));
^~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:1088:2: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(wdt->phys, sizeof(wdt->phys), "i2c-%u-%04x/input0",
^~~~~~~~
drivers/input/touchscreen/wdt87xx_i2c.c:1088:2: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(wdt->phys, sizeof(wdt->phys), "i2c-%u-%04x/input0",
^~~~~~~~
Suppressed 51 warnings (51 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.
25 warnings generated.
Suppressed 25 warnings (25 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.
42 warnings generated.
Suppressed 42 warnings (42 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
52 warnings generated.
drivers/regulator/bcm590xx-regulator.c:140:8: warning: Excessive padding in 'struct bcm590xx_info' (14 padding bytes, where 6 is optimal).
Optimal fields order:
name,
vin_name,
volt_table,
linear_ranges,
n_voltages,
n_linear_ranges,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct bcm590xx_info {
~~~~~~~^~~~~~~~~~~~~~~
drivers/regulator/bcm590xx-regulator.c:140:8: note: Excessive padding in 'struct bcm590xx_info' (14 padding bytes, where 6 is optimal). Optimal fields order: name, vin_name, volt_table, linear_ranges, n_voltages, n_linear_ranges, consider reordering the fields or adding explicit padding members
struct bcm590xx_info {
~~~~~~~^~~~~~~~~~~~~~~
Suppressed 51 warnings (51 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.
52 warnings generated.
>> drivers/regulator/bd9571mwv-regulator.c:172:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
^~~~~~~
drivers/regulator/bd9571mwv-regulator.c:172:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
^~~~~~~
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
75 warnings generated.
net/ethtool/common.c:296:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(link_ksettings, 0, sizeof(*link_ksettings));
^~~~~~
net/ethtool/common.c:296:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(link_ksettings, 0, sizeof(*link_ksettings));
^~~~~~
net/ethtool/common.c:389:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(info, 0, sizeof(*info));
^~~~~~
net/ethtool/common.c:389:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(info, 0, sizeof(*info));
^~~~~~
Suppressed 73 warnings (73 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.
94 warnings generated.
net/ethtool/netlink.c:304:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(reply_data, 0, ops->reply_data_size);
^~~~~~
net/ethtool/netlink.c:304:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(reply_data, 0, ops->reply_data_size);
^~~~~~
net/ethtool/netlink.c:594:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -ENOMEM;
^ ~~~~~~~
net/ethtool/netlink.c:594:2: note: Value stored to 'ret' is never read
ret = -ENOMEM;
^ ~~~~~~~
Suppressed 92 warnings (92 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.
95 warnings generated.
net/ethtool/bitset.c:17:17: warning: The result of the right shift is undefined due to shifting by '32', which is greater or equal to the width of type 'u32' [clang-analyzer-core.UndefinedBinaryOperatorResult]
return ~(u32)0 >> (32 - n % 32);
^
net/ethtool/bitset.c:829:9: note: Calling 'ethnl_update_bitset32'
return ethnl_update_bitset32((u32 *)bitmap, nbits, attr, names, extack,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ethtool/bitset.c:561:6: note: Assuming 'attr' is non-null
if (!attr)
^~~~~
net/ethtool/bitset.c:561:2: note: Taking false branch
if (!attr)
^
net/ethtool/bitset.c:565:6: note: Assuming 'ret' is >= 0
if (ret < 0)
^~~~~~~
net/ethtool/bitset.c:565:2: note: Taking false branch
if (ret < 0)
^
net/ethtool/bitset.c:568:6: note: Assuming the condition is false
if (tb[ETHTOOL_A_BITSET_BITS])
^~~~~~~~~~~~~~~~~~~~~~~~~
net/ethtool/bitset.c:568:2: note: Taking false branch
if (tb[ETHTOOL_A_BITSET_BITS])
^
net/ethtool/bitset.c:572:6: note: 'ret' is >= 0
if (ret < 0)
^~~
net/ethtool/bitset.c:572:2: note: Taking false branch
if (ret < 0)
^
net/ethtool/bitset.c:576:16: note: Assuming '__UNIQUE_ID___x846' is >= '__UNIQUE_ID___y847'
change_bits = min_t(unsigned int,
^
include/linux/minmax.h:104:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^~~~~~~~~~
net/ethtool/bitset.c:576:16: note: '?' condition is false
change_bits = min_t(unsigned int,
^
include/linux/minmax.h:104:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
--
51 warnings generated.
Suppressed 51 warnings (51 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.
62 warnings generated.
drivers/misc/ics932s401.c:156:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "1\n");
^~~~~~~
drivers/misc/ics932s401.c:156:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "1\n");
^~~~~~~
drivers/misc/ics932s401.c:158:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "0\n");
^~~~~~~
drivers/misc/ics932s401.c:158:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "0\n");
^~~~~~~
drivers/misc/ics932s401.c:202:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", calculate_cpu_freq(data));
^~~~~~~
drivers/misc/ics932s401.c:202:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", calculate_cpu_freq(data));
^~~~~~~
drivers/misc/ics932s401.c:231:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", freq);
^~~~~~~
drivers/misc/ics932s401.c:231:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", freq);
^~~~~~~
drivers/misc/ics932s401.c:259:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", calculate_src_freq(data));
^~~~~~~
drivers/misc/ics932s401.c:259:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", calculate_src_freq(data));
^~~~~~~
drivers/misc/ics932s401.c:279:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", freq);
^~~~~~~
drivers/misc/ics932s401.c:279:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", freq);
^~~~~~~
drivers/misc/ics932s401.c:307:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", calculate_pci_freq(data));
^~~~~~~
drivers/misc/ics932s401.c:307:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", calculate_pci_freq(data));
^~~~~~~
drivers/misc/ics932s401.c:322:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", freq);
^~~~~~~
drivers/misc/ics932s401.c:322:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", freq);
^~~~~~~
drivers/misc/ics932s401.c:373:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", x);
^~~~~~~
drivers/misc/ics932s401.c:373:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", x);
^~~~~~~
drivers/misc/ics932s401.c:385:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "0%%\n");
^~~~~~~
drivers/misc/ics932s401.c:385:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "0%%\n");
^~~~~~~
drivers/misc/ics932s401.c:399:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "-0.%lu%%\n", val);
^~~~~~~
drivers/misc/ics932s401.c:399:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "-0.%lu%%\n", val);
^~~~~~~
Suppressed 51 warnings (51 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.
31 warnings generated.
Suppressed 31 warnings (31 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.
56 warnings generated.
drivers/watchdog/ziirave_wdt.c:248:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(packet + 3, data, len);
^~~~~~
drivers/watchdog/ziirave_wdt.c:248:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(packet + 3, data, len);
^~~~~~
drivers/watchdog/ziirave_wdt.c:249:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(packet + 3 + len, 0, ZIIRAVE_FIRM_PKT_DATA_SIZE - len);
^~~~~~
drivers/watchdog/ziirave_wdt.c:249:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(packet + 3 + len, 0, ZIIRAVE_FIRM_PKT_DATA_SIZE - len);
^~~~~~
drivers/watchdog/ziirave_wdt.c:449:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = sprintf(buf, ZIIRAVE_FW_VERSION_FMT, w_priv->firmware_rev.major,
^~~~~~~
drivers/watchdog/ziirave_wdt.c:449:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret = sprintf(buf, ZIIRAVE_FW_VERSION_FMT, w_priv->firmware_rev.major,
^~~~~~~
drivers/watchdog/ziirave_wdt.c:472:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = sprintf(buf, ZIIRAVE_BL_VERSION_FMT, w_priv->bootloader_rev.major,
^~~~~~~
drivers/watchdog/ziirave_wdt.c:472:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret = sprintf(buf, ZIIRAVE_BL_VERSION_FMT, w_priv->bootloader_rev.major,
^~~~~~~
>> drivers/watchdog/ziirave_wdt.c:495:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = sprintf(buf, "%s", ziirave_reasons[w_priv->reset_reason]);
^~~~~~~
drivers/watchdog/ziirave_wdt.c:495:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret = sprintf(buf, "%s", ziirave_reasons[w_priv->reset_reason]);
^~~~~~~
Suppressed 51 warnings (51 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.
55 warnings generated.
drivers/hwmon/menf21bmc_hwmon.c:104:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", input_names[attr->index]);
^~~~~~~
drivers/hwmon/menf21bmc_hwmon.c:104:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", input_names[attr->index]);
^~~~~~~
drivers/hwmon/menf21bmc_hwmon.c:116:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", drv_data->in_val[attr->index]);
^~~~~~~
drivers/hwmon/menf21bmc_hwmon.c:116:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", drv_data->in_val[attr->index]);
^~~~~~~
drivers/hwmon/menf21bmc_hwmon.c:125:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", drv_data->in_min[attr->index]);
^~~~~~~
drivers/hwmon/menf21bmc_hwmon.c:125:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", drv_data->in_min[attr->index]);
^~~~~~~
drivers/hwmon/menf21bmc_hwmon.c:134:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", drv_data->in_max[attr->index]);
^~~~~~~
drivers/hwmon/menf21bmc_hwmon.c:134:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", drv_data->in_max[attr->index]);
^~~~~~~
Suppressed 51 warnings (51 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.
64 warnings generated.
drivers/hwmon/nct7802.c:77:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", (mode >> (2 * sattr->index) & 3) + 2);
^~~~~~~
drivers/hwmon/nct7802.c:77:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", (mode >> (2 * sattr->index) & 3) + 2);
^~~~~~~
drivers/hwmon/nct7802.c:110:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "1\n");
^~~~~~~
drivers/hwmon/nct7802.c:110:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "1\n");
^~~~~~~
drivers/hwmon/nct7802.c:116:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", !(regval & (1 << sattr->index)));
^~~~~~~
drivers/hwmon/nct7802.c:116:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", !(regval & (1 << sattr->index)));
^~~~~~~
drivers/hwmon/nct7802.c:128:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "255\n");
^~~~~~~
drivers/hwmon/nct7802.c:128:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "255\n");
^~~~~~~
drivers/hwmon/nct7802.c:134:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", val);
^~~~~~~
drivers/hwmon/nct7802.c:134:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", val);
^~~~~~~
drivers/hwmon/nct7802.c:165:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", enabled + 1);
^~~~~~~
drivers/hwmon/nct7802.c:165:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", enabled + 1);
^~~~~~~
drivers/hwmon/nct7802.c:352:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", voltage);
^~~~~~~
drivers/hwmon/nct7802.c:352:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", voltage);
^~~~~~~
drivers/hwmon/nct7802.c:427:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = sprintf(buf, "%u\n", !!(data->in_status & (1 << sattr->index)));
^~~~~~~
drivers/hwmon/nct7802.c:427:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret = sprintf(buf, "%u\n", !!(data->in_status & (1 << sattr->index)));
^~~~~~~
drivers/hwmon/nct7802.c:444:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", temp);
^~~~~~~
drivers/hwmon/nct7802.c:444:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", temp);
^~~~~~~
drivers/hwmon/nct7802.c:477:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", speed);
^~~~~~~
drivers/hwmon/nct7802.c:477:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", speed);
^~~~~~~
drivers/hwmon/nct7802.c:491:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", speed);
^~~~~~~
drivers/hwmon/nct7802.c:491:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", speed);
--
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1054:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = ath10k_sdio_mbox_proc_counter_intr(ar);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1054:3: note: Value stored to 'ret' is never read
ret = ath10k_sdio_mbox_proc_counter_intr(ar);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1208:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ar_sdio->bmi_buf, req, req_len);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1208:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ar_sdio->bmi_buf, req, req_len);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1281:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(resp, ar_sdio->bmi_buf, *resp_len);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1281:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(resp, ar_sdio->bmi_buf, *resp_len);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1315:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(bus_req, 0, sizeof(*bus_req));
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1315:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(bus_req, 0, sizeof(*bus_req));
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1559:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(regs, 0, sizeof(*regs));
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1559:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(regs, 0, sizeof(*regs));
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1753:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(buf, mem, buf_len);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1753:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(buf, mem, buf_len);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1930:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(regs, 0, sizeof(*regs)); /* disable all interrupts */
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1930:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(regs, 0, sizeof(*regs)); /* disable all interrupts */
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1931:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(skb->data, regs, sizeof(*regs));
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:1931:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(skb->data, regs, sizeof(*regs));
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:2228:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(buf + i, &val, 4);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:2228:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(buf + i, &val, 4);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:2445:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(buf, 0, buf_len);
^~~~~~
drivers/net/wireless/ath/ath10k/sdio.c:2445:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(buf, 0, buf_len);
^~~~~~
Suppressed 83 warnings (83 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.
52 warnings generated.
drivers/mmc/core/regulator.c:181:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = mmc_dev(mmc);
^~~
drivers/mmc/core/regulator.c:181:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = mmc_dev(mmc);
^~~
Suppressed 51 warnings (51 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.
41 warnings generated.
Suppressed 41 warnings (41 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.
27 warnings generated.
drivers/leds/trigger/ledtrig-timer.c:23:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%lu\n", led_cdev->blink_delay_on);
^~~~~~~
drivers/leds/trigger/ledtrig-timer.c:23:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%lu\n", led_cdev->blink_delay_on);
^~~~~~~
drivers/leds/trigger/ledtrig-timer.c:48:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%lu\n", led_cdev->blink_delay_off);
^~~~~~~
drivers/leds/trigger/ledtrig-timer.c:48:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%lu\n", led_cdev->blink_delay_off);
^~~~~~~
Suppressed 25 warnings (25 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.
52 warnings generated.
drivers/i2c/i2c-smbus.c:392:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&info, 0, sizeof(struct i2c_board_info));
^~~~~~
drivers/i2c/i2c-smbus.c:392:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&info, 0, sizeof(struct i2c_board_info));
^~~~~~
Suppressed 51 warnings (51 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.
53 warnings generated.
>> drivers/i2c/i2c-dev.c:104:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", i2c_dev->adap->name);
^~~~~~~
drivers/i2c/i2c-dev.c:104:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", i2c_dev->adap->name);
^~~~~~~
drivers/i2c/i2c-dev.c:608:2: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(client->name, I2C_NAME_SIZE, "i2c-dev %d", adap->nr);
^~~~~~~~
drivers/i2c/i2c-dev.c:608:2: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(client->name, I2C_NAME_SIZE, "i2c-dev %d", adap->nr);
^~~~~~~~
Suppressed 51 warnings (51 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.
44 warnings generated.
drivers/char/ipmi/ipmi_si_platform.c:160:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&io, 0, sizeof(io));
^~~~~~
drivers/char/ipmi/ipmi_si_platform.c:160:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&io, 0, sizeof(io));
^~~~~~
drivers/char/ipmi/ipmi_si_platform.c:334:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&io, 0, sizeof(io));
^~~~~~
drivers/char/ipmi/ipmi_si_platform.c:334:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&io, 0, sizeof(io));
^~~~~~
Suppressed 42 warnings (42 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.
42 warnings generated.
Suppressed 42 warnings (42 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.
42 warnings generated.
Suppressed 42 warnings (42 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.
46 warnings generated.
drivers/char/ipmi/ipmi_si_pci.c:78:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&io, 0, sizeof(io));
^~~~~~
drivers/char/ipmi/ipmi_si_pci.c:78:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&io, 0, sizeof(io));
^~~~~~
Suppressed 45 warnings (45 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.
54 warnings generated.
drivers/hwmon/lm90.c:995:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", !!(client->flags & I2C_CLIENT_PEC));
^~~~~~~
drivers/hwmon/lm90.c:995:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", !!(client->flags & I2C_CLIENT_PEC));
^~~~~~~
drivers/hwmon/lm90.c:1071:41: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
data->temp11[index] = temp_to_s8(val) << 8;
^
drivers/hwmon/lm90.c:1432:2: note: Control jumps to 'case hwmon_temp:' at line 1435
switch (type) {
^
drivers/hwmon/lm90.c:1436:10: note: Calling 'lm90_temp_write'
return lm90_temp_write(dev, attr, channel, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/lm90.c:1280:6: note: 'err' is 0
if (err)
^~~
drivers/hwmon/lm90.c:1280:2: note: Taking false branch
if (err)
^
drivers/hwmon/lm90.c:1283:2: note: Control jumps to 'case hwmon_temp_offset:' at line 1313
switch (attr) {
^
drivers/hwmon/lm90.c:1314:9: note: Calling 'lm90_set_temp11'
err = lm90_set_temp11(data, REMOTE_OFFSET, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/lm90.c:1061:6: note: Assuming field 'kind' is not equal to lm99
if (data->kind == lm99 && index <= 2)
^~~~~~~~~~~~~~~~~~
drivers/hwmon/lm90.c:1061:25: note: Left side of '&&' is false
if (data->kind == lm99 && index <= 2)
^
drivers/hwmon/lm90.c:1064:6: note: Assuming the condition is false
if (data->flags & LM90_HAVE_EXTENDED_TEMP)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/lm90.c:1064:2: note: Taking false branch
if (data->flags & LM90_HAVE_EXTENDED_TEMP)
^
drivers/hwmon/lm90.c:1066:11: note: Assuming field 'kind' is not equal to max6646
else if (data->kind == max6646)
^~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/lm90.c:1066:7: note: Taking false branch
else if (data->kind == max6646)
^
drivers/hwmon/lm90.c:1068:11: note: Assuming the condition is false
else if (data->flags & LM90_HAVE_REM_LIMIT_EXT)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/lm90.c:1068:7: note: Taking false branch
else if (data->flags & LM90_HAVE_REM_LIMIT_EXT)
^
drivers/hwmon/lm90.c:1071:25: note: Calling 'temp_to_s8'
data->temp11[index] = temp_to_s8(val) << 8;
^~~~~~~~~~~~~~~
drivers/hwmon/lm90.c:897:6: note: Assuming the condition is true
if (val <= -128000)
--
^~~~~~
net/netfilter/nf_conntrack_core.c:2147:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(dst_tuple, src_tuple, sizeof(*dst_tuple));
^~~~~~
net/netfilter/nf_conntrack_core.c:2147:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(dst_tuple, src_tuple, sizeof(*dst_tuple));
^~~~~~
net/netfilter/nf_conntrack_core.c:2164:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(dst_tuple, src_tuple, sizeof(*dst_tuple));
^~~~~~
net/netfilter/nf_conntrack_core.c:2164:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(dst_tuple, src_tuple, sizeof(*dst_tuple));
^~~~~~
net/netfilter/nf_conntrack_core.c:2495:2: warning: Value stored to 'old_size' is never read [clang-analyzer-deadcode.DeadStores]
old_size = nf_conntrack_htable_size;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_core.c:2495:2: note: Value stored to 'old_size' is never read
old_size = nf_conntrack_htable_size;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 113 warnings (113 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.
57 warnings generated.
drivers/hwmon/pmbus/inspur-ipsps.c:73:9: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "%s\n", data);
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:73:9: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "%s\n", data);
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:94:9: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "%u.%02u%u-%u.%02u\n",
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:94:9: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "%u.%02u%u-%u.%02u\n",
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:114:10: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "[%s] %s %s\n",
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:114:10: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "[%s] %s %s\n",
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:118:10: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "%s [%s] %s\n",
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:118:10: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "%s [%s] %s\n",
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:122:10: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "%s %s [%s]\n",
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:122:10: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "%s %s [%s]\n",
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:126:10: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "unspecified\n");
^~~~~~~~
drivers/hwmon/pmbus/inspur-ipsps.c:126:10: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "unspecified\n");
^~~~~~~~
Suppressed 51 warnings (51 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.
94 warnings generated.
drivers/net/can/dev/dev.c:987:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&bt, nla_data(data[IFLA_CAN_BITTIMING]), sizeof(bt));
^~~~~~
drivers/net/can/dev/dev.c:987:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&bt, nla_data(data[IFLA_CAN_BITTIMING]), sizeof(bt));
^~~~~~
drivers/net/can/dev/dev.c:1001:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&priv->bittiming, &bt, sizeof(bt));
^~~~~~
drivers/net/can/dev/dev.c:1001:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&priv->bittiming, &bt, sizeof(bt));
^~~~~~
drivers/net/can/dev/dev.c:1077:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&dbt, nla_data(data[IFLA_CAN_DATA_BITTIMING]),
^~~~~~
drivers/net/can/dev/dev.c:1077:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&dbt, nla_data(data[IFLA_CAN_DATA_BITTIMING]),
^~~~~~
drivers/net/can/dev/dev.c:1092:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&priv->data_bittiming, &dbt, sizeof(dbt));
^~~~~~
drivers/net/can/dev/dev.c:1092:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&priv->data_bittiming, &dbt, sizeof(dbt));
^~~~~~
Suppressed 90 warnings (90 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.
54 warnings generated.
drivers/hwmon/powr1220.c:181:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", adc_val);
^~~~~~~
drivers/hwmon/powr1220.c:181:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", adc_val);
^~~~~~~
drivers/hwmon/powr1220.c:191:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->adc_maxes[attr->index]);
^~~~~~~
drivers/hwmon/powr1220.c:191:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->adc_maxes[attr->index]);
^~~~~~~
>> drivers/hwmon/powr1220.c:201:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", input_names[attr->index]);
^~~~~~~
drivers/hwmon/powr1220.c:201:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", input_names[attr->index]);
^~~~~~~
Suppressed 51 warnings (51 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.
52 warnings generated.
Suppressed 52 warnings (52 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.
52 warnings generated.
fs/xfs/xfs_trans_buf.c:575:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(bip->bli_formats[i].blf_data_map, 0,
^~~~~~
fs/xfs/xfs_trans_buf.c:575:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(bip->bli_formats[i].blf_data_map, 0,
^~~~~~
Suppressed 51 warnings (51 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.
53 warnings generated.
fs/xfs/xfs_dquot.c:220:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(d, 0, BBTOB(q->qi_dqchunklen));
^~~~~~
fs/xfs/xfs_dquot.c:220:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(d, 0, BBTOB(q->qi_dqchunklen));
^~~~~~
Suppressed 52 warnings (52 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.
52 warnings generated.
Suppressed 52 warnings (52 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
54 warnings generated.
drivers/mfd/retu-mfd.c:214:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(®, data, sizeof(reg));
^~~~~~
drivers/mfd/retu-mfd.c:214:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(®, data, sizeof(reg));
^~~~~~
drivers/mfd/retu-mfd.c:215:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&val, data + sizeof(reg), sizeof(val));
^~~~~~
drivers/mfd/retu-mfd.c:215:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&val, data + sizeof(reg), sizeof(val));
^~~~~~
Suppressed 52 warnings (52 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.
52 warnings generated.
Suppressed 52 warnings (52 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.
53 warnings generated.
drivers/mfd/sky81452.c:47:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(cells, 0, sizeof(cells));
^~~~~~
drivers/mfd/sky81452.c:47:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(cells, 0, sizeof(cells));
^~~~~~
Suppressed 52 warnings (52 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
59 warnings generated.
drivers/nvdimm/btt.c:226:2: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(dirname, 32, "arena%d", idx);
^~~~~~~~
drivers/nvdimm/btt.c:226:2: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(dirname, 32, "arena%d", idx);
^~~~~~~~
drivers/nvdimm/btt.c:351:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(ent, &log.ent[arena->log_index[ret_ent]], LOG_ENT_SIZE);
^~~~~~
drivers/nvdimm/btt.c:351:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(ent, &log.ent[arena->log_index[ret_ent]], LOG_ENT_SIZE);
^~~~~~
drivers/nvdimm/btt.c:497:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
return ret;
^
drivers/nvdimm/btt.c:1676:6: note: Assuming field 'uuid' is non-null
if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) {
^~~~~~~~~~~~~
drivers/nvdimm/btt.c:1676:6: note: Left side of '||' is false
drivers/nvdimm/btt.c:1676:23: note: Assuming field 'ndns' is non-null
if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) {
^~~~~~~~~~~~~
drivers/nvdimm/btt.c:1676:6: note: Left side of '||' is false
if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) {
^
drivers/nvdimm/btt.c:1676:40: note: Assuming field 'lbasize' is not equal to 0
if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) {
^~~~~~~~~~~~~~~~
drivers/nvdimm/btt.c:1676:2: note: Taking false branch
if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) {
^
drivers/nvdimm/btt.c:1682:6: note: Assuming 'btt_sb' is non-null
if (!btt_sb)
^~~~~~~
drivers/nvdimm/btt.c:1682:2: note: Taking false branch
--
^
drivers/net/wireless/rsi/rsi_91x_hal.c:504:2: note: Value assigned to field 'blcmd_timer_expired', which participates in a condition later
add_timer(&adapter->bl_cmd_timer);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:847:2: note: Returning from 'bl_start_cmd_timer'
bl_start_cmd_timer(adapter, BL_CMD_TIMEOUT);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:849:9: note: Assuming field 'blcmd_timer_expired' is false
while (!adapter->blcmd_timer_expired) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:849:2: note: Loop condition is true. Entering loop body
while (!adapter->blcmd_timer_expired) {
^
drivers/net/wireless/rsi/rsi_91x_hal.c:853:7: note: Assuming 'status' is >= 0
if (status < 0) {
^~~~~~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:853:3: note: Taking false branch
if (status < 0) {
^
drivers/net/wireless/rsi/rsi_91x_hal.c:859:3: note: Left side of '&&' is true
mdelay(1);
^
include/linux/delay.h:44:3: note: expanded from macro 'mdelay'
(__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
^
drivers/net/wireless/rsi/rsi_91x_hal.c:859:3: note: 1 is <= 5
mdelay(1);
^
include/linux/delay.h:44:30: note: expanded from macro 'mdelay'
(__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
^~~
drivers/net/wireless/rsi/rsi_91x_hal.c:859:3: note: '?' condition is true
mdelay(1);
^
include/linux/delay.h:44:2: note: expanded from macro 'mdelay'
(__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
^
drivers/net/wireless/rsi/rsi_91x_hal.c:859:3: note: Taking true branch
mdelay(1);
^
include/linux/delay.h:44:52: note: expanded from macro 'mdelay'
(__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
^
include/asm-generic/delay.h:22:3: note: expanded from macro 'udelay'
if (__builtin_constant_p(n)) { \
^
drivers/net/wireless/rsi/rsi_91x_hal.c:859:3: note: Taking false branch
mdelay(1);
^
include/linux/delay.h:44:52: note: expanded from macro 'mdelay'
(__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
^
include/asm-generic/delay.h:23:4: note: expanded from macro 'udelay'
if ((n) / 20000 >= 1) \
^
drivers/net/wireless/rsi/rsi_91x_hal.c:860:7: note: Assuming the condition is true
if ((regout_val >> 8) == REGOUT_VALID)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:860:3: note: Taking true branch
if ((regout_val >> 8) == REGOUT_VALID)
^
drivers/net/wireless/rsi/rsi_91x_hal.c:861:4: note: Execution continues on line 863
break;
^
drivers/net/wireless/rsi/rsi_91x_hal.c:863:6: note: Assuming field 'blcmd_timer_expired' is false
if (adapter->blcmd_timer_expired) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:863:2: note: Taking false branch
if (adapter->blcmd_timer_expired) {
^
drivers/net/wireless/rsi/rsi_91x_hal.c:876:25: note: The result of the left shift is undefined because the left operand is negative
REGOUT_INVALID << 8),
^
drivers/net/wireless/rsi/rsi_91x_hal.c:1064:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&bootload_ds, fw_p, sizeof(struct bootload_ds));
^~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:1064:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&bootload_ds, fw_p, sizeof(struct bootload_ds));
^~~~~~
Suppressed 96 warnings (96 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.
29 warnings generated.
drivers/hwmon/adt7x10.c:235:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", ADT7X10_REG_TO_TEMP(data,
^~~~~~~
drivers/hwmon/adt7x10.c:235:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", ADT7X10_REG_TO_TEMP(data,
^~~~~~~
drivers/hwmon/adt7x10.c:278:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/adt7x10.c:278:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/adt7x10.c:315:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", !!(ret & attr->index));
^~~~~~~
drivers/hwmon/adt7x10.c:315:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", !!(ret & attr->index));
^~~~~~~
>> drivers/hwmon/adt7x10.c:323:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", data->name);
^~~~~~~
drivers/hwmon/adt7x10.c:323:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", data->name);
^~~~~~~
Suppressed 25 warnings (25 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
54 warnings generated.
Suppressed 54 warnings (54 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.
53 warnings generated.
drivers/hwmon/it87.c:863:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", in_from_reg(data, nr, data->in[nr][index]));
^~~~~~~
drivers/hwmon/it87.c:863:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", in_from_reg(data, nr, data->in[nr][index]));
^~~~~~~
drivers/hwmon/it87.c:951:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr][index]));
^~~~~~~
drivers/hwmon/it87.c:951:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr][index]));
^~~~~~~
drivers/hwmon/it87.c:1030:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "6\n"); /* Intel PECI */
^~~~~~~
drivers/hwmon/it87.c:1030:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "6\n"); /* Intel PECI */
^~~~~~~
drivers/hwmon/it87.c:1032:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "3\n"); /* thermal diode */
^~~~~~~
drivers/hwmon/it87.c:1032:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "3\n"); /* thermal diode */
^~~~~~~
drivers/hwmon/it87.c:1034:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "4\n"); /* thermistor */
^~~~~~~
drivers/hwmon/it87.c:1034:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "4\n"); /* thermistor */
^~~~~~~
drivers/hwmon/it87.c:1035:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "0\n"); /* disabled */
^~~~~~~
drivers/hwmon/it87.c:1035:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "0\n"); /* disabled */
^~~~~~~
drivers/hwmon/it87.c:1122:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", speed);
^~~~~~~
drivers/hwmon/it87.c:1122:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", speed);
^~~~~~~
drivers/hwmon/it87.c:1132:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%lu\n", DIV_FROM_REG(data->fan_div[nr]));
^~~~~~~
drivers/hwmon/it87.c:1132:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%lu\n", DIV_FROM_REG(data->fan_div[nr]));
^~~~~~~
drivers/hwmon/it87.c:1142:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", pwm_mode(data, nr));
^~~~~~~
drivers/hwmon/it87.c:1142:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", pwm_mode(data, nr));
^~~~~~~
drivers/hwmon/it87.c:1152:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/it87.c:1152:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/it87.c:1172:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", freq);
^~~~~~~
drivers/hwmon/it87.c:1172:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", freq);
^~~~~~~
drivers/hwmon/it87.c:1458:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", (int)BIT(map));
^~~~~~~
drivers/hwmon/it87.c:1458:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", (int)BIT(map));
^~~~~~~
drivers/hwmon/it87.c:1516:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/it87.c:1516:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/it87.c:1552:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->auto_pwm[nr][1] & 0x7f);
^~~~~~~
drivers/hwmon/it87.c:1552:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->auto_pwm[nr][1] & 0x7f);
^~~~~~~
drivers/hwmon/it87.c:1590:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", TEMP_FROM_REG(reg));
--
^~~~~~~
drivers/hwmon/it87.c:1870:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", (data->beeps >> bitnr) & 1);
^~~~~~~
drivers/hwmon/it87.c:1870:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", (data->beeps >> bitnr) & 1);
^~~~~~~
drivers/hwmon/it87.c:1920:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", data->vrm);
^~~~~~~
drivers/hwmon/it87.c:1920:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", data->vrm);
^~~~~~~
drivers/hwmon/it87.c:1943:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%ld\n", (long)vid_from_reg(data->vid, data->vrm));
^~~~~~~
drivers/hwmon/it87.c:1943:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%ld\n", (long)vid_from_reg(data->vid, data->vrm));
^~~~~~~
drivers/hwmon/it87.c:1973:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", label);
^~~~~~~
drivers/hwmon/it87.c:1973:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", label);
^~~~~~~
drivers/hwmon/it87.c:3311:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&sio_data, 0, sizeof(struct it87_sio_data));
^~~~~~
drivers/hwmon/it87.c:3311:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&sio_data, 0, sizeof(struct it87_sio_data));
^~~~~~
Suppressed 31 warnings (31 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
39 warnings generated.
drivers/mmc/core/sdio.c:30:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(vendor, "0x%04x\n", card->cis.vendor);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:30:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(vendor, "0x%04x\n", card->cis.vendor);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:31:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(device, "0x%04x\n", card->cis.device);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:31:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(device, "0x%04x\n", card->cis.device);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:32:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(revision, "%u.%u\n", card->major_rev, card->minor_rev);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:32:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(revision, "%u.%u\n", card->major_rev, card->minor_rev);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:33:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:33:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:34:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(rca, "0x%04x\n", card->rca);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sdio.c:34:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(rca, "0x%04x\n", card->rca);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
>> drivers/mmc/core/sdio.c:49:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_info_attr(1);
^
drivers/mmc/core/sdio.c:45:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", card->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio.c:49:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_info_attr(1);
^
drivers/mmc/core/sdio.c:45:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", card->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio.c:50:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_info_attr(2);
^
drivers/mmc/core/sdio.c:45:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", card->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio.c:50:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_info_attr(2);
^
drivers/mmc/core/sdio.c:45:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", card->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio.c:51:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_info_attr(3);
^
drivers/mmc/core/sdio.c:45:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", card->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio.c:51:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_info_attr(3);
^
drivers/mmc/core/sdio.c:45:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", card->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio.c:52:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_info_attr(4);
^
drivers/mmc/core/sdio.c:45:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", card->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio.c:52:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_info_attr(4);
^
drivers/mmc/core/sdio.c:45:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", card->info[num-1]); \
^~~~~~~
Suppressed 30 warnings (30 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.
68 warnings generated.
drivers/bus/mhi/core/main.c:203:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(buf, buf_info->v_addr, buf_info->len);
^~~~~~
drivers/bus/mhi/core/main.c:203:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(buf, buf_info->v_addr, buf_info->len);
^~~~~~
drivers/bus/mhi/core/main.c:221:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(buf_info->v_addr, buf_info->bb_addr, buf_info->len);
^~~~~~
drivers/bus/mhi/core/main.c:221:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(buf_info->v_addr, buf_info->bb_addr, buf_info->len);
^~~~~~
drivers/bus/mhi/core/main.c:284:2: warning: Value stored to 'mhi_cntrl' is never read [clang-analyzer-deadcode.DeadStores]
mhi_cntrl = mhi_dev->mhi_cntrl;
^ ~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/core/main.c:284:2: note: Value stored to 'mhi_cntrl' is never read
mhi_cntrl = mhi_dev->mhi_cntrl;
^ ~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/core/main.c:467:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &mhi_cntrl->mhi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/core/main.c:467:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = &mhi_cntrl->mhi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/core/main.c:1047:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &mhi_cntrl->mhi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/core/main.c:1047:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = &mhi_cntrl->mhi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/core/main.c:1521:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &mhi_cntrl->mhi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/core/main.c:1521:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = &mhi_cntrl->mhi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 62 warnings (61 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.
67 warnings generated.
drivers/hwmon/applesmc.c:390:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(cache->key, key, 4);
^~~~~~
drivers/hwmon/applesmc.c:390:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(cache->key, key, 4);
^~~~~~
drivers/hwmon/applesmc.c:392:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(cache->type, &info[1], 4);
^~~~~~
drivers/hwmon/applesmc.c:392:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(cache->type, &info[1], 4);
--
sound/core/seq/seq_memory.c:328:29: note: Field 'ptr' is equal to NULL
if (cell->event.data.ext.ptr == NULL)
^
sound/core/seq/seq_memory.c:328:4: note: Taking true branch
if (cell->event.data.ext.ptr == NULL)
^
sound/core/seq/seq_memory.c:330:8: note: 'tail' is null
if (tail)
^~~~
sound/core/seq/seq_memory.c:330:4: note: Taking false branch
if (tail)
^
sound/core/seq/seq_memory.c:334:8: note: Assuming 'is_chained' is not equal to 0
if (is_chained && src) {
^~~~~~~~~~
sound/core/seq/seq_memory.c:334:8: note: Left side of '&&' is true
sound/core/seq/seq_memory.c:334:22: note: Assuming 'src' is null
if (is_chained && src) {
^~~
sound/core/seq/seq_memory.c:334:8: note: Assuming pointer value is null
if (is_chained && src) {
^~~~~~~~~~~~~~~~~
sound/core/seq/seq_memory.c:334:4: note: Taking false branch
if (is_chained && src) {
^
sound/core/seq/seq_memory.c:337:15: note: Assuming 'is_usrptr' is 0
} else if (is_usrptr) {
^~~~~~~~~
sound/core/seq/seq_memory.c:337:11: note: Taking false branch
} else if (is_usrptr) {
^
sound/core/seq/seq_memory.c:343:5: note: Null pointer passed as 2nd argument to memory copy function
memcpy(&tmp->event, buf, size);
^ ~~~
Suppressed 44 warnings (44 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.
44 warnings generated.
Suppressed 44 warnings (44 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.
40 warnings generated.
drivers/mmc/core/sdio_bus.c:42:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_config_attr(class, "0x%02x\n", func->class);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:42:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_config_attr(class, "0x%02x\n", func->class);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:43:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_config_attr(vendor, "0x%04x\n", func->vendor);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:43:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_config_attr(vendor, "0x%04x\n", func->vendor);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:44:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_config_attr(device, "0x%04x\n", func->device);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:44:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_config_attr(device, "0x%04x\n", func->device);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:45:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_config_attr(revision, "%u.%u\n", func->major_rev, func->minor_rev);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:45:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_config_attr(revision, "%u.%u\n", func->major_rev, func->minor_rev);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:46:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_config_attr(modalias, "sdio:c%02Xv%04Xd%04X\n", func->class, func->vendor, func->device);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:46:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_config_attr(modalias, "sdio:c%02Xv%04Xd%04X\n", func->class, func->vendor, func->device);
^
drivers/mmc/core/sdio_bus.c:38:9: note: expanded from macro 'sdio_config_attr'
return sprintf(buf, format_string, args); \
^~~~~~~
>> drivers/mmc/core/sdio_bus.c:61:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_info_attr(1);
^
drivers/mmc/core/sdio_bus.c:57:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", func->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:61:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_info_attr(1);
^
drivers/mmc/core/sdio_bus.c:57:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", func->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:62:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_info_attr(2);
^
drivers/mmc/core/sdio_bus.c:57:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", func->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:62:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_info_attr(2);
^
drivers/mmc/core/sdio_bus.c:57:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", func->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:63:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_info_attr(3);
^
drivers/mmc/core/sdio_bus.c:57:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", func->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:63:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_info_attr(3);
^
drivers/mmc/core/sdio_bus.c:57:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", func->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:64:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sdio_info_attr(4);
^
drivers/mmc/core/sdio_bus.c:57:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", func->info[num-1]); \
^~~~~~~
drivers/mmc/core/sdio_bus.c:64:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sdio_info_attr(4);
^
drivers/mmc/core/sdio_bus.c:57:9: note: expanded from macro 'sdio_info_attr'
return sprintf(buf, "%s\n", func->info[num-1]); \
^~~~~~~
Suppressed 31 warnings (31 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.
57 warnings generated.
sound/soc/codecs/nau8824.c:845:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(prefixed_pin, sizeof(prefixed_pin), "%s %s",
^~~~~~~~
sound/soc/codecs/nau8824.c:845:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(prefixed_pin, sizeof(prefixed_pin), "%s %s",
^~~~~~~~
sound/soc/codecs/nau8824.c:860:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(prefixed_pin, sizeof(prefixed_pin), "%s %s",
^~~~~~~~
sound/soc/codecs/nau8824.c:860:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(prefixed_pin, sizeof(prefixed_pin), "%s %s",
^~~~~~~~
sound/soc/codecs/nau8824.c:1808:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = nau8824->dev;
^~~ ~~~~~~~~~~~~
sound/soc/codecs/nau8824.c:1808:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = nau8824->dev;
^~~ ~~~~~~~~~~~~
Suppressed 54 warnings (54 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.
47 warnings generated.
Suppressed 47 warnings (47 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
47 warnings generated.
Suppressed 47 warnings (47 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.
51 warnings generated.
Suppressed 51 warnings (51 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.
55 warnings generated.
sound/soc/codecs/pcm186x.c:268:19: warning: Value stored to 'format' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
snd_pcm_format_t format = params_format(params);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/pcm186x.c:268:19: note: Value stored to 'format' during its initialization is never read
snd_pcm_format_t format = params_format(params);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Suppressed 54 warnings (54 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.
51 warnings generated.
fs/ext4/dir.c:289:3: warning: Value stored to 'offset' is never read [clang-analyzer-deadcode.DeadStores]
offset = 0;
^ ~
fs/ext4/dir.c:289:3: note: Value stored to 'offset' is never read
offset = 0;
^ ~
fs/ext4/dir.c:466:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(new_fn->name, ent_name->name, ent_name->len);
--
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:678:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(scr, "%08x%08x\n", card->raw_scr[0], card->raw_scr[1]);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:678:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(scr, "%08x%08x\n", card->raw_scr[0], card->raw_scr[1]);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:679:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(ssr,
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:679:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(ssr,
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:687:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(date, "%02d/%04d\n", card->cid.month, card->cid.year);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:687:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(date, "%02d/%04d\n", card->cid.month, card->cid.year);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:688:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(erase_size, "%u\n", card->erase_size << 9);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:688:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(erase_size, "%u\n", card->erase_size << 9);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:689:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(preferred_erase_size, "%u\n", card->pref_erase << 9);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:689:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(preferred_erase_size, "%u\n", card->pref_erase << 9);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:690:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(fwrev, "0x%x\n", card->cid.fwrev);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:690:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(fwrev, "0x%x\n", card->cid.fwrev);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:691:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(hwrev, "0x%x\n", card->cid.hwrev);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:691:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(hwrev, "0x%x\n", card->cid.hwrev);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:692:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:692:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
>> drivers/mmc/core/sd.c:693:1: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:693:1: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:694:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:694:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:695:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:695:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:696:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:696:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:697:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(rca, "0x%04x\n", card->rca);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:697:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(rca, "0x%04x\n", card->rca);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:708:23: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "0x%x\n", host->dsr);
^~~~~~~
drivers/mmc/core/sd.c:708:23: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "0x%x\n", host->dsr);
^~~~~~~
drivers/mmc/core/sd.c:711:23: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "0x%x\n", 0x404);
^~~~~~~
drivers/mmc/core/sd.c:711:23: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "0x%x\n", 0x404);
^~~~~~~
drivers/mmc/core/sd.c:716:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(vendor, "0x%04x\n", card->cis.vendor);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:716:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(vendor, "0x%04x\n", card->cis.vendor);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:717:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(device, "0x%04x\n", card->cis.device);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:717:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
MMC_DEV_ATTR(device, "0x%04x\n", card->cis.device);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
^~~~~~~
drivers/mmc/core/sd.c:718:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MMC_DEV_ATTR(revision, "%u.%u\n", card->major_rev, card->minor_rev);
^
drivers/mmc/core/bus.h:20:9: note: expanded from macro 'MMC_DEV_ATTR'
return sprintf(buf, fmt, args); \
--
^~~~~~~
drivers/nvme/host/core.c:3442:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%8ph\n", dev_to_ns_head(dev)->ids.eui64);
^~~~~~~
drivers/nvme/host/core.c:3449:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", dev_to_ns_head(dev)->ns_id);
^~~~~~~
drivers/nvme/host/core.c:3449:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", dev_to_ns_head(dev)->ns_id);
^~~~~~~
drivers/nvme/host/core.c:3519:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
nvme_show_str_function(model);
^
drivers/nvme/host/core.c:3514:16: note: expanded from macro 'nvme_show_str_function'
return sprintf(buf, "%.*s\n", \
^~~~~~~
drivers/nvme/host/core.c:3519:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
nvme_show_str_function(model);
^
drivers/nvme/host/core.c:3514:16: note: expanded from macro 'nvme_show_str_function'
return sprintf(buf, "%.*s\n", \
^~~~~~~
drivers/nvme/host/core.c:3520:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
nvme_show_str_function(serial);
^
drivers/nvme/host/core.c:3514:16: note: expanded from macro 'nvme_show_str_function'
return sprintf(buf, "%.*s\n", \
^~~~~~~
drivers/nvme/host/core.c:3520:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
nvme_show_str_function(serial);
^
drivers/nvme/host/core.c:3514:16: note: expanded from macro 'nvme_show_str_function'
return sprintf(buf, "%.*s\n", \
^~~~~~~
drivers/nvme/host/core.c:3521:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
nvme_show_str_function(firmware_rev);
^
drivers/nvme/host/core.c:3514:16: note: expanded from macro 'nvme_show_str_function'
return sprintf(buf, "%.*s\n", \
^~~~~~~
drivers/nvme/host/core.c:3521:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
nvme_show_str_function(firmware_rev);
^
drivers/nvme/host/core.c:3514:16: note: expanded from macro 'nvme_show_str_function'
return sprintf(buf, "%.*s\n", \
^~~~~~~
drivers/nvme/host/core.c:3532:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
nvme_show_int_function(cntlid);
^
drivers/nvme/host/core.c:3528:16: note: expanded from macro 'nvme_show_int_function'
return sprintf(buf, "%d\n", ctrl->field); \
^~~~~~~
drivers/nvme/host/core.c:3532:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
nvme_show_int_function(cntlid);
^
drivers/nvme/host/core.c:3528:16: note: expanded from macro 'nvme_show_int_function'
return sprintf(buf, "%d\n", ctrl->field); \
^~~~~~~
drivers/nvme/host/core.c:3533:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
nvme_show_int_function(numa_node);
^
drivers/nvme/host/core.c:3528:16: note: expanded from macro 'nvme_show_int_function'
return sprintf(buf, "%d\n", ctrl->field); \
^~~~~~~
drivers/nvme/host/core.c:3533:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
nvme_show_int_function(numa_node);
^
drivers/nvme/host/core.c:3528:16: note: expanded from macro 'nvme_show_int_function'
return sprintf(buf, "%d\n", ctrl->field); \
^~~~~~~
drivers/nvme/host/core.c:3534:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
nvme_show_int_function(queue_count);
^
drivers/nvme/host/core.c:3528:16: note: expanded from macro 'nvme_show_int_function'
return sprintf(buf, "%d\n", ctrl->field); \
^~~~~~~
drivers/nvme/host/core.c:3534:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
nvme_show_int_function(queue_count);
^
drivers/nvme/host/core.c:3528:16: note: expanded from macro 'nvme_show_int_function'
return sprintf(buf, "%d\n", ctrl->field); \
^~~~~~~
drivers/nvme/host/core.c:3535:1: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
nvme_show_int_function(sqsize);
^
drivers/nvme/host/core.c:3528:16: note: expanded from macro 'nvme_show_int_function'
return sprintf(buf, "%d\n", ctrl->field); \
^~~~~~~
drivers/nvme/host/core.c:3535:1: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
nvme_show_int_function(sqsize);
^
drivers/nvme/host/core.c:3528:16: note: expanded from macro 'nvme_show_int_function'
return sprintf(buf, "%d\n", ctrl->field); \
^~~~~~~
drivers/nvme/host/core.c:3555:9: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "%s\n", ctrl->ops->name);
^~~~~~~~
drivers/nvme/host/core.c:3555:9: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "%s\n", ctrl->ops->name);
^~~~~~~~
>> drivers/nvme/host/core.c:3576:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", state_name[ctrl->state]);
^~~~~~~
drivers/nvme/host/core.c:3576:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", state_name[ctrl->state]);
^~~~~~~
drivers/nvme/host/core.c:3578:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "unknown state\n");
^~~~~~~
drivers/nvme/host/core.c:3578:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "unknown state\n");
^~~~~~~
drivers/nvme/host/core.c:3589:9: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "%s\n", ctrl->subsys->subnqn);
^~~~~~~~
drivers/nvme/host/core.c:3589:9: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "%s\n", ctrl->subsys->subnqn);
^~~~~~~~
drivers/nvme/host/core.c:3599:9: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "%s\n", ctrl->opts->host->nqn);
^~~~~~~~
drivers/nvme/host/core.c:3599:9: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "%s\n", ctrl->opts->host->nqn);
^~~~~~~~
drivers/nvme/host/core.c:3609:9: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(buf, PAGE_SIZE, "%pU\n", &ctrl->opts->host->id);
^~~~~~~~
drivers/nvme/host/core.c:3609:9: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(buf, PAGE_SIZE, "%pU\n", &ctrl->opts->host->id);
^~~~~~~~
drivers/nvme/host/core.c:3630:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "off\n");
^~~~~~~
drivers/nvme/host/core.c:3630:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "off\n");
^~~~~~~
drivers/nvme/host/core.c:3631:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/nvme/host/core.c:3631:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
drivers/nvme/host/core.c:3662:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "off\n");
^~~~~~~
drivers/nvme/host/core.c:3662:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "off\n");
^~~~~~~
drivers/nvme/host/core.c:3663:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", ctrl->opts->reconnect_delay);
^~~~~~~
drivers/nvme/host/core.c:3663:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", ctrl->opts->reconnect_delay);
^~~~~~~
drivers/nvme/host/core.c:3952:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(disk->disk_name, disk_name, DISK_NAME_LEN);
^~~~~~
drivers/nvme/host/core.c:3952:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(disk->disk_name, disk_name, DISK_NAME_LEN);
^~~~~~
drivers/nvme/host/core.c:4558:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&ctrl->ka_cmd, 0, sizeof(ctrl->ka_cmd));
^~~~~~
drivers/nvme/host/core.c:4558:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&ctrl->ka_cmd, 0, sizeof(ctrl->ka_cmd));
^~~~~~
Suppressed 76 warnings (76 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.
99 warnings generated.
net/can/isotp.c:214:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(ncf->data, so->opt.txpad_content, CAN_MAX_DLEN);
^~~~~~
net/can/isotp.c:214:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(ncf->data, so->opt.txpad_content, CAN_MAX_DLEN);
^~~~~~
net/can/isotp.c:253:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(addr, 0, sizeof(*addr));
^~~~~~
net/can/isotp.c:253:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(addr, 0, sizeof(*addr));
^~~~~~
net/can/isotp.c:434:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(skb_put(nskb, len), &cf->data[pcilen], len);
^~~~~~
net/can/isotp.c:434:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(skb_put(nskb, len), &cf->data[pcilen], len);
^~~~~~
net/can/isotp.c:573:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(skb_put(nskb, so->rx.len), so->rx.buf,
^~~~~~
net/can/isotp.c:573:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(skb_put(nskb, so->rx.len), so->rx.buf,
^~~~~~
net/can/isotp.c:700:4: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(cf->data, so->opt.txpad_content, cf->len);
^~~~~~
net/can/isotp.c:700:4: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(cf->data, so->opt.txpad_content, cf->len);
^~~~~~
net/can/isotp.c:704:4: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(cf->data, CAN_ISOTP_DEFAULT_PAD_CONTENT,
--
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:293:2: note: expanded from macro '__compiletime_assert'
do { \
^
net/sched/cls_fw.c:293:32: note: Assuming the condition is false
RCU_INIT_POINTER(fnew->next, rtnl_dereference(pfp->next));
^
include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
rcu_dereference_protected(p, lockdep_rtnl_is_held())
^
include/linux/rcupdate.h:557:2: note: expanded from macro 'rcu_dereference_protected'
__rcu_dereference_protected((p), (c), __rcu)
^
include/linux/rcupdate.h:376:19: note: expanded from macro '__rcu_dereference_protected'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/rcupdate.h:391:59: note: expanded from macro 'RCU_INITIALIZER'
#define RCU_INITIALIZER(v) (typeof(*(v)) __force __rcu *)(v)
^
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
__WRITE_ONCE(x, val); \
~~~~~~~~~~~~~~~~^~~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
*(volatile typeof(x) *)&(x) = (val); \
^~~
net/sched/cls_fw.c:293:32: note: Left side of '&&' is false
RCU_INIT_POINTER(fnew->next, rtnl_dereference(pfp->next));
^
include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
rcu_dereference_protected(p, lockdep_rtnl_is_held())
^
include/linux/rcupdate.h:557:2: note: expanded from macro 'rcu_dereference_protected'
__rcu_dereference_protected((p), (c), __rcu)
^
include/linux/rcupdate.h:376:2: note: expanded from macro '__rcu_dereference_protected'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
^
include/linux/rcupdate.h:313:11: note: expanded from macro 'RCU_LOCKDEP_WARN'
if ((c) && debug_lockdep_rcu_enabled() && !__warned) { \
^
net/sched/cls_fw.c:293:32: note: Loop condition is false. Exiting loop
RCU_INIT_POINTER(fnew->next, rtnl_dereference(pfp->next));
^
include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
rcu_dereference_protected(p, lockdep_rtnl_is_held())
^
include/linux/rcupdate.h:557:2: note: expanded from macro 'rcu_dereference_protected'
__rcu_dereference_protected((p), (c), __rcu)
^
include/linux/rcupdate.h:376:2: note: expanded from macro '__rcu_dereference_protected'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
^
include/linux/rcupdate.h:311:2: note: expanded from macro 'RCU_LOCKDEP_WARN'
do { \
^
net/sched/cls_fw.c:293:32: note: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'pfp')
RCU_INIT_POINTER(fnew->next, rtnl_dereference(pfp->next));
^
include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
rcu_dereference_protected(p, lockdep_rtnl_is_held())
^ ~
include/linux/rcupdate.h:557:2: note: expanded from macro 'rcu_dereference_protected'
__rcu_dereference_protected((p), (c), __rcu)
^ ~
include/linux/rcupdate.h:378:34: note: expanded from macro '__rcu_dereference_protected'
((typeof(*p) __force __kernel *)(p)); \
^~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/rcupdate.h:391:59: note: expanded from macro 'RCU_INITIALIZER'
#define RCU_INITIALIZER(v) (typeof(*(v)) __force __rcu *)(v)
^
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
__WRITE_ONCE(x, val); \
^~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
*(volatile typeof(x) *)&(x) = (val); \
^~~
Suppressed 77 warnings (77 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.
98 warnings generated.
net/mac80211/rc80211_minstrel_debugfs.c:71:7: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "\n");
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:71:7: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "\n");
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:72:7: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p,
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:72:7: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p,
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:74:7: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p,
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:74:7: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p,
^~~~~~~
>> net/mac80211/rc80211_minstrel_debugfs.c:87:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, " %3u%s ", mr->bitrate / 2,
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:87:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, " %3u%s ", mr->bitrate / 2,
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:89:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%3u ", i);
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:89:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%3u ", i);
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:90:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%6u ", mr->perfect_tx_time);
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:90:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%6u ", mr->perfect_tx_time);
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:96:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%4u.%1u %4u.%1u %3u.%1u"
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:96:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%4u.%1u %4u.%1u %3u.%1u"
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:108:7: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "\nTotal packet count:: ideal %d "
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:108:7: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "\nTotal packet count:: ideal %d "
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:138:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%s" ,((i == mi->max_tp_rate[0]) ? "A" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:138:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%s" ,((i == mi->max_tp_rate[0]) ? "A" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:139:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%s" ,((i == mi->max_tp_rate[1]) ? "B" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:139:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%s" ,((i == mi->max_tp_rate[1]) ? "B" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:140:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%s" ,((i == mi->max_tp_rate[2]) ? "C" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:140:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%s" ,((i == mi->max_tp_rate[2]) ? "C" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:141:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%s" ,((i == mi->max_tp_rate[3]) ? "D" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:141:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%s" ,((i == mi->max_tp_rate[3]) ? "D" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:142:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%s" ,((i == mi->max_prob_rate) ? "P" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:142:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%s" ,((i == mi->max_prob_rate) ? "P" : ""));
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:144:8: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, ",%u%s", mr->bitrate / 2,
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:144:8: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, ",%u%s", mr->bitrate / 2,
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:146:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%u,", i);
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:146:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%u,", i);
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:147:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%u,",mr->perfect_tx_time);
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:147:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%u,",mr->perfect_tx_time);
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:153:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u,%u,%u,"
^~~~~~~
net/mac80211/rc80211_minstrel_debugfs.c:153:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u,%u,%u,"
^~~~~~~
Suppressed 81 warnings (81 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.
112 warnings generated.
drivers/net/wireless/ath/ath11k/mac.c:569:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&arvif_iter, 0, sizeof(struct ath11k_vif_iter));
^~~~~~
drivers/net/wireless/ath/ath11k/mac.c:569:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&arvif_iter, 0, sizeof(struct ath11k_vif_iter));
^~~~~~
drivers/net/wireless/ath/ath11k/mac.c:1935:27: warning: Although the value stored to 'vht_mcs' is used in the enclosing expression, the value is never actually read from 'vht_mcs' [clang-analyzer-deadcode.DeadStores]
for (i = 0, max_nss = 0, vht_mcs = 0; i < NL80211_VHT_NSS_MAX; i++) {
^ ~
drivers/net/wireless/ath/ath11k/mac.c:1935:27: note: Although the value stored to 'vht_mcs' is used in the enclosing expression, the value is never actually read from 'vht_mcs'
for (i = 0, max_nss = 0, vht_mcs = 0; i < NL80211_VHT_NSS_MAX; i++) {
^ ~
drivers/net/wireless/ath/ath11k/mac.c:2256:27: warning: Although the value stored to 'he_mcs' is used in the enclosing expression, the value is never actually read from 'he_mcs' [clang-analyzer-deadcode.DeadStores]
for (i = 0, max_nss = 0, he_mcs = 0; i < NL80211_HE_NSS_MAX; i++) {
vim +2190 block/genhd.c
77ea887e433ad8 Tejun Heo 2010-12-08 2172
77ea887e433ad8 Tejun Heo 2010-12-08 2173 /*
77ea887e433ad8 Tejun Heo 2010-12-08 2174 * A disk events enabled device has the following sysfs nodes under
77ea887e433ad8 Tejun Heo 2010-12-08 2175 * its /sys/block/X/ directory.
77ea887e433ad8 Tejun Heo 2010-12-08 2176 *
77ea887e433ad8 Tejun Heo 2010-12-08 2177 * events : list of all supported events
77ea887e433ad8 Tejun Heo 2010-12-08 2178 * events_async : list of events which can be detected w/o polling
673387a930059f Martin Wilck 2019-03-27 2179 * (always empty, only for backwards compatibility)
77ea887e433ad8 Tejun Heo 2010-12-08 2180 * events_poll_msecs : polling interval, 0: disable, -1: system default
77ea887e433ad8 Tejun Heo 2010-12-08 2181 */
77ea887e433ad8 Tejun Heo 2010-12-08 2182 static ssize_t __disk_events_show(unsigned int events, char *buf)
77ea887e433ad8 Tejun Heo 2010-12-08 2183 {
77ea887e433ad8 Tejun Heo 2010-12-08 2184 const char *delim = "";
77ea887e433ad8 Tejun Heo 2010-12-08 2185 ssize_t pos = 0;
77ea887e433ad8 Tejun Heo 2010-12-08 2186 int i;
77ea887e433ad8 Tejun Heo 2010-12-08 2187
77ea887e433ad8 Tejun Heo 2010-12-08 2188 for (i = 0; i < ARRAY_SIZE(disk_events_strs); i++)
77ea887e433ad8 Tejun Heo 2010-12-08 2189 if (events & (1 << i)) {
77ea887e433ad8 Tejun Heo 2010-12-08 @2190 pos += sprintf(buf + pos, "%s%s",
77ea887e433ad8 Tejun Heo 2010-12-08 2191 delim, disk_events_strs[i]);
77ea887e433ad8 Tejun Heo 2010-12-08 2192 delim = " ";
77ea887e433ad8 Tejun Heo 2010-12-08 2193 }
77ea887e433ad8 Tejun Heo 2010-12-08 2194 if (pos)
77ea887e433ad8 Tejun Heo 2010-12-08 2195 pos += sprintf(buf + pos, "\n");
77ea887e433ad8 Tejun Heo 2010-12-08 2196 return pos;
77ea887e433ad8 Tejun Heo 2010-12-08 2197 }
77ea887e433ad8 Tejun Heo 2010-12-08 2198
:::::: The code at line 2190 was first introduced by commit
:::::: 77ea887e433ad8389d416826936c110fa7910f80 implement in-kernel gendisk events handling
:::::: TO: Tejun Heo <tj(a)kernel.org>
:::::: CC: Jens Axboe <jaxboe(a)fusionio.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
drivers/regulator/core.c:4580:9: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Zev Weiss <zev(a)bewilderbeest.net>
CC: Mark Brown <broonie(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d004b2f4fea97cde123e7f1939b80e77bf2e695
commit: 0f2d636e7d1fd76f704dd3ea5089ce29a8aee049 regulator: core: Add error flags to sysfs attributes
date: 4 weeks ago
:::::: branch date: 31 hours ago
:::::: commit date: 4 weeks ago
config: arm-randconfig-c002-20220524 (https://download.01.org/0day-ci/archive/20220529/202205291919.VwBIhbbQ-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 134d7f9a4b97e9035150d970bd9e376043c4577e)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 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 0f2d636e7d1fd76f704dd3ea5089ce29a8aee049
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~
drivers/regulator/core.c:739:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", rdev->constraints->max_uA);
^~~~~~~
drivers/regulator/core.c:749:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "constraint not defined\n");
^~~~~~~
drivers/regulator/core.c:749:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "constraint not defined\n");
^~~~~~~
drivers/regulator/core.c:751:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", rdev->constraints->min_uV);
^~~~~~~
drivers/regulator/core.c:751:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", rdev->constraints->min_uV);
^~~~~~~
drivers/regulator/core.c:761:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "constraint not defined\n");
^~~~~~~
drivers/regulator/core.c:761:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "constraint not defined\n");
^~~~~~~
drivers/regulator/core.c:763:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", rdev->constraints->max_uV);
^~~~~~~
drivers/regulator/core.c:763:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", rdev->constraints->max_uV);
^~~~~~~
drivers/regulator/core.c:780:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", uA);
^~~~~~~
drivers/regulator/core.c:780:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", uA);
^~~~~~~
drivers/regulator/core.c:788:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", rdev->use_count);
^~~~~~~
drivers/regulator/core.c:788:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", rdev->use_count);
^~~~~~~
drivers/regulator/core.c:799:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "voltage\n");
^~~~~~~
drivers/regulator/core.c:799:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "voltage\n");
^~~~~~~
drivers/regulator/core.c:801:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "current\n");
^~~~~~~
drivers/regulator/core.c:801:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "current\n");
^~~~~~~
drivers/regulator/core.c:803:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "unknown\n");
^~~~~~~
drivers/regulator/core.c:803:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "unknown\n");
^~~~~~~
drivers/regulator/core.c:812:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", rdev->constraints->state_mem.uV);
^~~~~~~
drivers/regulator/core.c:812:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", rdev->constraints->state_mem.uV);
^~~~~~~
drivers/regulator/core.c:821:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", rdev->constraints->state_disk.uV);
^~~~~~~
drivers/regulator/core.c:821:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", rdev->constraints->state_disk.uV);
^~~~~~~
drivers/regulator/core.c:830:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", rdev->constraints->state_standby.uV);
^~~~~~~
drivers/regulator/core.c:830:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", rdev->constraints->state_standby.uV);
^~~~~~~
drivers/regulator/core.c:911:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", report);
^~~~~~~
drivers/regulator/core.c:911:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", report);
^~~~~~~
drivers/regulator/core.c:1736:8: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = snprintf(buf, PAGE_SIZE,
^~~~~~~~
drivers/regulator/core.c:1736:8: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
ret = snprintf(buf, PAGE_SIZE,
^~~~~~~~
drivers/regulator/core.c:1781:10: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
size = snprintf(buf, REG_STR_SIZE, "%s-%s",
^~~~~~~~
drivers/regulator/core.c:1781:10: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
size = snprintf(buf, REG_STR_SIZE, "%s-%s",
^~~~~~~~
drivers/regulator/core.c:3830:3: warning: Value stored to 'possible_uV' is never read [clang-analyzer-deadcode.DeadStores]
possible_uV = desired_min_uV;
^ ~~~~~~~~~~~~~~
drivers/regulator/core.c:3830:3: note: Value stored to 'possible_uV' is never read
possible_uV = desired_min_uV;
^ ~~~~~~~~~~~~~~
>> drivers/regulator/core.c:4580:9: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
*flags |= cached_flags;
^
drivers/regulator/core.c:937:1: note: 'flags' declared without an initial value
REGULATOR_ERROR_ATTR(over_temp_warn, REGULATOR_ERROR_OVER_TEMP_WARN);
^
drivers/regulator/core.c:920:3: note: expanded from macro 'REGULATOR_ERROR_ATTR'
unsigned int flags; \
^~~~~~~~~~~~~~~~~~
drivers/regulator/core.c:937:1: note: Calling '_regulator_get_error_flags'
REGULATOR_ERROR_ATTR(over_temp_warn, REGULATOR_ERROR_OVER_TEMP_WARN);
^
drivers/regulator/core.c:922:9: note: expanded from macro 'REGULATOR_ERROR_ATTR'
ret = _regulator_get_error_flags(rdev, &flags); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/core.c:4575:6: note: Assuming field 'get_error_flags' is null
if (rdev->desc->ops->get_error_flags)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/core.c:4575:2: note: Taking false branch
if (rdev->desc->ops->get_error_flags)
^
drivers/regulator/core.c:4577:18: note: Field 'use_cached_err' is false
else if (!rdev->use_cached_err)
^
drivers/regulator/core.c:4577:7: note: Taking true branch
else if (!rdev->use_cached_err)
^
drivers/regulator/core.c:4580:9: note: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
*flags |= cached_flags;
~~~~~~ ^
drivers/regulator/core.c:5141:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(name, sizeof(name), "%s-%s", dev_name(parent),
^~~~~~~~
drivers/regulator/core.c:5141:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(name, sizeof(name), "%s-%s", dev_name(parent),
^~~~~~~~
Suppressed 42 warnings (42 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.
30 warnings generated.
drivers/input/touchscreen/dynapro.c:122:2: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(pdynapro->phys, sizeof(pdynapro->phys),
^~~~~~~~
drivers/input/touchscreen/dynapro.c:122:2: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(pdynapro->phys, sizeof(pdynapro->phys),
^~~~~~~~
Suppressed 29 warnings (29 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.
30 warnings generated.
drivers/input/touchscreen/gunze.c:112:2: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys);
^~~~~~~~
drivers/input/touchscreen/gunze.c:112:2: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys);
^~~~~~~~
Suppressed 29 warnings (29 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.
30 warnings generated.
drivers/input/touchscreen/inexio.c:126:2: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(pinexio->phys, sizeof(pinexio->phys), "%s/input0", serio->phys);
^~~~~~~~
drivers/input/touchscreen/inexio.c:126:2: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(pinexio->phys, sizeof(pinexio->phys), "%s/input0", serio->phys);
^~~~~~~~
Suppressed 29 warnings (29 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.
34 warnings generated.
drivers/iommu/iommu.c:420:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", group->name);
^~~~~~~
drivers/iommu/iommu.c:420:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", group->name);
^~~~~~~
drivers/iommu/iommu.c:532:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
str += sprintf(str, "0x%016llx 0x%016llx %s\n",
^~~~~~~
drivers/iommu/iommu.c:532:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
str += sprintf(str, "0x%016llx 0x%016llx %s\n",
^~~~~~~
drivers/iommu/iommu.c:569:2: 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(buf, type);
^~~~~~
drivers/iommu/iommu.c:569:2: 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(buf, type);
^~~~~~
drivers/iommu/iommu.c:1729:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(>ype, 0, sizeof(gtype));
^~~~~~
drivers/iommu/iommu.c:1729:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(>ype, 0, sizeof(gtype));
^~~~~~
Suppressed 30 warnings (30 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.
9 warnings generated.
Suppressed 9 warnings (9 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.
30 warnings generated.
Suppressed 30 warnings (30 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.
drivers/input/gameport/gameport.c:462:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", gameport->name);
vim +4580 drivers/regulator/core.c
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4565
1b5b42216469b0 Axel Haslam 2016-11-03 4566 static int _regulator_get_error_flags(struct regulator_dev *rdev,
1b5b42216469b0 Axel Haslam 2016-11-03 4567 unsigned int *flags)
1b5b42216469b0 Axel Haslam 2016-11-03 4568 {
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4569 int cached_flags, ret = 0;
1b5b42216469b0 Axel Haslam 2016-11-03 4570
66cf9a7e019273 Maciej Purski 2018-04-23 4571 regulator_lock(rdev);
1b5b42216469b0 Axel Haslam 2016-11-03 4572
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4573 cached_flags = rdev_get_cached_err_flags(rdev);
1b5b42216469b0 Axel Haslam 2016-11-03 4574
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4575 if (rdev->desc->ops->get_error_flags)
1b5b42216469b0 Axel Haslam 2016-11-03 4576 ret = rdev->desc->ops->get_error_flags(rdev, flags);
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4577 else if (!rdev->use_cached_err)
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4578 ret = -EINVAL;
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4579
7111c6d1b31b42 Matti Vaittinen 2021-06-03 @4580 *flags |= cached_flags;
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4581
66cf9a7e019273 Maciej Purski 2018-04-23 4582 regulator_unlock(rdev);
7111c6d1b31b42 Matti Vaittinen 2021-06-03 4583
1b5b42216469b0 Axel Haslam 2016-11-03 4584 return ret;
1b5b42216469b0 Axel Haslam 2016-11-03 4585 }
1b5b42216469b0 Axel Haslam 2016-11-03 4586
:::::: The code at line 4580 was first introduced by commit
:::::: 7111c6d1b31b42c8c758f6681e895a5116e3bad6 regulator: IRQ based event/error notification helpers
:::::: TO: Matti Vaittinen <matti.vaittinen(a)fi.rohmeurope.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c:56 gfxhub_v1_1_get_xgmi_info() warn: should '(((((((adev->virt.caps & (1 << 2)) && adev->gfx.rlc.funcs && adev->gfx.rlc.rlcg_reg_access_supported)) ?amdgpu_sriov_rreg(adev, adev->reg_offset[1][0][0] + 2425, 0, 1):a...
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Hawking Zhang <Hawking.Zhang(a)amd.com>
CC: Alex Deucher <alexander.deucher(a)amd.com>
CC: "Zhou, Peng Ju" <PengJu.Zhou(a)amd.com>
CC: Lijo Lazar <lijo.lazar(a)amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 664a393a2663a0f62fc1b18157ccae33dcdbb8c8
commit: 1b2dc99e2dc6f35f55f0487e12fc9166fbd023ed drm/amdgpu: switch to amdgpu_sriov_rreg/wreg
date: 4 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 4 months ago
config: arc-randconfig-m031-20220524 (https://download.01.org/0day-ci/archive/20220529/202205291815.MJ3JKjQk-lk...)
compiler: arceb-elf-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c:56 gfxhub_v1_1_get_xgmi_info() warn: should '(((((((adev->virt.caps & (1 << 2)) && adev->gfx.rlc.funcs && adev->gfx.rlc.rlcg_reg_access_supported)) ?amdgpu_sriov_rreg(adev, adev->reg_offset[1][0][0] + 2425, 0, 1):amdgpu_device_rreg(adev, (adev->reg_offset[1][0][0] + 2425), 0))) & 65535) >> 0) << 24' be a 64 bit type?
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c:530 gfxhub_v2_1_get_xgmi_info() warn: should '(((((((adev->virt.caps & (1 << 2)) && adev->gfx.rlc.funcs && adev->gfx.rlc.rlcg_reg_access_supported)) ?amdgpu_sriov_rreg(adev, adev->reg_offset[1][0][0] + 5880, 0, 1):amdgpu_device_rreg(adev, (adev->reg_offset[1][0][0] + 5880), 0))) & 131071) >> 0) << 24' be a 64 bit type?
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c:63 gfxhub_v1_1_get_xgmi_info() warn: should '(((((((adev->virt.caps & (1 << 2)) && adev->gfx.rlc.funcs && adev->gfx.rlc.rlcg_reg_access_supported)) ?amdgpu_sriov_rreg(adev, adev->reg_offset[1][0][0] + 2424, 0, 1):amdgpu_device_rreg(adev, (adev->reg_offset[1][0][0] + 2424), 0))) & 65535) >> 0) << 24' be a 64 bit type?
vim +56 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 43
21470d97c9f8bb Kevin Wang 2020-10-14 44 int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev)
bf0a60b78b61a7 Alex Deucher 2018-06-19 45 {
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 46 u32 max_num_physical_nodes;
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 47 u32 max_physical_node_id;
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 48 u32 xgmi_lfb_cntl;
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 49 u32 max_region;
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 50 u64 seg_size;
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 51
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 52 if (adev->asic_type == CHIP_ALDEBARAN) {
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 53 xgmi_lfb_cntl = RREG32_SOC15(GC, 0, mmMC_VM_XGMI_LFB_CNTL_ALDE);
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 54 seg_size = REG_GET_FIELD(
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 55 RREG32_SOC15(GC, 0, mmMC_VM_XGMI_LFB_SIZE_ALDE),
3cbb3a9749a31a Rajneesh Bhardwaj 2020-04-30 @56 MC_VM_XGMI_LFB_SIZE, PF_LFB_SIZE) << 24;
:::::: The code at line 56 was first introduced by commit
:::::: 3cbb3a9749a31a6e8549650df3d16a050acab3ca drm/amdgpu: support get xgmi information for Aldebaran
:::::: TO: Rajneesh Bhardwaj <rajneesh.bhardwaj(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
drivers/net/dsa/sja1105/sja1105_main.c:1818 sja1105_fast_age() warn: should '((((1))) << port)' be a 64 bit type?
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Vladimir Oltean <vladimir.oltean(a)nxp.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d004b2f4fea97cde123e7f1939b80e77bf2e695
commit: 5126ec72a094bd3a721941323c48cc80c60139d9 net: dsa: sja1105: add FDB fast ageing support
date: 10 months ago
:::::: branch date: 27 hours ago
:::::: commit date: 10 months ago
config: arc-randconfig-m031-20220524 (https://download.01.org/0day-ci/archive/20220529/202205291521.2PGI5RQ6-lk...)
compiler: arceb-elf-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:1818 sja1105_fast_age() warn: should '((((1))) << port)' be a 64 bit type?
Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:49 sja1105_port_allow_traffic() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:57 sja1105_can_forward() warn: should '((((1))) << to)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:129 sja1105_commit_pvid() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:255 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:267 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:276 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:285 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:291 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:298 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:530 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:531 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:552 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:553 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:676 sja1105_init_l2_forwarding_params() warn: is 'table->entries' large enough for 'struct sja1105_l2_forwarding_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:809 sja1105_init_topology() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:920 sja1105_init_avb_params() warn: is 'table->entries' large enough for 'struct sja1105_avb_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:1387 sja1105_find_static_fdb_entry() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1506 sja1105et_fdb_add() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1508 sja1105et_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1516 sja1105et_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1619 sja1105pqrs_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1629 sja1105pqrs_fdb_add() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1637 sja1105pqrs_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1710 sja1105pqrs_fdb_del() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1779 sja1105_fdb_dump() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1871 sja1105_manage_flood_domains() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1873 sja1105_manage_flood_domains() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2367 sja1105_vlan_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2368 sja1105_vlan_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2372 sja1105_vlan_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2682 sja1105_mgmt_xmit() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2990 sja1105_port_mcast_flood() warn: should '(((1))) << to' be a 64 bit type?
vim +1818 drivers/net/dsa/sja1105/sja1105_main.c
291d1e72b75642 Vladimir Oltean 2019-05-02 1796
5126ec72a094bd Vladimir Oltean 2021-08-08 1797 static void sja1105_fast_age(struct dsa_switch *ds, int port)
5126ec72a094bd Vladimir Oltean 2021-08-08 1798 {
5126ec72a094bd Vladimir Oltean 2021-08-08 1799 struct sja1105_private *priv = ds->priv;
5126ec72a094bd Vladimir Oltean 2021-08-08 1800 int i;
5126ec72a094bd Vladimir Oltean 2021-08-08 1801
5126ec72a094bd Vladimir Oltean 2021-08-08 1802 for (i = 0; i < SJA1105_MAX_L2_LOOKUP_COUNT; i++) {
5126ec72a094bd Vladimir Oltean 2021-08-08 1803 struct sja1105_l2_lookup_entry l2_lookup = {0};
5126ec72a094bd Vladimir Oltean 2021-08-08 1804 u8 macaddr[ETH_ALEN];
5126ec72a094bd Vladimir Oltean 2021-08-08 1805 int rc;
5126ec72a094bd Vladimir Oltean 2021-08-08 1806
5126ec72a094bd Vladimir Oltean 2021-08-08 1807 rc = sja1105_dynamic_config_read(priv, BLK_IDX_L2_LOOKUP,
5126ec72a094bd Vladimir Oltean 2021-08-08 1808 i, &l2_lookup);
5126ec72a094bd Vladimir Oltean 2021-08-08 1809 /* No fdb entry at i, not an issue */
5126ec72a094bd Vladimir Oltean 2021-08-08 1810 if (rc == -ENOENT)
5126ec72a094bd Vladimir Oltean 2021-08-08 1811 continue;
5126ec72a094bd Vladimir Oltean 2021-08-08 1812 if (rc) {
5126ec72a094bd Vladimir Oltean 2021-08-08 1813 dev_err(ds->dev, "Failed to read FDB: %pe\n",
5126ec72a094bd Vladimir Oltean 2021-08-08 1814 ERR_PTR(rc));
5126ec72a094bd Vladimir Oltean 2021-08-08 1815 return;
5126ec72a094bd Vladimir Oltean 2021-08-08 1816 }
5126ec72a094bd Vladimir Oltean 2021-08-08 1817
5126ec72a094bd Vladimir Oltean 2021-08-08 @1818 if (!(l2_lookup.destports & BIT(port)))
5126ec72a094bd Vladimir Oltean 2021-08-08 1819 continue;
5126ec72a094bd Vladimir Oltean 2021-08-08 1820
5126ec72a094bd Vladimir Oltean 2021-08-08 1821 /* Don't delete static FDB entries */
5126ec72a094bd Vladimir Oltean 2021-08-08 1822 if (l2_lookup.lockeds)
5126ec72a094bd Vladimir Oltean 2021-08-08 1823 continue;
5126ec72a094bd Vladimir Oltean 2021-08-08 1824
5126ec72a094bd Vladimir Oltean 2021-08-08 1825 u64_to_ether_addr(l2_lookup.macaddr, macaddr);
5126ec72a094bd Vladimir Oltean 2021-08-08 1826
5126ec72a094bd Vladimir Oltean 2021-08-08 1827 rc = sja1105_fdb_del(ds, port, macaddr, l2_lookup.vlanid);
5126ec72a094bd Vladimir Oltean 2021-08-08 1828 if (rc) {
5126ec72a094bd Vladimir Oltean 2021-08-08 1829 dev_err(ds->dev,
5126ec72a094bd Vladimir Oltean 2021-08-08 1830 "Failed to delete FDB entry %pM vid %lld: %pe\n",
5126ec72a094bd Vladimir Oltean 2021-08-08 1831 macaddr, l2_lookup.vlanid, ERR_PTR(rc));
5126ec72a094bd Vladimir Oltean 2021-08-08 1832 return;
5126ec72a094bd Vladimir Oltean 2021-08-08 1833 }
5126ec72a094bd Vladimir Oltean 2021-08-08 1834 }
5126ec72a094bd Vladimir Oltean 2021-08-08 1835 }
5126ec72a094bd Vladimir Oltean 2021-08-08 1836
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
[rostedt-trace:ftrace/core 6/53] kernel/trace/trace_events_hist.c:1540:6: warning: Branch condition evaluates to a garbage value [clang-analyzer-core.uninitialized.Branch]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Tom Zanussi <zanussi(a)kernel.org>
CC: "Steven Rostedt (Google)" <rostedt(a)goodmis.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git ftrace/core
head: b39181f7c6907dc66ff937b74758671fa6ba430c
commit: a7e6b7dcfb19988ad2968a1fafd29b600abbf133 [6/53] tracing: Separate hist state updates from hist registration
:::::: branch date: 17 hours ago
:::::: commit date: 5 weeks ago
config: i386-randconfig-c001 (https://download.01.org/0day-ci/archive/20220529/202205291406.3dAf4MFq-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 134d7f9a4b97e9035150d970bd9e376043c4577e)
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/rostedt/linux-trace.git/c...
git remote add rostedt-trace https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
git fetch --no-tags rostedt-trace ftrace/core
git checkout a7e6b7dcfb19988ad2968a1fafd29b600abbf133
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~
drivers/devfreq/devfreq.c:1750:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(df->stats.time_in_state, 0, (df->profile->max_state *
^
arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^~~~~~~~~~~~~~~~
drivers/devfreq/devfreq.c:1750:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(df->stats.time_in_state, 0, (df->profile->max_state *
^
arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^~~~~~~~~~~~~~~~
drivers/devfreq/devfreq.c:1752:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(df->stats.trans_table, 0, array3_size(sizeof(unsigned int),
^
arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^~~~~~~~~~~~~~~~
drivers/devfreq/devfreq.c:1752:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(df->stats.trans_table, 0, array3_size(sizeof(unsigned int),
^
arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^~~~~~~~~~~~~~~~
drivers/devfreq/devfreq.c:1785:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", df->profile->polling_ms);
^~~~~~~
drivers/devfreq/devfreq.c:1785:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", df->profile->polling_ms);
^~~~~~~
drivers/devfreq/devfreq.c:1799:8: warning: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = sscanf(buf, "%u", &value);
^~~~~~
drivers/devfreq/devfreq.c:1799:8: note: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11
ret = sscanf(buf, "%u", &value);
^~~~~~
drivers/devfreq/devfreq.c:1818:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", timer_name[df->profile->timer]);
^~~~~~~
drivers/devfreq/devfreq.c:1818:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", timer_name[df->profile->timer]);
^~~~~~~
drivers/devfreq/devfreq.c:1832:8: warning: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = sscanf(buf, "%16s", str_timer);
^~~~~~
drivers/devfreq/devfreq.c:1832:8: note: Call to function 'sscanf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sscanf_s' in case of C11
ret = sscanf(buf, "%16s", str_timer);
^~~~~~
Suppressed 44 warnings (44 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.
86 warnings generated.
kernel/trace/trace_events_hist.c:759:2: 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(last_cmd, HIST_PREFIX);
^~~~~~
kernel/trace/trace_events_hist.c:759:2: 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(last_cmd, HIST_PREFIX);
^~~~~~
kernel/trace/trace_events_hist.c:762:2: warning: Call to function 'strncat' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'strncat_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
strncat(last_cmd, str, len);
^~~~~~~
kernel/trace/trace_events_hist.c:762:2: note: Call to function 'strncat' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'strncat_s' in case of C11
strncat(last_cmd, str, len);
^~~~~~~
kernel/trace/trace_events_hist.c:775:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
snprintf(last_cmd_loc, MAX_FILTER_STR_VAL, HIST_PREFIX "%s:%s", system, name);
^~~~~~~~
kernel/trace/trace_events_hist.c:775:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
snprintf(last_cmd_loc, MAX_FILTER_STR_VAL, HIST_PREFIX "%s:%s", system, name);
^~~~~~~~
kernel/trace/trace_events_hist.c:1320:4: warning: Call to function 'strcat' 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 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(full_name, field->system);
^~~~~~
kernel/trace/trace_events_hist.c:1320:4: note: Call to function 'strcat' 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 'strlcat'. CWE-119
strcat(full_name, field->system);
^~~~~~
kernel/trace/trace_events_hist.c:1321:4: warning: Call to function 'strcat' 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 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(full_name, ".");
^~~~~~
kernel/trace/trace_events_hist.c:1321:4: note: Call to function 'strcat' 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 'strlcat'. CWE-119
strcat(full_name, ".");
^~~~~~
kernel/trace/trace_events_hist.c:1322:4: warning: Call to function 'strcat' 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 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(full_name, field->event_name);
^~~~~~
kernel/trace/trace_events_hist.c:1322:4: note: Call to function 'strcat' 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 'strlcat'. CWE-119
strcat(full_name, field->event_name);
^~~~~~
kernel/trace/trace_events_hist.c:1323:4: warning: Call to function 'strcat' 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 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(full_name, ".");
^~~~~~
kernel/trace/trace_events_hist.c:1323:4: note: Call to function 'strcat' 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 'strlcat'. CWE-119
strcat(full_name, ".");
^~~~~~
kernel/trace/trace_events_hist.c:1324:4: warning: Call to function 'strcat' 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 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(full_name, field->name);
^~~~~~
kernel/trace/trace_events_hist.c:1324:4: note: Call to function 'strcat' 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 'strlcat'. CWE-119
strcat(full_name, field->name);
^~~~~~
>> kernel/trace/trace_events_hist.c:1540:6: warning: Branch condition evaluates to a garbage value [clang-analyzer-core.uninitialized.Branch]
if (!attrs->keys_str) {
^
kernel/trace/trace_events_hist.c:5802:19: note: Assuming field 'ref' is > 0
if (WARN_ON_ONCE(data->ref <= 0))
^
include/asm-generic/bug.h:104:25: note: expanded from macro 'WARN_ON_ONCE'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
kernel/trace/trace_events_hist.c:5802:6: note: Taking false branch
if (WARN_ON_ONCE(data->ref <= 0))
^
include/asm-generic/bug.h:105:2: note: expanded from macro 'WARN_ON_ONCE'
if (unlikely(__ret_warn_on)) \
^
kernel/trace/trace_events_hist.c:5802:2: note: Taking false branch
if (WARN_ON_ONCE(data->ref <= 0))
^
kernel/trace/trace_events_hist.c:5805:2: note: Calling 'event_hist_trigger_free'
event_hist_trigger_free(data->named_data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_events_hist.c:5764:19: note: Assuming field 'ref' is > 0
if (WARN_ON_ONCE(data->ref <= 0))
^
include/asm-generic/bug.h:104:25: note: expanded from macro 'WARN_ON_ONCE'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
kernel/trace/trace_events_hist.c:5764:6: note: Taking false branch
if (WARN_ON_ONCE(data->ref <= 0))
^
include/asm-generic/bug.h:105:2: note: expanded from macro 'WARN_ON_ONCE'
if (unlikely(__ret_warn_on)) \
^
kernel/trace/trace_events_hist.c:5764:2: note: Taking false branch
if (WARN_ON_ONCE(data->ref <= 0))
^
kernel/trace/trace_events_hist.c:5768:6: note: Assuming field 'ref' is 0
if (!data->ref) {
^~~~~~~~~~
kernel/trace/trace_events_hist.c:5768:2: note: Taking true branch
if (!data->ref) {
^
kernel/trace/trace_events_hist.c:5769:7: note: Assuming field 'name' is null
if (data->name)
^~~~~~~~~~
kernel/trace/trace_events_hist.c:5769:3: note: Taking false branch
if (data->name)
^
kernel/trace/trace_events_hist.c:5776:3: note: Calling 'unregister_field_var_hists'
unregister_field_var_hists(hist_data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_events_hist.c:5751:14: note: Assuming 'i' is < field 'n_field_var_hists'
for (i = 0; i < hist_data->n_field_var_hists; i++) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_events_hist.c:5751:2: note: Loop condition is true. Entering loop body
for (i = 0; i < hist_data->n_field_var_hists; i++) {
^
kernel/trace/trace_events_hist.c:5754:9: note: Calling 'event_hist_trigger_parse'
ret = event_hist_trigger_parse(&trigger_hist_cmd, file,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_events_hist.c:6215:2: note: Assuming 'debug_locks' is 0
lockdep_assert_held(&event_mutex);
^
include/linux/lockdep.h:316:2: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:310:15: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
^~~~~~~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
kernel/trace/trace_events_hist.c:6215:2: note: Left side of '&&' is false
lockdep_assert_held(&event_mutex);
^
include/linux/lockdep.h:316:2: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
^
include/linux/lockdep.h:310:27: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
^
kernel/trace/trace_events_hist.c:6215:2: note: Taking false branch
lockdep_assert_held(&event_mutex);
^
include/linux/lockdep.h:316:2: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
^
include/linux/lockdep.h:310:7: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
^
include/asm-generic/bug.h:122:2: note: expanded from macro 'WARN_ON'
if (unlikely(__ret_warn_on)) \
^
kernel/trace/trace_events_hist.c:6215:2: note: Loop condition is false. Exiting loop
lockdep_assert_held(&event_mutex);
^
include/linux/lockdep.h:316:2: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
^
include/linux/lockdep.h:310:2: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
vim +1540 kernel/trace/trace_events_hist.c
9b1ae035c9304e Tom Zanussi 2018-01-15 1501
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 1502) static struct hist_trigger_attrs *
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 1503) parse_hist_trigger_attrs(struct trace_array *tr, char *trigger_str)
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1504 {
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1505 struct hist_trigger_attrs *attrs;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1506 int ret = 0;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1507
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1508 attrs = kzalloc(sizeof(*attrs), GFP_KERNEL);
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1509 if (!attrs)
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1510 return ERR_PTR(-ENOMEM);
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1511
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1512 while (trigger_str) {
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1513 char *str = strsep(&trigger_str, ":");
b527b638fd63ba Tom Zanussi 2019-06-28 1514 char *rhs;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1515
b527b638fd63ba Tom Zanussi 2019-06-28 1516 rhs = strchr(str, '=');
b527b638fd63ba Tom Zanussi 2019-06-28 1517 if (rhs) {
b527b638fd63ba Tom Zanussi 2019-06-28 1518 if (!strlen(++rhs)) {
b527b638fd63ba Tom Zanussi 2019-06-28 1519 ret = -EINVAL;
4de26c8c967d55 Tom Zanussi 2019-06-28 1520 hist_err(tr, HIST_ERR_EMPTY_ASSIGNMENT, errpos(str));
b527b638fd63ba Tom Zanussi 2019-06-28 1521 goto free;
b527b638fd63ba Tom Zanussi 2019-06-28 1522 }
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 1523) ret = parse_assignment(tr, str, attrs);
9b1ae035c9304e Tom Zanussi 2018-01-15 1524 if (ret)
9b1ae035c9304e Tom Zanussi 2018-01-15 1525 goto free;
9b1ae035c9304e Tom Zanussi 2018-01-15 1526 } else if (strcmp(str, "pause") == 0)
83e99914c9e267 Tom Zanussi 2016-03-03 1527 attrs->pause = true;
83e99914c9e267 Tom Zanussi 2016-03-03 1528 else if ((strcmp(str, "cont") == 0) ||
83e99914c9e267 Tom Zanussi 2016-03-03 1529 (strcmp(str, "continue") == 0))
83e99914c9e267 Tom Zanussi 2016-03-03 1530 attrs->cont = true;
e86ae9baacfa9e Tom Zanussi 2016-03-03 1531 else if (strcmp(str, "clear") == 0)
e86ae9baacfa9e Tom Zanussi 2016-03-03 1532 attrs->clear = true;
9b1ae035c9304e Tom Zanussi 2018-01-15 1533 else {
0212e2aa30e112 Tom Zanussi 2018-01-15 1534 ret = parse_action(str, attrs);
0212e2aa30e112 Tom Zanussi 2018-01-15 1535 if (ret)
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1536 goto free;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1537 }
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1538 }
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1539
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 @1540 if (!attrs->keys_str) {
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1541 ret = -EINVAL;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1542 goto free;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1543 }
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1544
a4072fe85ba367 Tom Zanussi 2018-01-15 1545 if (!attrs->clock) {
a4072fe85ba367 Tom Zanussi 2018-01-15 1546 attrs->clock = kstrdup("global", GFP_KERNEL);
a4072fe85ba367 Tom Zanussi 2018-01-15 1547 if (!attrs->clock) {
a4072fe85ba367 Tom Zanussi 2018-01-15 1548 ret = -ENOMEM;
a4072fe85ba367 Tom Zanussi 2018-01-15 1549 goto free;
a4072fe85ba367 Tom Zanussi 2018-01-15 1550 }
a4072fe85ba367 Tom Zanussi 2018-01-15 1551 }
a4072fe85ba367 Tom Zanussi 2018-01-15 1552
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1553 return attrs;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1554 free:
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1555 destroy_hist_trigger_attrs(attrs);
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1556
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1557 return ERR_PTR(ret);
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1558 }
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 1559
:::::: The code at line 1540 was first introduced by commit
:::::: 7ef224d1d0e3a1ade02d02c01ce1dcffb736d2c3 tracing: Add 'hist' event trigger command
:::::: TO: Tom Zanussi <tom.zanussi(a)linux.intel.com>
:::::: CC: Steven Rostedt <rostedt(a)goodmis.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
drivers/net/ethernet/intel/ice/ice_ptp.c:109:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Jacob Keller <jacob.e.keller(a)intel.com>
CC: Tony Nguyen <anthony.l.nguyen(a)intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d004b2f4fea97cde123e7f1939b80e77bf2e695
commit: 67569a7f940130fcfe9041e07a614a5263a9944d ice: report the PTP clock index in ethtool .get_ts_info
date: 12 months ago
:::::: branch date: 26 hours ago
:::::: commit date: 12 months ago
config: s390-randconfig-c005-20220524 (https://download.01.org/0day-ci/archive/20220529/202205291455.l3CbC31D-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 134d7f9a4b97e9035150d970bd9e376043c4577e)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-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 67569a7f940130fcfe9041e07a614a5263a9944d
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
if (skb_put_padto(skb, ETH_ZLEN) < 0)
^
drivers/net/ethernet/rdc/r6040.c:803:2: note: Loop condition is false. Exiting loop
spin_lock_irqsave(&lp->lock, flags);
^
include/linux/spinlock.h:384:2: note: expanded from macro 'spin_lock_irqsave'
raw_spin_lock_irqsave(spinlock_check(lock), flags); \
^
include/linux/spinlock.h:250:2: note: expanded from macro 'raw_spin_lock_irqsave'
do { \
^
drivers/net/ethernet/rdc/r6040.c:803:2: note: Loop condition is false. Exiting loop
spin_lock_irqsave(&lp->lock, flags);
^
include/linux/spinlock.h:382:43: note: expanded from macro 'spin_lock_irqsave'
#define spin_lock_irqsave(lock, flags) \
^
drivers/net/ethernet/rdc/r6040.c:806:6: note: Assuming field 'tx_free_desc' is not equal to 0
if (!lp->tx_free_desc) {
^~~~~~~~~~~~~~~~~
drivers/net/ethernet/rdc/r6040.c:806:2: note: Taking false branch
if (!lp->tx_free_desc) {
^
drivers/net/ethernet/rdc/r6040.c:825:7: note: Calling 'netdev_xmit_more'
if (!netdev_xmit_more() || netif_queue_stopped(dev))
^~~~~~~~~~~~~~~~~~
include/linux/netdevice.h:4949:9: note: Loop condition is false. Exiting loop
return __this_cpu_read(softnet_data.xmit.more);
^
include/linux/percpu-defs.h:446:2: note: expanded from macro '__this_cpu_read'
raw_cpu_read(pcp); \
^
include/linux/percpu-defs.h:420:28: note: expanded from macro 'raw_cpu_read'
#define raw_cpu_read(pcp) __pcpu_size_call_return(raw_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/linux/netdevice.h:4949:9: note: Control jumps to 'case 1:' at line 4949
return __this_cpu_read(softnet_data.xmit.more);
^
include/linux/percpu-defs.h:446:2: note: expanded from macro '__this_cpu_read'
raw_cpu_read(pcp); \
^
include/linux/percpu-defs.h:420:28: note: expanded from macro 'raw_cpu_read'
#define raw_cpu_read(pcp) __pcpu_size_call_return(raw_cpu_read_, pcp)
^
include/linux/percpu-defs.h:320:2: note: expanded from macro '__pcpu_size_call_return'
switch(sizeof(variable)) { \
^
include/linux/netdevice.h:4949:9: note: Loop condition is false. Exiting loop
return __this_cpu_read(softnet_data.xmit.more);
^
include/linux/percpu-defs.h:446:2: note: expanded from macro '__this_cpu_read'
raw_cpu_read(pcp); \
^
include/linux/percpu-defs.h:420:28: note: expanded from macro 'raw_cpu_read'
#define raw_cpu_read(pcp) __pcpu_size_call_return(raw_cpu_read_, pcp)
^
include/linux/percpu-defs.h:321:23: note: expanded from macro '__pcpu_size_call_return'
case 1: pscr_ret__ = stem##1(variable); break; \
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/asm-generic/percpu.h:67:3: note: expanded from macro 'raw_cpu_generic_read'
*raw_cpu_ptr(&(pcp)); \
^
include/linux/percpu-defs.h:241:2: note: expanded from macro 'raw_cpu_ptr'
__verify_pcpu_ptr(ptr); \
^
include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr'
#define __verify_pcpu_ptr(ptr) \
^
include/linux/netdevice.h:4949:9: note: Dereference of null pointer
return __this_cpu_read(softnet_data.xmit.more);
^
include/linux/percpu-defs.h:446:2: note: expanded from macro '__this_cpu_read'
raw_cpu_read(pcp); \
^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:420:28: note: expanded from macro 'raw_cpu_read'
#define raw_cpu_read(pcp) __pcpu_size_call_return(raw_cpu_read_, pcp)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:321:23: note: expanded from macro '__pcpu_size_call_return'
case 1: pscr_ret__ = stem##1(variable); break; \
^~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/asm-generic/percpu.h:44:31: note: expanded from macro 'arch_raw_cpu_ptr'
#define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:231:2: note: expanded from macro 'SHIFT_PERCPU_PTR'
RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:182:28: note: expanded from macro 'RELOC_HIDE'
(typeof(ptr)) (__ptr + (off)); })
^~~~~
Suppressed 26 warnings (14 in non-user code, 12 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.
29 warnings generated.
>> drivers/net/ethernet/intel/ice/ice_ptp.c:109:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ice_pf_to_dev(pf);
^~~
drivers/net/ethernet/intel/ice/ice_ptp.c:109:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ice_pf_to_dev(pf);
^~~
include/linux/time64.h:67:50: warning: The left operand of '+' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
set_normalized_timespec64(&ts_delta, lhs.tv_sec + rhs.tv_sec,
^
drivers/net/ethernet/intel/ice/ice_ptp.c:358:22: note: Left side of '&&' is false
struct ice_pf *pf = ptp_info_to_pf(info);
^
drivers/net/ethernet/intel/ice/ice_ptp.h:24:15: note: expanded from macro 'ptp_info_to_pf'
container_of(__ptp_info_to_ptp((i)), struct ice_pf, ptp)
^
drivers/net/ethernet/intel/ice/ice_ptp.h:22:2: note: expanded from macro '__ptp_info_to_ptp'
container_of((i), struct ice_ptp, info)
^
include/linux/kernel.h:716:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/net/ethernet/intel/ice/ice_ptp.c:358:22: note: Taking false branch
struct ice_pf *pf = ptp_info_to_pf(info);
^
drivers/net/ethernet/intel/ice/ice_ptp.h:24:15: note: expanded from macro 'ptp_info_to_pf'
container_of(__ptp_info_to_ptp((i)), struct ice_pf, ptp)
^
drivers/net/ethernet/intel/ice/ice_ptp.h:22:2: note: expanded from macro '__ptp_info_to_ptp'
container_of((i), struct ice_ptp, info)
^
include/linux/kernel.h:716:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:328:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:308:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
drivers/net/ethernet/intel/ice/ice_ptp.c:358:22: note: Loop condition is false. Exiting loop
struct ice_pf *pf = ptp_info_to_pf(info);
^
drivers/net/ethernet/intel/ice/ice_ptp.h:24:15: note: expanded from macro 'ptp_info_to_pf'
container_of(__ptp_info_to_ptp((i)), struct ice_pf, ptp)
^
drivers/net/ethernet/intel/ice/ice_ptp.h:22:2: note: expanded from macro '__ptp_info_to_ptp'
container_of((i), struct ice_ptp, info)
^
include/linux/kernel.h:716:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:328:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:306:2: note: expanded from macro '__compiletime_assert'
do { \
^
drivers/net/ethernet/intel/ice/ice_ptp.c:358:22: note: Left side of '&&' is false
struct ice_pf *pf = ptp_info_to_pf(info);
^
drivers/net/ethernet/intel/ice/ice_ptp.h:24:2: note: expanded from macro 'ptp_info_to_pf'
container_of(__ptp_info_to_ptp((i)), struct ice_pf, ptp)
^
include/linux/kernel.h:716:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/net/ethernet/intel/ice/ice_ptp.c:358:22: note: Taking false branch
struct ice_pf *pf = ptp_info_to_pf(info);
^
drivers/net/ethernet/intel/ice/ice_ptp.h:24:2: note: expanded from macro 'ptp_info_to_pf'
container_of(__ptp_info_to_ptp((i)), struct ice_pf, ptp)
^
include/linux/kernel.h:716: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:328:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:308:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
drivers/net/ethernet/intel/ice/ice_ptp.c:358:22: note: Loop condition is false. Exiting loop
struct ice_pf *pf = ptp_info_to_pf(info);
^
drivers/net/ethernet/intel/ice/ice_ptp.h:24:2: note: expanded from macro 'ptp_info_to_pf'
container_of(__ptp_info_to_ptp((i)), struct ice_pf, ptp)
^
vim +/dev +109 drivers/net/ethernet/intel/ice/ice_ptp.c
67569a7f940130 Jacob Keller 2021-06-09 98
67569a7f940130 Jacob Keller 2021-06-09 99 /**
67569a7f940130 Jacob Keller 2021-06-09 100 * ice_clear_ptp_clock_index - Clear the PTP clock index
67569a7f940130 Jacob Keller 2021-06-09 101 * @pf: the PF pointer
67569a7f940130 Jacob Keller 2021-06-09 102 *
67569a7f940130 Jacob Keller 2021-06-09 103 * Clear the PTP clock index for this device. Must be called when
67569a7f940130 Jacob Keller 2021-06-09 104 * unregistering the PTP clock, in order to ensure other PFs stop reporting
67569a7f940130 Jacob Keller 2021-06-09 105 * a clock object that no longer exists.
67569a7f940130 Jacob Keller 2021-06-09 106 */
67569a7f940130 Jacob Keller 2021-06-09 107 static void ice_clear_ptp_clock_index(struct ice_pf *pf)
67569a7f940130 Jacob Keller 2021-06-09 108 {
67569a7f940130 Jacob Keller 2021-06-09 @109 struct device *dev = ice_pf_to_dev(pf);
67569a7f940130 Jacob Keller 2021-06-09 110 enum ice_aqc_driver_params param_idx;
67569a7f940130 Jacob Keller 2021-06-09 111 struct ice_hw *hw = &pf->hw;
67569a7f940130 Jacob Keller 2021-06-09 112 u8 tmr_idx;
67569a7f940130 Jacob Keller 2021-06-09 113 int err;
67569a7f940130 Jacob Keller 2021-06-09 114
67569a7f940130 Jacob Keller 2021-06-09 115 /* Do not clear the index if we don't own the timer */
67569a7f940130 Jacob Keller 2021-06-09 116 if (!hw->func_caps.ts_func_info.src_tmr_owned)
67569a7f940130 Jacob Keller 2021-06-09 117 return;
67569a7f940130 Jacob Keller 2021-06-09 118
67569a7f940130 Jacob Keller 2021-06-09 119 tmr_idx = hw->func_caps.ts_func_info.tmr_index_assoc;
67569a7f940130 Jacob Keller 2021-06-09 120 if (!tmr_idx)
67569a7f940130 Jacob Keller 2021-06-09 121 param_idx = ICE_AQC_DRIVER_PARAM_CLK_IDX_TMR0;
67569a7f940130 Jacob Keller 2021-06-09 122 else
67569a7f940130 Jacob Keller 2021-06-09 123 param_idx = ICE_AQC_DRIVER_PARAM_CLK_IDX_TMR1;
67569a7f940130 Jacob Keller 2021-06-09 124
67569a7f940130 Jacob Keller 2021-06-09 125 err = ice_aq_set_driver_param(hw, param_idx, 0, NULL);
67569a7f940130 Jacob Keller 2021-06-09 126 if (err) {
67569a7f940130 Jacob Keller 2021-06-09 127 dev_dbg(dev, "Failed to clear PTP clock index parameter, err %d aq_err %s\n",
67569a7f940130 Jacob Keller 2021-06-09 128 err, ice_aq_str(hw->adminq.sq_last_status));
67569a7f940130 Jacob Keller 2021-06-09 129 }
67569a7f940130 Jacob Keller 2021-06-09 130 }
67569a7f940130 Jacob Keller 2021-06-09 131
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
Re: [PATCH v3 3/3] ext4: support flex_bg in ext4_mb_normalize_request
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220528110017.354175-4-libaokun1(a)huawei.com>
References: <20220528110017.354175-4-libaokun1(a)huawei.com>
TO: Baokun Li <libaokun1(a)huawei.com>
TO: linux-ext4(a)vger.kernel.org
CC: tytso(a)mit.edu
CC: adilger.kernel(a)dilger.ca
CC: jack(a)suse.cz
CC: ritesh.list(a)gmail.com
CC: lczerner(a)redhat.com
CC: linux-kernel(a)vger.kernel.org
CC: yi.zhang(a)huawei.com
CC: yebin10(a)huawei.com
CC: yukuai3(a)huawei.com
CC: libaokun1(a)huawei.com
Hi Baokun,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tytso-ext4/dev]
[also build test WARNING on linus/master v5.18 next-20220527]
[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/intel-lab-lkp/linux/commits/Baokun-Li/ext4-fix-two-bug...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
:::::: branch date: 18 hours ago
:::::: commit date: 18 hours ago
config: i386-randconfig-c001 (https://download.01.org/0day-ci/archive/20220529/202205291323.QpmoZoIc-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0fbe3f3f486e01448121f7931a4ca29fac1504ab)
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://github.com/intel-lab-lkp/linux/commit/24640234aaeae85de0c1b9eadec...
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Baokun-Li/ext4-fix-two-bugs-in-ext4_mb_normalize_request/20220528-184745
git checkout 24640234aaeae85de0c1b9eadec0fa29eee5927a
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^
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/ext4/mballoc.c:1295:4: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(grinfo->bb_counters, 0,
^
arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:1295:4: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(grinfo->bb_counters, 0,
^
arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:1303:4: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(data, 0xff, blocksize);
^
arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:1303:4: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(data, 0xff, blocksize);
^
arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:1316:4: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(data, bitmap, blocksize);
^
arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:1316:4: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(data, bitmap, blocksize);
^
arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:2612:27: warning: Value stored to 'grp' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct ext4_group_info *grp = ext4_get_group_info(sb, group);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:2612:27: note: Value stored to 'grp' during its initialization is never read
struct ext4_group_info *grp = ext4_get_group_info(sb, group);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:2891:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(&sg, ext4_get_group_info(sb, group), i);
^
arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:2891:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(&sg, ext4_get_group_info(sb, group), i);
^
arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:3103:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(new_groupinfo, old_groupinfo,
^
arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:3103:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(new_groupinfo, old_groupinfo,
^
arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~
fs/ext4/mballoc.c:3994:2: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
if (err)
^
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/ext4/mballoc.c:3899:9: note: 'err' declared without an initial value
int i, err;
^~~
fs/ext4/mballoc.c:3903:9: note: Assuming 'len' is <= 0
while (len > 0) {
^~~~~~~
fs/ext4/mballoc.c:3903:2: note: Loop condition is false. Execution continues on line 3994
while (len > 0) {
^
fs/ext4/mballoc.c:3994:2: note: 1st function call argument is an uninitialized value
if (err)
^
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/ext4/mballoc.c:4119:21: warning: Division by zero [clang-analyzer-core.DivideZero]
start = max(start, rounddown(ac->ac_o_ex.fe_logical, bpg));
^
include/linux/math.h:76:13: note: expanded from macro 'rounddown'
__x - (__x % (y)); \
^
include/linux/minmax.h:52:36: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(x, y, >)
~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:38:17: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:32:25: note: expanded from macro '__cmp_once'
typeof(y) unique_y = (y); \
^
fs/ext4/mballoc.c:4037:6: note: Assuming the condition is false
if (!(ac->ac_flags & EXT4_MB_HINT_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))
^~~~
fs/ext4/mballoc.c:4037:2: note: '?' condition is false
if (!(ac->ac_flags & EXT4_MB_HINT_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))
^
fs/ext4/mballoc.c:4037:2: note: '?' condition is false
if (!(ac->ac_flags & EXT4_MB_HINT_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) ? \
^
fs/ext4/mballoc.c:4037:2: note: Taking false branch
if (!(ac->ac_flags & EXT4_MB_HINT_DATA))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/ext4/mballoc.c:4041:6: note: Assuming the condition is true
if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))
^
include/linux/compiler.h:48:24: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/linux/compiler.h:33:32: 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:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
fs/ext4/mballoc.c:4041:2: note: '?' condition is false
if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))
^
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/ext4/mballoc.c:4041:2: note: '?' condition is false
if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))
^
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/ext4/mballoc.c:4041:2: note: Taking false branch
if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/ext4/mballoc.c:4046:2: note: Assuming the condition is true
if (ac->ac_flags & EXT4_MB_HINT_NOPREALLOC)
^
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))
vim +4119 fs/ext4/mballoc.c
c9de560ded61fa Alex Tomas 2008-01-29 4016
c9de560ded61fa Alex Tomas 2008-01-29 4017 /*
c9de560ded61fa Alex Tomas 2008-01-29 4018 * Normalization means making request better in terms of
c9de560ded61fa Alex Tomas 2008-01-29 4019 * size and alignment
c9de560ded61fa Alex Tomas 2008-01-29 4020 */
4ddfef7b41aebb Eric Sandeen 2008-04-29 4021 static noinline_for_stack void
4ddfef7b41aebb Eric Sandeen 2008-04-29 4022 ext4_mb_normalize_request(struct ext4_allocation_context *ac,
c9de560ded61fa Alex Tomas 2008-01-29 4023 struct ext4_allocation_request *ar)
c9de560ded61fa Alex Tomas 2008-01-29 4024 {
53accfa9f819c8 Theodore Ts'o 2011-09-09 4025 struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
c9de560ded61fa Alex Tomas 2008-01-29 4026 int bsbits, max;
c9de560ded61fa Alex Tomas 2008-01-29 4027 ext4_lblk_t end;
1592d2c5574eda Curt Wohlgemuth 2012-02-20 4028 loff_t size, start_off;
1592d2c5574eda Curt Wohlgemuth 2012-02-20 4029 loff_t orig_size __maybe_unused;
5a0790c2c4a184 Andi Kleen 2010-06-14 4030 ext4_lblk_t start;
24640234aaeae8 Baokun Li 2022-05-28 4031 ext4_lblk_t bpg;
c9de560ded61fa Alex Tomas 2008-01-29 4032 struct ext4_inode_info *ei = EXT4_I(ac->ac_inode);
9a0762c5af40e4 Aneesh Kumar K.V 2008-04-17 4033 struct ext4_prealloc_space *pa;
c9de560ded61fa Alex Tomas 2008-01-29 4034
c9de560ded61fa Alex Tomas 2008-01-29 4035 /* do normalize only data requests, metadata requests
c9de560ded61fa Alex Tomas 2008-01-29 4036 do not need preallocation */
c9de560ded61fa Alex Tomas 2008-01-29 4037 if (!(ac->ac_flags & EXT4_MB_HINT_DATA))
c9de560ded61fa Alex Tomas 2008-01-29 4038 return;
c9de560ded61fa Alex Tomas 2008-01-29 4039
c9de560ded61fa Alex Tomas 2008-01-29 4040 /* sometime caller may want exact blocks */
c9de560ded61fa Alex Tomas 2008-01-29 4041 if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))
c9de560ded61fa Alex Tomas 2008-01-29 4042 return;
c9de560ded61fa Alex Tomas 2008-01-29 4043
c9de560ded61fa Alex Tomas 2008-01-29 4044 /* caller may indicate that preallocation isn't
c9de560ded61fa Alex Tomas 2008-01-29 4045 * required (it's a tail, for example) */
c9de560ded61fa Alex Tomas 2008-01-29 4046 if (ac->ac_flags & EXT4_MB_HINT_NOPREALLOC)
c9de560ded61fa Alex Tomas 2008-01-29 4047 return;
c9de560ded61fa Alex Tomas 2008-01-29 4048
c9de560ded61fa Alex Tomas 2008-01-29 4049 if (ac->ac_flags & EXT4_MB_HINT_GROUP_ALLOC) {
c9de560ded61fa Alex Tomas 2008-01-29 4050 ext4_mb_normalize_group_request(ac);
c9de560ded61fa Alex Tomas 2008-01-29 4051 return ;
c9de560ded61fa Alex Tomas 2008-01-29 4052 }
c9de560ded61fa Alex Tomas 2008-01-29 4053
c9de560ded61fa Alex Tomas 2008-01-29 4054 bsbits = ac->ac_sb->s_blocksize_bits;
24640234aaeae8 Baokun Li 2022-05-28 4055 bpg = EXT4_BLOCKS_PER_GROUP(ac->ac_sb);
24640234aaeae8 Baokun Li 2022-05-28 4056 if (ext4_has_feature_flex_bg(ac->ac_sb) && sbi->s_log_groups_per_flex) {
24640234aaeae8 Baokun Li 2022-05-28 4057 if (check_shl_overflow(bpg, sbi->s_log_groups_per_flex, &bpg))
24640234aaeae8 Baokun Li 2022-05-28 4058 bpg = EXT_MAX_BLOCKS;
24640234aaeae8 Baokun Li 2022-05-28 4059 }
c9de560ded61fa Alex Tomas 2008-01-29 4060
c9de560ded61fa Alex Tomas 2008-01-29 4061 /* first, let's learn actual file size
c9de560ded61fa Alex Tomas 2008-01-29 4062 * given current request is allocated */
53accfa9f819c8 Theodore Ts'o 2011-09-09 4063 size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len);
c9de560ded61fa Alex Tomas 2008-01-29 4064 size = size << bsbits;
c9de560ded61fa Alex Tomas 2008-01-29 4065 if (size < i_size_read(ac->ac_inode))
c9de560ded61fa Alex Tomas 2008-01-29 4066 size = i_size_read(ac->ac_inode);
5a0790c2c4a184 Andi Kleen 2010-06-14 4067 orig_size = size;
c9de560ded61fa Alex Tomas 2008-01-29 4068
1930479c4b6bbc Valerie Clement 2008-05-13 4069 /* max size of free chunks */
1930479c4b6bbc Valerie Clement 2008-05-13 4070 max = 2 << bsbits;
c9de560ded61fa Alex Tomas 2008-01-29 4071
1930479c4b6bbc Valerie Clement 2008-05-13 4072 #define NRL_CHECK_SIZE(req, size, max, chunk_size) \
1930479c4b6bbc Valerie Clement 2008-05-13 4073 (req <= (size) || max <= (chunk_size))
c9de560ded61fa Alex Tomas 2008-01-29 4074
c9de560ded61fa Alex Tomas 2008-01-29 4075 /* first, try to predict filesize */
c9de560ded61fa Alex Tomas 2008-01-29 4076 /* XXX: should this table be tunable? */
c9de560ded61fa Alex Tomas 2008-01-29 4077 start_off = 0;
c9de560ded61fa Alex Tomas 2008-01-29 4078 if (size <= 16 * 1024) {
c9de560ded61fa Alex Tomas 2008-01-29 4079 size = 16 * 1024;
c9de560ded61fa Alex Tomas 2008-01-29 4080 } else if (size <= 32 * 1024) {
c9de560ded61fa Alex Tomas 2008-01-29 4081 size = 32 * 1024;
c9de560ded61fa Alex Tomas 2008-01-29 4082 } else if (size <= 64 * 1024) {
c9de560ded61fa Alex Tomas 2008-01-29 4083 size = 64 * 1024;
c9de560ded61fa Alex Tomas 2008-01-29 4084 } else if (size <= 128 * 1024) {
c9de560ded61fa Alex Tomas 2008-01-29 4085 size = 128 * 1024;
c9de560ded61fa Alex Tomas 2008-01-29 4086 } else if (size <= 256 * 1024) {
c9de560ded61fa Alex Tomas 2008-01-29 4087 size = 256 * 1024;
c9de560ded61fa Alex Tomas 2008-01-29 4088 } else if (size <= 512 * 1024) {
c9de560ded61fa Alex Tomas 2008-01-29 4089 size = 512 * 1024;
c9de560ded61fa Alex Tomas 2008-01-29 4090 } else if (size <= 1024 * 1024) {
c9de560ded61fa Alex Tomas 2008-01-29 4091 size = 1024 * 1024;
1930479c4b6bbc Valerie Clement 2008-05-13 4092 } else if (NRL_CHECK_SIZE(size, 4 * 1024 * 1024, max, 2 * 1024)) {
c9de560ded61fa Alex Tomas 2008-01-29 4093 start_off = ((loff_t)ac->ac_o_ex.fe_logical >>
1930479c4b6bbc Valerie Clement 2008-05-13 4094 (21 - bsbits)) << 21;
1930479c4b6bbc Valerie Clement 2008-05-13 4095 size = 2 * 1024 * 1024;
1930479c4b6bbc Valerie Clement 2008-05-13 4096 } else if (NRL_CHECK_SIZE(size, 8 * 1024 * 1024, max, 4 * 1024)) {
c9de560ded61fa Alex Tomas 2008-01-29 4097 start_off = ((loff_t)ac->ac_o_ex.fe_logical >>
c9de560ded61fa Alex Tomas 2008-01-29 4098 (22 - bsbits)) << 22;
c9de560ded61fa Alex Tomas 2008-01-29 4099 size = 4 * 1024 * 1024;
c9de560ded61fa Alex Tomas 2008-01-29 4100 } else if (NRL_CHECK_SIZE(ac->ac_o_ex.fe_len,
1930479c4b6bbc Valerie Clement 2008-05-13 4101 (8<<20)>>bsbits, max, 8 * 1024)) {
c9de560ded61fa Alex Tomas 2008-01-29 4102 start_off = ((loff_t)ac->ac_o_ex.fe_logical >>
c9de560ded61fa Alex Tomas 2008-01-29 4103 (23 - bsbits)) << 23;
c9de560ded61fa Alex Tomas 2008-01-29 4104 size = 8 * 1024 * 1024;
c9de560ded61fa Alex Tomas 2008-01-29 4105 } else {
c9de560ded61fa Alex Tomas 2008-01-29 4106 start_off = (loff_t) ac->ac_o_ex.fe_logical << bsbits;
b27b1535acc0e9 Xiaoguang Wang 2014-07-27 4107 size = (loff_t) EXT4_C2B(EXT4_SB(ac->ac_sb),
b27b1535acc0e9 Xiaoguang Wang 2014-07-27 4108 ac->ac_o_ex.fe_len) << bsbits;
c9de560ded61fa Alex Tomas 2008-01-29 4109 }
5a0790c2c4a184 Andi Kleen 2010-06-14 4110 size = size >> bsbits;
5a0790c2c4a184 Andi Kleen 2010-06-14 4111 start = start_off >> bsbits;
c9de560ded61fa Alex Tomas 2008-01-29 4112
b0c3a326d0bc0b Baokun Li 2022-05-28 4113 /*
b0c3a326d0bc0b Baokun Li 2022-05-28 4114 * For tiny groups (smaller than 8MB) the chosen allocation
b0c3a326d0bc0b Baokun Li 2022-05-28 4115 * alignment may be larger than group size. Make sure the
b0c3a326d0bc0b Baokun Li 2022-05-28 4116 * alignment does not move allocation to a different group which
b0c3a326d0bc0b Baokun Li 2022-05-28 4117 * makes mballoc fail assertions later.
b0c3a326d0bc0b Baokun Li 2022-05-28 4118 */
24640234aaeae8 Baokun Li 2022-05-28 @4119 start = max(start, rounddown(ac->ac_o_ex.fe_logical, bpg));
b0c3a326d0bc0b Baokun Li 2022-05-28 4120
c9de560ded61fa Alex Tomas 2008-01-29 4121 /* don't cover already allocated blocks in selected range */
c9de560ded61fa Alex Tomas 2008-01-29 4122 if (ar->pleft && start <= ar->lleft) {
c9de560ded61fa Alex Tomas 2008-01-29 4123 size -= ar->lleft + 1 - start;
c9de560ded61fa Alex Tomas 2008-01-29 4124 start = ar->lleft + 1;
c9de560ded61fa Alex Tomas 2008-01-29 4125 }
c9de560ded61fa Alex Tomas 2008-01-29 4126 if (ar->pright && start + size - 1 >= ar->lright)
c9de560ded61fa Alex Tomas 2008-01-29 4127 size -= start + size - ar->lright;
c9de560ded61fa Alex Tomas 2008-01-29 4128
cd648b8a8fd507 Jan Kara 2017-01-27 4129 /*
cd648b8a8fd507 Jan Kara 2017-01-27 4130 * Trim allocation request for filesystems with artificially small
cd648b8a8fd507 Jan Kara 2017-01-27 4131 * groups.
cd648b8a8fd507 Jan Kara 2017-01-27 4132 */
24640234aaeae8 Baokun Li 2022-05-28 4133 if (size > bpg)
24640234aaeae8 Baokun Li 2022-05-28 4134 size = bpg;
cd648b8a8fd507 Jan Kara 2017-01-27 4135
c9de560ded61fa Alex Tomas 2008-01-29 4136 end = start + size;
c9de560ded61fa Alex Tomas 2008-01-29 4137
c9de560ded61fa Alex Tomas 2008-01-29 4138 /* check we don't cross already preallocated blocks */
c9de560ded61fa Alex Tomas 2008-01-29 4139 rcu_read_lock();
9a0762c5af40e4 Aneesh Kumar K.V 2008-04-17 4140 list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
498e5f24158da7 Theodore Ts'o 2008-11-05 4141 ext4_lblk_t pa_end;
c9de560ded61fa Alex Tomas 2008-01-29 4142
c9de560ded61fa Alex Tomas 2008-01-29 4143 if (pa->pa_deleted)
c9de560ded61fa Alex Tomas 2008-01-29 4144 continue;
c9de560ded61fa Alex Tomas 2008-01-29 4145 spin_lock(&pa->pa_lock);
c9de560ded61fa Alex Tomas 2008-01-29 4146 if (pa->pa_deleted) {
c9de560ded61fa Alex Tomas 2008-01-29 4147 spin_unlock(&pa->pa_lock);
c9de560ded61fa Alex Tomas 2008-01-29 4148 continue;
c9de560ded61fa Alex Tomas 2008-01-29 4149 }
c9de560ded61fa Alex Tomas 2008-01-29 4150
53accfa9f819c8 Theodore Ts'o 2011-09-09 4151 pa_end = pa->pa_lstart + EXT4_C2B(EXT4_SB(ac->ac_sb),
53accfa9f819c8 Theodore Ts'o 2011-09-09 4152 pa->pa_len);
c9de560ded61fa Alex Tomas 2008-01-29 4153
c9de560ded61fa Alex Tomas 2008-01-29 4154 /* PA must not overlap original request */
c9de560ded61fa Alex Tomas 2008-01-29 4155 BUG_ON(!(ac->ac_o_ex.fe_logical >= pa_end ||
c9de560ded61fa Alex Tomas 2008-01-29 4156 ac->ac_o_ex.fe_logical < pa->pa_lstart));
c9de560ded61fa Alex Tomas 2008-01-29 4157
38877f4e8dbbec Eric Sandeen 2009-08-17 4158 /* skip PAs this normalized request doesn't overlap with */
38877f4e8dbbec Eric Sandeen 2009-08-17 4159 if (pa->pa_lstart >= end || pa_end <= start) {
c9de560ded61fa Alex Tomas 2008-01-29 4160 spin_unlock(&pa->pa_lock);
c9de560ded61fa Alex Tomas 2008-01-29 4161 continue;
c9de560ded61fa Alex Tomas 2008-01-29 4162 }
c9de560ded61fa Alex Tomas 2008-01-29 4163 BUG_ON(pa->pa_lstart <= start && pa_end >= end);
c9de560ded61fa Alex Tomas 2008-01-29 4164
38877f4e8dbbec Eric Sandeen 2009-08-17 4165 /* adjust start or end to be adjacent to this pa */
c9de560ded61fa Alex Tomas 2008-01-29 4166 if (pa_end <= ac->ac_o_ex.fe_logical) {
c9de560ded61fa Alex Tomas 2008-01-29 4167 BUG_ON(pa_end < start);
c9de560ded61fa Alex Tomas 2008-01-29 4168 start = pa_end;
38877f4e8dbbec Eric Sandeen 2009-08-17 4169 } else if (pa->pa_lstart > ac->ac_o_ex.fe_logical) {
c9de560ded61fa Alex Tomas 2008-01-29 4170 BUG_ON(pa->pa_lstart > end);
c9de560ded61fa Alex Tomas 2008-01-29 4171 end = pa->pa_lstart;
c9de560ded61fa Alex Tomas 2008-01-29 4172 }
c9de560ded61fa Alex Tomas 2008-01-29 4173 spin_unlock(&pa->pa_lock);
c9de560ded61fa Alex Tomas 2008-01-29 4174 }
c9de560ded61fa Alex Tomas 2008-01-29 4175 rcu_read_unlock();
c9de560ded61fa Alex Tomas 2008-01-29 4176 size = end - start;
c9de560ded61fa Alex Tomas 2008-01-29 4177
c9de560ded61fa Alex Tomas 2008-01-29 4178 /* XXX: extra loop to check we really don't overlap preallocations */
c9de560ded61fa Alex Tomas 2008-01-29 4179 rcu_read_lock();
9a0762c5af40e4 Aneesh Kumar K.V 2008-04-17 4180 list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
498e5f24158da7 Theodore Ts'o 2008-11-05 4181 ext4_lblk_t pa_end;
53accfa9f819c8 Theodore Ts'o 2011-09-09 4182
c9de560ded61fa Alex Tomas 2008-01-29 4183 spin_lock(&pa->pa_lock);
c9de560ded61fa Alex Tomas 2008-01-29 4184 if (pa->pa_deleted == 0) {
53accfa9f819c8 Theodore Ts'o 2011-09-09 4185 pa_end = pa->pa_lstart + EXT4_C2B(EXT4_SB(ac->ac_sb),
53accfa9f819c8 Theodore Ts'o 2011-09-09 4186 pa->pa_len);
c9de560ded61fa Alex Tomas 2008-01-29 4187 BUG_ON(!(start >= pa_end || end <= pa->pa_lstart));
c9de560ded61fa Alex Tomas 2008-01-29 4188 }
c9de560ded61fa Alex Tomas 2008-01-29 4189 spin_unlock(&pa->pa_lock);
c9de560ded61fa Alex Tomas 2008-01-29 4190 }
c9de560ded61fa Alex Tomas 2008-01-29 4191 rcu_read_unlock();
c9de560ded61fa Alex Tomas 2008-01-29 4192
7354605bc16dc1 Baokun Li 2022-05-28 4193 /*
7354605bc16dc1 Baokun Li 2022-05-28 4194 * In this function "start" and "size" are normalized for better
7354605bc16dc1 Baokun Li 2022-05-28 4195 * alignment and length such that we could preallocate more blocks.
7354605bc16dc1 Baokun Li 2022-05-28 4196 * This normalization is done such that original request of
7354605bc16dc1 Baokun Li 2022-05-28 4197 * ac->ac_o_ex.fe_logical & fe_len should always lie within "start" and
7354605bc16dc1 Baokun Li 2022-05-28 4198 * "size" boundaries.
7354605bc16dc1 Baokun Li 2022-05-28 4199 * (Note fe_len can be relaxed since FS block allocation API does not
7354605bc16dc1 Baokun Li 2022-05-28 4200 * provide gurantee on number of contiguous blocks allocation since that
7354605bc16dc1 Baokun Li 2022-05-28 4201 * depends upon free space left, etc).
7354605bc16dc1 Baokun Li 2022-05-28 4202 * In case of inode pa, later we use the allocated blocks
7354605bc16dc1 Baokun Li 2022-05-28 4203 * [pa_start + fe_logical - pa_lstart, fe_len/size] from the preallocated
7354605bc16dc1 Baokun Li 2022-05-28 4204 * range of goal/best blocks [start, size] to put it at the
7354605bc16dc1 Baokun Li 2022-05-28 4205 * ac_o_ex.fe_logical extent of this inode.
7354605bc16dc1 Baokun Li 2022-05-28 4206 * (See ext4_mb_use_inode_pa() for more details)
7354605bc16dc1 Baokun Li 2022-05-28 4207 */
7354605bc16dc1 Baokun Li 2022-05-28 4208 if (start + size <= ac->ac_o_ex.fe_logical ||
c9de560ded61fa Alex Tomas 2008-01-29 4209 start > ac->ac_o_ex.fe_logical) {
9d8b9ec44234b2 Theodore Ts'o 2011-08-01 4210 ext4_msg(ac->ac_sb, KERN_ERR,
9d8b9ec44234b2 Theodore Ts'o 2011-08-01 4211 "start %lu, size %lu, fe_logical %lu",
c9de560ded61fa Alex Tomas 2008-01-29 4212 (unsigned long) start, (unsigned long) size,
c9de560ded61fa Alex Tomas 2008-01-29 4213 (unsigned long) ac->ac_o_ex.fe_logical);
dfe076c106f63c Dmitry Monakhov 2014-10-01 4214 BUG();
c9de560ded61fa Alex Tomas 2008-01-29 4215 }
24640234aaeae8 Baokun Li 2022-05-28 4216 BUG_ON(size <= 0 || size > bpg);
c9de560ded61fa Alex Tomas 2008-01-29 4217
c9de560ded61fa Alex Tomas 2008-01-29 4218 /* now prepare goal request */
c9de560ded61fa Alex Tomas 2008-01-29 4219
c9de560ded61fa Alex Tomas 2008-01-29 4220 /* XXX: is it better to align blocks WRT to logical
c9de560ded61fa Alex Tomas 2008-01-29 4221 * placement or satisfy big request as is */
c9de560ded61fa Alex Tomas 2008-01-29 4222 ac->ac_g_ex.fe_logical = start;
53accfa9f819c8 Theodore Ts'o 2011-09-09 4223 ac->ac_g_ex.fe_len = EXT4_NUM_B2C(sbi, size);
c9de560ded61fa Alex Tomas 2008-01-29 4224
c9de560ded61fa Alex Tomas 2008-01-29 4225 /* define goal start in order to merge */
c9de560ded61fa Alex Tomas 2008-01-29 4226 if (ar->pright && (ar->lright == (start + size))) {
c9de560ded61fa Alex Tomas 2008-01-29 4227 /* merge to the right */
c9de560ded61fa Alex Tomas 2008-01-29 4228 ext4_get_group_no_and_offset(ac->ac_sb, ar->pright - size,
c9de560ded61fa Alex Tomas 2008-01-29 4229 &ac->ac_f_ex.fe_group,
c9de560ded61fa Alex Tomas 2008-01-29 4230 &ac->ac_f_ex.fe_start);
c9de560ded61fa Alex Tomas 2008-01-29 4231 ac->ac_flags |= EXT4_MB_HINT_TRY_GOAL;
c9de560ded61fa Alex Tomas 2008-01-29 4232 }
c9de560ded61fa Alex Tomas 2008-01-29 4233 if (ar->pleft && (ar->lleft + 1 == start)) {
c9de560ded61fa Alex Tomas 2008-01-29 4234 /* merge to the left */
c9de560ded61fa Alex Tomas 2008-01-29 4235 ext4_get_group_no_and_offset(ac->ac_sb, ar->pleft + 1,
c9de560ded61fa Alex Tomas 2008-01-29 4236 &ac->ac_f_ex.fe_group,
c9de560ded61fa Alex Tomas 2008-01-29 4237 &ac->ac_f_ex.fe_start);
c9de560ded61fa Alex Tomas 2008-01-29 4238 ac->ac_flags |= EXT4_MB_HINT_TRY_GOAL;
c9de560ded61fa Alex Tomas 2008-01-29 4239 }
c9de560ded61fa Alex Tomas 2008-01-29 4240
d3df14535f4a5b Ritesh Harjani 2020-05-10 4241 mb_debug(ac->ac_sb, "goal: %lld(was %lld) blocks at %u\n", size,
d3df14535f4a5b Ritesh Harjani 2020-05-10 4242 orig_size, start);
c9de560ded61fa Alex Tomas 2008-01-29 4243 }
c9de560ded61fa Alex Tomas 2008-01-29 4244
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
drivers/hwmon/nct6775-core.c:2104:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or ...
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Zev Weiss <zev(a)bewilderbeest.net>
CC: Guenter Roeck <linux(a)roeck-us.net>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d004b2f4fea97cde123e7f1939b80e77bf2e695
commit: c3963bc0a0cf9ecb205a9d4976eb92b6df2fa3fd hwmon: (nct6775) Split core and platform driver
date: 8 days ago
:::::: branch date: 24 hours ago
:::::: commit date: 8 days ago
config: arm-randconfig-c002-20220524 (https://download.01.org/0day-ci/archive/20220529/202205291231.PyXFLjeQ-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 134d7f9a4b97e9035150d970bd9e376043c4577e)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 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 c3963bc0a0cf9ecb205a9d4976eb92b6df2fa3fd
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
drivers/hwmon/nct6775-core.c:1415:7: note: Assuming the condition is false
if (!data->target_speed[i] ||
^~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/nct6775-core.c:1415:7: note: Left side of '||' is false
drivers/hwmon/nct6775-core.c:1416:7: note: Assuming the condition is false
data->pwm_enable[i] == speed_cruise) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/nct6775-core.c:1415:3: note: Taking false branch
if (!data->target_speed[i] ||
^
drivers/hwmon/nct6775-core.c:1426:15: note: Assuming 'j' is >= field 'auto_pwm_num'
for (j = 0; j < data->auto_pwm_num; j++) {
^~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/nct6775-core.c:1426:3: note: Loop condition is false. Execution continues on line 1439
for (j = 0; j < data->auto_pwm_num; j++) {
^
drivers/hwmon/nct6775-core.c:1439:9: note: Calling 'nct6775_read_value'
err = nct6775_read_value(data, data->REG_CRITICAL_TEMP[i], ®);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/nct6775.h:189:6: note: Assuming 'ret' is 0, which participates in a condition later
if (!ret)
^~~~
drivers/hwmon/nct6775.h:189:2: note: Taking true branch
if (!ret)
^
drivers/hwmon/nct6775.h:191:2: note: Returning without writing to 'data->kind', which participates in a condition later
return ret;
^
drivers/hwmon/nct6775.h:191:2: note: Returning zero (loaded from 'ret'), which participates in a condition later
return ret;
^~~~~~~~~~
drivers/hwmon/nct6775-core.c:1439:9: note: Returning from 'nct6775_read_value'
err = nct6775_read_value(data, data->REG_CRITICAL_TEMP[i], ®);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/nct6775-core.c:1440:7: note: 'err' is 0
if (err)
^~~
drivers/hwmon/nct6775-core.c:1440:3: note: Taking false branch
if (err)
^
drivers/hwmon/nct6775-core.c:1444:3: note: Control jumps to 'case nct6775:' at line 1445
switch (data->kind) {
^
drivers/hwmon/nct6775-core.c:1446:10: note: 2nd function call argument is an uninitialized value
err = nct6775_read_value(data, NCT6775_REG_CRITICAL_ENAB[i], ®);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/nct6775-core.c:1633:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%ld\n", in_from_reg(data->in[nr][index], nr));
^~~~~~~
drivers/hwmon/nct6775-core.c:1633:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%ld\n", in_from_reg(data->in[nr][index], nr));
^~~~~~~
drivers/hwmon/nct6775-core.c:1668:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:1668:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:1711:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", alarm);
^~~~~~~
drivers/hwmon/nct6775-core.c:1711:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", alarm);
^~~~~~~
drivers/hwmon/nct6775-core.c:1726:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:1726:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:1781:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", beep);
^~~~~~~
drivers/hwmon/nct6775-core.c:1781:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", beep);
^~~~~~~
drivers/hwmon/nct6775-core.c:1867:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->rpm[nr]);
^~~~~~~
drivers/hwmon/nct6775-core.c:1867:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->rpm[nr]);
^~~~~~~
drivers/hwmon/nct6775-core.c:1880:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:1880:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:1895:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%u\n", div_from_reg(data->fan_div[nr]));
^~~~~~~
drivers/hwmon/nct6775-core.c:1895:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%u\n", div_from_reg(data->fan_div[nr]));
^~~~~~~
drivers/hwmon/nct6775-core.c:2005:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", p ? : 4);
^~~~~~~
drivers/hwmon/nct6775-core.c:2005:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", p ? : 4);
^~~~~~~
>> drivers/hwmon/nct6775-core.c:2104:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%s\n", data->temp_label[data->temp_src[nr]]);
^~~~~~~
drivers/hwmon/nct6775-core.c:2104:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%s\n", data->temp_label[data->temp_src[nr]]);
^~~~~~~
drivers/hwmon/nct6775-core.c:2118:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", LM75_TEMP_FROM_REG(data->temp[index][nr]));
^~~~~~~
drivers/hwmon/nct6775-core.c:2118:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", LM75_TEMP_FROM_REG(data->temp[index][nr]));
^~~~~~~
drivers/hwmon/nct6775-core.c:2152:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->temp_offset[sattr->index] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:2152:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->temp_offset[sattr->index] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:2189:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", (int)data->temp_type[nr]);
^~~~~~~
drivers/hwmon/nct6775-core.c:2189:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", (int)data->temp_type[nr]);
^~~~~~~
drivers/hwmon/nct6775-core.c:2375:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->pwm_mode[sattr->index]);
^~~~~~~
drivers/hwmon/nct6775-core.c:2375:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->pwm_mode[sattr->index]);
^~~~~~~
drivers/hwmon/nct6775-core.c:2442:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", pwm);
^~~~~~~
drivers/hwmon/nct6775-core.c:2442:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", pwm);
^~~~~~~
drivers/hwmon/nct6775-core.c:2567:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->pwm_enable[sattr->index]);
^~~~~~~
drivers/hwmon/nct6775-core.c:2567:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->pwm_enable[sattr->index]);
^~~~~~~
drivers/hwmon/nct6775-core.c:2636:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", sel);
^~~~~~~
drivers/hwmon/nct6775-core.c:2636:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", sel);
^~~~~~~
drivers/hwmon/nct6775-core.c:2761:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->target_temp[sattr->index] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:2761:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->target_temp[sattr->index] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:2798:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:2798:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:2840:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->temp_tolerance[index][nr] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:2840:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->temp_tolerance[index][nr] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:2907:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", tolerance);
^~~~~~~
drivers/hwmon/nct6775-core.c:2907:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", tolerance);
^~~~~~~
drivers/hwmon/nct6775-core.c:2967:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->weight_temp[index][nr] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:2967:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->weight_temp[index][nr] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:3016:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:3016:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/nct6775-core.c:3053:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->auto_pwm[sattr->nr][sattr->index]);
^~~~~~~
drivers/hwmon/nct6775-core.c:3053:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->auto_pwm[sattr->nr][sattr->index]);
^~~~~~~
drivers/hwmon/nct6775-core.c:3144:9: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", data->auto_temp[nr][point] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:3144:9: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", data->auto_temp[nr][point] * 1000);
^~~~~~~
drivers/hwmon/nct6775-core.c:3964:9: warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
err = nct6775_read_value(data, data->REG_TEMP_SOURCE[i], &src);
^ ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/nct6775-core.c:3415:2: note: Taking false branch
if (IS_ERR(data->regmap))
vim +2104 drivers/hwmon/nct6775-core.c
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2093
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2094 static ssize_t
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2095 show_temp_label(struct device *dev, struct device_attribute *attr, char *buf)
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2096 {
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2097 struct nct6775_data *data = nct6775_update_device(dev);
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2098 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr);
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2099 int nr = sattr->index;
9cd892bcbe32fe drivers/hwmon/nct6775.c Guenter Roeck 2014-11-16 2100
4ef2774511dc6e drivers/hwmon/nct6775.c Zev Weiss 2022-04-26 2101 if (IS_ERR(data))
4ef2774511dc6e drivers/hwmon/nct6775.c Zev Weiss 2022-04-26 2102 return PTR_ERR(data);
4ef2774511dc6e drivers/hwmon/nct6775.c Zev Weiss 2022-04-26 2103
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 @2104 return sprintf(buf, "%s\n", data->temp_label[data->temp_src[nr]]);
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2105 }
aa136e5dad9fbe drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 2106
:::::: The code at line 2104 was first introduced by commit
:::::: aa136e5dad9fbec9e98867278555a81f2d75ea10 hwmon: (nct6775) Add support for temperature sensors
:::::: TO: Guenter Roeck <linux(a)roeck-us.net>
:::::: CC: Guenter Roeck <linux(a)roeck-us.net>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
drivers/net/dsa/sja1105/sja1105_main.c:521 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Vladimir Oltean <vladimir.oltean(a)nxp.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d004b2f4fea97cde123e7f1939b80e77bf2e695
commit: 3fa212707b8e6026cea6a92faea87f556e0cba9b net: dsa: sja1105: manage the forwarding domain towards DSA ports
date: 10 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 10 months ago
config: arc-randconfig-m031-20220524 (https://download.01.org/0day-ci/archive/20220529/202205291142.dQeOKrZs-lk...)
compiler: arceb-elf-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:521 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:49 sja1105_port_allow_traffic() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:57 sja1105_can_forward() warn: should '((((1))) << to)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:129 sja1105_commit_pvid() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:248 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:260 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:269 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:278 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:284 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:291 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:522 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:543 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:544 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:640 sja1105_init_l2_forwarding_params() warn: is 'table->entries' large enough for 'struct sja1105_l2_forwarding_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:773 sja1105_init_topology() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:884 sja1105_init_avb_params() warn: is 'table->entries' large enough for 'struct sja1105_avb_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:1351 sja1105_find_static_fdb_entry() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1469 sja1105et_fdb_add() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1471 sja1105et_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1479 sja1105et_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1565 sja1105pqrs_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1573 sja1105pqrs_fdb_add() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1578 sja1105pqrs_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1628 sja1105pqrs_fdb_del() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1697 sja1105_fdb_dump() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1749 sja1105_manage_flood_domains() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1751 sja1105_manage_flood_domains() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2244 sja1105_vlan_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2245 sja1105_vlan_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2249 sja1105_vlan_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2558 sja1105_mgmt_xmit() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2876 sja1105_port_mcast_flood() warn: should '(((1))) << to' be a 64 bit type?
vim +521 drivers/net/dsa/sja1105/sja1105_main.c
8aa9ebccae8762 Vladimir Oltean 2019-05-02 472
8aa9ebccae8762 Vladimir Oltean 2019-05-02 473 static int sja1105_init_l2_forwarding(struct sja1105_private *priv)
8aa9ebccae8762 Vladimir Oltean 2019-05-02 474 {
8aa9ebccae8762 Vladimir Oltean 2019-05-02 475 struct sja1105_l2_forwarding_entry *l2fwd;
542043e91df452 Vladimir Oltean 2021-05-24 476 struct dsa_switch *ds = priv->ds;
8aa9ebccae8762 Vladimir Oltean 2019-05-02 477 struct sja1105_table *table;
3fa212707b8e60 Vladimir Oltean 2021-08-04 478 int port, tc;
3fa212707b8e60 Vladimir Oltean 2021-08-04 479 int from, to;
8aa9ebccae8762 Vladimir Oltean 2019-05-02 480
8aa9ebccae8762 Vladimir Oltean 2019-05-02 481 table = &priv->static_config.tables[BLK_IDX_L2_FORWARDING];
8aa9ebccae8762 Vladimir Oltean 2019-05-02 482
8aa9ebccae8762 Vladimir Oltean 2019-05-02 483 if (table->entry_count) {
8aa9ebccae8762 Vladimir Oltean 2019-05-02 484 kfree(table->entries);
8aa9ebccae8762 Vladimir Oltean 2019-05-02 485 table->entry_count = 0;
8aa9ebccae8762 Vladimir Oltean 2019-05-02 486 }
8aa9ebccae8762 Vladimir Oltean 2019-05-02 487
fd6f2c257b0bc0 Vladimir Oltean 2021-05-24 488 table->entries = kcalloc(table->ops->max_entry_count,
8aa9ebccae8762 Vladimir Oltean 2019-05-02 489 table->ops->unpacked_entry_size, GFP_KERNEL);
8aa9ebccae8762 Vladimir Oltean 2019-05-02 490 if (!table->entries)
8aa9ebccae8762 Vladimir Oltean 2019-05-02 491 return -ENOMEM;
8aa9ebccae8762 Vladimir Oltean 2019-05-02 492
fd6f2c257b0bc0 Vladimir Oltean 2021-05-24 493 table->entry_count = table->ops->max_entry_count;
8aa9ebccae8762 Vladimir Oltean 2019-05-02 494
8aa9ebccae8762 Vladimir Oltean 2019-05-02 495 l2fwd = table->entries;
8aa9ebccae8762 Vladimir Oltean 2019-05-02 496
3fa212707b8e60 Vladimir Oltean 2021-08-04 497 /* First 5 entries in the L2 Forwarding Table define the forwarding
3fa212707b8e60 Vladimir Oltean 2021-08-04 498 * rules and the VLAN PCP to ingress queue mapping.
3fa212707b8e60 Vladimir Oltean 2021-08-04 499 * Set up the ingress queue mapping first.
3fa212707b8e60 Vladimir Oltean 2021-08-04 500 */
3fa212707b8e60 Vladimir Oltean 2021-08-04 501 for (port = 0; port < ds->num_ports; port++) {
3fa212707b8e60 Vladimir Oltean 2021-08-04 502 if (dsa_is_unused_port(ds, port))
3fa212707b8e60 Vladimir Oltean 2021-08-04 503 continue;
3fa212707b8e60 Vladimir Oltean 2021-08-04 504
3fa212707b8e60 Vladimir Oltean 2021-08-04 505 for (tc = 0; tc < SJA1105_NUM_TC; tc++)
3fa212707b8e60 Vladimir Oltean 2021-08-04 506 l2fwd[port].vlan_pmap[tc] = tc;
3fa212707b8e60 Vladimir Oltean 2021-08-04 507 }
8aa9ebccae8762 Vladimir Oltean 2019-05-02 508
3fa212707b8e60 Vladimir Oltean 2021-08-04 509 /* Then manage the forwarding domain for user ports. These can forward
3fa212707b8e60 Vladimir Oltean 2021-08-04 510 * only to the always-on domain (CPU port and DSA links)
3fa212707b8e60 Vladimir Oltean 2021-08-04 511 */
3fa212707b8e60 Vladimir Oltean 2021-08-04 512 for (from = 0; from < ds->num_ports; from++) {
3fa212707b8e60 Vladimir Oltean 2021-08-04 513 if (!dsa_is_user_port(ds, from))
f238fef1b3de2f Vladimir Oltean 2021-05-24 514 continue;
f238fef1b3de2f Vladimir Oltean 2021-05-24 515
3fa212707b8e60 Vladimir Oltean 2021-08-04 516 for (to = 0; to < ds->num_ports; to++) {
3fa212707b8e60 Vladimir Oltean 2021-08-04 517 if (!dsa_is_cpu_port(ds, to) &&
3fa212707b8e60 Vladimir Oltean 2021-08-04 518 !dsa_is_dsa_port(ds, to))
3fa212707b8e60 Vladimir Oltean 2021-08-04 519 continue;
8aa9ebccae8762 Vladimir Oltean 2019-05-02 520
3fa212707b8e60 Vladimir Oltean 2021-08-04 @521 l2fwd[from].bc_domain |= BIT(to);
3fa212707b8e60 Vladimir Oltean 2021-08-04 522 l2fwd[from].fl_domain |= BIT(to);
3fa212707b8e60 Vladimir Oltean 2021-08-04 523
3fa212707b8e60 Vladimir Oltean 2021-08-04 524 sja1105_port_allow_traffic(l2fwd, from, to, true);
3fa212707b8e60 Vladimir Oltean 2021-08-04 525 }
3fa212707b8e60 Vladimir Oltean 2021-08-04 526 }
3fa212707b8e60 Vladimir Oltean 2021-08-04 527
3fa212707b8e60 Vladimir Oltean 2021-08-04 528 /* Then manage the forwarding domain for DSA links and CPU ports (the
3fa212707b8e60 Vladimir Oltean 2021-08-04 529 * always-on domain). These can send packets to any enabled port except
3fa212707b8e60 Vladimir Oltean 2021-08-04 530 * themselves.
7f7ccdea8c730f Vladimir Oltean 2021-02-16 531 */
3fa212707b8e60 Vladimir Oltean 2021-08-04 532 for (from = 0; from < ds->num_ports; from++) {
3fa212707b8e60 Vladimir Oltean 2021-08-04 533 if (!dsa_is_cpu_port(ds, from) && !dsa_is_dsa_port(ds, from))
3fa212707b8e60 Vladimir Oltean 2021-08-04 534 continue;
7f7ccdea8c730f Vladimir Oltean 2021-02-16 535
3fa212707b8e60 Vladimir Oltean 2021-08-04 536 for (to = 0; to < ds->num_ports; to++) {
3fa212707b8e60 Vladimir Oltean 2021-08-04 537 if (dsa_is_unused_port(ds, to))
8aa9ebccae8762 Vladimir Oltean 2019-05-02 538 continue;
8aa9ebccae8762 Vladimir Oltean 2019-05-02 539
3fa212707b8e60 Vladimir Oltean 2021-08-04 540 if (from == to)
3fa212707b8e60 Vladimir Oltean 2021-08-04 541 continue;
4d942354950181 Vladimir Oltean 2021-02-12 542
3fa212707b8e60 Vladimir Oltean 2021-08-04 543 l2fwd[from].bc_domain |= BIT(to);
3fa212707b8e60 Vladimir Oltean 2021-08-04 544 l2fwd[from].fl_domain |= BIT(to);
4d942354950181 Vladimir Oltean 2021-02-12 545
3fa212707b8e60 Vladimir Oltean 2021-08-04 546 sja1105_port_allow_traffic(l2fwd, from, to, true);
3fa212707b8e60 Vladimir Oltean 2021-08-04 547 }
3fa212707b8e60 Vladimir Oltean 2021-08-04 548 }
3fa212707b8e60 Vladimir Oltean 2021-08-04 549
3fa212707b8e60 Vladimir Oltean 2021-08-04 550 /* Finally, manage the egress flooding domain. All ports start up with
3fa212707b8e60 Vladimir Oltean 2021-08-04 551 * flooding enabled, including the CPU port and DSA links.
3fa212707b8e60 Vladimir Oltean 2021-08-04 552 */
3fa212707b8e60 Vladimir Oltean 2021-08-04 553 for (port = 0; port < ds->num_ports; port++) {
3fa212707b8e60 Vladimir Oltean 2021-08-04 554 if (dsa_is_unused_port(ds, port))
3fa212707b8e60 Vladimir Oltean 2021-08-04 555 continue;
3fa212707b8e60 Vladimir Oltean 2021-08-04 556
3fa212707b8e60 Vladimir Oltean 2021-08-04 557 priv->ucast_egress_floods |= BIT(port);
3fa212707b8e60 Vladimir Oltean 2021-08-04 558 priv->bcast_egress_floods |= BIT(port);
8aa9ebccae8762 Vladimir Oltean 2019-05-02 559 }
f238fef1b3de2f Vladimir Oltean 2021-05-24 560
8aa9ebccae8762 Vladimir Oltean 2019-05-02 561 /* Next 8 entries define VLAN PCP mapping from ingress to egress.
8aa9ebccae8762 Vladimir Oltean 2019-05-02 562 * Create a one-to-one mapping.
8aa9ebccae8762 Vladimir Oltean 2019-05-02 563 */
3fa212707b8e60 Vladimir Oltean 2021-08-04 564 for (tc = 0; tc < SJA1105_NUM_TC; tc++) {
3fa212707b8e60 Vladimir Oltean 2021-08-04 565 for (port = 0; port < ds->num_ports; port++) {
3fa212707b8e60 Vladimir Oltean 2021-08-04 566 if (dsa_is_unused_port(ds, port))
f238fef1b3de2f Vladimir Oltean 2021-05-24 567 continue;
f238fef1b3de2f Vladimir Oltean 2021-05-24 568
3fa212707b8e60 Vladimir Oltean 2021-08-04 569 l2fwd[ds->num_ports + tc].vlan_pmap[port] = tc;
f238fef1b3de2f Vladimir Oltean 2021-05-24 570 }
3e77e59bf8cf10 Vladimir Oltean 2021-06-08 571
3fa212707b8e60 Vladimir Oltean 2021-08-04 572 l2fwd[ds->num_ports + tc].type_egrpcp2outputq = true;
3e77e59bf8cf10 Vladimir Oltean 2021-06-08 573 }
3e77e59bf8cf10 Vladimir Oltean 2021-06-08 574
3e77e59bf8cf10 Vladimir Oltean 2021-06-08 575 return 0;
3e77e59bf8cf10 Vladimir Oltean 2021-06-08 576 }
3e77e59bf8cf10 Vladimir Oltean 2021-06-08 577
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks
[intel-lts:5.15/linux 44/62] drivers/media/i2c/kmb-imx327.c:1629:28: warning: Value stored to 'ctrl_hdlr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
TO: Zhou Furong <furong.zhou(a)intel.com>
CC: nanli2x <nanx.li(a)intel.com>
Hi Zhou,
First bad commit (maybe != root cause):
tree: https://github.com/intel/linux-intel-lts.git 5.15/linux
head: 5308d498714872bc2f9957901da0c5c9569e9a78
commit: 49fa3e4bf70e3787f53ec225a1f9962598606bb9 [44/62] media: keembay-camera: sync with API change
:::::: branch date: 6 days ago
:::::: commit date: 5 months ago
config: arm-randconfig-c002-20220529 (https://download.01.org/0day-ci/archive/20220529/202205291105.Wf3WI9fZ-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0fbe3f3f486e01448121f7931a4ca29fac1504ab)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/intel/linux-intel-lts/commit/49fa3e4bf70e3787f53ec225a...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.15/linux
git checkout 49fa3e4bf70e3787f53ec225a1f9962598606bb9
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
dev_err(bus->dev,
^
include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
^
include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap'
dev_printk_index_emit(level, fmt); \
^
include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit'
printk_index_subsys_emit("%s %s: ", level, fmt)
^
include/linux/printk.h:417:2: note: expanded from macro 'printk_index_subsys_emit'
__printk_index_emit(fmt, level, subsys_fmt_prefix)
^
include/linux/printk.h:396:34: note: expanded from macro '__printk_index_emit'
#define __printk_index_emit(...) do {} while (0)
^
drivers/soundwire/stream.c:820:5: note: Control jumps to line 847
goto error;
^
drivers/soundwire/stream.c:847:2: note: Left side of '&&' is false
list_for_each_entry(m_rt, &stream->master_list, stream_node) {
^
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/soundwire/stream.c:847:2: note: Taking false branch
list_for_each_entry(m_rt, &stream->master_list, stream_node) {
^
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)
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:302:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
drivers/soundwire/stream.c:847:2: note: Loop condition is false. Exiting loop
list_for_each_entry(m_rt, &stream->master_list, stream_node) {
^
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)
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:300:2: note: expanded from macro '__compiletime_assert'
do { \
^
drivers/soundwire/stream.c:847:2: note: Loop condition is true. Entering loop body
list_for_each_entry(m_rt, &stream->master_list, stream_node) {
^
include/linux/list.h:628:2: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
drivers/soundwire/stream.c:849:22: note: Field 'msg' is non-null
if (bus->defer_msg.msg) {
^
drivers/soundwire/stream.c:849:3: note: Taking true branch
if (bus->defer_msg.msg) {
^
drivers/soundwire/stream.c:850:10: note: Use of memory after it is freed
kfree(bus->defer_msg.msg->buf);
^~~~~~~~~~~~~~~~~~~~~~~
Suppressed 8 warnings (8 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.
9 warnings generated.
Suppressed 9 warnings (8 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.
10 warnings generated.
>> drivers/media/i2c/kmb-imx327.c:1629:28: warning: Value stored to 'ctrl_hdlr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct v4l2_ctrl_handler *ctrl_hdlr = &kmb_imx327->ctrl_handler;
^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/kmb-imx327.c:1629:28: note: Value stored to 'ctrl_hdlr' during its initialization is never read
struct v4l2_ctrl_handler *ctrl_hdlr = &kmb_imx327->ctrl_handler;
^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (8 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.
10 warnings generated.
>> drivers/media/i2c/kmb-flash.c:357:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -ENOMEM;
^ ~~~~~~~
drivers/media/i2c/kmb-flash.c:357:3: note: Value stored to 'ret' is never read
ret = -ENOMEM;
^ ~~~~~~~
Suppressed 9 warnings (8 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.
11 warnings generated.
>> drivers/media/i2c/kmb-lens.c:215:2: warning: Value stored to 'new_pos' is never read [clang-analyzer-deadcode.DeadStores]
new_pos = kmb_lens->iris_new_pos;
^ ~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/kmb-lens.c:215:2: note: Value stored to 'new_pos' is never read
new_pos = kmb_lens->iris_new_pos;
^ ~~~~~~~~~~~~~~~~~~~~~~
Suppressed 10 warnings (8 in non-user code, 2 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.
9 warnings generated.
Suppressed 9 warnings (8 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.
10 warnings generated.
Suppressed 10 warnings (8 in non-user code, 2 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.
9 warnings generated.
Suppressed 9 warnings (8 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.
11 warnings generated.
drivers/media/tuners/tuner-xc2028.c:1037:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = send_seq(priv, {0x00, 0x00});
^
drivers/media/tuners/tuner-xc2028.c:1037:3: note: Value stored to 'rc' is never read
Suppressed 10 warnings (8 in non-user code, 2 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.
10 warnings generated.
Suppressed 10 warnings (8 in non-user code, 2 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.
9 warnings generated.
Suppressed 9 warnings (8 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.
9 warnings generated.
drivers/of/unittest.c:3128:29: warning: Access to field 'properties' results in a dereference of an undefined pointer value (loaded from variable 'overlay_base_symbols') [clang-analyzer-core.NullDereference]
for_each_property_of_node(overlay_base_symbols, prop) {
^
include/linux/of.h:358:12: note: expanded from macro 'for_each_property_of_node'
for (pp = dn->properties; pp != NULL; pp = pp->next)
^~
drivers/of/unittest.c:3039:2: note: 'overlay_base_symbols' declared without an initial value
struct device_node *overlay_base_symbols;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/of/unittest.c:3044:6: note: Assuming 'overlay_base_root' is non-null
if (!overlay_base_root) {
^~~~~~~~~~~~~~~~~~
drivers/of/unittest.c:3044:2: note: Taking false branch
if (!overlay_base_root) {
^
drivers/of/unittest.c:3068:2: note: Loop condition is false. Execution continues on line 3077
for (np = overlay_base_root->child; np; np = np->sibling) {
^
drivers/of/unittest.c:3078:6: note: Assuming 'of_symbols' is non-null
if (of_symbols) {
^~~~~~~~~~
drivers/of/unittest.c:3078:2: note: Taking true branch
if (of_symbols) {
^
drivers/of/unittest.c:3081:3: note: Loop condition is false. Execution continues on line 3091
for (np = overlay_base_root->child; np; np = np->sibling) {
^
drivers/of/unittest.c:3091:44: note: Assuming 'np' is equal to null
for_each_child_of_node(overlay_base_root, np) {
^
include/linux/of.h:1301:48: note: expanded from macro 'for_each_child_of_node'
for (child = of_get_next_child(parent, NULL); child != NULL; \
^~~~~~~~~~~~~
drivers/of/unittest.c:3091:2: note: Loop condition is false. Execution continues on line 3110
for_each_child_of_node(overlay_base_root, np) {
^
include/linux/of.h:1301:2: note: expanded from macro 'for_each_child_of_node'
for (child = of_get_next_child(parent, NULL); child != NULL; \
^
drivers/of/unittest.c:3110:2: note: Loop condition is false. Execution continues on line 3113
for (np = overlay_base_root->child; np; np = np->sibling)
^
drivers/of/unittest.c:3115:2: note: Loop condition is false. Execution continues on line 3118
for (last_sibling = np = of_root->child; np; np = np->sibling)
^
drivers/of/unittest.c:3118:6: note: 'last_sibling' is null
if (last_sibling)
^~~~~~~~~~~~
drivers/of/unittest.c:3118:2: note: Taking false branch
if (last_sibling)
^
drivers/of/unittest.c:3123:2: note: Loop condition is false. Execution continues on line 3126
for_each_of_allnodes_from(overlay_base_root, np)
^
include/linux/of.h:265:2: note: expanded from macro 'for_each_of_allnodes_from'
for (dn = __of_find_all_nodes(from); dn; dn = __of_find_all_nodes(dn))
^
drivers/of/unittest.c:3126:6: note: 'of_symbols' is non-null
if (of_symbols) {
^~~~~~~~~~
drivers/of/unittest.c:3126:2: note: Taking true branch
if (of_symbols) {
^
drivers/of/unittest.c:3128:29: note: Access to field 'properties' results in a dereference of an undefined pointer value (loaded from variable 'overlay_base_symbols')
for_each_property_of_node(overlay_base_symbols, prop) {
^
include/linux/of.h:358:12: note: expanded from macro 'for_each_property_of_node'
for (pp = dn->properties; pp != NULL; pp = pp->next)
^~
Suppressed 8 warnings (8 in non-user code).
--
^
drivers/media/i2c/ccs/ccs-data.c:548:11: note: Passing null pointer value via 2nd parameter 'pdaf_readout'
&rules->pdaf_readout,
^~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ccs/ccs-data.c:547:11: note: Calling 'ccs_data_parse_pdaf_readout'
rval = ccs_data_parse_pdaf_readout(bin,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ccs/ccs-data.c:412:6: note: Assuming the condition is false
if (!is_contained(__pdaf, endp))
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ccs/ccs-data.c:412:2: note: Taking false branch
if (!is_contained(__pdaf, endp))
^
drivers/media/i2c/ccs/ccs-data.c:415:12: note: Field 'base' is non-null
if (!bin->base) {
^
drivers/media/i2c/ccs/ccs-data.c:415:2: note: Taking false branch
if (!bin->base) {
^
drivers/media/i2c/ccs/ccs-data.c:418:17: note: Dereference of null pointer (loaded from variable 'pdaf_readout')
*pdaf_readout = bin_alloc(bin, sizeof(**pdaf_readout));
~~~~~~~~~~~~ ^
Suppressed 8 warnings (8 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.
9 warnings generated.
drivers/of/unittest.c:3128:29: warning: Access to field 'properties' results in a dereference of an undefined pointer value (loaded from variable 'overlay_base_symbols') [clang-analyzer-core.NullDereference]
for_each_property_of_node(overlay_base_symbols, prop) {
^
include/linux/of.h:358:12: note: expanded from macro 'for_each_property_of_node'
for (pp = dn->properties; pp != NULL; pp = pp->next)
^~
drivers/of/unittest.c:3039:2: note: 'overlay_base_symbols' declared without an initial value
struct device_node *overlay_base_symbols;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/of/unittest.c:3044:6: note: Assuming 'overlay_base_root' is non-null
if (!overlay_base_root) {
^~~~~~~~~~~~~~~~~~
drivers/of/unittest.c:3044:2: note: Taking false branch
if (!overlay_base_root) {
^
drivers/of/unittest.c:3068:2: note: Loop condition is false. Execution continues on line 3077
for (np = overlay_base_root->child; np; np = np->sibling) {
^
drivers/of/unittest.c:3078:6: note: Assuming 'of_symbols' is non-null
if (of_symbols) {
^~~~~~~~~~
drivers/of/unittest.c:3078:2: note: Taking true branch
if (of_symbols) {
^
drivers/of/unittest.c:3081:3: note: Loop condition is false. Execution continues on line 3091
for (np = overlay_base_root->child; np; np = np->sibling) {
^
drivers/of/unittest.c:3091:44: note: Assuming 'np' is equal to null
for_each_child_of_node(overlay_base_root, np) {
^
include/linux/of.h:1301:48: note: expanded from macro 'for_each_child_of_node'
for (child = of_get_next_child(parent, NULL); child != NULL; \
^~~~~~~~~~~~~
drivers/of/unittest.c:3091:2: note: Loop condition is false. Execution continues on line 3110
for_each_child_of_node(overlay_base_root, np) {
^
include/linux/of.h:1301:2: note: expanded from macro 'for_each_child_of_node'
for (child = of_get_next_child(parent, NULL); child != NULL; \
^
drivers/of/unittest.c:3110:2: note: Loop condition is false. Execution continues on line 3113
for (np = overlay_base_root->child; np; np = np->sibling)
^
drivers/of/unittest.c:3115:2: note: Loop condition is false. Execution continues on line 3118
for (last_sibling = np = of_root->child; np; np = np->sibling)
^
drivers/of/unittest.c:3118:6: note: 'last_sibling' is null
if (last_sibling)
^~~~~~~~~~~~
drivers/of/unittest.c:3118:2: note: Taking false branch
if (last_sibling)
^
drivers/of/unittest.c:3123:2: note: Loop condition is false. Execution continues on line 3126
for_each_of_allnodes_from(overlay_base_root, np)
^
include/linux/of.h:265:2: note: expanded from macro 'for_each_of_allnodes_from'
for (dn = __of_find_all_nodes(from); dn; dn = __of_find_all_nodes(dn))
^
drivers/of/unittest.c:3126:6: note: 'of_symbols' is non-null
if (of_symbols) {
^~~~~~~~~~
drivers/of/unittest.c:3126:2: note: Taking true branch
if (of_symbols) {
^
drivers/of/unittest.c:3128:29: note: Access to field 'properties' results in a dereference of an undefined pointer value (loaded from variable 'overlay_base_symbols')
for_each_property_of_node(overlay_base_symbols, prop) {
^
include/linux/of.h:358:12: note: expanded from macro 'for_each_property_of_node'
for (pp = dn->properties; pp != NULL; pp = pp->next)
^~
Suppressed 8 warnings (8 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.
9 warnings generated.
Suppressed 9 warnings (8 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.
10 warnings generated.
>> drivers/media/i2c/kmb-imx327.c:1629:28: warning: Value stored to 'ctrl_hdlr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct v4l2_ctrl_handler *ctrl_hdlr = &kmb_imx327->ctrl_handler;
^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/kmb-imx327.c:1629:28: note: Value stored to 'ctrl_hdlr' during its initialization is never read
struct v4l2_ctrl_handler *ctrl_hdlr = &kmb_imx327->ctrl_handler;
^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (8 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.
10 warnings generated.
>> drivers/media/i2c/kmb-flash.c:357:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -ENOMEM;
^ ~~~~~~~
drivers/media/i2c/kmb-flash.c:357:3: note: Value stored to 'ret' is never read
ret = -ENOMEM;
^ ~~~~~~~
Suppressed 9 warnings (8 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.
11 warnings generated.
>> drivers/media/i2c/kmb-lens.c:215:2: warning: Value stored to 'new_pos' is never read [clang-analyzer-deadcode.DeadStores]
new_pos = kmb_lens->iris_new_pos;
^ ~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/kmb-lens.c:215:2: note: Value stored to 'new_pos' is never read
new_pos = kmb_lens->iris_new_pos;
^ ~~~~~~~~~~~~~~~~~~~~~~
Suppressed 10 warnings (8 in non-user code, 2 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.
9 warnings generated.
Suppressed 9 warnings (8 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.
10 warnings generated.
Suppressed 10 warnings (8 in non-user code, 2 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.
9 warnings generated.
Suppressed 9 warnings (8 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.
11 warnings generated.
drivers/media/tuners/tuner-xc2028.c:1037:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = send_seq(priv, {0x00, 0x00});
^
drivers/media/tuners/tuner-xc2028.c:1037:3: note: Value stored to 'rc' is never read
Suppressed 10 warnings (8 in non-user code, 2 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.
10 warnings generated.
Suppressed 10 warnings (8 in non-user code, 2 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.
9 warnings generated.
Suppressed 9 warnings (8 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.
8 warnings generated.
Suppressed 8 warnings (8 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.
Suppressed 8 warnings (8 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.
8 warnings generated.
Suppressed 8 warnings (8 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.
Suppressed 8 warnings (8 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.
9 warnings generated.
drivers/hwmon/lm73.c:76:62: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
value = clamp_val(temp / 250, LM73_TEMP_MIN, LM73_TEMP_MAX) << 5;
^
drivers/hwmon/lm73.c:65:41: note: Left side of '&&' is false
struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
^
include/linux/hwmon-sysfs.h:17:2: note: expanded from macro 'to_sensor_dev_attr'
container_of(_dev_attr, struct sensor_device_attribute, dev_attr)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/hwmon/lm73.c:65:41: note: Taking false branch
struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
^
include/linux/hwmon-sysfs.h:17:2: note: expanded from macro 'to_sensor_dev_attr'
container_of(_dev_attr, struct sensor_device_attribute, dev_attr)
^
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:322:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:302:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
drivers/hwmon/lm73.c:65:41: note: Loop condition is false. Exiting loop
struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
^
include/linux/hwmon-sysfs.h:17:2: note: expanded from macro 'to_sensor_dev_attr'
container_of(_dev_attr, struct sensor_device_attribute, dev_attr)
^
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:322:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:300:2: note: expanded from macro '__compiletime_assert'
do { \
^
drivers/hwmon/lm73.c:72:6: note: Assuming 'status' is >= 0
vim +/ctrl_hdlr +1629 drivers/media/i2c/kmb-imx327.c
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1620
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1621 /**
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1622 * kmb_imx327_init_controls - Initialize sensor subdevice controls
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1623 * @kmb_imx327: pointer to kmb_imx327 device
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1624 *
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1625 * Return: 0 if successful
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1626 */
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1627 static int kmb_imx327_init_controls(struct kmb_imx327 *kmb_imx327)
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1628 {
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 @1629 struct v4l2_ctrl_handler *ctrl_hdlr = &kmb_imx327->ctrl_handler;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1630 const struct kmb_imx327_mode *mode = kmb_imx327->cur_mode;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1631 u32 hblank;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1632 u32 vblank;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1633 int ret;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1634
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1635 ctrl_hdlr = &kmb_imx327->ctrl_handler;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1636 ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1637 if (ret)
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1638 return ret;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1639
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1640 /* Serialize controls with sensor device */
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1641 ctrl_hdlr->lock = &kmb_imx327->mutex;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1642
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1643 /* Initialize exposure and gain */
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1644 kmb_imx327->exp_ctrl = v4l2_ctrl_new_std(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1645 &kmb_imx327_ctrl_ops,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1646 V4L2_CID_EXPOSURE,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1647 KMB_IMX327_EXPOSURE_MIN,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1648 mode->lpfr[0],
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1649 KMB_IMX327_EXPOSURE_STEP,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1650 KMB_IMX327_EXPOSURE_DEFAULT);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1651
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1652 kmb_imx327->again_ctrl = v4l2_ctrl_new_std(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1653 &kmb_imx327_ctrl_ops,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1654 V4L2_CID_ANALOGUE_GAIN,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1655 KMB_IMX327_AGAIN_MIN,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1656 KMB_IMX327_AGAIN_MAX,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1657 KMB_IMX327_AGAIN_STEP,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1658 KMB_IMX327_AGAIN_DEFAULT);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1659 kmb_imx327->exp1_ctrl = v4l2_ctrl_new_custom(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1660 &exposure_short,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1661 NULL);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1662
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1663 kmb_imx327->again1_ctrl = v4l2_ctrl_new_custom(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1664 &again_short,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1665 NULL);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1666
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1667 kmb_imx327->exp2_ctrl = v4l2_ctrl_new_custom(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1668 &exposure_very_short,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1669 NULL);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1670
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1671 kmb_imx327->again2_ctrl = v4l2_ctrl_new_custom(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1672 &again_very_short,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1673 NULL);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1674
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1675 v4l2_ctrl_cluster(6, &kmb_imx327->exp_ctrl);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1676
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1677 /* Read only controls */
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1678 kmb_imx327->pclk_ctrl = v4l2_ctrl_new_std(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1679 &kmb_imx327_ctrl_ops,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1680 V4L2_CID_PIXEL_RATE,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1681 mode->pclk, mode->pclk,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1682 1, mode->pclk);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1683 if (kmb_imx327->pclk_ctrl)
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1684 kmb_imx327->pclk_ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1685
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1686 vblank = mode->lpfr[0] - mode->height;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1687 kmb_imx327->vblank_ctrl = v4l2_ctrl_new_std(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1688 &kmb_imx327_ctrl_ops,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1689 V4L2_CID_VBLANK,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1690 KMB_IMX327_REG_MIN,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1691 KMB_IMX327_REG_MAX,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1692 1, vblank);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1693 if (kmb_imx327->vblank_ctrl)
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1694 kmb_imx327->vblank_ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1695
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1696 hblank = mode->ppln - mode->width;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1697 kmb_imx327->hblank_ctrl = v4l2_ctrl_new_std(ctrl_hdlr,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1698 &kmb_imx327_ctrl_ops,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1699 V4L2_CID_HBLANK,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1700 KMB_IMX327_REG_MIN,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1701 KMB_IMX327_REG_MAX,
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1702 1, hblank);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1703 if (kmb_imx327->hblank_ctrl)
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1704 kmb_imx327->hblank_ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1705
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1706 if (ctrl_hdlr->error) {
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1707 ret = ctrl_hdlr->error;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1708 dev_err(kmb_imx327->dev, "control init failed: %d", ret);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1709 goto error;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1710 }
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1711
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1712 kmb_imx327->sd.ctrl_handler = ctrl_hdlr;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1713
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1714 return 0;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1715
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1716 error:
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1717 v4l2_ctrl_handler_free(ctrl_hdlr);
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1718
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1719 return ret;
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1720 }
ca29c95cf4cd93 Gjorgji Rosikopulos 2020-06-26 1721
:::::: The code at line 1629 was first introduced by commit
:::::: ca29c95cf4cd93d1e33013951d9ab731e49e1bce media: kmb-imx327-sensor: Add Keem Bay IMX327 sensor
:::::: TO: Gjorgji Rosikopulos <gjorgjix.rosikopulos(a)intel.com>
:::::: CC: nanli2x <nanx.li(a)intel.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 2 weeks