mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergei Stepanenkov <sergei_stepanenkov@disroot.org>
To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-staging@lists.linux.dev, andy@kernel.org, hansg@kernel.org,
	mchehab@kernel.org, sakari.ailus@linux.intel.com,
	gregkh@linuxfoundation.org
Cc: ~lkcamp/patches@lists.sr.ht, koike@igalia.com,
	Sergei Stepanenkov <sergei_stepanenkov@disroot.org>
Subject: [PATCH] staging: media: atomisp: move constant to the right side of comparisons
Date: Thu, 23 Jul 2026 12:50:20 -0300	[thread overview]
Message-ID: <20260723155027.124722-1-sergei_stepanenkov@disroot.org> (raw)

Fix all checkpatch warning occurences
"WARNING: Comparisons should place the constant on the right side of
the test" in folder drivers/staging/media/atomisp/pci

Signed-off-by: Sergei Stepanenkov <sergei_stepanenkov@disroot.org>
---
Hey, this is my first patch, I appreciate any feedback, thanks!
---
 drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 4 ++--
 drivers/staging/media/atomisp/pci/sh_css.c               | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
index 0ee52637ea30..1e9f7d96f18c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
@@ -2301,8 +2301,8 @@ int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
 			       ATOMISP_INPUT_STREAM_VIDEO :
 			       ATOMISP_INPUT_STREAM_GENERAL;
 
-	if (0 != ia_css_pipe_get_info(asd->stream_env[stream_index]
-		.pipes[pipe_index], &info)) {
+	if (ia_css_pipe_get_info(asd->stream_env[stream_index]
+		.pipes[pipe_index], &info) != 0) {
 		dev_dbg(isp->dev, "ia_css_pipe_get_info FAILED");
 		return -EINVAL;
 	}
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 00082276f1db..3399e6793628 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -7708,7 +7708,7 @@ ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
 		IA_CSS_LEAVE_ERR_PRIVATE(err);
 		return err;
 	}
-	if (0 != pin_index && 1 != pin_index) {
+	if (pin_index != 0 && pin_index != 1) {
 		IA_CSS_ERROR("pin index is not valid");
 		err = -EINVAL;
 		IA_CSS_LEAVE_ERR_PRIVATE(err);
-- 
2.47.3


             reply	other threads:[~2026-07-23 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 15:50 Sergei Stepanenkov [this message]
2026-08-06 23:06 ` Andy Shevchenko

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=20260723155027.124722-1-sergei_stepanenkov@disroot.org \
    --to=sergei_stepanenkov@disroot.org \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=koike@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=~lkcamp/patches@lists.sr.ht \
    /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®