mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 5/5] drm/solomon: Enforce one assignment per line
Date: Fri, 12 Sep 2025 18:42:13 +0200	[thread overview]
Message-ID: <20250912-improve-ssd130x-v1-5-bc9389ed299e@gmail.com> (raw)
In-Reply-To: <20250912-improve-ssd130x-v1-0-bc9389ed299e@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.

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 7bdccb5140195a45d8ffd01e139dd4eb2e3cc327..a09e64719f62562126851e67c4f77d779b861148 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -1864,10 +1864,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


  parent reply	other threads:[~2025-09-12 16:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-12 16:42 [PATCH 0/5] drm/solomon: Code improvements and DRM helper adoption Iker Pedrosa
2025-09-12 16:42 ` [PATCH 1/5] drm/solomon: Move calls to drm_gem_fb_end_cpu*() Iker Pedrosa
2025-09-17  9:06   ` Javier Martinez Canillas
2025-09-17  9:20     ` Thomas Zimmermann
2025-09-12 16:42 ` [PATCH 2/5] drm/solomon: Use drm_WARN_ON_ONCE instead of WARN_ON Iker Pedrosa
2025-09-17  9:23   ` Javier Martinez Canillas
2025-09-12 16:42 ` [PATCH 3/5] drm/solomon: Simplify mode_valid() using DRM helper Iker Pedrosa
2025-09-17  9:27   ` Javier Martinez Canillas
2025-09-12 16:42 ` [PATCH 4/5] drm/solomon: Simplify get_modes() " Iker Pedrosa
2025-09-17  9:28   ` Javier Martinez Canillas
2025-09-12 16:42 ` Iker Pedrosa [this message]
2025-09-17  9:29   ` [PATCH 5/5] drm/solomon: Enforce one assignment per line Javier Martinez Canillas
2025-09-15 11:24 ` [PATCH 0/5] drm/solomon: Code improvements and DRM helper adoption Thomas Zimmermann

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=20250912-improve-ssd130x-v1-5-bc9389ed299e@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®