Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49880263 authored by Emoly Liu's avatar Emoly Liu Committed by Greg Kroah-Hartman
Browse files

staging/lustre: Fix unnecessary parentheses around variables



This patch fixes all checkpatch occurences of
"CHECK: Unnecessary parentheses around xxx"
in Lustre code.

Signed-off-by: default avatarEmoly Liu <emoly.liu@intel.com>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 182ae52d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -995,7 +995,7 @@ struct hsm_user_request {
/** Return pointer to data field in a hsm user request */
/** Return pointer to data field in a hsm user request */
static inline void *hur_data(struct hsm_user_request *hur)
static inline void *hur_data(struct hsm_user_request *hur)
{
{
	return &(hur->hur_user_item[hur->hur_request.hr_itemcount]);
	return &hur->hur_user_item[hur->hur_request.hr_itemcount];
}
}


/**
/**
+2 −2
Original line number Original line Diff line number Diff line
@@ -941,7 +941,7 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg,
	}
	}
	case LCFG_PARAM: {
	case LCFG_PARAM: {
		struct lprocfs_static_vars lvars = { NULL };
		struct lprocfs_static_vars lvars = { NULL };
		struct lov_desc *desc = &(obd->u.lov.desc);
		struct lov_desc *desc = &obd->u.lov.desc;


		if (!desc) {
		if (!desc) {
			rc = -EINVAL;
			rc = -EINVAL;
@@ -1461,7 +1461,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
		}
		}


		desc = (struct lov_desc *)data->ioc_inlbuf1;
		desc = (struct lov_desc *)data->ioc_inlbuf1;
		memcpy(desc, &(lov->desc), sizeof(*desc));
		memcpy(desc, &lov->desc, sizeof(*desc));


		uuidp = (struct obd_uuid *)data->ioc_inlbuf2;
		uuidp = (struct obd_uuid *)data->ioc_inlbuf2;
		genp = (__u32 *)data->ioc_inlbuf3;
		genp = (__u32 *)data->ioc_inlbuf3;
+8 −8
Original line number Original line Diff line number Diff line
@@ -61,7 +61,7 @@ void lov_pool_putref(struct pool_desc *pool)
		LASSERT(hlist_unhashed(&pool->pool_hash));
		LASSERT(hlist_unhashed(&pool->pool_hash));
		LASSERT(list_empty(&pool->pool_list));
		LASSERT(list_empty(&pool->pool_list));
		LASSERT(!pool->pool_debugfs_entry);
		LASSERT(!pool->pool_debugfs_entry);
		lov_ost_pool_free(&(pool->pool_obds));
		lov_ost_pool_free(&pool->pool_obds);
		kfree(pool);
		kfree(pool);
	}
	}
}
}
@@ -260,7 +260,7 @@ static int pool_proc_show(struct seq_file *s, void *v)
	tgt = pool_tgt(iter->pool, iter->idx);
	tgt = pool_tgt(iter->pool, iter->idx);
	up_read(&pool_tgt_rw_sem(iter->pool));
	up_read(&pool_tgt_rw_sem(iter->pool));
	if (tgt)
	if (tgt)
		seq_printf(s, "%s\n", obd_uuid2str(&(tgt->ltd_uuid)));
		seq_printf(s, "%s\n", obd_uuid2str(&tgt->ltd_uuid));


	return 0;
	return 0;
}
}
@@ -400,7 +400,7 @@ int lov_pool_new(struct obd_device *obd, char *poolname)
	struct pool_desc *new_pool;
	struct pool_desc *new_pool;
	int rc;
	int rc;


	lov = &(obd->u.lov);
	lov = &obd->u.lov;


	if (strlen(poolname) > LOV_MAXPOOLNAME)
	if (strlen(poolname) > LOV_MAXPOOLNAME)
		return -ENAMETOOLONG;
		return -ENAMETOOLONG;
@@ -471,7 +471,7 @@ int lov_pool_del(struct obd_device *obd, char *poolname)
	struct lov_obd *lov;
	struct lov_obd *lov;
	struct pool_desc *pool;
	struct pool_desc *pool;


	lov = &(obd->u.lov);
	lov = &obd->u.lov;


	/* lookup and kill hash reference */
	/* lookup and kill hash reference */
	pool = cfs_hash_del_key(lov->lov_pools_hash_body, poolname);
	pool = cfs_hash_del_key(lov->lov_pools_hash_body, poolname);
@@ -503,7 +503,7 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname)
	unsigned int lov_idx;
	unsigned int lov_idx;
	int rc;
	int rc;


	lov = &(obd->u.lov);
	lov = &obd->u.lov;


	pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname);
	pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname);
	if (!pool)
	if (!pool)
@@ -517,7 +517,7 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname)
		if (!lov->lov_tgts[lov_idx])
		if (!lov->lov_tgts[lov_idx])
			continue;
			continue;
		if (obd_uuid_equals(&ost_uuid,
		if (obd_uuid_equals(&ost_uuid,
				    &(lov->lov_tgts[lov_idx]->ltd_uuid)))
				    &lov->lov_tgts[lov_idx]->ltd_uuid))
			break;
			break;
	}
	}
	/* test if ost found in lov */
	/* test if ost found in lov */
@@ -547,7 +547,7 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname)
	unsigned int lov_idx;
	unsigned int lov_idx;
	int rc = 0;
	int rc = 0;


	lov = &(obd->u.lov);
	lov = &obd->u.lov;


	pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname);
	pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname);
	if (!pool)
	if (!pool)
@@ -562,7 +562,7 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname)
			continue;
			continue;


		if (obd_uuid_equals(&ost_uuid,
		if (obd_uuid_equals(&ost_uuid,
				    &(lov->lov_tgts[lov_idx]->ltd_uuid)))
				    &lov->lov_tgts[lov_idx]->ltd_uuid))
			break;
			break;
	}
	}


+2 −2
Original line number Original line Diff line number Diff line
@@ -166,10 +166,10 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
	    !type->typ_name)
	    !type->typ_name)
		goto failed;
		goto failed;


	*(type->typ_dt_ops) = *dt_ops;
	*type->typ_dt_ops = *dt_ops;
	/* md_ops is optional */
	/* md_ops is optional */
	if (md_ops)
	if (md_ops)
		*(type->typ_md_ops) = *md_ops;
		*type->typ_md_ops = *md_ops;
	strcpy(type->typ_name, name);
	strcpy(type->typ_name, name);
	spin_lock_init(&type->obd_type_lock);
	spin_lock_init(&type->obd_type_lock);


+1 −1
Original line number Original line Diff line number Diff line
@@ -80,7 +80,7 @@ static void llog_free_handle(struct llog_handle *loghandle)
		LASSERT(list_empty(&loghandle->u.phd.phd_entry));
		LASSERT(list_empty(&loghandle->u.phd.phd_entry));
	else if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_CAT)
	else if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_CAT)
		LASSERT(list_empty(&loghandle->u.chd.chd_head));
		LASSERT(list_empty(&loghandle->u.chd.chd_head));
	LASSERT(sizeof(*(loghandle->lgh_hdr)) == LLOG_CHUNK_SIZE);
	LASSERT(sizeof(*loghandle->lgh_hdr) == LLOG_CHUNK_SIZE);
	kfree(loghandle->lgh_hdr);
	kfree(loghandle->lgh_hdr);
out:
out:
	kfree(loghandle);
	kfree(loghandle);
Loading