Remove set but unused variables as report list.
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: If9120ec088a2dd0b65564330bc295c08a1e579b7
Reviewed-on: http://review.whamcloud.com/23221
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
{
struct cfs_lstr addrrange;
struct cfs_lstr net;
- struct cfs_lstr tmp;
struct nidrange *nr;
- tmp = *src;
if (cfs_gettok(src, '@', &addrrange) == 0)
goto failed;
struct lu_seq_range *range)
{
struct lu_seq_range tmp = { 0, };
- int rc;
char kernbuf[MAX_FID_RANGE_STRLEN];
ENTRY;
}
/* of the form "[0x0000000240000400 - 0x000000028000400]" */
- rc = sscanf(kernbuf, "[%llx - %llx]\n",
- (long long unsigned *)&tmp.lsr_start,
- (long long unsigned *)&tmp.lsr_end);
+ sscanf(kernbuf, "[%llx - %llx]\n",
+ (long long unsigned *)&tmp.lsr_start,
+ (long long unsigned *)&tmp.lsr_end);
if (!lu_seq_range_is_sane(&tmp) || lu_seq_range_is_zero(&tmp) ||
tmp.lsr_start < range->lsr_start || tmp.lsr_end > range->lsr_end)
RETURN(-EINVAL);
struct mdd_object *child;
char *name = mdd_env_info(env)->mti_key;
int len;
- int recsize;
int is_dir;
bool target_exist = false;
}
fid_le_to_cpu(&ent->lde_fid, &ent->lde_fid);
- recsize = le16_to_cpu(ent->lde_reclen);
/* Insert new fid with target name into target dir */
if ((ent->lde_namelen == 1 && ent->lde_name[0] == '.') ||
struct seq_file *s = data;
struct agent_action_iterator *aai;
int sz;
- size_t count;
char buf[12];
ENTRY;
hdr->lrh_index <= aai->aai_index))
RETURN(0);
- count = s->count;
sz = larr->arr_hai.hai_len - sizeof(larr->arr_hai);
seq_printf(s, "lrh=[type=%X len=%d idx=%d/%d] fid="DFID
" dfid="DFID" compound/cookie=%#llx/%#llx"
int lproc_mgs_add_live(struct mgs_device *mgs, struct fs_db *fsdb)
{
- int rc;
-
if (!mgs->mgs_proc_live)
return 0;
- rc = lprocfs_seq_create(mgs->mgs_proc_live, fsdb->fsdb_name, 0644,
- &mgs_live_fops, fsdb);
-
- return 0;
+ return lprocfs_seq_create(mgs->mgs_proc_live, fsdb->fsdb_name, 0644,
+ &mgs_live_fops, fsdb);
}
int lproc_mgs_del_live(struct mgs_device *mgs, struct fs_db *fsdb)
else
rc = -ENOMEM;
- return 0;
+ return rc;
}
static void mgs_object_free(const struct lu_env *env, struct lu_object *o)
int from_cache;
int force = 0; /* can use cached data intially */
long chunk = ofd_grant_chunk(exp, ofd, NULL);
- int rc;
ENTRY;
* space on the server */
spin_unlock(&ofd->ofd_grant_lock);
/* discard errors, at least we tried ... */
- rc = dt_sync(env, ofd->ofd_osd);
+ dt_sync(env, ofd->ofd_osd);
force = 2;
goto refresh;
}
struct obdo *oa)
{
struct ofd_device *ofd = ofd_exp(exp);
- struct ofd_thread_info *info;
u64 seq = ostid_seq(&oa->o_oi);
struct ofd_seq *oseq;
int rc = 0, diff = 1;
ENTRY;
- info = ofd_info_init(env, exp);
+ ofd_info_init(env, exp);
LASSERT(seq == FID_SEQ_ECHO);
LASSERT(oa->o_valid & OBD_MD_FLGROUP);
int i = 0;
struct cfs_crypto_hash_desc *hdesc;
unsigned int bufsize;
- int err;
unsigned char cfs_alg = cksum_obd2cfs(cksum_type);
LASSERT(pg_count > 0);
}
bufsize = sizeof(cksum);
- err = cfs_crypto_hash_final(hdesc, (unsigned char *)&cksum, &bufsize);
+ cfs_crypto_hash_final(hdesc, (unsigned char *)&cksum, &bufsize);
/* For sending we only compute the wrong checksum instead
* of corrupting the data so it is still correct on a redo */
*/
static int iam_path_lookup(struct iam_path *path, int index)
{
- struct iam_container *c;
struct iam_leaf *leaf;
int result;
- c = path->ip_container;
leaf = &path->ip_leaf;
result = iam_lookup_lock(path, &leaf->il_lock, DLT_WRITE);
assert_inv(iam_path_check(path));
iam_ptr_t cursor;
struct dynlock_handle *lh[DX_MAX_TREE_HEIGHT] = { NULL, };
int result;
- struct inode *object;
/*
* Locking for iam_index_next()... is to be described.
*/
- object = c->ic_object;
cursor = path->ip_frame->leaf;
while (1) {
* insertion point moves into new leaf.
*/
int shift;
- int result;
shift = iam_lfix_diff(l, l->il_at, start);
*bh = l->il_bh;
l->il_bh = new_leaf;
l->il_curidx = new_blknr;
- result = iam_lfix_init(l);
+ iam_lfix_init(l);
/*
* init cannot fail, as node was just initialized.
*/
* insertion point moves into new leaf.
*/
ptrdiff_t shift;
- int result;
shift = PDIFF(leaf->il_at, first_to_move);
*bh = leaf->il_bh;
leaf->il_curidx = new_blknr;
assert_corr(iam_leaf_is_locked(leaf));
- result = lvar_init(leaf);
+ lvar_init(leaf);
/*
* init cannot fail, as node was just initialized.
*/
struct qmt_thread_info *qti = qmt_info(env);
struct qmt_pool_info *pool = lqe2qpi(lqe);
struct ldlm_resource *res = NULL;
- int rc;
ENTRY;
lquota_generate_fid(&qti->qti_fid, pool->qpi_key & 0x0000ffff,
RETURN_EXIT;
}
- rc = qmt_glimpse_lock(env, pool->qpi_qmt, res, &qti->qti_gl_desc,
- NULL, NULL);
+ qmt_glimpse_lock(env, pool->qpi_qmt, res, &qti->qti_gl_desc,
+ NULL, NULL);
ldlm_resource_putref(res);
EXIT;
}
struct qmt_thread_info *qti = qmt_info(env);
struct qmt_pool_info *pool = lqe2qpi(lqe);
struct ldlm_resource *res = NULL;
- int rc;
ENTRY;
if (!lqe->lqe_enforced)
lqe_write_unlock(lqe);
/* issue glimpse callback to slaves */
- rc = qmt_glimpse_lock(env, qmt, res, &qti->qti_gl_desc,
- uuid ? qmt_id_lock_cb : NULL, (void *)uuid);
+ qmt_glimpse_lock(env, qmt, res, &qti->qti_gl_desc,
+ uuid ? qmt_id_lock_cb : NULL, (void *)uuid);
lqe_write_lock(lqe);
if (lqe->lqe_revoke_time == 0 &&
{
struct ptlrpc_request *req = data;
struct lquota_entry *lqe;
- struct qsd_instance *qsd;
struct ldlm_gl_lquota_desc *desc;
struct lquota_lvb *lvb;
int rc;
LQUOTA_DEBUG(lqe, "glimpse on quota locks, new qunit:%llu",
desc->gl_qunit);
- qsd = lqe2qqi(lqe)->qqi_qsd;
-
lqe_write_lock(lqe);
lvb->lvb_id_rel = 0;
if (desc->gl_qunit != 0 && desc->gl_qunit != lqe->lqe_qunit) {
{
struct lustre_handle *lockh;
struct quota_body *rep_qbody = NULL, *req_qbody;
- struct ldlm_intent *lit;
struct qsd_async_args *aa = (struct qsd_async_args *)arg;
__u64 flags = LDLM_FL_HAS_INTENT;
ENTRY;
LASSERT(aa->aa_exp);
lockh = &aa->aa_lockh;
req_qbody = req_capsule_client_get(&req->rq_pill, &RMF_QUOTA_BODY);
- lit = req_capsule_client_get(&req->rq_pill, &RMF_LDLM_INTENT);
+ req_capsule_client_get(&req->rq_pill, &RMF_LDLM_INTENT);
rc = ldlm_cli_enqueue_fini(aa->aa_exp, req, LDLM_PLAIN, 0, LCK_CR,
&flags, (void *)aa->aa_lvb,