Whamcloud - gitweb
Bug #357, no more gratituous new line..., or typecasting
authorthantry <thantry>
Wed, 13 Nov 2002 04:45:22 +0000 (04:45 +0000)
committerthantry <thantry>
Wed, 13 Nov 2002 04:45:22 +0000 (04:45 +0000)
13 files changed:
lustre/llite/lproc_llite.c
lustre/llite/super.c
lustre/llite/super25.c
lustre/lov/lov_obd.c
lustre/mdc/mdc_request.c
lustre/mds/handler.c
lustre/obdclass/class_obd.c
lustre/obdclass/lprocfs_status.c
lustre/obdecho/echo.c
lustre/obdfilter/filter.c
lustre/osc/osc_request.c
lustre/ost/ost_handler.c
lustre/ptlrpc/rpc.c

index b3c4a0f..0ccfb9c 100644 (file)
@@ -162,7 +162,7 @@ int rd_dev_uuid(char* page, char **start, off_t off, int count, int *eof,
 struct lprocfs_vars status_var_nm_1[] = {
         {"status/uuid", rd_uuid, 0, 0},
         {"status/mntpt_path", rd_path, 0, 0},
-        {"status/fs_type", rd_fstype, 0, 0},
+        {"status/fstype", rd_fstype, 0, 0},
         {"status/blocksize",rd_blksize, 0, 0},
         {"status/kbytestotal",rd_kbytestotal, 0, 0},
         {"status/kbytesfree", rd_kbytesfree, 0, 0},
index 580a88a..027ee50 100644 (file)
@@ -267,7 +267,7 @@ static void ll_put_super(struct super_block *sb)
         mdc_getstatus(&sbi->ll_mdc_conn, &rootfid);
 
         lprocfs_dereg_mnt(sbi->ll_proc_root);
-        sbi->ll_proc_root=0;
+        sbi->ll_proc_root = NULL;
         
         obd_disconnect(&sbi->ll_mdc_conn);
 
index 4521ea4..270ecb6 100644 (file)
@@ -270,7 +270,7 @@ static void ll_put_super(struct super_block *sb)
         mdc_getstatus(&sbi->ll_mdc_conn, &rootfid);
 
         lprocfs_dereg_mnt(sbi->ll_proc_root);
-        sbi->ll_proc_root=0;
+        sbi->ll_proc_root = NULL;
 
         obd_disconnect(&sbi->ll_mdc_conn);
         OBD_FREE(sbi, sizeof(*sbi));
index 0ebde79..132fdd4 100644 (file)
@@ -1356,8 +1356,7 @@ static int lov_iocontrol(long cmd, struct lustre_handle *conn, int len,
         RETURN(rc);
 }
 
-int lov_attach(struct obd_device *dev,
-               obd_count len, void *data)
+int lov_attach(struct obd_device *dev, obd_count len, void *data)
 {
         return lprocfs_reg_obd(dev, status_var_nm_1, dev);
 }
index 6fc0ff1..1f884a4 100644 (file)
@@ -637,8 +637,7 @@ out:
 
         return rc;
 }
-int mdc_attach(struct obd_device *dev, 
-                   obd_count len, void *data)
+int mdc_attach(struct obd_device *dev, obd_count len, void *data)
 {
         return lprocfs_reg_obd(dev, status_var_nm_1, dev);
 }
index 4c334fd..b5db971 100644 (file)
@@ -1451,8 +1451,7 @@ static int ldlm_intent_policy(struct ldlm_lock *lock, void *req_cookie,
         RETURN(rc);
 }
 
-int mds_attach(struct obd_device *dev,
-               obd_count len, void *data)
+int mds_attach(struct obd_device *dev, obd_count len, void *data)
 {
         return lprocfs_reg_obd(dev, status_var_nm_1, dev);
 }
index 8888e80..9363959 100644 (file)
@@ -816,7 +816,7 @@ static int __init init_obdclass(void)
                 return err;
         obd_sysctl_init();
 
-        err=lprocfs_reg_main();
+        err = lprocfs_reg_main();
 
         return 0;
 }
index d3022c2..1f8316c 100644 (file)
@@ -140,14 +140,14 @@ int lprocfs_new_vars(struct proc_dir_entry* root,
         struct proc_dir_entry *new_parent;
         char temp_string[MAX_STRING_SIZE];
 
-        if (!list)
+        if (list == NULL)
                 return 0;
 
         while (list->name) {
                 temp_root = lprocfs_new_dir(root, list->name, tok);
                 if (temp_root == NULL) {
                         CDEBUG(D_OTHER, "!LProcFS: Mods: No root!");
-                        return PTR_ERR(temp_root);
+                        return -EINVAL;
                 }
 
                 /* Convert the last element into a leaf-node */
@@ -175,14 +175,14 @@ int lprocfs_new_vars(struct proc_dir_entry* root,
 int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *var,
                      void *data)
 {
-        return lprocfs_new_vars(root, var, (const char*) tok, data);
+        return lprocfs_new_vars(root, var, tok, data);
 }
 
 int lprocfs_reg_obd(struct obd_device *device, struct lprocfs_vars *list,
                     void *data)
 {
-        struct proc_dir_entry* this_dev_root = NULL;
-        int retval = 0;
+        struct proc_dir_entry* this_dev_root;
+        int retval;
         
         if(lprocfs_srch(device->obd_type->typ_procroot, device->obd_name)){
                 CDEBUG(D_OTHER, "Device with name [%s] exists!", 
@@ -204,16 +204,16 @@ int lprocfs_dereg_obd(struct obd_device* device)
 {
         CDEBUG(D_OTHER, "LPROCFS removing device = %s\n", device->obd_name);
 
-        if (!device) {
+        if (device == NULL) {
                 CDEBUG(D_OTHER, "! LProcfs:  Null pointer !\n");
                 return 0;
         }
-        if (!device->obd_proc_entry) {
+        if (device->obd_proc_entry == NULL) {
                 CDEBUG(D_OTHER, "! Proc entry non-existent !");
                 return 0;
         }
         lprocfs_remove_all(device->obd_proc_entry);
-        device->obd_proc_entry = 0;
+        device->obd_proc_entry = NULL;
         if (device->counters)
                 OBD_FREE(device->counters, device->cntr_mem_size);
 
@@ -254,13 +254,13 @@ int lprocfs_reg_class(struct obd_type* type, struct lprocfs_vars* list,
 
 int lprocfs_dereg_class(struct obd_type* class)
 {
-        if(!class){
+        if(class == NULL){
                 CDEBUG(D_OTHER, "Non-existent class",
                        class->typ_name);
                 return 0;
         }
         lprocfs_remove_all(class->typ_procroot);
-        class->typ_procroot = 0;
+        class->typ_procroot = NULL;
         CDEBUG(D_OTHER, "LPROCFS removed = %s\n", class->typ_name);
         return 0;
 
@@ -291,10 +291,9 @@ int lprocfs_reg_main()
 int lprocfs_dereg_main()
 {
         lprocfs_remove_all(proc_lustre_root);
-        proc_lustre_root = 0;
-        proc_lustre_dev_root = 0;
-        proc_lustre_fs_root = 0;
-
+        proc_lustre_root = NULL;
+        proc_lustre_dev_root = NULL;
+        proc_lustre_fs_root = NULL;
         return 0;
 }
 
index 1dcfa67..4934e15 100644 (file)
@@ -12,8 +12,8 @@
  * and Andreas Dilger <adilger@clusterfs.com>
  */
 
-static char rcsid[] __attribute ((unused)) = "$Id: echo.c,v 1.47 2002/11/13 02:46:41 thantry Exp $";
-#define OBDECHO_VERSION "$Revision: 1.47 $"
+static char rcsid[] __attribute ((unused)) = "$Id: echo.c,v 1.48 2002/11/13 04:45:21 thantry Exp $";
+#define OBDECHO_VERSION "$Revision: 1.48 $"
 
 #define EXPORT_SYMTAB
 
@@ -434,8 +434,7 @@ static int echo_cleanup(struct obd_device *obddev)
         RETURN(0);
 }
 
-int echo_attach(struct obd_device *dev, 
-                   obd_count len, void *data)
+int echo_attach(struct obd_device *dev, obd_count len, void *data)
 {
         return lprocfs_reg_obd(dev, status_var_nm_1, dev);
 }
index 0ae84c8..8a4d364 100644 (file)
@@ -1764,8 +1764,7 @@ int filter_copy_data(struct lustre_handle *dst_conn, struct obdo *dst,
 
         RETURN(err);
 }
-int filter_attach(struct obd_device *dev, 
-                   obd_count len, void *data)
+int filter_attach(struct obd_device *dev, obd_count len, void *data)
 {
         return lprocfs_reg_obd(dev, status_var_nm_1, dev);
 }
index a77e2d8..e626160 100644 (file)
@@ -868,8 +868,7 @@ out:
         return err;
 }
 
-int osc_attach(struct obd_device *dev, 
-                   obd_count len, void *data)
+int osc_attach(struct obd_device *dev, obd_count len, void *data)
 {
         return lprocfs_reg_obd(dev, status_var_nm_1, dev);
 }
index 94ad47f..228115f 100644 (file)
@@ -661,8 +661,7 @@ static int ost_cleanup(struct obd_device * obddev)
         MOD_DEC_USE_COUNT;
         RETURN(0);
 }
-int ost_attach(struct obd_device *dev, 
-                   obd_count len, void *data)
+int ost_attach(struct obd_device *dev, obd_count len, void *data)
 {
         return lprocfs_reg_obd(dev, status_var_nm_1, dev);
 }
index af6ce21..b4cd0be 100644 (file)
@@ -166,8 +166,7 @@ static int connmgr_connect(struct lustre_handle *conn, struct obd_device *src,
 {
         return class_connect(conn, src, cluuid);
 }
-int connmgr_attach(struct obd_device *dev, 
-                   obd_count len, void *data)
+int connmgr_attach(struct obd_device *dev, obd_count len, void *data)
 {
         return lprocfs_reg_obd(dev, status_var_nm_1, dev);
 }
@@ -194,8 +193,7 @@ static int __init ptlrpc_init(void)
         if (rc) 
                 RETURN(rc);
         ptlrpc_init_connection();
-        rc = class_register_type(&recovd_obd_ops, 
-                                 status_class_var,
+        rc = class_register_type(&recovd_obd_ops, status_class_var,
                                  LUSTRE_HA_NAME);
         if (rc) 
                 RETURN(rc);