From patchwork Mon May 30 22:16:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9142887 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5CA2B60761 for ; Mon, 30 May 2016 22:20:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 327A527D17 for ; Mon, 30 May 2016 22:20:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 275F228183; Mon, 30 May 2016 22:20:35 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 CAC4E27D17 for ; Mon, 30 May 2016 22:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162054AbcE3WT6 (ORCPT ); Mon, 30 May 2016 18:19:58 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36384 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423661AbcE3WRp (ORCPT ); Mon, 30 May 2016 18:17:45 -0400 Received: by mail-pa0-f65.google.com with SMTP id fg1so22571845pad.3; Mon, 30 May 2016 15:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jcZXPPbfPUAoOWBBSm8UsdnT3xxf8oJkvEyh3OKT1G0=; b=gMYC9yjTUN2iYGNDkBpLH4/SEEUg380RJz7R4Nq0KtirERr2lWLNkTmawOAqhOymJN UBs8+GWYs4jb0zM9kuVucrJymfT/Amtg00fnFMYeXER6+NO0lY9RJIX3LqUxXh+sqB6q a2wcsWq7d6178LH0ie0D3Dc2GvYsZoTZCdvO34H67ZvFnTGeglEEE9EEwC2U4j1FgGIL y1ekyabUTL8DELnVwWG8kS3gdURyQDdS4XgZ2uISTxYQOGvGIB84wQi4UvCneEYy+ppt u9mdlkZEcfq7ULytFiQXGA9GwIeQbvYv2D8sB/nlLRFehIPwDfiHFnY/nNkYOn6AGxC7 q9dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jcZXPPbfPUAoOWBBSm8UsdnT3xxf8oJkvEyh3OKT1G0=; b=fYeFwOvbP6481gVc33wKO9z8qYME8ZHk7N1/gMfmA1lh9A/PLm2s5yMm0Tc003GW4p zeP/OTqsRZziluph6yWLoP7Sm/iN7aa0eyH+L9kUFnj0xvFvMuMLTc7haJf4KO0ti4C8 KDE3ZJ7oBNTDJESp+s77ko1BJbNzG9P/D/7o1Vt++zMjerM1iZaPwkf2Xs4Smy8T/BoZ kNye3TkdLKvOFc0a8qiq9aHZf2i9B0/vwouLOwaoxVvphpGmbmJAb7CGHnD6L+9ybrL9 R8fzLtnFeVnh2J7pj2c+yYeJnLI769K67TkWuMxZe9rHN8aFDyO/ZtY7LNxISIEuj5yc PHDQ== X-Gm-Message-State: ALyK8tJoKVRstIc/rJF9YeKtlZV5M39bbq5pK0QDvojRKIrWDHc7rfUDUwckBIXFoNoIVQ== X-Received: by 10.67.13.144 with SMTP id ey16mr49601067pad.147.1464646664232; Mon, 30 May 2016 15:17:44 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id p13sm35156653pfj.58.2016.05.30.15.17.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 15:17:43 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Eduardo Valentin Subject: [PATCHv3 42/48] thermal: core: small style fix when checking for __find_governor() Date: Mon, 30 May 2016 15:16:18 -0700 Message-Id: <1464646584-14322-43-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464646584-14322-1-git-send-email-edubezval@gmail.com> References: <1464646584-14322-1-git-send-email-edubezval@gmail.com> 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 Remove style issue: CHECK: Comparison to NULL could be written "!__find_governor" + if (__find_governor(governor->name) == NULL) { Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index f653090..cbc5954 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -136,7 +136,7 @@ int thermal_register_governor(struct thermal_governor *governor) mutex_lock(&thermal_governor_lock); err = -EBUSY; - if (__find_governor(governor->name) == NULL) { + if (!__find_governor(governor->name)) { err = 0; list_add(&governor->governor_list, &thermal_governor_list); if (!def_governor && !strncmp(governor->name, @@ -182,7 +182,7 @@ void thermal_unregister_governor(struct thermal_governor *governor) mutex_lock(&thermal_governor_lock); - if (__find_governor(governor->name) == NULL) + if (!__find_governor(governor->name)) goto exit; mutex_lock(&thermal_list_lock);