From patchwork Sat Feb 16 16:15:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10816299 X-Patchwork-Delegate: viresh.linux@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B420413BF for ; Sat, 16 Feb 2019 16:15:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97C112C141 for ; Sat, 16 Feb 2019 16:15:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7285E2C14A; Sat, 16 Feb 2019 16:15:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C0242C141 for ; Sat, 16 Feb 2019 16:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730046AbfBPQPH (ORCPT ); Sat, 16 Feb 2019 11:15:07 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42405 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729886AbfBPQPH (ORCPT ); Sat, 16 Feb 2019 11:15:07 -0500 Received: by mail-pg1-f195.google.com with SMTP id b2so527004pgl.9; Sat, 16 Feb 2019 08:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ReTQZo60sGXBPg6k+sT2jbe543Cdh/eIkIUhoU27/xY=; b=F9w2grQhklcd1YfLoVfIGSlLy7NsRTpsT0GMTERpfXG1cNgsn14Fxxe1ntqihAXbbw YR4oIfCPi4AgzK0NBk68tdpXXFFAUSO6ks5V7D8aOEwF52m1SwI2fg89mFHbiVSdNFWb wR6sekQIus2WsPE+jDuKgWmFWF9GcP7Ln+IEv95QxM/VzLOiaEMKfzCHXL4E7jWo6h2f Su97xnWiq/U9k/xUGdx/1cKEGYdahhnRmM1m/GX8KurhTkoh8gRA8sxLKoPrzO83/reB FFZoKu+EPEjJ/gz4CwcP1r1eWkJFglJRH/8jkVnRXcLYRcPy1DOqhQjxAG6SD8/nSUHp bSDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ReTQZo60sGXBPg6k+sT2jbe543Cdh/eIkIUhoU27/xY=; b=csmP8HSsmnjdCpCcbxAq4K+wJtASPji6R3CeHp+fF9lDPf6bQl6GgAAIgX2fGDPjmF U4WD7tUW2H58m64fHa+ITTRWtf0VdqCh5sC0tNB/b7jCdj3TqJll3qZW6pbpAfBQqNuO qkwCAGIqoRuXDWwobzrUtLDlPMq12anQJjiRZFURRONI4B8vzI8v2cztsdcXpH384fJs 028CsLdI80Dy4eLORhEbQJ4aoo3U6ofmZyMeo5rh5DnbWsAacfbVpxbXrAJzNgHZ5Wwq JzPjnoyG71ny3GQ8Yr89Jtsk3IUg2k6FdRinHgigDy1Lps1wEltvlCgUX3NZJNsvFrwJ KbbQ== X-Gm-Message-State: AHQUAuZmJR7M+o2AL7X+/oDwPZ0VHYgQiWkHlsoLP1Qwmst0nVYFo6PE GikSEpgQ/eNwwK8wDGmKWO4fpZIqaW8= X-Google-Smtp-Source: AHgI3IbiaMe3/hGdHH6wYM9ulqhffU2465Pw8xJNoTStroojHFUe76RsgQ4Po9MXn+gnnINfJJ+DPA== X-Received: by 2002:a63:b70b:: with SMTP id t11mr10559120pgf.404.1550333706377; Sat, 16 Feb 2019 08:15:06 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id l12sm18629766pgk.40.2019.02.16.08.15.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Feb 2019 08:15:05 -0800 (PST) From: Yangtao Li To: rjw@rjwysocki.net, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Yangtao Li Subject: [PATCH] cpufreq: speedstep: convert BUG() to BUG_ON() Date: Sat, 16 Feb 2019 11:15:01 -0500 Message-Id: <20190216161501.12168-1-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To fix coccinelle WARNING. WARNING: Use BUG_ON instead of if condition followed by BUG. Signed-off-by: Yangtao Li --- drivers/cpufreq/speedstep-ich.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index fbbcb88db061..5d8a09b82efb 100644 --- a/drivers/cpufreq/speedstep-ich.c +++ b/drivers/cpufreq/speedstep-ich.c @@ -243,8 +243,7 @@ static unsigned int speedstep_get(unsigned int cpu) unsigned int speed; /* You're supposed to ensure CPU is online. */ - if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0) - BUG(); + BUG_ON(smp_call_function_single(cpu, get_freq_data, &speed, 1)); pr_debug("detected %u kHz as current frequency\n", speed); return speed;