public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 09/11] fpga: xilinx: Check if fpga operations are defined
Date: Wed, 14 Jan 2015 16:17:17 +0100	[thread overview]
Message-ID: <54B6887D.9040405@monstr.eu> (raw)
In-Reply-To: <CAPnjgZ1wCqrEf_Fki3pNUmdmpVq+H_qfKLve9g1CPdy1WpVz2g@mail.gmail.com>

On 01/14/2015 04:14 PM, Simon Glass wrote:
> On 14 January 2015 at 01:04, Michal Simek <michal.simek@xilinx.com> wrote:
>> Ensure that operations are correctly setup.
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> (comment below)
> 
>> ---
>>
>>  drivers/fpga/xilinx.c | 17 +++++++++++++++--
>>  1 file changed, 15 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
>> index adb4b8cd25fd..9c95148b25c1 100644
>> --- a/drivers/fpga/xilinx.c
>> +++ b/drivers/fpga/xilinx.c
>> @@ -139,6 +139,11 @@ int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize,
>>                 return FPGA_FAIL;
>>         }
>>
>> +       if (!desc->operations || !desc->operations->load) {
>> +               printf("%s: Missing load operation\n", __func__);
>> +               return FPGA_FAIL;
> 
> I wonder if these error codes should be dropped in favour of the
> standard ones? Perhaps in a separate patch. E.g. here we could use
> -ENOSYS.

Definitely. They are bogus.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150114/80ca1a82/attachment.pgp>

  reply	other threads:[~2015-01-14 15:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14  9:04 [U-Boot] [PATCH 01/11] fpga: Protect GZIP usage when LOADMK is enabled Michal Simek
2015-01-14  9:04 ` [U-Boot] [PATCH 02/11] fpga: Remove extern prototypes from .h Michal Simek
2015-01-14  9:04 ` [U-Boot] [PATCH 03/11] fpga: Export fpga_get_desc for SPL Michal Simek
2015-01-14  9:04 ` [U-Boot] [PATCH 04/11] fpga: xilinx: spartan2: Setup NULL fpga_op without driver Michal Simek
2015-01-14  9:04 ` [U-Boot] [PATCH 05/11] fpga: xilinx: spartan3: " Michal Simek
2015-01-14  9:04 ` [U-Boot] [PATCH 06/11] fpga: xilinx: virtex2: " Michal Simek
2015-01-14  9:04 ` [U-Boot] [PATCH 07/11] fpga: xilinx: virtex2: Fix macro indentation Michal Simek
2015-01-14  9:04 ` [U-Boot] [PATCH 08/11] fpga: xilinx: zynqpl: Setup NULL fpga_op without driver Michal Simek
2015-01-14  9:04 ` [U-Boot] [PATCH 09/11] fpga: xilinx: Check if fpga operations are defined Michal Simek
2015-01-14 15:14   ` Simon Glass
2015-01-14 15:17     ` Michal Simek [this message]
2015-01-14  9:04 ` [U-Boot] [PATCH 10/11] fpga: xilinx: Show fpga info if defined Michal Simek
2015-01-14 15:16   ` Simon Glass
2015-01-14  9:04 ` [U-Boot] [PATCH 11/11] fpga: zynqpl: Add support for zc7035 Michal Simek
2015-01-14 15:11 ` [U-Boot] [PATCH 01/11] fpga: Protect GZIP usage when LOADMK is enabled Simon Glass

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=54B6887D.9040405@monstr.eu \
    --to=monstr@monstr.eu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox