Go to file
Tiezhu Yang 5543e9b15c bpftool: Silence build warning about calloc()
[ Upstream commit f5f30386c7 ]

There exists the following warning when building bpftool:

  CC      prog.o
prog.c: In function ‘profile_open_perf_events’:
prog.c:2301:24: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 2301 |                 sizeof(int), obj->rodata->num_cpu * obj->rodata->num_metric);
      |                        ^~~
prog.c:2301:24: note: earlier argument should specify number of elements, later size of each element

Tested with the latest upstream GCC which contains a new warning option
-Wcalloc-transposed-args. The first argument to calloc is documented to
be number of elements in array, while the second argument is size of each
element, just switch the first and second arguments of calloc() to silence
the build warning, compile tested only.

Fixes: 47c09d6a9f ("bpftool: Introduce "prog profile" command")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20240116061920.31172-1-yangtiezhu@loongson.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:18:04 -04:00
arch arm64: dts: qcom: sc8180x: Shrink aoss_qmp register space size 2024-03-26 18:18:04 -04:00
block block: fix deadlock between bd_link_disk_holder and partition scan 2024-03-26 18:17:59 -04:00
certs This update includes the following changes: 2023-11-02 16:15:30 -10:00
crypto crypto: algif_hash - Remove bogus SGL free on zero-length error path 2024-02-23 09:51:51 +01:00
Documentation x86/rfds: Mitigate Register File Data Sampling (RFDS) 2024-03-15 10:48:13 -04:00
drivers cpufreq: mediatek-hw: Wait for CPU supplies before probing 2024-03-26 18:18:04 -04:00
fs ovl: Always reject mounting over case-insensitive directories 2024-03-26 18:17:59 -04:00
include ovl: Always reject mounting over case-insensitive directories 2024-03-26 18:17:59 -04:00
init update workarounds for gcc "asm goto" issue 2024-02-23 09:51:21 +01:00
io_uring io_uring/net: fix overflow check in io_recvmsg_mshot_prep() 2024-03-26 18:18:01 -04:00
ipc Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
kernel sched/fair: Take the scheduling domain into account in select_idle_core() 2024-03-26 18:18:02 -04:00
lib lib: memcpy_kunit: Fix an invalid format specifier in an assertion msg 2024-03-26 18:18:00 -04:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm readahead: avoid multiple marked readahead pages 2024-03-15 10:48:22 -04:00
net inet_diag: annotate data-races around inet_diag_table[] 2024-03-26 18:18:04 -04:00
rust rust: Ignore preserve-most functions 2024-01-25 15:45:09 -08:00
samples work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:51:20 +01:00
scripts gen_compile_commands: fix invalid escape sequence warning 2024-03-26 18:17:51 -04:00
security landlock: Fix asymmetric private inodes referring 2024-03-06 14:53:55 +00:00
sound ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll 2024-03-26 18:17:57 -04:00
tools bpftool: Silence build warning about calloc() 2024-03-26 18:18:04 -04:00
usr arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
virt KVM/arm64 fixes for 6.7, part #2 2023-12-22 18:03:54 -05:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/ 2023-10-03 20:49:09 +09:00
.mailmap 12 hotfixes. 2 are cc:stable and the remainder either address post-6.7 2024-01-05 13:46:18 -08:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS 12 hotfixes. 2 are cc:stable and the remainder either address post-6.7 2024-01-05 13:46:18 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS 12 hotfixes. 2 are cc:stable and the remainder either address post-6.7 2024-01-05 13:46:18 -08:00
Makefile Linux 6.7.10 2024-03-15 14:22:41 -04:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.