All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Max Pedraza" <maximpedraza@gmail.com>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v3 7/7] video: logo: add ppmtodtlogo host tool
Date: Wed, 23 Sep 2026 20:24:14 +0000	[thread overview]
Message-ID: <20260923202415.B5A851F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260923201035.51007-8-maximpedraza@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] ppmtodtlogo: silent output corruption due to unchecked file writes
--

commit 4ad00a19ffae8a59e9289c4ee762366d9f29a5de
Author: Max Pedraza <maximpedraza@gmail.com>

video: logo: add ppmtodtlogo host tool

This commit adds a host tool that converts a PPM image into a devicetree boot
logo node or a binary blob for a reserved memory region.

> diff --git a/drivers/video/logo/ppmtodtlogo.c b/drivers/video/logo/ppmtodtlogo.c
> new file mode 100644
> index 0000000000000..7fded9ce9ba37
> --- /dev/null
> +++ b/drivers/video/logo/ppmtodtlogo.c
[ ... ]
> +static void write_bin(void)
> +{
> +	put_le32(BLOB_MAGIC);
> +	put_le32(logo_width);
> +	put_le32(logo_height);
> +	put_le32(logo_clutsize);
> +	fwrite(logo_clut, 3, logo_clutsize, out);
> +	fwrite(logo_data, 1, logo_width * logo_height, out);

[Severity: Low]
Are we missing error checks on these writes? If the tool runs under a
disk-full condition or encounters another write error, it looks like it
will silently produce truncated binary blobs without reporting an error or
returning a non-zero exit status.

> +}
[ ... ]
> +int main(int argc, char *argv[])
> +{
[ ... ]
> +	if (outputname)
> +		fclose(out);

[Severity: Low]
Could failing to check the return value here ignore buffered write failures?
If a flush fails at the end of the program, it might obscure disk space
issues and leave a corrupted output file while still exiting with a zero
status code.

> +
> +	fprintf(stderr, "%s: %ux%u pixels, %u colours\n", filename, logo_width,
> +		logo_height, logo_clutsize);
> +
> +	return 0;
> +}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260923201035.51007-1-maximpedraza@gmail.com?part=7

  reply	other threads:[~2026-09-23 20:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 20:10 [PATCH v3 0/7] Boot logo supplied by the device tree Max Pedraza
2026-09-23 20:10 ` [PATCH v3 1/7] fbdev: describe where the boot logo goes in one place Max Pedraza
2026-09-24 12:05   ` Thomas Zimmermann
2026-09-23 20:10 ` [PATCH v3 2/7] dt-bindings: display: add a device tree supplied boot logo Max Pedraza
2026-09-23 20:17   ` sashiko-bot
2026-09-24 11:49   ` Rob Herring (Arm)
2026-09-25  8:58     ` Màxim Pedraza Padilla
2026-09-23 20:10 ` [PATCH v3 3/7] video: logo: allow the boot logo to come from the device tree Max Pedraza
2026-09-23 20:10 ` [PATCH v3 4/7] fbdev: honour the device tree boot logo placement properties Max Pedraza
2026-09-23 20:10 ` [PATCH v3 5/7] dt-bindings: display: allow the boot logo in a reserved memory region Max Pedraza
2026-09-23 20:17   ` sashiko-bot
2026-09-23 20:10 ` [PATCH v3 6/7] video: logo: allow the boot logo to come from " Max Pedraza
2026-09-23 20:10 ` [PATCH v3 7/7] video: logo: add ppmtodtlogo host tool Max Pedraza
2026-09-23 20:24   ` sashiko-bot [this message]
2026-09-24 12:21 ` [PATCH v3 0/7] Boot logo supplied by the device tree Thomas Zimmermann
2026-09-25  8:48   ` Màxim Pedraza Padilla
2026-09-25 19:31     ` Francesco Valla
2026-09-29 11:46       ` Màxim Pedraza Padilla
2026-09-30  6:32         ` Francesco Valla
2026-10-01 20:17           ` Màxim Pedraza Padilla

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=20260923202415.B5A851F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maximpedraza@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.