public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Gabriel Rondon <grondon@gmail.com>
Cc: parthiban.veerasooran@microchip.com,
	christian.gromm@microchip.com, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: most: dim2: replace BUG_ON() with graceful error handling
Date: Mon, 30 Mar 2026 17:57:23 +0200	[thread overview]
Message-ID: <2026033011-limit-cherisher-06b1@gregkh> (raw)
In-Reply-To: <20260319115408.24215-1-grondon@gmail.com>

On Thu, Mar 19, 2026 at 11:54:08AM +0000, Gabriel Rondon wrote:
> BUG_ON() is deprecated as it crashes the entire kernel on assertion
> failure (see Documentation/process/deprecated.rst). Replace all
> BUG_ON() calls in dim2.c with proper error handling that returns
> appropriate error codes instead of panicking.
> 
> In try_start_dim_transfer(), replace the BUG_ON for null/uninitialized
> channel with an early return of -EINVAL, and replace the BUG_ON for
> zero bus_address with an error return that properly releases the
> spinlock first.
> 
> In service_done_flag(), replace BUG_ON with an early return since the
> function returns void.
> 
> In configure_channel(), enqueue(), and poison_channel(), replace BUG_ON
> range checks on ch_idx with returns of -EINVAL.

This should be one patch per function, right?

thanks,

greg k-h

  reply	other threads:[~2026-03-30 15:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 11:54 [PATCH] staging: most: dim2: replace BUG_ON() with graceful error handling Gabriel Rondon
2026-03-30 15:57 ` Greg KH [this message]
2026-03-30 17:50   ` grondon

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=2026033011-limit-cherisher-06b1@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=christian.gromm@microchip.com \
    --cc=grondon@gmail.com \
    --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