mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/5] usb: gadget: fastboot: allow to build without BOOTM
Date: Thu, 11 Dec 2014 08:36:14 +0100	[thread overview]
Message-ID: <20141211073614.GB30369@pengutronix.de> (raw)
In-Reply-To: <1418123146-13235-1-git-send-email-l.stach@pengutronix.de>

On Tue, Dec 09, 2014 at 12:05:42PM +0100, Lucas Stach wrote:
> This will disable the capability to boot an uploaded image directly,
> but keeps other fastboot functionality. This seems like a valid config.
> 
> Fixes:
> In function `do_bootm_on_complete': undefined reference to `bootm_boot'
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/usb/gadget/f_fastboot.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
> index 92a1a218c643..76879db1f15d 100644
> --- a/drivers/usb/gadget/f_fastboot.c
> +++ b/drivers/usb/gadget/f_fastboot.c
> @@ -653,7 +653,8 @@ static void do_bootm_on_complete(struct usb_ep *ep, struct usb_request *req)
>  		pr_err("Booting failed\n");
>  }
>  
> -static void cb_boot(struct usb_ep *ep, struct usb_request *req, const char *opt)
> +static void __maybe_unused cb_boot(struct usb_ep *ep, struct usb_request *req,
> +				   const char *opt)
>  {
>  	struct f_fastboot *f_fb = req->context;
>  
> @@ -857,9 +858,11 @@ static const struct cmd_dispatch_info cmd_dispatch_info[] = {
>  	}, {
>  		.cmd = "download:",
>  		.cb = cb_download,
> +#if defined(CONFIG_BOOTM)
>  	}, {
>  		.cmd = "boot",
>  		.cb = cb_boot,
> +#endif

Instead of the #ifdef can we do a:

	if (!IS_ENABLED(CONFIG_BOOTM)) {
		fastboot_tx_print(f_fb, "FAILCommand not supported");
		return;
	}

in cb_boot?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-12-11  7:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 11:05 Lucas Stach
2014-12-09 11:05 ` [PATCH 2/5] video: imx-hdmi: search for DDC node only when EDID support is enabled Lucas Stach
2014-12-09 11:05 ` [PATCH 3/5] imd: provide dummy imd_command_setenv Lucas Stach
2014-12-10  9:05   ` Lucas Stach
2014-12-09 11:05 ` [PATCH 4/5] fdt: don't strip const qualifier Lucas Stach
2014-12-11  7:37   ` Sascha Hauer
2014-12-09 11:05 ` [PATCH 5/5] Revert "ARM: i.MX: Make NAND related Kconfig options depend on MTD" Lucas Stach
2014-12-11  7:36 ` Sascha Hauer [this message]
2014-12-15 11:35   ` [PATCH 1/5] usb: gadget: fastboot: allow to build without BOOTM Lucas Stach
2014-12-17 10:03     ` Sascha Hauer

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=20141211073614.GB30369@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=l.stach@pengutronix.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