mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 3/5] mfd: Add Hexagon EFI driver
Date: Fri, 6 Feb 2026 14:09:18 +0100	[thread overview]
Message-ID: <11768616-d5d9-40a2-acb3-beef9055e7a2@pengutronix.de> (raw)
In-Reply-To: <20260205-vmaster-customers-leicageo-system1600-v1-3-a80b234ce1a1@pengutronix.de>

Hi,

On 2/5/26 4:45 PM, Marco Felsch wrote:
> This adds the EFI core driver to communicate with the system
> co-processor.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

but see below for some nits should there be a v2.

> +	max_msg_len = HGS_EFI_SEP_FRAME_PREAMBLE_SZ +
> +		      HGS_EFI_SEP_FRAME_POSTAMBLE_SZ +
> +		      efi->coder->sep_header_hdrsize + cmd->payload_size;
> +	msg = p = xzalloc(max_msg_len);
> +	if (!msg) {

xzalloc never fails.

> +		dev_err(dev, "No memory\n");

dev_err allocates memory, so this wouldn't work anyway.

> +	/* Split header from payload first for the following str-ops on buf */
> +	payload = strstr(buf, ":");

Nitpick: strchr()

> +	if (!payload) {
> +		dev_warn(dev, "Failed to find header delim\n");
> +		return -EINVAL;
> +	}
> +
> +	hdrlen = payload - buf;
> +	if (hdrlen > sizeof(struct hgs_efi_sep_ascii_hdr)) {
> +		dev_warn(dev, "Invalid header len detected\n");
> +		return -EINVAL;
> +	}
> +
> +	*payload = 0;
> +	payload++;
> +
> +	/*
> +	 * Albeit the CRC is optional and the calc as a few flaws the coder may
> +	 * has added it. Skip the CRC check but do the msg-id check.
> +	 */
> +	p = strstr(buf, ",");

Nitpick: strchr()


Cheers,
Ahmad

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2026-02-06 13:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 15:45 [PATCH 0/5] Hexagon Geosystems GS05 Board Support Marco Felsch
2026-02-05 15:45 ` [PATCH 1/5] ARM: i.MX8MM: add MX8MM_PAD_CTL defines Marco Felsch
2026-02-06 13:04   ` Ahmad Fatoum
2026-02-05 15:45 ` [PATCH 2/5] lib: hexdump: make use of pr_print Marco Felsch
2026-02-06 13:05   ` Ahmad Fatoum
2026-02-05 15:45 ` [PATCH 3/5] mfd: Add Hexagon EFI driver Marco Felsch
2026-02-06 13:09   ` Ahmad Fatoum [this message]
2026-02-06 15:52     ` Marco Felsch
2026-02-09  9:03   ` Sascha Hauer
2026-02-09 11:13     ` Marco Felsch
2026-02-09 13:46       ` Sascha Hauer
2026-02-05 15:45 ` [PATCH 4/5] watchdog: Add Hexagon EFI watchdog driver Marco Felsch
2026-02-06 13:13   ` Ahmad Fatoum
2026-02-06 16:34     ` Marco Felsch
2026-02-05 15:45 ` [PATCH 5/5] ARM: i.MX8MM: add Hexagon Geosystems GS05 Marco Felsch
2026-02-06 13:47   ` Ahmad Fatoum
2026-02-06 14:07     ` SCHNEIDER Johannes
2026-02-06 15:43       ` Marco Felsch
2026-02-06 17:12     ` Marco Felsch
2026-02-09 10:42   ` Sascha Hauer
2026-02-09 11:39     ` Marco Felsch
2026-02-09 13:40       ` Sascha Hauer
2026-02-05 15:50 ` [PATCH 0/5] Hexagon Geosystems GS05 Board Support Marco Felsch

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=11768616-d5d9-40a2-acb3-beef9055e7a2@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.de \
    --cc=s.hauer@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