<p>Lee Leahy has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20392">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">commonlib/storage: Zero extend MMC capacity<br><br>Fix CID 1376472 detected by coverity.  Zero extend the capacity instead<br>of sign extending it.<br><br>TEST=Build and run on reef<br><br>Change-Id: I6aac422fb1dacb75e0cc44a94ff1f467ce9f529e<br>Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com><br>---<br>M src/commonlib/storage/mmc.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/20392/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/commonlib/storage/mmc.c b/src/commonlib/storage/mmc.c<br>index b8a3b67..ad78617 100644<br>--- a/src/commonlib/storage/mmc.c<br>+++ b/src/commonlib/storage/mmc.c<br>@@ -433,7 +433,7 @@<br>      * ext_csd's capacity is valid if the value is<br>     * more than 2GB<br>       */<br>-  capacity = (ext_csd[EXT_CSD_SEC_CNT + 0] << 0 |<br>+        capacity = (uint32_t)(ext_csd[EXT_CSD_SEC_CNT + 0] << 0 |<br>                   ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |<br>                     ext_csd[EXT_CSD_SEC_CNT + 2] << 16 |<br>                    ext_csd[EXT_CSD_SEC_CNT + 3] << 24);<br></pre><p>To view, visit <a href="https://review.coreboot.org/20392">change 20392</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20392"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I6aac422fb1dacb75e0cc44a94ff1f467ce9f529e </div>
<div style="display:none"> Gerrit-Change-Number: 20392 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Lee Leahy <leroy.p.leahy@intel.com> </div>