Project

General

Profile

Bug #3071 ยป 0001-Simplify-redundant-conditions-and-remove-never-used-.patch

lubos, 10/10/2017 10:11 AM

View differences:

sys/dev/raid/mrsas/mrsas_fp.c
*pDevHandle = MR_PdDevHandleGet(pd, map);
else {
*pDevHandle = MR_PD_INVALID;
if ((raid->level >= 5) && ((!do_invader) || (do_invader &&
raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))
if ((raid->level >= 5) && (!do_invader || raid->regTypeReqOnRead != REGION_TYPE_UNUSED))
pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE;
else if (raid->level == 1) {
pd = MR_ArPdGet(arRef, physArm + 1, map);
......
*pDevHandle = MR_PdDevHandleGet(pd, map); // Get dev handle from Pd.
else {
*pDevHandle = MR_PD_INVALID; // set dev handle as invalid.
if ((raid->level >= 5) && ((!do_invader) || (do_invader &&
raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))
if ((raid->level >= 5) && (!do_invader || raid->regTypeReqOnRead != REGION_TYPE_UNUSED))
pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE;
else if (raid->level == 1) {
pd = MR_ArPdGet(arRef, physArm + 1, map); // Get Alternate Pd.
......
MR_QUAD_ELEMENT *quad;
MR_LD_RAID *raid = MR_LdRaidGet(ld, map);
u_int32_t span, j;
u_int64_t blk, debugBlk;
u_int64_t blk;
for (span=0; span < raid->spanDepth; span++, pSpanBlock++) {
for (j=0; j < pSpanBlock->block_span_info.noElements; j++) {
......
(mega_mod64(row-quad->logStart, quad->diff)) == 0) {
if (span_blk != NULL) {
blk = mega_div64_32((row-quad->logStart), quad->diff);
debugBlk = blk;
blk = (blk + quad->offsetInSpan) << raid->stripeShift;
*span_blk = blk;
}
    (1-1/1)