lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Feb 2012 01:36:52 -0800 (PST)
From:	merez@...eaurora.org
To:	"Seungwon Jeon" <tgih.jun@...sung.com>
Cc:	linux-mmc@...r.kernel.org, "'Chris Ball'" <cjb@...top.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/2] mmc: core: Support packed command for eMMC4.5 
     device

> @@ -1065,12 +1075,60 @@ static int mmc_blk_err_check(struct mmc_card
> *card,
>  	if (!brq->data.bytes_xfered)
>  		return MMC_BLK_RETRY;
>
> +	if (mq_mrq->packed_cmd != MMC_PACKED_NONE) {
> +		if (unlikely(brq->data.blocks << 9 != brq->data.bytes_xfered))
> +			return MMC_BLK_PARTIAL;
> +		else
> +			return MMC_BLK_SUCCESS;
> +	}
> +
>  	if (blk_rq_bytes(req) != brq->data.bytes_xfered)
>  		return MMC_BLK_PARTIAL;
>
>  	return MMC_BLK_SUCCESS;
>  }
I think it would be best to keep the request length (brq->data.blocks << 9
or blk_rq_bytes(req)) in a variable and use it in the original if above.
This way you can avoid doubling the exit points from the function.
Thanks,
Maya Erez
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists