All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chanho Park" <chanho61.park@samsung.com>
To: "'Michal Simek'" <michal.simek@amd.com>, <u-boot@lists.denx.de>,
	<eugen.hristev@collabora.com>
Subject: RE: [PATCH] fpga: define dummy fpga_load function for debug build
Date: Mon, 28 Aug 2023 09:21:27 +0900	[thread overview]
Message-ID: <000001d9d945$95ebf520$c1c3df60$@samsung.com> (raw)
In-Reply-To: <c0e49c05-a5f8-2759-33b5-946bf2283b34@amd.com>

Hi,

> -----Original Message-----
> From: Michal Simek <michal.simek@amd.com>
> Sent: Friday, August 25, 2023 4:23 PM
> To: Chanho Park <chanho61.park@samsung.com>; u-boot@lists.denx.de
> Subject: Re: [PATCH] fpga: define dummy fpga_load function for debug build
> 
> Hi,
> 
> On 8/16/23 08:54, Chanho Park wrote:
> > This fixes below build error when CC_OPTIMIZE_FOR_DEBUG is enabled and
> > CONFIG_SPL_FPGA is not enabled.
> >
> > ../common/spl/spl_fit.c:591: undefined reference to `fpga_load'
> > collect2: error: ld returned 1 exit status
> >
> > Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> > ---
> >   include/fpga.h | 8 ++++++++
> >   1 file changed, 8 insertions(+)
> >
> > diff --git a/include/fpga.h b/include/fpga.h index
> > ed688cc0fa3b..44f2755a3f10 100644
> > --- a/include/fpga.h
> > +++ b/include/fpga.h
> > @@ -60,8 +60,16 @@ int fpga_add(fpga_type devtype, void *desc);
> >   int fpga_count(void);
> >   const fpga_desc *const fpga_get_desc(int devnum);
> >   int fpga_is_partial_data(int devnum, size_t img_len);
> > +#if CONFIG_IS_ENABLED(FPGA)
> >   int fpga_load(int devnum, const void *buf, size_t bsize,
> >   	      bitstream_type bstype, int flags);
> > +#else
> > +static inline int fpga_load(int devnum, const void *buf, size_t bsize,
> > +	      bitstream_type bstype, int flags) {
> > +	return FPGA_FAIL;
> > +}
> > +#endif
> >   int fpga_fsload(int devnum, const void *buf, size_t size,
> >   		fpga_fs_info *fpga_fsinfo);
> >   int fpga_loads(int devnum, const void *buf, size_t size,
> 
> There is another patch targeting the same code.
> Please take a look at
> https://lore.kernel.org/r/20230808102227.34233-1-
> eugen.hristev@collabora.com

I wasn't aware that there was an attempt to fix the issue. If I knew it, I would reply the patch...

> 
> and work together to come up with the patch which covers both cases.

Yes. I also tried to make the patch with CONFIG_CC_OPTIMIZE_FOR_DEBUG guard but I couldn't find any codes that uses the guard.
And I was also worried about the CC_OPTIMIZE_FOR_DEBUG's behavior. It could be related with the optimization level of the compiler.
That's why I put the guard with #if CONFIG_IS_ENABLED(FPGA).

Best Regards,
Chanho Park


  reply	other threads:[~2023-08-28  0:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230816065448epcas2p3bf66892f15a6dc8e082a5f296b307bec@epcas2p3.samsung.com>
2023-08-16  6:54 ` [PATCH] fpga: define dummy fpga_load function for debug build Chanho Park
2023-08-25  7:22   ` Michal Simek
2023-08-28  0:21     ` Chanho Park [this message]
2023-08-28  8:46       ` Eugen Hristev
2023-08-28 10:00         ` Chanho Park
2023-08-28 10:44           ` Michal Simek
2023-08-29 11:10   ` Michal Simek
2023-08-31  2:21     ` Chanho Park
2023-08-31  6:33       ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001d9d945$95ebf520$c1c3df60$@samsung.com' \
    --to=chanho61.park@samsung.com \
    --cc=eugen.hristev@collabora.com \
    --cc=michal.simek@amd.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.