[intel-tdx:kvm-upstream 74/152] arch/x86/kvm/vmx/tdx_stubs.c:10:5: error: no previous prototype for 'tdx_dev_ioctl'
by kernel test robot
tree: https://github.com/intel/tdx.git kvm-upstream
head: bdfe06c17daab60c196ff80c1d98467a1d3734fa
commit: a7aca922f6abdf63d234853308401894d6c4106d [74/152] KVM: TDX: x86: Add support for device-scoped KVM_MEMORY_ENCRYPT_OP
config: i386-randconfig-m021-20211216 (https://download.01.org/0day-ci/archive/20211216/202112162154.fSEMJNMD-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/a7aca922f6abdf63d234853308401894d6c4106d
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream
git checkout a7aca922f6abdf63d234853308401894d6c4106d
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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 >>):
arch/x86/kvm/vmx/tdx_stubs.c:4:13: error: no previous prototype for 'tdx_pre_kvm_init' [-Werror=missing-prototypes]
4 | void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:6:12: error: no previous prototype for 'tdx_hardware_setup' [-Werror=missing-prototypes]
6 | int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:7:6: error: no previous prototype for 'tdx_hardware_enable' [-Werror=missing-prototypes]
7 | void tdx_hardware_enable(void) {}
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:8:6: error: no previous prototype for 'tdx_hardware_disable' [-Werror=missing-prototypes]
8 | void tdx_hardware_disable(void) {}
| ^~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:10:5: error: no previous prototype for 'tdx_dev_ioctl' [-Werror=missing-prototypes]
10 | int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/tdx_dev_ioctl +10 arch/x86/kvm/vmx/tdx_stubs.c
9
> 10 int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[linux-next:master 5819/6579] dtbs_check: arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml: imu@68: i2c-gate: False schema does not allow {'#address-cells': [[1]], '#size-cells': [[0]], 'ax8975@c': {'compatible': ['asahi-kasei,ak8975'], 'reg': [[12]]}}
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ea922272cbe547bdf58da2aaf240d59782c6a009
commit: fa0fdb78cb5d4cde00430ec481f09fbe7c029376 [5819/6579] ARM: dts: am335x: Use correct vendor prefix for Asahi Kasei Corp.
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce: make ARCH=arm dtbs_check
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
dtcheck warnings: (new ones prefixed by >>)
From schema: Documentation/devicetree/bindings/bus/ti-sysc.yaml
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml: serial@0: compatible: 'oneOf' conditional failed, one must be fixed:
['ti,am3352-uart', 'ti,omap3-uart'] is too long
Additional items are not allowed ('ti,omap3-uart' was unexpected)
'ti,am3352-uart' is not one of ['ti,am64-uart', 'ti,j721e-uart']
'ti,am654-uart' was expected
From schema: Documentation/devicetree/bindings/serial/8250_omap.yaml
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml:0:0: /ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/tps@24: failed to match any schema with compatible: ['ti,tps65217']
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml:0:0: /ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/tps@24/pwrbutton: failed to match any schema with compatible: ['ti,tps65217-pwrbutton']
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml:0:0: /ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/hdmi-encoder@70: failed to match any schema with compatible: ['nxp,tda998x']
>> arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml: imu@68: i2c-gate: False schema does not allow {'#address-cells': [[1]], '#size-cells': [[0]], 'ax8975@c': {'compatible': ['asahi-kasei,ak8975'], 'reg': [[12]]}}
From schema: Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml: pressure@76: 'vddd-supply' is a required property
From schema: Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml: pressure@76: 'vdda-supply' is a required property
From schema: Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml: scm@0: $nodename:0: 'scm@0' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
From schema: /usr/local/lib/python3.9/dist-packages/dtschema/schemas/simple-bus.yaml
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml: scm@0: clockdomains: {} should not be valid under {'type': 'object'}
From schema: /usr/local/lib/python3.9/dist-packages/dtschema/schemas/simple-bus.yaml
arch/arm/boot/dts/am335x-osd3358-sm-red.dt.yaml:0:0: /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0: failed to match any schema with compatible: ['ti,am3-scm', 'simple-bus']
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[frank-w-bpi-r2-4.14:5.16-r2pro 5/46] drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:191:6: error: no previous prototype for function 'mtk_wcn_consys_power_on'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.16-r2pro
head: 128a9afefdc678ae6492ee2067b1e33e14b6c28f
commit: 8f3e42b3d0855dda8a76965487facfb915a4dd33 [5/46] mt6625l: add changes outside driver dir
config: arm-randconfig-r003-20211216 (https://download.01.org/0day-ci/archive/20211216/202112162013.yu4EBbAk-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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/frank-w/BPI-R2-4.14/commit/8f3e42b3d0855dda8a76965487f...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.16-r2pro
git checkout 8f3e42b3d0855dda8a76965487facfb915a4dd33
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/ drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/ drivers/power/supply/
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 >>):
>> drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:191:6: error: no previous prototype for function 'mtk_wcn_consys_power_on' [-Werror,-Wmissing-prototypes]
VOID mtk_wcn_consys_power_on(VOID)
^
drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:191:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
VOID mtk_wcn_consys_power_on(VOID)
^
static
>> drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:207:6: error: no previous prototype for function 'mtk_wcn_consys_power_off' [-Werror,-Wmissing-prototypes]
VOID mtk_wcn_consys_power_off(VOID)
^
drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:207:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
VOID mtk_wcn_consys_power_off(VOID)
^
static
>> drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:224:7: error: no previous prototype for function 'mtk_wcn_consys_hw_reg_ctrl' [-Werror,-Wmissing-prototypes]
INT32 mtk_wcn_consys_hw_reg_ctrl(UINT32 on, UINT32 co_clock_type)
^
drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:224:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
INT32 mtk_wcn_consys_hw_reg_ctrl(UINT32 on, UINT32 co_clock_type)
^
static
>> drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:335:7: error: no previous prototype for function 'mtk_wcn_consys_hw_gpio_ctrl' [-Werror,-Wmissing-prototypes]
INT32 mtk_wcn_consys_hw_gpio_ctrl(UINT32 on)
^
drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:335:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
INT32 mtk_wcn_consys_hw_gpio_ctrl(UINT32 on)
^
static
>> drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:539:7: error: no previous prototype for function 'mtk_wcn_consys_hw_restore' [-Werror,-Wmissing-prototypes]
INT32 mtk_wcn_consys_hw_restore(struct device *device)
^
drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:539:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
INT32 mtk_wcn_consys_hw_restore(struct device *device)
^
static
>> drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:592:5: error: no previous prototype for function 'reserve_memory_consys_fn' [-Werror,-Wmissing-prototypes]
int reserve_memory_consys_fn(struct reserved_mem *rmem)
^
drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:592:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int reserve_memory_consys_fn(struct reserved_mem *rmem)
^
static
6 errors generated.
--
static const struct proc_ops wmt_dbg_fops = {
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1289:7: error: no previous prototype for function 'wmt_dev_dbg_setup' [-Werror,-Wmissing-prototypes]
INT32 wmt_dev_dbg_setup(VOID)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1289:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
INT32 wmt_dev_dbg_setup(VOID)
^
static
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1303:7: error: no previous prototype for function 'wmt_dev_dbg_remove' [-Werror,-Wmissing-prototypes]
INT32 wmt_dev_dbg_remove(VOID)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1303:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
INT32 wmt_dev_dbg_remove(VOID)
^
static
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1376:31: error: unused variable 'wmt_aee_fops' [-Werror,-Wunused-variable]
static const struct proc_ops wmt_aee_fops = {
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1374:7: error: no previous prototype for function 'wmt_dev_proc_for_aee_setup' [-Werror,-Wmissing-prototypes]
INT32 wmt_dev_proc_for_aee_setup(VOID)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1374:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
INT32 wmt_dev_proc_for_aee_setup(VOID)
^
static
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1390:7: error: no previous prototype for function 'wmt_dev_proc_for_aee_remove' [-Werror,-Wmissing-prototypes]
INT32 wmt_dev_proc_for_aee_remove(VOID)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1390:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
INT32 wmt_dev_proc_for_aee_remove(VOID)
^
static
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1494:20: error: implicit declaration of function 'get_fs' [-Werror,-Wimplicit-function-declaration]
fs=get_fs();
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1494:20: note: did you mean 'sget_fc'?
include/linux/fs.h:2564:21: note: 'sget_fc' declared here
struct super_block *sget_fc(struct fs_context *fc,
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1494:19: error: assigning to 'mm_segment_t' from incompatible type 'int'
fs=get_fs();
^~~~~~~~~
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1496:17: error: implicit declaration of function 'set_fs' [-Werror,-Wimplicit-function-declaration]
set_fs(fs);
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1496:17: note: did you mean 'get_fs'?
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1494:20: note: 'get_fs' declared here
fs=get_fs();
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1435:7: error: no previous prototype for function 'wmt_dev_read_file' [-Werror,-Wmissing-prototypes]
INT32 wmt_dev_read_file(PUINT8 pName, const PPUINT8 ppBufPtr, INT32 offset, INT32 padSzBuf)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1435:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
INT32 wmt_dev_read_file(PUINT8 pName, const PPUINT8 ppBufPtr, INT32 offset, INT32 padSzBuf)
^
static
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1528:25: error: implicit declaration of function 'get_fs' [-Werror,-Wimplicit-function-declaration]
mm_segment_t orig_fs = get_fs();
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1528:15: error: initializing 'mm_segment_t' with an expression of incompatible type 'int'
mm_segment_t orig_fs = get_fs();
^ ~~~~~~~~
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1555:2: error: implicit declaration of function 'set_fs' [-Werror,-Wimplicit-function-declaration]
set_fs(get_ds());
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1597:14: error: no previous prototype for function 'wmt_dev_is_file_exist' [-Werror,-Wmissing-prototypes]
MTK_WCN_BOOL wmt_dev_is_file_exist(PUINT8 pFileName)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1597:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
MTK_WCN_BOOL wmt_dev_is_file_exist(PUINT8 pFileName)
^
static
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1645:14: error: no previous prototype for function 'wmt_dev_tra_bitf_update' [-Werror,-Wmissing-prototypes]
extern INT32 wmt_dev_tra_bitf_update(void)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1645:8: note: declare 'static' if the function is not intended to be used outside of this translation unit
extern INT32 wmt_dev_tra_bitf_update(void)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1703:6: error: no previous prototype for function 'wmt_dev_tm_temp_query' [-Werror,-Wmissing-prototypes]
long wmt_dev_tm_temp_query(void)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1703:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
long wmt_dev_tm_temp_query(void)
^
static
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1801:9: error: no previous prototype for function 'WMT_write' [-Werror,-Wmissing-prototypes]
ssize_t WMT_write(struct file *filp, const char __user *buf, size_t count, loff_t *f_pos)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1801:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ssize_t WMT_write(struct file *filp, const char __user *buf, size_t count, loff_t *f_pos)
^
static
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1834:9: error: no previous prototype for function 'WMT_read' [-Werror,-Wmissing-prototypes]
ssize_t WMT_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1834:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ssize_t WMT_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos)
^
static
>> drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1865:14: error: no previous prototype for function 'WMT_poll' [-Werror,-Wmissing-prototypes]
unsigned int WMT_poll(struct file *filp, poll_table *wait)
^
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:1865:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned int WMT_poll(struct file *filp, poll_table *wait)
^
static
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +/mtk_wcn_consys_power_on +191 drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 190
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 @191 VOID mtk_wcn_consys_power_on(VOID)
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 192 {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 193 INT32 iRet = -1;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 194 iRet = pm_runtime_get_sync(&my_pdev->dev);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 195 if (iRet)
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 196 WMT_PLAT_ERR_FUNC("pm_runtime_get_sync() fail(%d)\n", iRet);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 197 else
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 198 WMT_PLAT_INFO_FUNC("pm_runtime_get_sync() CONSYS ok\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 199
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 200 iRet = device_init_wakeup(&my_pdev->dev, true);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 201 if (iRet)
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 202 WMT_PLAT_ERR_FUNC("device_init_wakeup(true) fail.\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 203 else
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 204 WMT_PLAT_INFO_FUNC("device_init_wakeup(true) CONSYS ok\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 205 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 206
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 @207 VOID mtk_wcn_consys_power_off(VOID)
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 208 {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 209 INT32 iRet = -1;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 210
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 211 iRet = pm_runtime_put_sync(&my_pdev->dev);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 212 if (iRet)
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 213 WMT_PLAT_ERR_FUNC("pm_runtime_put_sync() fail.\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 214 else
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 215 WMT_PLAT_INFO_FUNC("pm_runtime_put_sync() CONSYS ok\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 216
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 217 iRet = device_init_wakeup(&my_pdev->dev, false);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 218 if (iRet)
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 219 WMT_PLAT_ERR_FUNC("device_init_wakeup(false) fail.\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 220 else
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 221 WMT_PLAT_INFO_FUNC("device_init_wakeup(false) CONSYS ok\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 222 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 223
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 @224 INT32 mtk_wcn_consys_hw_reg_ctrl(UINT32 on, UINT32 co_clock_type)
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 225 {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 226 UINT32 retry = 10;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 227 UINT32 consysHwChipId = 0;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 228
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 229 WMT_PLAT_DBG_FUNC("CONSYS-HW-REG-CTRL(0x%08x),start\n", on);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 230 if (on) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 231 WMT_PLAT_DBG_FUNC("++\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 232 /*need PMIC driver provide new API protocol */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 233 /*1.AP power on VCN_1V8 LDO (with PMIC_WRAP API) VCN_1V8 */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 234 regulator_set_mode(reg_VCN18, REGULATOR_MODE_STANDBY);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 235 /* VOL_DEFAULT, VOL_1200, VOL_1300, VOL_1500, VOL_1800... */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 236 if (reg_VCN18) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 237 regulator_set_voltage(reg_VCN18, 1800000, 1800000);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 238 if (regulator_enable(reg_VCN18))
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 239 WMT_PLAT_ERR_FUNC("enable VCN18 fail\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 240 else
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 241 WMT_PLAT_DBG_FUNC("enable VCN18 ok\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 242 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 243 udelay(150);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 244 if (co_clock_type) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 245 /*step0,clk buf ctrl */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 246 WMT_PLAT_INFO_FUNC("co clock type(%d),turn on clk buf\n", co_clock_type);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 247 #if CONSYS_CLOCK_BUF_CTRL
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 248 clk_buf_ctrl(CLK_BUF_CONN, 1);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 249 #endif
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 250 /*if co-clock mode: */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 251 /*2.set VCN28 to SW control mode (with PMIC_WRAP API) */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 252 /*turn on VCN28 LDO only when FMSYS is activated" */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 253 regmap_update_bits(pmic_regmap, 0x41C, 0x1 << 14, 0x0 << 14);/*V28*/
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 254 } else {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 255 /*if NOT co-clock: */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 256 /*2.1.switch VCN28 to HW control mode (with PMIC_WRAP API) */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 257 regmap_update_bits(pmic_regmap, 0x41C, 0x1 << 14, 0x1 << 14);/*V28*/
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 258 /*2.2.turn on VCN28 LDO (with PMIC_WRAP API)" */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 259 /*fix vcn28 not balance warning */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 260 if (reg_VCN28) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 261 regulator_set_voltage(reg_VCN28, 2800000, 2800000);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 262 if (regulator_enable(reg_VCN28))
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 263 WMT_PLAT_ERR_FUNC("enable VCN_2V8 fail!\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 264 else
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 265 WMT_PLAT_DBG_FUNC("enable VCN_2V8 ok\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 266 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 267 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 268
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 269 /*3.assert CONNSYS CPU SW reset 0x10007018 "[12]=1'b1 [31:24]=8'h88 (key)" */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 270 reset_control_reset(rstc);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 271 mtk_wcn_consys_power_on();
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 272 /*11.26M is ready now, delay 10us for mem_pd de-assert */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 273 udelay(10);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 274 /*enable AP bus clock : connmcu_bus_pd API: enable_clock() ++?? */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 275 clk_prepare_enable(clk_infra_conn_main);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 276 WMT_PLAT_DBG_FUNC("[CCF]enable clk_infra_conn_main\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 277 /*12.poll CONNSYS CHIP ID until chipid is returned 0x18070008 */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 278 while (retry-- > 0) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 279 consysHwChipId = CONSYS_REG_READ(conn_reg.mcu_base + CONSYS_CHIP_ID_OFFSET) - 0xf6d;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 280
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 281 if ((consysHwChipId == 0x0321) || (consysHwChipId == 0x0335) || (consysHwChipId == 0x0337)) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 282 WMT_PLAT_INFO_FUNC("retry(%d)consys chipId(0x%08x)\n", retry, consysHwChipId);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 283 break;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 284 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 285 if ((consysHwChipId == 0x8163) || (consysHwChipId == 0x8127) || (consysHwChipId == 0x7623)) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 286 WMT_PLAT_INFO_FUNC("retry(%d)consys chipId(0x%08x)\n", retry, consysHwChipId);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 287 break;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 288 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 289
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 290 WMT_PLAT_ERR_FUNC("Read CONSYS chipId(0x%08x)", consysHwChipId);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 291 msleep(20);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 292 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 293
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 294 if ((0 == retry) || (0 == consysHwChipId))
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 295 WMT_PLAT_ERR_FUNC("Maybe has a consys power on issue,(0x%08x)\n", consysHwChipId);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 296
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 297 msleep(40);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 298
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 299 } else {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 300
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 301 clk_disable_unprepare(clk_infra_conn_main);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 302 WMT_PLAT_DBG_FUNC("[CCF] clk_disable_unprepare(clk_infra_conn_main) calling\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 303 mtk_wcn_consys_power_off();
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 304
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 305 if (co_clock_type) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 306 /*VCN28 has been turned off by GPS OR FM */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 307 #if CONSYS_CLOCK_BUF_CTRL
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 308 clk_buf_ctrl(CLK_BUF_CONN, 0);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 309 #endif
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 310 } else {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 311 regmap_update_bits(pmic_regmap, 0x41C, 0x1 << 14, 0x0 << 14);/*V28*/
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 312 /*turn off VCN28 LDO (with PMIC_WRAP API)" */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 313 if (reg_VCN28) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 314 if (regulator_disable(reg_VCN28))
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 315 WMT_PLAT_ERR_FUNC("disable VCN_2V8 fail!\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 316 else
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 317 WMT_PLAT_DBG_FUNC("disable VCN_2V8 ok\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 318 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 319 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 320
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 321 /*AP power off MT6625L VCN_1V8 LDO */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 322 regulator_set_mode(reg_VCN18, REGULATOR_MODE_STANDBY);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 323 if (reg_VCN18) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 324 if (regulator_disable(reg_VCN18))
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 325 WMT_PLAT_ERR_FUNC("disable VCN_1V8 fail!\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 326 else
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 327 WMT_PLAT_DBG_FUNC("disable VCN_1V8 ok\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 328 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 329
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 330 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 331 WMT_PLAT_DBG_FUNC("CONSYS-HW-REG-CTRL(0x%08x),finish\n", on);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 332 return 0;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 333 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 334
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 @335 INT32 mtk_wcn_consys_hw_gpio_ctrl(UINT32 on)
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 336 {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 337 INT32 iRet = 0;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 338
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 339 WMT_PLAT_DBG_FUNC("CONSYS-HW-GPIO-CTRL(0x%08x), start\n", on);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 340
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 341 if (on) {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 342
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 343 /* TODO: [FixMe][GeorgeKuo] double check if BGF_INT is implemented ok */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 344 /* iRet += wmt_plat_gpio_ctrl(PIN_BGF_EINT, PIN_STA_MUX); */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 345 iRet += wmt_plat_eirq_ctrl(PIN_BGF_EINT, PIN_STA_INIT);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 346 iRet += wmt_plat_eirq_ctrl(PIN_BGF_EINT, PIN_STA_EINT_DIS);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 347 WMT_PLAT_DBG_FUNC("CONSYS-HW, BGF IRQ registered and disabled\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 348
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 349 } else {
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 350
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 351 /* set bgf eint/all eint to deinit state, namely input low state */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 352 iRet += wmt_plat_eirq_ctrl(PIN_BGF_EINT, PIN_STA_EINT_DIS);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 353 iRet += wmt_plat_eirq_ctrl(PIN_BGF_EINT, PIN_STA_DEINIT);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 354 WMT_PLAT_DBG_FUNC("CONSYS-HW, BGF IRQ unregistered and disabled\n");
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 355 /* iRet += wmt_plat_gpio_ctrl(PIN_BGF_EINT, PIN_STA_DEINIT); */
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 356 }
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 357 WMT_PLAT_DBG_FUNC("CONSYS-HW-GPIO-CTRL(0x%08x), finish\n", on);
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 358 return iRet;
d03a149ef0a8e6 Frank Wunderlich 2021-08-29 359
:::::: The code at line 191 was first introduced by commit
:::::: d03a149ef0a8e6180c7c086fc189dedb7ecb8af5 mt6625l: add driver folder from 5.14
:::::: TO: Frank Wunderlich <frank-w(a)public-files.de>
:::::: CC: Frank Wunderlich <frank-w(a)public-files.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-tdx:kvm-upstream 73/152] arch/x86/kvm/vmx/main.c:25:14: error: lvalue required as left operand of assignment
by kernel test robot
tree: https://github.com/intel/tdx.git kvm-upstream
head: bdfe06c17daab60c196ff80c1d98467a1d3734fa
commit: 3545bcde2d72e4b5b5f16571788aac0ddb5f49a5 [73/152] KVM: TDX: Add KVM TDX system-wide initialization and teardown
config: i386-randconfig-m021-20211216 (https://download.01.org/0day-ci/archive/20211216/202112162007.5fUQkqjb-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/3545bcde2d72e4b5b5f16571788aac0ddb5f49a5
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream
git checkout 3545bcde2d72e4b5b5f16571788aac0ddb5f49a5
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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 >>):
arch/x86/kvm/vmx/main.c: In function 'vt_hardware_setup':
>> arch/x86/kvm/vmx/main.c:25:14: error: lvalue required as left operand of assignment
25 | enable_tdx = false;
| ^
--
arch/x86/kvm/vmx/tdx_stubs.c:4:13: error: no previous prototype for 'tdx_pre_kvm_init' [-Werror=missing-prototypes]
4 | void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
| ^~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:6:12: error: no previous prototype for 'tdx_hardware_setup' [-Werror=missing-prototypes]
6 | int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:7:6: error: no previous prototype for 'tdx_hardware_enable' [-Werror=missing-prototypes]
7 | void tdx_hardware_enable(void) {}
| ^~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:8:6: error: no previous prototype for 'tdx_hardware_disable' [-Werror=missing-prototypes]
8 | void tdx_hardware_disable(void) {}
| ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +25 arch/x86/kvm/vmx/main.c
15
16 static __init int vt_hardware_setup(void)
17 {
18 int ret;
19
20 ret = vmx_hardware_setup();
21 if (ret)
22 return ret;
23
24 if (enable_tdx && tdx_hardware_setup(&vt_x86_ops))
> 25 enable_tdx = false;
26 return 0;
27 }
28
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[djwong-xfs:repair-symlink-swapext 323/325] fs/xfs/libxfs/xfs_symlink_remote.c:311:1: warning: no previous prototype for 'xfs_symlink_write_target'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-symlink-swapext
head: 851df07d9599471df909c4ff0e3cf33f4b9619f0
commit: 90d15e3e9dcd303fbb36e9a54e7c36457ff9a254 [323/325] xfs: move symlink target write function to libxfs
config: m68k-randconfig-r006-20211214 (https://download.01.org/0day-ci/archive/20211216/202112162006.medrsrAU-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.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/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs repair-symlink-swapext
git checkout 90d15e3e9dcd303fbb36e9a54e7c36457ff9a254
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash fs/xfs/
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 >>):
fs/xfs/libxfs/xfs_symlink_remote.c:28:1: warning: no previous prototype for 'xfs_symlink_blocks' [-Wmissing-prototypes]
28 | xfs_symlink_blocks(
| ^~~~~~~~~~~~~~~~~~
fs/xfs/libxfs/xfs_symlink_remote.c:38:1: warning: no previous prototype for 'xfs_symlink_hdr_set' [-Wmissing-prototypes]
38 | xfs_symlink_hdr_set(
| ^~~~~~~~~~~~~~~~~~~
fs/xfs/libxfs/xfs_symlink_remote.c:68:1: warning: no previous prototype for 'xfs_symlink_hdr_ok' [-Wmissing-prototypes]
68 | xfs_symlink_hdr_ok(
| ^~~~~~~~~~~~~~~~~~
fs/xfs/libxfs/xfs_symlink_remote.c:167:1: warning: no previous prototype for 'xfs_symlink_local_to_remote' [-Wmissing-prototypes]
167 | xfs_symlink_local_to_remote(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/xfs/libxfs/xfs_symlink_remote.c:206:1: warning: no previous prototype for 'xfs_symlink_shortform_verify' [-Wmissing-prototypes]
206 | xfs_symlink_shortform_verify(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/xfs/libxfs/xfs_symlink_remote.c:239:1: warning: no previous prototype for 'xfs_symlink_remote_read' [-Wmissing-prototypes]
239 | xfs_symlink_remote_read(
| ^~~~~~~~~~~~~~~~~~~~~~~
>> fs/xfs/libxfs/xfs_symlink_remote.c:311:1: warning: no previous prototype for 'xfs_symlink_write_target' [-Wmissing-prototypes]
311 | xfs_symlink_write_target(
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/xfs_symlink_write_target +311 fs/xfs/libxfs/xfs_symlink_remote.c
308
309 /* Write the symlink target into the inode. */
310 int
> 311 xfs_symlink_write_target(
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v7 14/14] ima: Setup securityfs for IMA namespace
by kernel test robot
Hi Stefan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on zohar-integrity/next-integrity]
[also build test WARNING on linux/master linus/master v5.16-rc5]
[cannot apply to jmorris-security/next-testing next-20211215]
[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/Stefan-Berger/ima-Namespace-IMA-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity
config: mips-buildonly-randconfig-r006-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161948.NK58RGVT-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/bc2f1f683efbf2ad7b955fd4afc788616...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Stefan-Berger/ima-Namespace-IMA-with-audit-support-in-IMA-ns/20211216-134611
git checkout bc2f1f683efbf2ad7b955fd4afc78861609eff4b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash security/integrity/ima/
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 >>):
>> security/integrity/ima/ima_fs.c:451:5: warning: no previous prototype for function 'ima_fs_ns_init' [-Wmissing-prototypes]
int ima_fs_ns_init(struct user_namespace *user_ns, struct dentry *root)
^
security/integrity/ima/ima_fs.c:451:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ima_fs_ns_init(struct user_namespace *user_ns, struct dentry *root)
^
static
1 warning generated.
vim +/ima_fs_ns_init +451 security/integrity/ima/ima_fs.c
450
> 451 int ima_fs_ns_init(struct user_namespace *user_ns, struct dentry *root)
452 {
453 struct ima_namespace *ns = user_ns->ima_ns;
454 struct dentry *int_dir;
455 struct dentry *ima_dir = NULL;
456 struct dentry *ima_symlink = NULL;
457 struct dentry *binary_runtime_measurements = NULL;
458 struct dentry *ascii_runtime_measurements = NULL;
459 struct dentry *runtime_measurements_count = NULL;
460 struct dentry *violations = NULL;
461
462 /* FIXME: update when evm and integrity are namespaced */
463 if (user_ns != &init_user_ns) {
464 int_dir =
465 securityfs_create_dir("integrity", root);
466 if (IS_ERR(int_dir))
467 return -1;
468 } else
469 int_dir = integrity_dir;
470
471 ima_dir = securityfs_create_dir("ima", int_dir);
472 if (IS_ERR(ima_dir))
473 goto out;
474
475 ima_symlink = securityfs_create_symlink("ima", root, "integrity/ima",
476 NULL);
477 if (IS_ERR(ima_symlink))
478 goto out;
479
480 binary_runtime_measurements =
481 securityfs_create_file("binary_runtime_measurements",
482 S_IRUSR | S_IRGRP, ima_dir, NULL,
483 &ima_measurements_ops);
484 if (IS_ERR(binary_runtime_measurements))
485 goto out;
486
487 ascii_runtime_measurements =
488 securityfs_create_file("ascii_runtime_measurements",
489 S_IRUSR | S_IRGRP, ima_dir, NULL,
490 &ima_ascii_measurements_ops);
491 if (IS_ERR(ascii_runtime_measurements))
492 goto out;
493
494 runtime_measurements_count =
495 securityfs_create_file("runtime_measurements_count",
496 S_IRUSR | S_IRGRP, ima_dir, NULL,
497 &ima_measurements_count_ops);
498 if (IS_ERR(runtime_measurements_count))
499 goto out;
500
501 violations =
502 securityfs_create_file("violations", S_IRUSR | S_IRGRP,
503 ima_dir, NULL, &ima_htable_violations_ops);
504 if (IS_ERR(violations))
505 goto out;
506
507
508 if (!ns->policy_dentry_removed) {
509 ns->policy_dentry =
510 securityfs_create_file("policy", POLICY_FILE_FLAGS,
511 ima_dir, NULL,
512 &ima_measure_policy_ops);
513 if (IS_ERR(ns->policy_dentry))
514 goto out;
515 }
516
517 return 0;
518 out:
519 securityfs_remove(ns->policy_dentry);
520 securityfs_remove(violations);
521 securityfs_remove(runtime_measurements_count);
522 securityfs_remove(ascii_runtime_measurements);
523 securityfs_remove(binary_runtime_measurements);
524 securityfs_remove(ima_symlink);
525 securityfs_remove(ima_dir);
526 if (user_ns != &init_user_ns)
527 securityfs_remove(integrity_dir);
528
529 return -1;
530 }
531
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[djwong-xfs:repair-symlink-swapext 323/325] fs/xfs/libxfs/xfs_symlink_remote.c:311:1: warning: no previous prototype for function 'xfs_symlink_write_target'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-symlink-swapext
head: 851df07d9599471df909c4ff0e3cf33f4b9619f0
commit: 90d15e3e9dcd303fbb36e9a54e7c36457ff9a254 [323/325] xfs: move symlink target write function to libxfs
config: riscv-randconfig-r042-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161930.6u4fjfND-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs repair-symlink-swapext
git checkout 90d15e3e9dcd303fbb36e9a54e7c36457ff9a254
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash fs/xfs/
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 >>):
fs/xfs/libxfs/xfs_symlink_remote.c:28:1: warning: no previous prototype for function 'xfs_symlink_blocks' [-Wmissing-prototypes]
xfs_symlink_blocks(
^
fs/xfs/libxfs/xfs_symlink_remote.c:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:38:1: warning: no previous prototype for function 'xfs_symlink_hdr_set' [-Wmissing-prototypes]
xfs_symlink_hdr_set(
^
fs/xfs/libxfs/xfs_symlink_remote.c:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:68:1: warning: no previous prototype for function 'xfs_symlink_hdr_ok' [-Wmissing-prototypes]
xfs_symlink_hdr_ok(
^
fs/xfs/libxfs/xfs_symlink_remote.c:67:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:167:1: warning: no previous prototype for function 'xfs_symlink_local_to_remote' [-Wmissing-prototypes]
xfs_symlink_local_to_remote(
^
fs/xfs/libxfs/xfs_symlink_remote.c:166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:206:1: warning: no previous prototype for function 'xfs_symlink_shortform_verify' [-Wmissing-prototypes]
xfs_symlink_shortform_verify(
^
fs/xfs/libxfs/xfs_symlink_remote.c:205:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
xfs_failaddr_t
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:239:1: warning: no previous prototype for function 'xfs_symlink_remote_read' [-Wmissing-prototypes]
xfs_symlink_remote_read(
^
fs/xfs/libxfs/xfs_symlink_remote.c:238:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
>> fs/xfs/libxfs/xfs_symlink_remote.c:311:1: warning: no previous prototype for function 'xfs_symlink_write_target' [-Wmissing-prototypes]
xfs_symlink_write_target(
^
fs/xfs/libxfs/xfs_symlink_remote.c:310:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
7 warnings generated.
vim +/xfs_symlink_write_target +311 fs/xfs/libxfs/xfs_symlink_remote.c
236
237 /* Read a remote symlink target into the buffer. */
238 int
> 239 xfs_symlink_remote_read(
240 struct xfs_inode *ip,
241 char *link)
242 {
243 struct xfs_mount *mp = ip->i_mount;
244 struct xfs_bmbt_irec mval[XFS_SYMLINK_MAPS];
245 struct xfs_buf *bp;
246 xfs_daddr_t d;
247 char *cur_chunk;
248 int pathlen = ip->i_disk_size;
249 int nmaps = XFS_SYMLINK_MAPS;
250 int byte_cnt;
251 int n;
252 int error = 0;
253 int fsblocks = 0;
254 int offset;
255
256 ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED | XFS_ILOCK_EXCL));
257
258 fsblocks = xfs_symlink_blocks(mp, pathlen);
259 error = xfs_bmapi_read(ip, 0, fsblocks, mval, &nmaps, 0);
260 if (error)
261 goto out;
262
263 offset = 0;
264 for (n = 0; n < nmaps; n++) {
265 d = XFS_FSB_TO_DADDR(mp, mval[n].br_startblock);
266 byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount);
267
268 error = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), 0,
269 &bp, &xfs_symlink_buf_ops);
270 if (error)
271 return error;
272 byte_cnt = XFS_SYMLINK_BUF_SPACE(mp, byte_cnt);
273 if (pathlen < byte_cnt)
274 byte_cnt = pathlen;
275
276 cur_chunk = bp->b_addr;
277 if (xfs_has_crc(mp)) {
278 if (!xfs_symlink_hdr_ok(ip->i_ino, offset,
279 byte_cnt, bp)) {
280 xfs_inode_mark_sick(ip, XFS_SICK_INO_SYMLINK);
281 error = -EFSCORRUPTED;
282 xfs_alert(mp,
283 "symlink header does not match required off/len/owner (0x%x/Ox%x,0x%llx)",
284 offset, byte_cnt, ip->i_ino);
285 xfs_buf_relse(bp);
286 goto out;
287
288 }
289
290 cur_chunk += sizeof(struct xfs_dsymlink_hdr);
291 }
292
293 memcpy(link + offset, cur_chunk, byte_cnt);
294
295 pathlen -= byte_cnt;
296 offset += byte_cnt;
297
298 xfs_buf_relse(bp);
299 }
300 ASSERT(pathlen == 0);
301
302 link[ip->i_disk_size] = '\0';
303 error = 0;
304
305 out:
306 return error;
307 }
308
309 /* Write the symlink target into the inode. */
310 int
> 311 xfs_symlink_write_target(
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
arch/mips/mm/tlbex.c:2599 check_pabits() warn: always true condition '(fillbits >= ((__builtin_constant_p(0)) ?(((0) < 2) ?0:63 - __builtin_clzll(0)):((4 <= 4)) ?__ilog2_u32(0):__ilog2_u64(0))) => (0-u32max >= 0)'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2b14864acbaaf03d9c01982e243a84632524c3ac
commit: 2f78788b55baa3410b1ec91a576286abe1ad4d6a ilog2: improve ilog2 for constant arguments
date: 1 year ago
config: mips-randconfig-m031-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161929.ccx97Im9-lk...)
compiler: mips64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
arch/mips/mm/tlbex.c:2599 check_pabits() warn: always true condition '(fillbits >= ((__builtin_constant_p(0)) ?(((0) < 2) ?0:63 - __builtin_clzll(0)):((4 <= 4)) ?__ilog2_u32(0):__ilog2_u64(0))) => (0-u32max >= 0)'
Old smatch warnings:
arch/mips/mm/tlbex.c:1681 iPTE_LW() warn: curly braces intended?
arch/mips/mm/tlbex.c:1713 iPTE_SW() warn: inconsistent indenting
vim +2599 arch/mips/mm/tlbex.c
c5b367835cfc7a Steven J. Hill 2015-02-26 2569
00bf1c691d082c Paul Burton 2015-09-22 2570 static void check_pabits(void)
00bf1c691d082c Paul Burton 2015-09-22 2571 {
00bf1c691d082c Paul Burton 2015-09-22 2572 unsigned long entry;
00bf1c691d082c Paul Burton 2015-09-22 2573 unsigned pabits, fillbits;
00bf1c691d082c Paul Burton 2015-09-22 2574
00bf1c691d082c Paul Burton 2015-09-22 2575 if (!cpu_has_rixi || !_PAGE_NO_EXEC) {
00bf1c691d082c Paul Burton 2015-09-22 2576 /*
00bf1c691d082c Paul Burton 2015-09-22 2577 * We'll only be making use of the fact that we can rotate bits
00bf1c691d082c Paul Burton 2015-09-22 2578 * into the fill if the CPU supports RIXI, so don't bother
00bf1c691d082c Paul Burton 2015-09-22 2579 * probing this for CPUs which don't.
00bf1c691d082c Paul Burton 2015-09-22 2580 */
00bf1c691d082c Paul Burton 2015-09-22 2581 return;
00bf1c691d082c Paul Burton 2015-09-22 2582 }
00bf1c691d082c Paul Burton 2015-09-22 2583
00bf1c691d082c Paul Burton 2015-09-22 2584 write_c0_entrylo0(~0ul);
00bf1c691d082c Paul Burton 2015-09-22 2585 back_to_back_c0_hazard();
00bf1c691d082c Paul Burton 2015-09-22 2586 entry = read_c0_entrylo0();
00bf1c691d082c Paul Burton 2015-09-22 2587
00bf1c691d082c Paul Burton 2015-09-22 2588 /* clear all non-PFN bits */
00bf1c691d082c Paul Burton 2015-09-22 2589 entry &= ~((1 << MIPS_ENTRYLO_PFN_SHIFT) - 1);
00bf1c691d082c Paul Burton 2015-09-22 2590 entry &= ~(MIPS_ENTRYLO_RI | MIPS_ENTRYLO_XI);
00bf1c691d082c Paul Burton 2015-09-22 2591
00bf1c691d082c Paul Burton 2015-09-22 2592 /* find a lower bound on PABITS, and upper bound on fill bits */
00bf1c691d082c Paul Burton 2015-09-22 2593 pabits = fls_long(entry) + 6;
00bf1c691d082c Paul Burton 2015-09-22 2594 fillbits = max_t(int, (int)BITS_PER_LONG - pabits, 0);
00bf1c691d082c Paul Burton 2015-09-22 2595
00bf1c691d082c Paul Burton 2015-09-22 2596 /* minus the RI & XI bits */
00bf1c691d082c Paul Burton 2015-09-22 2597 fillbits -= min_t(unsigned, fillbits, 2);
00bf1c691d082c Paul Burton 2015-09-22 2598
00bf1c691d082c Paul Burton 2015-09-22 @2599 if (fillbits >= ilog2(_PAGE_NO_EXEC))
00bf1c691d082c Paul Burton 2015-09-22 2600 fill_includes_sw_bits = true;
00bf1c691d082c Paul Burton 2015-09-22 2601
00bf1c691d082c Paul Burton 2015-09-22 2602 pr_debug("Entry* registers contain %u fill bits\n", fillbits);
00bf1c691d082c Paul Burton 2015-09-22 2603 }
00bf1c691d082c Paul Burton 2015-09-22 2604
:::::: The code at line 2599 was first introduced by commit
:::::: 00bf1c691d082c1945fdba032c03a9a82e9e7e61 MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields
:::::: TO: Paul Burton <paul.burton(a)imgtec.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week