From: Krzysztof Kozlowski <krzk@kernel.org>
To: Iker Pedrosa <ikerpedrosam@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Javier Martinez Canillas <javierm@redhat.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/3] drm: Add driver for Sitronix ST7920 LCD displays
Date: Thu, 7 Aug 2025 10:12:19 +0200 [thread overview]
Message-ID: <285eee30-58ab-4837-9fc4-ff5cd5118037@kernel.org> (raw)
In-Reply-To: <20250806-st7920-v1-1-64ab5a34f9a0@gmail.com>
On 06/08/2025 14:48, Iker Pedrosa wrote:
> This adds a functional DRM driver for ST7920 that communicates with the
> display via the SPI bus.
Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
>
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
...
> +#define BOTTOM_HORIZONTAL_ADDRESS 0x80
> +
> +#define CMD_SIZE 35
> +
> +const struct st7920_deviceinfo st7920_variants[] = {
> + [ST7920_ID] = {
> + .default_width = 128,
> + .default_height = 64,
> + .family_id = ST7920_FAMILY,
Don't add dead code. This cannot be anything else than ST7920_FAMILY.
Several places here can be simplified (and "possible" future code is not
an argument here - this patch must be correct, simple and stand on its
own because we do not write code just in case).
...
> +static int st7920_probe(struct spi_device *spi)
> +{
> + struct st7920_device *st7920;
> + struct regmap *regmap;
> + struct device *dev = &spi->dev;
> + struct drm_device *drm;
> + int ret;
> +
> + regmap = devm_regmap_init_spi(spi, &st7920_spi_regmap_config);
> + if (IS_ERR(regmap))
> + return PTR_ERR(regmap);
> +
> + st7920 = devm_drm_dev_alloc(dev, &st7920_drm_driver,
> + struct st7920_device, drm);
> + if (IS_ERR(st7920))
> + return dev_err_probe(dev, PTR_ERR(st7920),
> + "Failed to allocate DRM device\n");
Misaligned but also this looks like ENOMEM error and such should never
have dev_err.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-08-07 8:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 12:48 [PATCH 0/3] drm/sitronix/st7920: Add support for the ST7920 controller Iker Pedrosa
2025-08-06 12:48 ` [PATCH 1/3] drm: Add driver for Sitronix ST7920 LCD displays Iker Pedrosa
2025-08-07 7:48 ` kernel test robot
2025-08-07 8:12 ` Krzysztof Kozlowski [this message]
2025-09-01 13:44 ` Thomas Zimmermann
2025-08-06 12:48 ` [PATCH 2/3] dt-bindings: display: sitronix,st7920: Add DT schema Iker Pedrosa
2025-08-06 17:22 ` Conor Dooley
2025-08-07 8:09 ` Krzysztof Kozlowski
2025-08-06 12:48 ` [PATCH 3/3] MAINTAINERS: Add entry for Sitronix ST7920 driver Iker Pedrosa
2025-08-07 8:13 ` Krzysztof Kozlowski
2025-08-20 12:23 ` Iker Pedrosa
2025-08-20 13:10 ` Krzysztof Kozlowski
2025-09-01 12:53 ` Maxime Ripard
2025-09-01 13:17 ` Javier Martinez Canillas
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=285eee30-58ab-4837-9fc4-ff5cd5118037@kernel.org \
--to=krzk@kernel.org \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ikerpedrosam@gmail.com \
--cc=javierm@redhat.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.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.