Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp18505pxf; Tue, 16 Mar 2021 20:40:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOTUgfT/i4NllnYQ1fjdOfTLArBPS9RLOkQeBt25QmMvMom1m38IxjZvJoROhaHqQwwnaf X-Received: by 2002:a17:906:edca:: with SMTP id sb10mr16379535ejb.398.1615952439075; Tue, 16 Mar 2021 20:40:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615952439; cv=none; d=google.com; s=arc-20160816; b=x8aJl/xDUCya/kNvrhaPYNLK65mznE0eyfh62hthzlnC1EclQv4lzDSP+VH/NKRzeS WT1JLa1GziwB8BSne2z3ftvJUZ1GneJa4HaEXpT66TH556PAwclaLo+MsON6QRYjb6wR KJmalGMBfrixJH3U52lDGtiRB+6p5OQsuHvRYWvnoHqDihkKKAI45Oi0Yd3SFsmQjk79 VEMjzooOexQCVgsM06LrrS7Iyye//VeeZycWuql9hz5OFjAdGPFslS/js1J+Qc5b2Ds7 kp7THdUNicmp2c814uTQL3nVT53vU/K70BuAlNkUXT6PDKJKKpxIS3BfLEAE3FE997YR lmGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=QG0Gh0cSglIYMkCo9bg7JNafprhx7FH8Flb0F1cQCBc=; b=CHzqMzmGAj35EndMtv45QufzF5Lk2PI/vfQVX2fkY87Gk33vI2C+fxMOGb9WoCQH6V nZPWvmCb+5vrNJ8QJfaUJSuR7J/XyncybUzeCcAuVCYdirancx54Eh74YIqvtVLT43hV jeIPm7mcCMk7NjRjyZDOHwkpUkuqXQ4a4ogDiD6QsOta/wi4jORREo+cMRqd18oYcOs5 Igg8yybQjuxSFgaSdGRc19mDnWy4uoWm2sLskARtZL2TvbimeXMI4y13CTDxik9FVo5m 65OaUrxul5l4gUpns+/+0c42WGp/xwajo+cmjLPLPE3gT/TqkLles0M6x65YqPvuUaGS jq6A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si16143985edd.471.2021.03.16.20.40.17; Tue, 16 Mar 2021 20:40:39 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbhCQDjA (ORCPT + 99 others); Tue, 16 Mar 2021 23:39:00 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:50210 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbhCQDiv (ORCPT ); Tue, 16 Mar 2021 23:38:51 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R501e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0USDZp7x_1615952319; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0USDZp7x_1615952319) by smtp.aliyun-inc.com(127.0.0.1); Wed, 17 Mar 2021 11:38:45 +0800 From: Jiapeng Chong To: dhowells@redhat.com Cc: davem@davemloft.net, kuba@kernel.org, linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] rxrpc: rxkad: replace if (cond) BUG() with BUG_ON() Date: Wed, 17 Mar 2021 11:38:38 +0800 Message-Id: <1615952318-4861-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warnings: ./net/rxrpc/rxkad.c:1140:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- net/rxrpc/rxkad.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index e2e9e9b..bfa3d9a 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c @@ -1135,9 +1135,8 @@ static void rxkad_decrypt_response(struct rxrpc_connection *conn, ntohl(session_key->n[0]), ntohl(session_key->n[1])); mutex_lock(&rxkad_ci_mutex); - if (crypto_sync_skcipher_setkey(rxkad_ci, session_key->x, - sizeof(*session_key)) < 0) - BUG(); + BUG_ON(crypto_sync_skcipher_setkey(rxkad_ci, session_key->x, + sizeof(*session_key)) < 0); memcpy(&iv, session_key, sizeof(iv)); -- 1.8.3.1