Whamcloud - gitweb
LU-18034 build: compatibility updates for kernel 6.10 28/55728/3
authorShaun Tancheff <shaun.tancheff@hpe.com>
Mon, 15 Jul 2024 01:57:04 +0000 (08:57 +0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 8 Aug 2024 00:17:01 +0000 (00:17 +0000)
Braces required around trivial conditional statements that devolve
to a single semi-colon (;).

static modifier should be the first modifier used.

Use 'static inline' or 'inline' modifier at the front
of declaration if inline is to be used.

const int func(), const is discarded and should not be used.

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Iff67ff589e3ffde522c3b5bc03b1ec6705c6fc5c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55728
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/include/lu_object.h
lustre/include/lustre_net.h
lustre/lod/lod_pool.c
lustre/lov/lov_object.c
lustre/lov/lov_pool.c
lustre/mdc/mdc_request.c
lustre/obdclass/lprocfs_jobstats.c
lustre/ptlrpc/gss/gss_crypto.c
lustre/ptlrpc/lproc_ptlrpc.c

index b6d5423..d1ca415 100644 (file)
@@ -4274,11 +4274,11 @@ AC_DEFUN([LC_SRC_HAVE_CLASS_CREATE_MODULE_ARG], [
        LB2_LINUX_TEST_SRC([class_create_without_module_arg], [
                #include <linux/device/class.h>
        ],[
-               struct class *class __attribute__ ((unused));
+               struct class *class;
 
                class = class_create("empty");
                if (IS_ERR(class))
-                       /* checked */;
+                       return PTR_ERR(class);
        ],[-Werror])
 ])
 AC_DEFUN([LC_HAVE_CLASS_CREATE_MODULE_ARG], [
index 363b0f9..81d861c 100644 (file)
@@ -775,7 +775,7 @@ static inline const struct lu_fid *lu_object_fid(const struct lu_object *o)
 /**
  * return device operations vector for this object
  */
-static const inline struct lu_device_operations *
+static inline const struct lu_device_operations *
 lu_object_ops(const struct lu_object *o)
 {
        return o->lo_dev->ld_ops;
index a2ef33c..a196c05 100644 (file)
@@ -2658,7 +2658,7 @@ void ptlrpcd_decref(void);
  * @{
  */
 const char *ll_opcode2str(__u32 opcode);
-const int ll_str2opcode(const char *ops);
+int ll_str2opcode(const char *ops);
 #ifdef CONFIG_PROC_FS
 void ptlrpc_lprocfs_register_obd(struct obd_device *obd);
 void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd);
index b7c3380..ace2c9c 100644 (file)
@@ -324,7 +324,7 @@ static int pool_proc_open(struct inode *inode, struct file *file)
        return rc;
 }
 
-const static struct proc_ops pool_proc_operations = {
+static const struct proc_ops pool_proc_operations = {
        .proc_open      = pool_proc_open,
        .proc_read      = seq_read,
        .proc_lseek     = seq_lseek,
index 6f17244..45c4707 100644 (file)
@@ -1135,7 +1135,7 @@ static int lov_flush_empty(const struct lu_env *env, struct cl_object *obj,
        return 0;
 }
 
-const static struct lov_layout_operations lov_dispatch[] = {
+static const struct lov_layout_operations lov_dispatch[] = {
        [LLT_EMPTY] = {
                .llo_init      = lov_init_empty,
                .llo_delete    = lov_delete_empty,
index c31d8d5..7051533 100644 (file)
@@ -334,7 +334,7 @@ static int pool_proc_open(struct inode *inode, struct file *file)
        return rc;
 }
 
-const static struct proc_ops pool_proc_operations = {
+static const struct proc_ops pool_proc_operations = {
        .proc_open      = pool_proc_open,
        .proc_read      = seq_read,
        .proc_lseek     = seq_lseek,
index 23b1cb4..d825ff2 100644 (file)
@@ -1330,12 +1330,15 @@ static int ll_mdc_read_page_remote(void *data, struct page *page0)
        int npages;
        int i;
        int rc;
+       gfp_t gfp;
+
        ENTRY;
 
        max_pages = rp->rp_exp->exp_obd->u.cli.cl_max_pages_per_rpc;
        inode = op_data->op_data;
        fid = &op_data->op_fid1;
        LASSERT(inode != NULL);
+       gfp = mapping_gfp_mask(inode->i_mapping);
 
        OBD_ALLOC_PTR_ARRAY_LARGE(page_pool, max_pages);
        if (page_pool != NULL) {
@@ -1346,7 +1349,7 @@ static int ll_mdc_read_page_remote(void *data, struct page *page0)
        }
 
        for (npages = 1; npages < max_pages; npages++) {
-               page = page_cache_alloc(inode->i_mapping);
+               page = __page_cache_alloc(gfp);
                if (page == NULL)
                        break;
                page_pool[npages] = page;
index c2d27e2..dcb0c32 100644 (file)
@@ -480,7 +480,7 @@ static void *lprocfs_jobstats_seq_next(struct seq_file *p, void *v, loff_t *pos)
 
 static const char spaces[] = "                    ";
 
-static int inline width(const char *str, int len)
+static inline int width(const char *str, int len)
 {
        return len - min((int)strlen(str), 15);
 }
index a07fac7..cf217cb 100644 (file)
@@ -434,8 +434,9 @@ int gss_crypt_rawobjs(struct crypto_sync_skcipher *tfm, __u8 *iv,
                }
 
                skcipher_request_set_crypt(req, &src, &dst, src.length, iv);
-               if (!iv)
+               if (!iv) {
                        skcipher_request_set_crypt_iv(req);
+               }
 
                if (enc)
                        rc = crypto_skcipher_encrypt_iv(req, &dst, &src,
index e0a7d1d..a7d8db3 100644 (file)
@@ -182,7 +182,7 @@ const char *ll_opcode2str(__u32 opcode)
        return ll_rpc_opcode_table[offset].opname;
 }
 
-const int ll_str2opcode(const char *ops)
+int ll_str2opcode(const char *ops)
 {
        int i;