Whamcloud - gitweb
LU-6142 utils: Fix style issues for folder lustre/include/lustre 00/53900/4
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Sat, 3 Feb 2024 21:38:05 +0000 (03:08 +0530)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Feb 2024 07:01:15 +0000 (07:01 +0000)
This patch fixes issues reported by checkpatch
for all files under folder lustre/include/lustre/

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I65e87c8343bc0b90b71684827d8ca2bd7efd652e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53900
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre/libiam.h
lustre/include/lustre/lustreapi.h

index 6ccd52f..39b6224 100644 (file)
  * Author: Fan Yong <fanyong@clusterfs.com>
  */
 
-/*
- *  lustre/libiam.h
- */
-
+/* lustre/libiam.h */
 #ifndef __IAM_ULIB_H__
 #define __IAM_ULIB_H__
 
-/** \defgroup libiam libiam
- *
- * @{
- */
-
-
 #define DX_FMT_NAME_LEN 16
 
 #define IAM_LFIX_ROOT_MAGIC  0xbedabb1edULL
@@ -60,8 +51,8 @@ enum {
 };
 
 enum iam_fmt_t {
-        FMT_LFIX = 0,
-        FMT_LVAR = 1
+       FMT_LFIX = 0,
+       FMT_LVAR = 1,
 };
 
 struct dx_countlimit {
@@ -156,11 +147,11 @@ static inline unsigned int root_limit(unsigned int root_gap,
 }
 
 struct iam_uapi_info {
-        __u16 iui_keysize;
-        __u16 iui_recsize;
-        __u16 iui_ptrsize;
-        __u16 iui_height;
-        char  iui_fmt_name[DX_FMT_NAME_LEN];
+       __u16 iui_keysize;
+       __u16 iui_recsize;
+       __u16 iui_ptrsize;
+       __u16 iui_height;
+       char  iui_fmt_name[DX_FMT_NAME_LEN];
 };
 
 /*
@@ -168,7 +159,7 @@ struct iam_uapi_info {
  * Return 0 if success, else -1.
  */
 int iam_creat(char *filename, enum iam_fmt_t fmt,
-              int blocksize, int keysize, int recsize, int ptrsize);
+             int blocksize, int keysize, int recsize, int ptrsize);
 
 /*
  * Open an iam file, but do NOT creat it if the file doesn't exist.
@@ -178,63 +169,55 @@ int iam_creat(char *filename, enum iam_fmt_t fmt,
 int iam_open(char *filename, struct iam_uapi_info *ua);
 
 /*
- * Close file opened by iam_open. 
+ * Close file opened by iam_open.
  */
 int iam_close(int fd);
 
 /*
  * Please use iam_open before use this function.
  */
-int iam_insert(int fd, struct iam_uapi_info *ua,
-               int key_need_convert, char *keybuf,
-               int rec_need_convert, char *recbuf);
+int iam_insert(int fd, struct iam_uapi_info *ua, int key_need_convert,
+              char *keybuf, int rec_need_convert, char *recbuf);
 
 /*
  * Please use iam_open before use this function.
  */
 int iam_lookup(int fd, struct iam_uapi_info *ua,
-               int key_need_convert, char *key_buf,
-               int *keysize, char *save_key,
-               int rec_need_convert, char *rec_buf,
-               int *recsize, char *save_rec);
+              int key_need_convert, char *key_buf, int *keysize,
+              char *save_key, int rec_need_convert, char *rec_buf,
+              int *recsize, char *save_rec);
 
 /*
  * Please use iam_open before use this function.
  */
-int iam_delete(int fd, struct iam_uapi_info *ua,
-               int key_need_convert, char *keybuf,
-               int rec_need_convert, char *recbuf);
+int iam_delete(int fd, struct iam_uapi_info *ua, int key_need_convert,
+              char *keybuf, int rec_need_convert, char *recbuf);
 
 /*
  * Please use iam_open before use this function.
  */
-int iam_it_start(int fd, struct iam_uapi_info *ua,
-                 int key_need_convert, char *key_buf,
-                 int *keysize, char *save_key,
-                 int rec_need_convert, char *rec_buf,
-                 int *recsize, char *save_rec);
+int iam_it_start(int fd, struct iam_uapi_info *ua, int key_need_convert,
+                char *key_buf, int *keysize, char *save_key,
+                int rec_need_convert, char *rec_buf, int *recsize,
+                char *save_rec);
 
 /*
  * Please use iam_open before use this function.
  */
-int iam_it_next(int fd, struct iam_uapi_info *ua,
-                int key_need_convert, char *key_buf,
-                int *keysize, char *save_key,
-                int rec_need_convert, char *rec_buf,
-                int *recsize, char *save_rec);
+int iam_it_next(int fd, struct iam_uapi_info *ua, int key_need_convert,
+               char *key_buf, int *keysize, char *save_key,
+               int rec_need_convert, char *rec_buf, int *recsize,
+               char *save_rec);
 
 /*
  * Please use iam_open before use this function.
  */
-int iam_it_stop(int fd, struct iam_uapi_info *ua,
-                int key_need_convert, char *keybuf,
-                int rec_need_convert, char *recbuf);
+int iam_it_stop(int fd, struct iam_uapi_info *ua, int key_need_convert,
+               char *keybuf, int rec_need_convert, char *recbuf);
 
 /*
  * Change iam file mode.
  */
 int iam_polymorph(char *filename, unsigned long mode);
 
-/** @} libiam */
-
 #endif
index 067bc5c..f118dd5 100644 (file)
@@ -78,7 +78,6 @@ typedef struct statx lstatx_t;
  * BUILD_BUG_ON() is Compile-time check which verifies correctness at
  * compile-time rather than runtime. If "cond" is true, (1 - 2*!!(cond))
  * will be a negative value, which will cause the compiler to complain.
- *
  */
 #ifndef BUILD_BUG_ON
 #define BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2*!!(cond)]))
@@ -87,7 +86,8 @@ typedef struct statx lstatx_t;
 /* Currently external applications can access this but in the
  * future this will no longer be exposed for the user. Instead
  * if you want to know if the library is initialized just call
- * llapi_liblustreapi_initialized() which is now available. */
+ * llapi_liblustreapi_initialized() which is now available.
+ */
 extern bool liblustreapi_initialized;
 
 typedef void (*llapi_cb_t)(char *obd_type_name, char *obd_name, char *obd_uuid,
@@ -95,14 +95,14 @@ typedef void (*llapi_cb_t)(char *obd_type_name, char *obd_name, char *obd_uuid,
 
 /* lustreapi message severity level */
 enum llapi_message_level {
-        LLAPI_MSG_OFF    = 0,
-        LLAPI_MSG_FATAL  = 1,
-        LLAPI_MSG_ERROR  = 2,
-        LLAPI_MSG_WARN   = 3,
-        LLAPI_MSG_NORMAL = 4,
-        LLAPI_MSG_INFO   = 5,
-        LLAPI_MSG_DEBUG  = 6,
-        LLAPI_MSG_MAX
+       LLAPI_MSG_OFF    = 0,
+       LLAPI_MSG_FATAL  = 1,
+       LLAPI_MSG_ERROR  = 2,
+       LLAPI_MSG_WARN   = 3,
+       LLAPI_MSG_NORMAL = 4,
+       LLAPI_MSG_INFO   = 5,
+       LLAPI_MSG_DEBUG  = 6,
+       LLAPI_MSG_MAX
 };
 
 typedef void (*llapi_log_callback_t)(enum llapi_message_level level, int err,
@@ -262,7 +262,8 @@ struct find_param {
        time_t                   fp_mtime;
        time_t                   fp_ctime;
        /* {a,m,c,b}sign cannot be bitfields due to using pointers to
-        * access them during argument parsing. */
+        * access them during argument parsing.
+        */
        int                      fp_asign;
        int                      fp_msign;
        int                      fp_csign;
@@ -346,7 +347,7 @@ struct find_param {
                                 fp_newerxy:1,
                                 fp_exclude_btime:1,
                                 fp_exclude_perm:1,
-                                fp_stop_on_error:1, /* stop iteration on error */
+                                fp_stop_on_error:1, /* stop iteration on err */
                                 fp_exclude_nlink:1, /* Once used, we must add*/
                                 fp_exclude_attrs:1, /* a separate flag field */
                                 fp_unused_bit7:1;   /* at end of struct.  */
@@ -573,8 +574,7 @@ int llapi_fswap_layouts(int fd1, int fd2, __u64 dv1, __u64 dv2, __u64 flags);
 int llapi_swap_layouts(const char *path1, const char *path2, __u64 dv1,
                       __u64 dv2, __u64 flags);
 
-/* Changelog interface.  priv is private state, managed internally by these
- * functions */
+/* Changelog interface. priv is private connection state, managed internally */
 
 /* Records received are in extended format now, though most of them are still
  * written in disk in changelog_rec format (to save space and time), it's