From: Iker Pedrosa <ikerpedrosam@gmail.com>
To: Javier Martinez Canillas <javierm@redhat.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>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Iker Pedrosa <ikerpedrosam@gmail.com>
Subject: [PATCH v2 5/5] drm/solomon: Enforce one assignment per line
Date: Sat, 20 Sep 2025 11:45:45 +0200 [thread overview]
Message-ID: <20250920-improve-ssd130x-v2-5-77721e87ae08@gmail.com> (raw)
In-Reply-To: <20250920-improve-ssd130x-v2-0-77721e87ae08@gmail.com>
The code contains several instances of chained assignments. The Linux
kernel coding style generally favors clarity and simplicity over terse
syntax. Refactor the code to use a separate line for each assignment.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
drivers/gpu/drm/solomon/ssd130x.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index 50528a94cd3bcfa46517c6ffccf3f458e17cf816..f3dd6982b293c74024f7d70a6ef1ebfb5889b0a1 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -1867,10 +1867,14 @@ static int ssd130x_init_modeset(struct ssd130x_device *ssd130x)
mode->type = DRM_MODE_TYPE_DRIVER;
mode->clock = 1;
- mode->hdisplay = mode->htotal = ssd130x->width;
- mode->hsync_start = mode->hsync_end = ssd130x->width;
- mode->vdisplay = mode->vtotal = ssd130x->height;
- mode->vsync_start = mode->vsync_end = ssd130x->height;
+ mode->hdisplay = ssd130x->width;
+ mode->htotal = ssd130x->width;
+ mode->hsync_start = ssd130x->width;
+ mode->hsync_end = ssd130x->width;
+ mode->vdisplay = ssd130x->height;
+ mode->vtotal = ssd130x->height;
+ mode->vsync_start = ssd130x->height;
+ mode->vsync_end = ssd130x->height;
mode->width_mm = 27;
mode->height_mm = 27;
--
2.51.0
next prev parent reply other threads:[~2025-09-20 9:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-20 9:45 [PATCH v2 0/5] drm/solomon: Code improvements and DRM helper adoption Iker Pedrosa
2025-09-20 9:45 ` [PATCH v2 1/5] drm/solomon: Move calls to drm_gem_fb_end_cpu*() Iker Pedrosa
2025-09-20 9:45 ` [PATCH v2 2/5] drm/solomon: Use drm_WARN_ON_ONCE instead of WARN_ON Iker Pedrosa
2025-09-20 9:45 ` [PATCH v2 3/5] drm/solomon: Simplify mode_valid() using DRM helper Iker Pedrosa
2025-09-20 9:45 ` [PATCH v2 4/5] drm/solomon: Simplify get_modes() " Iker Pedrosa
2025-09-20 9:45 ` Iker Pedrosa [this message]
2025-09-26 13:15 ` [PATCH v2 0/5] drm/solomon: Code improvements and DRM helper adoption 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=20250920-improve-ssd130x-v2-5-77721e87ae08@gmail.com \
--to=ikerpedrosam@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®