[peterz-queue:perf/core 49/49] kernel//events/core.c:7022:12: warning: no previous prototype for function 'arch_perf_get_page_size'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head: 23e3665aed7353ef6f8df3d9676612767587094e
commit: 23e3665aed7353ef6f8df3d9676612767587094e [49/49] perf,mm: Handle non-page-table-aligned hugetlbfs
config: arm-randconfig-r021-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue perf/core
git checkout 23e3665aed7353ef6f8df3d9676612767587094e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel//events/core.c:6540:6: warning: no previous prototype for function 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
long perf_pmu_snapshot_aux(struct perf_buffer *rb,
^
kernel//events/core.c:6540:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
long perf_pmu_snapshot_aux(struct perf_buffer *rb,
^
static
>> kernel//events/core.c:7022:12: warning: no previous prototype for function 'arch_perf_get_page_size' [-Wmissing-prototypes]
__weak u64 arch_perf_get_page_size(struct mm_struct *mm, unsigned long addr)
^
kernel//events/core.c:7022:8: note: declare 'static' if the function is not intended to be used outside of this translation unit
__weak u64 arch_perf_get_page_size(struct mm_struct *mm, unsigned long addr)
^
static
kernel//events/core.c:1095:1: warning: unused function 'perf_cgroup_switch' [-Wunused-function]
perf_cgroup_switch(struct task_struct *task, struct task_struct *next)
^
3 warnings generated.
vim +/arch_perf_get_page_size +7022 kernel//events/core.c
7011
7012 /*
7013 * Return the MMU page size of a given virtual address.
7014 *
7015 * This generic implementation handles page-table aligned huge pages, as well
7016 * as non-page-table aligned hugetlbfs compound pages.
7017 *
7018 * If an architecture supports and uses non-page-table aligned pages in their
7019 * kernel mapping it will need to provide it's own implementation of this
7020 * function.
7021 */
> 7022 __weak u64 arch_perf_get_page_size(struct mm_struct *mm, unsigned long addr)
7023 {
7024 struct page *page;
7025 pgd_t *pgd;
7026 p4d_t *p4d;
7027 pud_t *pud;
7028 pmd_t *pmd;
7029 pte_t *pte;
7030
7031 pgd = pgd_offset(mm, addr);
7032 if (pgd_none(*pgd))
7033 return 0;
7034
7035 p4d = p4d_offset(pgd, addr);
7036 if (!p4d_present(*p4d))
7037 return 0;
7038
7039 if (p4d_leaf(*p4d))
7040 return 1ULL << P4D_SHIFT;
7041
7042 pud = pud_offset(p4d, addr);
7043 if (!pud_present(*pud))
7044 return 0;
7045
7046 if (pud_leaf(*pud)) {
7047 #ifdef pud_page
7048 page = pud_page(*pud);
7049 if (PageHuge(page))
7050 return page_size(compound_head(page));
7051 #endif
7052 return 1ULL << PUD_SHIFT;
7053 }
7054
7055 pmd = pmd_offset(pud, addr);
7056 if (!pmd_present(*pmd))
7057 return 0;
7058
7059 if (pmd_leaf(*pmd)) {
7060 #ifdef pmd_page
7061 page = pmd_page(*pmd);
7062 if (PageHuge(page))
7063 return page_size(compound_head(page));
7064 #endif
7065 return 1ULL << PMD_SHIFT;
7066 }
7067
7068 pte = pte_offset_map(pmd, addr);
7069 if (!pte_present(*pte)) {
7070 pte_unmap(pte);
7071 return 0;
7072 }
7073
7074 page = pte_page(*pte);
7075 if (PageHuge(page)) {
7076 u64 size = page_size(compound_head(page));
7077 pte_unmap(pte);
7078 return size;
7079 }
7080
7081 pte_unmap(pte);
7082 return PAGE_SIZE;
7083 }
7084
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[chrome-os:chromeos-4.4 27/27] /tmp/fair-470613.s:3876: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: 3c1b8a3d0b8d2303a67dcc84f6fa05a3ae828e5e
commit: 3c1b8a3d0b8d2303a67dcc84f6fa05a3ae828e5e [27/27] UPSTREAM: Bluetooth: btusb: Configure Intel debug feature based on available support
config: x86_64-randconfig-a002-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.4
git checkout 3c1b8a3d0b8d2303a67dcc84f6fa05a3ae828e5e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
^
static
kernel/sched/fair.c:2336:6: warning: no previous prototype for function 'task_tick_numa' [-Wmissing-prototypes]
void task_tick_numa(struct rq *rq, struct task_struct *curr)
^
kernel/sched/fair.c:2336:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void task_tick_numa(struct rq *rq, struct task_struct *curr)
^
static
kernel/sched/fair.c:2905:6: warning: no previous prototype for function 'remove_entity_load_avg' [-Wmissing-prototypes]
void remove_entity_load_avg(struct sched_entity *se)
^
kernel/sched/fair.c:2905:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void remove_entity_load_avg(struct sched_entity *se)
^
static
kernel/sched/fair.c:3248:12: warning: comparison of integers of different signs: 's64' (aka 'long long') and 'unsigned long' [-Wsign-compare]
if (delta > ideal_runtime)
~~~~~ ^ ~~~~~~~~~~~~~
kernel/sched/fair.c:4217:6: warning: no previous prototype for function 'init_cfs_bandwidth' [-Wmissing-prototypes]
void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
^
kernel/sched/fair.c:4217:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
^
static
kernel/sched/fair.c:4947:11: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (util >= capacity)
~~~~ ^ ~~~~~~~~
kernel/sched/fair.c:5008:20: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
for (idx = 0; idx < sge->nr_cap_states; idx++) {
~~~ ^ ~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:5079:41: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
if (sd->child && group_first_cpu(sg) != cpu)
~~~~~~~~~~~~~~~~~~~ ^ ~~~
kernel/sched/fair.c:5296:12: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
if (slave < factor || master < slave * factor)
~~~~~ ^ ~~~~~~
kernel/sched/fair.c:5710:73: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
if (best_idle < 0 || (idle_idx < best_idle_cstate && capacity_orig <= best_idle_capacity)) {
~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:5795:16: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
if (new_util < cur_capacity) {
~~~~~~~~ ^ ~~~~~~~~~~~~
kernel/sched/fair.c:5802:19: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
target_util < new_util) {
~~~~~~~~~~~ ^ ~~~~~~~~
kernel/sched/fair.c:5811:19: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
target_util > new_util) {
~~~~~~~~~~~ ^ ~~~~~~~~
kernel/sched/fair.c:5883:33: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
if (capacity_of(max_cap_cpu) < target_max_cap &&
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
kernel/sched/fair.c:5915:19: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (target_cpu == task_cpu(p))
~~~~~~~~~~ ^ ~~~~~~~~~~~
kernel/sched/fair.c:5937:17: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (target_cpu != task_cpu(p)) {
~~~~~~~~~~ ^ ~~~~~~~~~~~
kernel/sched/fair.c:6042:15: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (weight <= tmp->span_weight)
~~~~~~ ^ ~~~~~~~~~~~~~~~~
kernel/sched/fair.c:6634:34: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
if (sysctl_sched_migration_cost == -1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~
kernel/sched/fair.c:6882:18: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
if ((load / 2) > env->imbalance)
~~~~~~~~ ^ ~~~~~~~~~~~~~~
kernel/sched/fair.c:7550:42: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (sgs->sum_nr_running && env->dst_cpu < group_first_cpu(sg)) {
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:7896:21: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
if (env->imbalance < busiest->load_per_task)
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:8063:33: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
if (rq->nr_running == 1 && wl > env->imbalance &&
~~ ^ ~~~~~~~~~~~~~~
kernel/sched/fair.c:9525:6: warning: no previous prototype for function 'free_fair_sched_group' [-Wmissing-prototypes]
void free_fair_sched_group(struct task_group *tg) { }
^
kernel/sched/fair.c:9525:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void free_fair_sched_group(struct task_group *tg) { }
^
static
kernel/sched/fair.c:9527:5: warning: no previous prototype for function 'alloc_fair_sched_group' [-Wmissing-prototypes]
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
^
kernel/sched/fair.c:9527:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
^
static
kernel/sched/fair.c:9532:6: warning: no previous prototype for function 'unregister_fair_sched_group' [-Wmissing-prototypes]
void unregister_fair_sched_group(struct task_group *tg) { }
^
kernel/sched/fair.c:9532:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void unregister_fair_sched_group(struct task_group *tg) { }
^
static
32 warnings generated.
/tmp/fair-470613.s: Assembler messages:
>> /tmp/fair-470613.s:3876: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[dhowells-fs:fscache-iter 72/76] fs/afs/write.c:28:60: error: macro "fscache_set_page_dirty" passed 2 arguments, but takes just 1
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head: 09cf7c4c505054d930c99ecd93d384a72e73e529
commit: 57b26ca50d1d852952e2a28e8bc474915fb8839b [72/76] fixes 2
config: sparc-randconfig-p002-20201014 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
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/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-iter
git checkout 57b26ca50d1d852952e2a28e8bc474915fb8839b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/afs/write.c: In function 'afs_set_page_dirty':
>> fs/afs/write.c:28:60: error: macro "fscache_set_page_dirty" passed 2 arguments, but takes just 1
28 | return fscache_set_page_dirty(page, afs_vnode_cache(vnode));
| ^
In file included from fs/afs/write.c:14:
include/linux/fscache_helper.h:114: note: macro "fscache_set_page_dirty" defined here
114 | #define fscache_set_page_dirty(PAGE) (__set_page_dirty_nobuffers((PAGE)))
|
>> fs/afs/write.c:28:9: error: 'fscache_set_page_dirty' undeclared (first use in this function); did you mean 'afs_set_page_dirty'?
28 | return fscache_set_page_dirty(page, afs_vnode_cache(vnode));
| ^~~~~~~~~~~~~~~~~~~~~~
| afs_set_page_dirty
fs/afs/write.c:28:9: note: each undeclared identifier is reported only once for each function it appears in
fs/afs/write.c:26:20: warning: unused variable 'vnode' [-Wunused-variable]
26 | struct afs_vnode *vnode = AFS_FS_I(page->mapping->host);
| ^~~~~
fs/afs/write.c:29:1: warning: control reaches end of non-void function [-Wreturn-type]
29 | }
| ^
vim +/fscache_set_page_dirty +28 fs/afs/write.c
16
17 static void afs_write_to_cache(struct afs_vnode *vnode,
18 loff_t a, loff_t b, loff_t c, loff_t i_size);
19
20 /*
21 * Mark a page as having been made dirty and thus needing writeback. We also
22 * need to pin the cache object to write back to.
23 */
24 int afs_set_page_dirty(struct page *page)
25 {
26 struct afs_vnode *vnode = AFS_FS_I(page->mapping->host);
27
> 28 return fscache_set_page_dirty(page, afs_vnode_cache(vnode));
29 }
30
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH 4/7] ASoC: arizona: Allow codecs to be selected from kernel config
by kernel test robot
Hi Richard,
I love your patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on robh/for-next sound/for-next v5.9 next-20201013]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-dts-for-R...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: xtensa-randconfig-s032-20201014 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-rc1-dirty
# https://github.com/0day-ci/linux/commit/7ddf8ce197a5426e13fe9422a3ed17f0b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Richard-Fitzgerald/Add-dts-for-Rpi4-Cirrus-Lochnagar-and-codecs/20201014-225648
git checkout 7ddf8ce197a5426e13fe9422a3ed17f0b02a94df
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> sound/soc/codecs/wm5102.c:687:35: sparse: sparse: cast to restricted __be16
vim +687 sound/soc/codecs/wm5102.c
cc9e92431ee9c7f Charles Keepax 2014-06-06 677
cc9e92431ee9c7f Charles Keepax 2014-06-06 678 static int wm5102_out_comp_coeff_put(struct snd_kcontrol *kcontrol,
cc9e92431ee9c7f Charles Keepax 2014-06-06 679 struct snd_ctl_elem_value *ucontrol)
cc9e92431ee9c7f Charles Keepax 2014-06-06 680 {
0fe1daa6663ae94 Kuninori Morimoto 2018-02-13 681 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
0fe1daa6663ae94 Kuninori Morimoto 2018-02-13 682 struct arizona *arizona = dev_get_drvdata(component->dev->parent);
cc9e92431ee9c7f Charles Keepax 2014-06-06 683
d74bcaaeb668261 Lars-Peter Clausen 2014-11-09 684 mutex_lock(&arizona->dac_comp_lock);
cc9e92431ee9c7f Charles Keepax 2014-06-06 685 memcpy(&arizona->dac_comp_coeff, ucontrol->value.bytes.data,
cc9e92431ee9c7f Charles Keepax 2014-06-06 686 sizeof(arizona->dac_comp_coeff));
cc9e92431ee9c7f Charles Keepax 2014-06-06 @687 arizona->dac_comp_coeff = be16_to_cpu(arizona->dac_comp_coeff);
d74bcaaeb668261 Lars-Peter Clausen 2014-11-09 688 mutex_unlock(&arizona->dac_comp_lock);
cc9e92431ee9c7f Charles Keepax 2014-06-06 689
cc9e92431ee9c7f Charles Keepax 2014-06-06 690 return 0;
cc9e92431ee9c7f Charles Keepax 2014-06-06 691 }
cc9e92431ee9c7f Charles Keepax 2014-06-06 692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[RFC PATCH] nvmem: core: nvmem_of_notifier can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 859431c15d5bc3..6dd79075fdd9b0 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -1671,7 +1671,7 @@ static int of_nvmem_notify(struct notifier_block *nb, unsigned long action,
return NOTIFY_OK;
}
-struct notifier_block nvmem_of_notifier = {
+static struct notifier_block nvmem_of_notifier = {
.notifier_call = of_nvmem_notify,
};
#endif /* CONFIG_OF_DYNAMIC */
1 year, 11 months
Re: [PATCH v4 1/5] RDMA/umem: Support importing dma-buf as user memory region
by kernel test robot
Hi Jianxin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on rdma/for-next]
[also build test WARNING on tegra-drm/drm/tegra/for-next v5.9 next-20201013]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jianxin-Xiong/RDMA-Add-dma-buf-s...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: powerpc-randconfig-r006-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/2990dd070526adeeccee2db6d465b8e1c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jianxin-Xiong/RDMA-Add-dma-buf-support/20201015-000352
git checkout 2990dd070526adeeccee2db6d465b8e1ca33a967
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:36:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/infiniband/core/umem_dmabuf.c:6:
In file included from include/linux/dma-buf.h:18:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:41:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/infiniband/core/umem_dmabuf.c:6:
In file included from include/linux/dma-buf.h:18:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:46:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/infiniband/core/umem_dmabuf.c:6:
In file included from include/linux/dma-buf.h:18:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:51:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/infiniband/core/umem_dmabuf.c:6:
In file included from include/linux/dma-buf.h:18:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:56:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/infiniband/core/umem_dmabuf.c:6:
In file included from include/linux/dma-buf.h:18:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:61:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
drivers/infiniband/core/umem_dmabuf.c:26:5: warning: no previous prototype for function 'ib_umem_dmabuf_map_pages' [-Wmissing-prototypes]
int ib_umem_dmabuf_map_pages(struct ib_umem *umem, bool first)
^
drivers/infiniband/core/umem_dmabuf.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ib_umem_dmabuf_map_pages(struct ib_umem *umem, bool first)
^
static
>> drivers/infiniband/core/umem_dmabuf.c:138:6: warning: comparison of distinct pointer types ('typeof (addr) *' (aka 'unsigned long *') and 'typeof (size) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
if (check_add_overflow(addr, size, &end))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/overflow.h:60:15: note: expanded from macro 'check_add_overflow'
(void) (&__a == &__b); \
~~~~ ^ ~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/infiniband/core/umem_dmabuf.c:138:6: warning: comparison of distinct pointer types ('typeof (addr) *' (aka 'unsigned long *') and 'typeof (size) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
if (check_add_overflow(addr, size, &end))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/overflow.h:60:15: note: expanded from macro 'check_add_overflow'
(void) (&__a == &__b); \
~~~~ ^ ~~~~
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:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/infiniband/core/umem_dmabuf.c:138:6: warning: comparison of distinct pointer types ('typeof (addr) *' (aka 'unsigned long *') and 'typeof (size) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
if (check_add_overflow(addr, size, &end))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/overflow.h:60:15: note: expanded from macro 'check_add_overflow'
(void) (&__a == &__b); \
~~~~ ^ ~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
drivers/infiniband/core/umem_dmabuf.c:188:6: warning: no previous prototype for function 'ib_umem_dmabuf_release' [-Wmissing-prototypes]
void ib_umem_dmabuf_release(struct ib_umem *umem)
^
drivers/infiniband/core/umem_dmabuf.c:188:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ib_umem_dmabuf_release(struct ib_umem *umem)
^
static
11 warnings generated.
vim +138 drivers/infiniband/core/umem_dmabuf.c
126
127 struct ib_umem *ib_umem_dmabuf_get(struct ib_device *device,
128 unsigned long addr, size_t size,
129 int dmabuf_fd, int access,
130 const struct ib_umem_dmabuf_ops *ops)
131 {
132 struct dma_buf *dmabuf;
133 struct ib_umem_dmabuf *umem_dmabuf;
134 struct ib_umem *umem;
135 unsigned long end;
136 long ret;
137
> 138 if (check_add_overflow(addr, size, &end))
139 return ERR_PTR(-EINVAL);
140
141 if (unlikely(PAGE_ALIGN(end) < PAGE_SIZE))
142 return ERR_PTR(-EINVAL);
143
144 if (unlikely(!ops || !ops->invalidate || !ops->update))
145 return ERR_PTR(-EINVAL);
146
147 umem_dmabuf = kzalloc(sizeof(*umem_dmabuf), GFP_KERNEL);
148 if (!umem_dmabuf)
149 return ERR_PTR(-ENOMEM);
150
151 umem_dmabuf->ops = ops;
152 INIT_WORK(&umem_dmabuf->work, ib_umem_dmabuf_work);
153
154 umem = &umem_dmabuf->umem;
155 umem->ibdev = device;
156 umem->length = size;
157 umem->address = addr;
158 umem->writable = ib_access_writable(access);
159 umem->is_dmabuf = 1;
160
161 dmabuf = dma_buf_get(dmabuf_fd);
162 if (IS_ERR(dmabuf)) {
163 ret = PTR_ERR(dmabuf);
164 goto out_free_umem;
165 }
166
167 umem_dmabuf->attach = dma_buf_dynamic_attach(
168 dmabuf,
169 device->dma_device,
170 &ib_umem_dmabuf_attach_ops,
171 umem_dmabuf);
172 if (IS_ERR(umem_dmabuf->attach)) {
173 ret = PTR_ERR(umem_dmabuf->attach);
174 goto out_release_dmabuf;
175 }
176
177 return umem;
178
179 out_release_dmabuf:
180 dma_buf_put(dmabuf);
181
182 out_free_umem:
183 kfree(umem_dmabuf);
184 return ERR_PTR(ret);
185 }
186 EXPORT_SYMBOL(ib_umem_dmabuf_get);
187
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[peterz-queue:perf/core 49/49] kernel/events/core.c:7022:12: warning: no previous prototype for 'arch_perf_get_page_size'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head: 23e3665aed7353ef6f8df3d9676612767587094e
commit: 23e3665aed7353ef6f8df3d9676612767587094e [49/49] perf,mm: Handle non-page-table-aligned hugetlbfs
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
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/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue perf/core
git checkout 23e3665aed7353ef6f8df3d9676612767587094e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/events/core.c:6540:6: warning: no previous prototype for 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
6540 | long perf_pmu_snapshot_aux(struct perf_buffer *rb,
| ^~~~~~~~~~~~~~~~~~~~~
>> kernel/events/core.c:7022:12: warning: no previous prototype for 'arch_perf_get_page_size' [-Wmissing-prototypes]
7022 | __weak u64 arch_perf_get_page_size(struct mm_struct *mm, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/arch_perf_get_page_size +7022 kernel/events/core.c
7011
7012 /*
7013 * Return the MMU page size of a given virtual address.
7014 *
7015 * This generic implementation handles page-table aligned huge pages, as well
7016 * as non-page-table aligned hugetlbfs compound pages.
7017 *
7018 * If an architecture supports and uses non-page-table aligned pages in their
7019 * kernel mapping it will need to provide it's own implementation of this
7020 * function.
7021 */
> 7022 __weak u64 arch_perf_get_page_size(struct mm_struct *mm, unsigned long addr)
7023 {
7024 struct page *page;
7025 pgd_t *pgd;
7026 p4d_t *p4d;
7027 pud_t *pud;
7028 pmd_t *pmd;
7029 pte_t *pte;
7030
7031 pgd = pgd_offset(mm, addr);
7032 if (pgd_none(*pgd))
7033 return 0;
7034
7035 p4d = p4d_offset(pgd, addr);
7036 if (!p4d_present(*p4d))
7037 return 0;
7038
7039 if (p4d_leaf(*p4d))
7040 return 1ULL << P4D_SHIFT;
7041
7042 pud = pud_offset(p4d, addr);
7043 if (!pud_present(*pud))
7044 return 0;
7045
7046 if (pud_leaf(*pud)) {
7047 #ifdef pud_page
7048 page = pud_page(*pud);
7049 if (PageHuge(page))
7050 return page_size(compound_head(page));
7051 #endif
7052 return 1ULL << PUD_SHIFT;
7053 }
7054
7055 pmd = pmd_offset(pud, addr);
7056 if (!pmd_present(*pmd))
7057 return 0;
7058
7059 if (pmd_leaf(*pmd)) {
7060 #ifdef pmd_page
7061 page = pmd_page(*pmd);
7062 if (PageHuge(page))
7063 return page_size(compound_head(page));
7064 #endif
7065 return 1ULL << PMD_SHIFT;
7066 }
7067
7068 pte = pte_offset_map(pmd, addr);
7069 if (!pte_present(*pte)) {
7070 pte_unmap(pte);
7071 return 0;
7072 }
7073
7074 page = pte_page(*pte);
7075 if (PageHuge(page)) {
7076 u64 size = page_size(compound_head(page));
7077 pte_unmap(pte);
7078 return size;
7079 }
7080
7081 pte_unmap(pte);
7082 return PAGE_SIZE;
7083 }
7084
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months