Whamcloud - gitweb
LU-16291 build: make kobj_type constant 43/49043/3
authorJian Yu <yujian@whamcloud.com>
Fri, 2 Dec 2022 19:27:43 +0000 (11:27 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 13 Dec 2022 16:07:40 +0000 (16:07 +0000)
commitd1dbf26afd6676e02a2a00e635b9ad1fe14cf68e
tree59e87e9eadd6b266a30cb7cfef99cf5dc1c78796
parent6f74bb60ff6c58f4a2647556124c501100330f4c
LU-16291 build: make kobj_type constant

Kernel v5.16-rc2-28-gee6d3dd4ed48:
commit ee6d3dd4ed48ab24b74bab3c3977b8218518247d
driver core: make kobj_type constant.

This patch makes struct kobj_type constant to fix
the following build failure against kernel 5.16:

lustre/obdclass/obd_config.c: In function 'class_modify_config':
lustre/obdclass/obd_config.c:1639:13: error: assignment discards
'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
1639 |         typ = get_ktype(kobj);
     |             ^

Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I19e0d1f4e3cf97f6871e038487cda9294ac1f67b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49043
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/mgs/lproc_mgs.c
lustre/obdclass/obd_config.c
lustre/ofd/ofd_dev.c