<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>


<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.rtems.org/opticron">Kinsey Moore</a>
commented on a
discussion on <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/90#note_107963">bsps/shared/dev/spi/xqspipsu-flash-helper.c</a>:
</p>
<table class="code gl-mb-5" style="border-spacing: 0; margin-bottom: 1rem; border-collapse: collapse; width: auto; font-family: monospace; font-size: 90%;" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder" style="line-height: 1.6;">
<td class="old_line diff-line-num" data-linenumber="267" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #ececef; border-right-style: solid; padding: inherit;" align="right" bgcolor="#fbfafd">
267
</td>
<td class="new_line diff-line-num" data-linenumber="289" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #ececef; border-right-style: solid; padding: inherit;" align="right" bgcolor="#fbfafd">
289
</td>
<td class="line_content" style="padding: inherit;"><pre style='display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dcdcde;'> <span id="LC289" class="line" lang="c"><span class="cm" style="color: #998; font-style: italic;">   * Indicate the transfer on the QSPIPSU bus is no longer in progress</span></span>
</pre></td>
</tr>
<tr class="line_holder" style="line-height: 1.6;">
<td class="old_line diff-line-num" data-linenumber="268" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #ececef; border-right-style: solid; padding: inherit;" align="right" bgcolor="#fbfafd">
268
</td>
<td class="new_line diff-line-num" data-linenumber="290" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #ececef; border-right-style: solid; padding: inherit;" align="right" bgcolor="#fbfafd">
290
</td>
<td class="line_content" style="padding: inherit;"><pre style='display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dcdcde;'> <span id="LC290" class="line" lang="c"><span class="cm" style="color: #998; font-style: italic;">   * regardless of the status event</span></span>
</pre></td>
</tr>
<tr class="line_holder" style="line-height: 1.6;">
<td class="old_line diff-line-num" data-linenumber="269" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #ececef; border-right-style: solid; padding: inherit;" align="right" bgcolor="#fbfafd">
269
</td>
<td class="new_line diff-line-num" data-linenumber="291" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #ececef; border-right-style: solid; padding: inherit;" align="right" bgcolor="#fbfafd">
291
</td>
<td class="line_content" style="padding: inherit;"><pre style='display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dcdcde;'> <span id="LC291" class="line" lang="c"><span class="cm" style="color: #998; font-style: italic;">   */</span></span>
</pre></td>
</tr>
<tr class="line_holder old" style="line-height: 1.6;">
<td class="old_line diff-line-num old" data-linenumber="270" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: inherit;" align="right" bgcolor="#f9d7dc">
270
</td>
<td class="new_line diff-line-num old" data-linenumber="292" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: inherit;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding: inherit;" bgcolor="#fbe9eb"><pre style='display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dcdcde;'>-<span id="LC270" class="line" lang="c">  <span class="n" style="color: #333;">TransferInProgress</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">FALSE</span><span class="p">;</span></span>
</pre></td>
</tr>
<tr class="line_holder new" style="line-height: 1.6;">
<td class="old_line diff-line-num new" data-linenumber="271" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="292" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
292
</td>
<td class="line_content new" style="padding: inherit;" bgcolor="#ecfdf0"><pre style='display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dcdcde;'>+<span id="LC292" class="line" lang="c">  <span class="n" style="color: #333;">rtems_status_code</span> <span class="n" style="color: #333;">sc</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">rtems_event_transient_send</span><span class="p">(</span><span class="n" style="color: #333;">TransferTask</span><span class="p">);</span></span>
</pre></td>
</tr>
<tr class="line_holder new" style="line-height: 1.6;">
<td class="old_line diff-line-num new" data-linenumber="271" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="293" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
293
</td>
<td class="line_content new" style="padding: inherit;" bgcolor="#ecfdf0"><pre style='display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dcdcde;'>+<span id="LC293" class="line" lang="c">  <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">sc</span> <span class="o" style="font-weight: 600;">!=</span> <span class="n" style="color: #333;">RTEMS_SUCCESSFUL</span><span class="p">)</span> <span class="p">{</span></span>
</pre></td>
</tr>
<tr class="line_holder new" style="line-height: 1.6;">
<td class="old_line diff-line-num new" data-linenumber="271" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="294" style="width: 35px; color: rgba(31,30,36,.24); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
294
</td>
<td class="line_content new" style="padding: inherit;" bgcolor="#ecfdf0"><pre style='display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dcdcde;'>+<span id="LC294" class="line" lang="c">    <span class="n" style="color: #333;">Error</span><span class="o" style="font-weight: 600;">++</span><span class="p">;</span></span>
</pre></td>
</tr>

</table>
<div class="md" style="color: #333238; word-wrap: break-word;">
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">This particular file was originally sourced from the Xilinx repo, but is not in its original form as its original form was not suitable for purpose.</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">This file is now owned by RTEMS as an adapter of sorts. Unfortunately, this Error variable is not part of the QSPI driver, but part of the flash wrapper code that was brought in. It's technically possible to remove the Error variable here by resetting the status handler prior to each call which would allow replacing the void* argument that's passed in, but that runs the risk of leaving a stale pointer into the stack since you can't pass NULL for that field to clear it out (there's an assertion in the underlying code preventing it). This could be rectified by a global struct that houses the XQspiPsu pointer (currently unused) and additional NOR-layer attributes such as the error counter.</p>
<p dir="auto" style="color: #333238; margin: 0;" align="initial">Realistically, nothing consumes the error count and it can just be removed until it's actually needed. I'll add another commit that removes it.</p>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">

<br>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/90#note_107963">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/14142572ade34a47ccedaefb01a9b151/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/90#note_107963"}}</script>


</p>
</div>
</body>
</html>