Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp41178pxb; Tue, 2 Nov 2021 22:57:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNNj9I4sfA7zMY7O/2YdeGYDNgb6HAoV1UjzC4EsF2LazfLGiq7LAywhEpaPJaN29vgXTN X-Received: by 2002:a05:6602:2d8f:: with SMTP id k15mr17009719iow.31.1635919074384; Tue, 02 Nov 2021 22:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635919074; cv=none; d=google.com; s=arc-20160816; b=Wl5+WKLB7lJ4oiWqLNaVVxnUcuPclz8LFYDQy9p3MgtnwABUGhyzJBCN303+htsFKX 8oK7vwNwHtKCOtUWUgfrrgpUi/NnB0sPwS+UMAR3UMrmTkZ5N62tdFgD9j6KZxGb+WoN y2I94CWy6036dHcTbG9UTYgpiVRTvpAFpY7J2MLTLPp3sskOpAz3+dmL0uoZOKG+zrYY EEvffWdS7bPDa8q7QzgyMRTczgk85xQ4xnHyuWTGdqiisXNp/dr9IX5+T6qQcjyu/Ag2 o5NLT2gMAhwvZtPDZDyhz+3H2g4Q+R5O6ADvBf7KoP1fyQkQKB1tqYPHHZy4EpAJehHl aR5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=t7wqUhnpf2ljLZMeYQek9+0eByVdd6mRp60BpbWMryQ=; b=XWreWwQmAOXXBbC3j62b73lZX9/x9P2uALfNlirnMtsWL83FZqlFvWdN+rT80gVIwz 06i9OV3CKH/BgdrPBI6cHY5SGIsBZ2n2NP/OThQ4ZRVCdLKynhchV1KIVB00JpcgKu7+ SzpWLI9LxuwAaxswvX1d4K41Z8izzF985GH4TRO3gaMO81TOKT6PK9mXMet+Hanztx82 JYu5mulvkcUmHBTkZYFFs7Kql6eSmFFgRLIB6fBCrjOIlXTcyw1Gat7l7a4P72hV+w6u qxEbDOevLr+Lc6YZ4XGV2quFzmBqBSvSP7Yh+sM9FTyYivCIpnM+SxRSZAJIfG1qx2nu dRvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="XzTUj8/o"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si2379454iow.17.2021.11.02.22.57.41; Tue, 02 Nov 2021 22:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="XzTUj8/o"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbhKCF7J (ORCPT + 99 others); Wed, 3 Nov 2021 01:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbhKCF7I (ORCPT ); Wed, 3 Nov 2021 01:59:08 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23B04C061714; Tue, 2 Nov 2021 22:56:33 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id t21so1755067plr.6; Tue, 02 Nov 2021 22:56:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t7wqUhnpf2ljLZMeYQek9+0eByVdd6mRp60BpbWMryQ=; b=XzTUj8/oGxrAKfnwYmCHaL/KD+jX69gDINS4NSle1ndT6Xq4/AYSM21Z+wmrlprrJb 9d7dumUxZSWpVmZBdnLV8U7V3m51gFSfAdnJETX2h3kpLDan9YbS+BHBM6Tjkiog3pgC 4KWmz73c+mgPVyEUy9KJiz9cNSekXe2/SSbA5gxmTzYLOt0xn5ixuW+fjtrzMPubJ+1z uCUVGleLmqTuXZN47TikvAvxTa5wDJN4FrPxITpC8Jwfq6/r0mJiWOxqYtan5m1Mn4uQ Tr/MMwR+xHeG/aohJNxMWLmBznxBUd7v2I+IVfMc3fKQRlv9FndwEPgHdoY5tnXEK9YD CiXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t7wqUhnpf2ljLZMeYQek9+0eByVdd6mRp60BpbWMryQ=; b=seeIDuRFcIo7pdZcxgMVyDK2VRBIr1LrIydfxWRSPQ7JGZlhGo06OF+cBJe33MrzHP NYPfhiUKt7ej10O/8KOEdOuWV1FHB7Wp4EcOtjy/wvfkZoJ6PqwLMPnak+MXBYTHl16a CXuEoeuoWELsdyOvqLn+yMcdqcQF37i9tOZ8mccJV08l2tLqHE2+HzgZLf6nW9Yvhci9 xwXj8ggBqQsNLLI6/ViegUYJa16+3+cnHkF/VmDttMfIkgKRylURYDjtSvKGvE8NRnRe Fuc6ocUxButz9s0cv2UrKUL1uGAHIGfwpqjr2czztr6YvrsUPytGZse5k7cM+yJCR4eY HGhw== X-Gm-Message-State: AOAM530bK2nEmImm4tEBtZU6wjNHX3JBIAHzTSt/+F6+sNGvfAjyh3RR f3q7+kAqTY3tSllNHvsx//Q= X-Received: by 2002:a17:90a:9915:: with SMTP id b21mr12072347pjp.195.1635918992254; Tue, 02 Nov 2021 22:56:32 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id s28sm780757pgo.86.2021.11.02.22.56.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 22:56:31 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: zhang.mingyu@zte.com.cn 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 Subject: [PATCH] s390:Use BUG_ON instead of if condition followed by BUG. Date: Wed, 3 Nov 2021 05:56:22 +0000 Message-Id: <20211103055622.25441-1-zhang.mingyu@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhang Mingyu This issue was detected with the help of Coccinelle. Reported-by: Zeal Robot Signed-off-by: Zhang Mingyu --- 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