mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging: lustre: use NULL instead of 0 for pointer
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
81fb955d02
commit
df3c9577f4
@ -187,7 +187,7 @@ int lustre_start_simple(char *obdname, char *type, char *uuid,
|
|||||||
int rc;
|
int rc;
|
||||||
CDEBUG(D_MOUNT, "Starting obd %s (typ=%s)\n", obdname, type);
|
CDEBUG(D_MOUNT, "Starting obd %s (typ=%s)\n", obdname, type);
|
||||||
|
|
||||||
rc = do_lcfg(obdname, 0, LCFG_ATTACH, type, uuid, 0, 0);
|
rc = do_lcfg(obdname, 0, LCFG_ATTACH, type, uuid, NULL, NULL);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
CERROR("%s attach error %d\n", obdname, rc);
|
CERROR("%s attach error %d\n", obdname, rc);
|
||||||
return rc;
|
return rc;
|
||||||
@ -195,7 +195,7 @@ int lustre_start_simple(char *obdname, char *type, char *uuid,
|
|||||||
rc = do_lcfg(obdname, 0, LCFG_SETUP, s1, s2, s3, s4);
|
rc = do_lcfg(obdname, 0, LCFG_SETUP, s1, s2, s3, s4);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
CERROR("%s setup error %d\n", obdname, rc);
|
CERROR("%s setup error %d\n", obdname, rc);
|
||||||
do_lcfg(obdname, 0, LCFG_DETACH, 0, 0, 0, 0);
|
do_lcfg(obdname, 0, LCFG_DETACH, NULL, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -337,7 +337,8 @@ int lustre_start_mgc(struct super_block *sb)
|
|||||||
lnet_process_id_t id;
|
lnet_process_id_t id;
|
||||||
while ((rc = LNetGetId(i++, &id)) != -ENOENT) {
|
while ((rc = LNetGetId(i++, &id)) != -ENOENT) {
|
||||||
rc = do_lcfg(mgcname, id.nid,
|
rc = do_lcfg(mgcname, id.nid,
|
||||||
LCFG_ADD_UUID, niduuid, 0,0,0);
|
LCFG_ADD_UUID, niduuid,
|
||||||
|
NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Use mgsnode= nids */
|
/* Use mgsnode= nids */
|
||||||
@ -351,7 +352,8 @@ int lustre_start_mgc(struct super_block *sb)
|
|||||||
}
|
}
|
||||||
while (class_parse_nid(ptr, &nid, &ptr) == 0) {
|
while (class_parse_nid(ptr, &nid, &ptr) == 0) {
|
||||||
rc = do_lcfg(mgcname, nid,
|
rc = do_lcfg(mgcname, nid,
|
||||||
LCFG_ADD_UUID, niduuid, 0,0,0);
|
LCFG_ADD_UUID, niduuid,
|
||||||
|
NULL, NULL, NULL);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,7 +362,7 @@ int lustre_start_mgc(struct super_block *sb)
|
|||||||
ptr = lsi->lsi_lmd->lmd_dev;
|
ptr = lsi->lsi_lmd->lmd_dev;
|
||||||
while (class_parse_nid(ptr, &nid, &ptr) == 0) {
|
while (class_parse_nid(ptr, &nid, &ptr) == 0) {
|
||||||
rc = do_lcfg(mgcname, nid,
|
rc = do_lcfg(mgcname, nid,
|
||||||
LCFG_ADD_UUID, niduuid, 0,0,0);
|
LCFG_ADD_UUID, niduuid, NULL, NULL, NULL);
|
||||||
i++;
|
i++;
|
||||||
/* Stop at the first failover nid */
|
/* Stop at the first failover nid */
|
||||||
if (*ptr == ':')
|
if (*ptr == ':')
|
||||||
@ -396,13 +398,13 @@ int lustre_start_mgc(struct super_block *sb)
|
|||||||
while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) {
|
while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) {
|
||||||
j++;
|
j++;
|
||||||
rc = do_lcfg(mgcname, nid,
|
rc = do_lcfg(mgcname, nid,
|
||||||
LCFG_ADD_UUID, niduuid, 0,0,0);
|
LCFG_ADD_UUID, niduuid, NULL, NULL, NULL);
|
||||||
if (*ptr == ':')
|
if (*ptr == ':')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (j > 0) {
|
if (j > 0) {
|
||||||
rc = do_lcfg(mgcname, 0, LCFG_ADD_CONN,
|
rc = do_lcfg(mgcname, 0, LCFG_ADD_CONN,
|
||||||
niduuid, 0, 0, 0);
|
niduuid, NULL, NULL, NULL);
|
||||||
i++;
|
i++;
|
||||||
} else {
|
} else {
|
||||||
/* at ":/fsname" */
|
/* at ":/fsname" */
|
||||||
@ -532,7 +534,7 @@ static int lustre_stop_mgc(struct super_block *sb)
|
|||||||
for (i = 0; i < lsi->lsi_lmd->lmd_mgs_failnodes; i++) {
|
for (i = 0; i < lsi->lsi_lmd->lmd_mgs_failnodes; i++) {
|
||||||
sprintf(ptr, "_%x", i);
|
sprintf(ptr, "_%x", i);
|
||||||
rc = do_lcfg(LUSTRE_MGC_OBDNAME, 0, LCFG_DEL_UUID,
|
rc = do_lcfg(LUSTRE_MGC_OBDNAME, 0, LCFG_DEL_UUID,
|
||||||
niduuid, 0, 0, 0);
|
niduuid, NULL, NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
CERROR("del MDC UUID %s failed: rc = %d\n",
|
CERROR("del MDC UUID %s failed: rc = %d\n",
|
||||||
niduuid, rc);
|
niduuid, rc);
|
||||||
|
Loading…
Reference in New Issue
Block a user