From: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org,
andriy.shevchenko@linux.intel.com, john.ogness@linutronix.de,
pmladek@suse.com, johan@kernel.org, namcao@linutronix.de,
timur@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, akhileshpatilvnit@gmail.com,
skhan@linuxfoundation.org
Subject: [PATCH] tty: serial: ucc_uart: use WARN_ON() instead of BUG()
Date: Mon, 28 Jul 2025 07:14:25 +0530 [thread overview]
Message-ID: <aIbV+WbhFMDamaiW@bhairav-test.ee.iitb.ac.in> (raw)
Replace BUG() with WARN_ON() as recommended in
Documentation/process/deprecated.rst
Fix system entering into unstable/break/undebuggable state due to use
of BUG(). Follow strict suggestions as per [1] [2].
Link: https://lore.kernel.org/lkml/CA+55aFy6jNLsywVYdGp83AMrXBo_P-pkjkphPGrO=82SPKCpLQ@mail.gmail.com/ [1]
Link: https://lore.kernel.org/lkml/CAHk-=whDHsbK3HTOpTF=ue_o04onRwTEaK_ZoJp_fjbqq4+=Jw@mail.gmail.com/ [2]
Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
---
drivers/tty/serial/ucc_uart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 0613f8c11ab1..6214ab1b67cb 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -223,7 +223,7 @@ static inline dma_addr_t cpu2qe_addr(void *addr, struct uart_qe_port *qe_port)
/* something nasty happened */
printk(KERN_ERR "%s: addr=%p\n", __func__, addr);
- BUG();
+ WARN_ON(1);
return 0;
}
@@ -242,7 +242,7 @@ static inline void *qe2cpu_addr(dma_addr_t addr, struct uart_qe_port *qe_port)
/* something nasty happened */
printk(KERN_ERR "%s: addr=%llx\n", __func__, (u64)addr);
- BUG();
+ WARN_ON(1);
return NULL;
}
--
2.34.1
next reply other threads:[~2025-07-28 1:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-28 1:44 Akhilesh Patil [this message]
2025-07-28 4:07 ` Greg KH
2025-07-28 5:31 ` Akhilesh Patil
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=aIbV+WbhFMDamaiW@bhairav-test.ee.iitb.ac.in \
--to=akhilesh@ee.iitb.ac.in \
--cc=akhileshpatilvnit@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=namcao@linutronix.de \
--cc=pmladek@suse.com \
--cc=skhan@linuxfoundation.org \
--cc=timur@kernel.org \
/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®