linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: cgel.zte@gmail.com
To: hca@linux.ibm.com
Cc: gor@linux.ibm.com, borntraeger@de.ibm.com,
	agordeev@linux.ibm.com, svens@linux.ibm.com,
	egorenar@linux.ibm.com, geert@linux-m68k.org,
	zhang.mingyu@zte.com.cn, frankja@linux.ibm.com,
	ebiederm@xmission.com, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org, Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH] s390:Use BUG_ON instead of if condition followed by BUG.
Date: Wed,  3 Nov 2021 05:56:22 +0000	[thread overview]
Message-ID: <20211103055622.25441-1-zhang.mingyu@zte.com.cn> (raw)

From: Zhang Mingyu <zhang.mingyu@zte.com.cn>

This issue was detected with the help of Coccinelle.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
---
 arch/s390/mm/fault.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index d30f5986fa85..48a0231158c9 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -824,8 +824,7 @@ void do_secure_storage_access(struct pt_regs *regs)
 			break;
 		rc = arch_make_page_accessible(page);
 		put_page(page);
-		if (rc)
-			BUG();
+		BUG_ON(rc);
 		break;
 	case GMAP_FAULT:
 	default:
-- 
2.25.1


             reply	other threads:[~2021-11-03  5:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  5:56 cgel.zte [this message]
2021-11-10 14:44 ` [PATCH] s390:Use BUG_ON instead of if condition followed by BUG Heiko Carstens

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=20211103055622.25441-1-zhang.mingyu@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=egorenar@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=geert@linux-m68k.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=svens@linux.ibm.com \
    --cc=zealci@zte.com.cn \
    --cc=zhang.mingyu@zte.com.cn \
    /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;
as well as URLs for NNTP newsgroup(s).