mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Olle Lukowski <olle@lukowski.dev>
To: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
	 Christian Gromm <christian.gromm@microchip.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	 Olle Lukowski <olle@lukowski.dev>
Subject: [PATCH v2 0/3] staging: most: replace BUG_ON() with proper error handling
Date: Tue, 21 Oct 2025 16:09:27 +0300	[thread overview]
Message-ID: <20251021-staging-most-warn-v2-0-cd51e1e717f6@lukowski.dev> (raw)

This small series replaces BUG_ON() calls in three staging MOST drivers
with appropriate error handling.

The affected drivers are:

  - drivers/staging/most/i2c/i2c.c
  - drivers/staging/most/dim2/dim2.c
  - drivers/staging/most/video/video.c

All changes are mechanical and do not alter runtime behavior, except that
the kernel won't panic if a driver invariant is violated.

Tested with checkpatch.pl and compile-tested (make M=drivers/staging/most).

Signed-off-by: Olle Lukowski <olle@lukowski.dev>
---
Changes in v2:
- Drop WARN_ON_ONCE() per review (Greg KH). Many systems enable
  panic_on_warn; use plain checks + error returns instead.
- Link to v1: https://lore.kernel.org/r/20251021-staging-most-warn-v1-0-4cdd3745bbdc@lukowski.dev

---
Olle Lukowski (3):
      staging: most: i2c: replace BUG_ON() with proper checks and error returns
      staging: most: dim2: replace BUG_ON() with proper checks and error returns
      staging: most: video: replace BUG_ON() with proper check

 drivers/staging/most/dim2/dim2.c   | 27 +++++++++++++++++++--------
 drivers/staging/most/i2c/i2c.c     |  9 ++++++---
 drivers/staging/most/video/video.c |  3 ++-
 3 files changed, 27 insertions(+), 12 deletions(-)
---
base-commit: 211ddde0823f1442e4ad052a2f30f050145ccada
change-id: 20251021-staging-most-warn-51deb2e454aa

Best regards,
-- 
Olle Lukowski <olle@lukowski.dev>


             reply	other threads:[~2025-10-21 13:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 13:09 Olle Lukowski [this message]
2025-10-21 13:09 ` [PATCH v2 1/3] staging: most: i2c: replace BUG_ON() with proper checks and error returns Olle Lukowski
2025-10-21 13:09 ` [PATCH v2 2/3] staging: most: dim2: " Olle Lukowski
2025-10-21 16:02   ` Greg Kroah-Hartman
2025-10-21 13:09 ` [PATCH v2 3/3] staging: most: video: replace BUG_ON() with proper check Olle Lukowski
2025-10-21 16:02   ` Greg Kroah-Hartman

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=20251021-staging-most-warn-v2-0-cd51e1e717f6@lukowski.dev \
    --to=olle@lukowski.dev \
    --cc=christian.gromm@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=parthiban.veerasooran@microchip.com \
    /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®