Whamcloud - gitweb
LU-16291 build: make kobj_type constant 23/49123/3
authorJian Yu <yujian@whamcloud.com>
Thu, 26 Jan 2023 06:54:37 +0000 (22:54 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Mar 2023 06:45:11 +0000 (06:45 +0000)
commit88783c0f8e05178090548960e051a624a1c6561a
tree26358aee2b9ef88f7c792b7be29367be30ba56c5
parentf40c9bbe8f2bc94eb8a7ce997330fc46f41cee3c
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);
     |             ^

Lustre-change: https://review.whamcloud.com/49043
Lustre-commit: d1dbf26afd6676e02a2a00e635b9ad1fe14cf68e

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