<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Re: C Calling convention Question</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764076#M118701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Calros&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the finding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;In the \linux\fb.h&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;\linux\fb.h(266):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int (*fb_blank)(int blank, struct fb_info *info);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;\linux\fb.h(598):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extern int fb_blank(struct fb_info *info, int blank);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;(That was confusing and not a good practice)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;The line (266) has the same signature as &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;static int mxsfb_blank(int blank, struct fb_info *fb_info);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;That explains the structure assignment for the function pointer:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;.fb_blank = mxsfb_blank,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;And the call of the function in the line 1533:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 9.5pt;"&gt;ret = fb_blank(fb_info, FB_BLANK_UNBLANK);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;The function signature is defined as the line 598 (shown above) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The call to the function &amp;nbsp;fb_blank&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;ret = fb_blank(fb_info, FB_BLANK_UNBLANK);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;It is actually defined in the ../fbdev/core/fbmem.c. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Only a little confusion that why not directly call the mxsfb_blank().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David Zhou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Dec 2017 15:33:34 GMT</pubDate>
    <dc:creator>davidzhou</dc:creator>
    <dc:date>2017-12-06T15:33:34Z</dc:date>
    <item>
      <title>C Calling convention Question</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764071#M118696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In kernel/drivers/fbdev/mxsfb.c (line 994): defined mxsfb_ops functions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static struct fb_ops mxsfb_ops = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.owner = THIS_MODULE,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_check_var = mxsfb_check_var,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_set_par = mxsfb_set_par,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_setcolreg = mxsfb_setcolreg,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_ioctl = mxsfb_ioctl,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_blank = mxsfb_blank,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_pan_display = mxsfb_pan_display,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_mmap = mxsfb_mmap,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_fillrect = cfb_fillrect,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_copyarea = cfb_copyarea,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_imageblit = cfb_imageblit,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line 878: defines the function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static int mxsfb_blank(int blank, struct fb_info *fb_info)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;struct mxsfb_info *host = to_imxfb_host(fb_info);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;host-&amp;gt;cur_blank = blank;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line 1506: calls the function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = fb_blank(fb_info, FB_BLANK_UNBLANK);&lt;/P&gt;&lt;P&gt;Line 1591: calls the function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxsfb_blank(FB_BLANK_POWERDOWN, fb_info);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why the parameters are passed in with different order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David Zhou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 13:37:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764071#M118696</guid>
      <dc:creator>davidzhou</dc:creator>
      <dc:date>2017-12-05T13:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: C Calling convention Question</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764072#M118697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which kernel are you using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:13:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764072#M118697</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2017-12-05T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: C Calling convention Question</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764073#M118698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your email regarding my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The linux kernel is version 4.1 from DIGI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The driver passed compilation, and it seems have no problems of running. I just confused myself with the parameters passing sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;David Zhou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:23:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764073#M118698</guid>
      <dc:creator>davidzhou</dc:creator>
      <dc:date>2017-12-05T17:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: C Calling convention Question</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764074#M118699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find it strange too, but in this case you may contact Digi Embedded because they developed this BSP, not NXP.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 18:23:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764074#M118699</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2017-12-05T18:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: C Calling convention Question</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764075#M118700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Calros,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 18:49:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764075#M118700</guid>
      <dc:creator>davidzhou</dc:creator>
      <dc:date>2017-12-05T18:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: C Calling convention Question</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764076#M118701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Calros&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the finding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;In the \linux\fb.h&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;\linux\fb.h(266):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int (*fb_blank)(int blank, struct fb_info *info);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;\linux\fb.h(598):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extern int fb_blank(struct fb_info *info, int blank);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;(That was confusing and not a good practice)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;The line (266) has the same signature as &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;static int mxsfb_blank(int blank, struct fb_info *fb_info);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;That explains the structure assignment for the function pointer:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;.fb_blank = mxsfb_blank,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;And the call of the function in the line 1533:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 9.5pt;"&gt;ret = fb_blank(fb_info, FB_BLANK_UNBLANK);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;The function signature is defined as the line 598 (shown above) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The call to the function &amp;nbsp;fb_blank&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;ret = fb_blank(fb_info, FB_BLANK_UNBLANK);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;It is actually defined in the ../fbdev/core/fbmem.c. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Only a little confusion that why not directly call the mxsfb_blank().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David Zhou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 15:33:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764076#M118701</guid>
      <dc:creator>davidzhou</dc:creator>
      <dc:date>2017-12-06T15:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: C Calling convention Question</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764077#M118702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hi David ,&lt;/P&gt;&lt;P&gt;Can you tell me what is the role of three functions ?&amp;nbsp; as below :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .fb_fillrect = cfb_fillrect,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_copyarea = cfb_copyarea,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.fb_imageblit = cfb_imageblit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2019 07:37:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/C-Calling-convention-Question/m-p/764077#M118702</guid>
      <dc:creator>zhaoqinsu</dc:creator>
      <dc:date>2019-04-18T07:37:56Z</dc:date>
    </item>
  </channel>
</rss>

