<p><a href="https://review.coreboot.org/25082">View Change</a></p><p>10 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/spi_flash.c">File src/drivers/spi/spi_flash.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/spi_flash.c@69">Patch Set #1, Line 69:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">printk(BIOS_WARNING, "SF: Failed to send command %02x: %d\n",<br>                cmd[0], ret);<br></pre></blockquote></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Now that the command can contain more than one byte do you want to do something like this:<br>if (ret) {<br>   printk(BIOS_WARNING, "SF: Failed to send command ret: %d, cmd:", ret);<br>      for (i = 0; i < cmd_len; i++)<br>              printk(BIOS_WARNING, "%02x ", cmd[i]);<br>      printk(BIOS_WARNING, "\n");<br>}</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/spi_flash.c@438">Patch Set #1, Line 438:</a> <code style="font-family:monospace,monospace">)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">|| !region</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/winbond.c">File src/drivers/spi/winbond.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/winbond.c@199">Patch Set #1, Line 199:</a> <code style="font-family:monospace,monospace">port</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">part</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/winbond.c@204">Patch Set #1, Line 204:</a> <code style="font-family:monospace,monospace">i</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">size_t i</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/winbond.c@219">Patch Set #1, Line 219:</a> <code style="font-family:monospace,monospace">1</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">use a macro for this?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/winbond.c@233">Patch Set #1, Line 233:</a> <code style="font-family:monospace,monospace">port</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">part</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/winbond.c@238">Patch Set #1, Line 238:</a> <code style="font-family:monospace,monospace">block</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">size_t?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/winbond.c@266">Patch Set #1, Line 266:</a> <code style="font-family:monospace,monospace">KiB</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Do you really need to divide by KiB?</p><p style="white-space: pre-wrap; word-wrap: break-word;">block = reg.s.sec ? (4 * KiB) : max(64 * KiB, flash->size / 64);</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/drivers/spi/winbond.c@285">Patch Set #1, Line 285:</a> <code style="font-family:monospace,monospace">4</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">magic value. Do you want to add a macro for this?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://review.coreboot.org/#/c/25082/1/src/include/spi_flash.h">File src/include/spi_flash.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/25082/1/src/include/spi_flash.h@107">Patch Set #1, Line 107:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">0   if the device doesn't support block protection<br> *   0   if the device doesn't enable block protection<br> *   0<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Do you think it would help if we returned different return codes for these caes?</p></li></ul></li></ul><p>To view, visit <a href="https://review.coreboot.org/25082">change 25082</a>. To unsubscribe, or for help writing mail filters, 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/25082"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: I933a8abdc28174ec32acf323c102d606b58c1ea5 </div>
<div style="display:none"> Gerrit-Change-Number: 25082 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <patrick.rudolph@9elements.com> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>
<div style="display:none"> Gerrit-CC: Furquan Shaikh <furquan@google.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 09 Mar 2018 15:51:41 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>