From patchwork Tue Nov 8 05:09:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416583 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 845F860459 for ; Tue, 8 Nov 2016 05:26:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 753A728B9C for ; Tue, 8 Nov 2016 05:26:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 689C228BA3; Tue, 8 Nov 2016 05:26:08 +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 EA87028B9D for ; Tue, 8 Nov 2016 05:26:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752380AbcKHF0G (ORCPT ); Tue, 8 Nov 2016 00:26:06 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34030 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbcKHF0F (ORCPT ); Tue, 8 Nov 2016 00:26:05 -0500 Received: by mail-pf0-f194.google.com with SMTP id y68so18126754pfb.1; Mon, 07 Nov 2016 21:26:05 -0800 (PST) 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=Te0ZJrNOu0axjX4X4WuET10vfouJudIS1g30i9rvIWc=; b=aslf8Fb9tFUSKgYw0njfHtHsEc6ZSbXpyufGV3o64COFzNxL/grDVSTsQfjiNHmdX/ E3Tuj91oI3VFweAlmcJxOfGfGgV4FNzz7F23S1i8/Z1ZkATTwRnPOMqz/xyydbVKvsKz 5r7EPk3wXyuomrGwlWP+BG38wYa6KZt2BIi2sd9eGBVL6TrlPyv3C4SFPVTfnRLWK+pk ksWZ7N7CKdRoKfrcaJS9ew4AEHk42KNBZ3DMQ3xIdh4aRv1R01nhuTRp1IgRkLrFOfgQ 2vzS/xPp8cCvBj/yN8qL5uPRYDgZ+1HBFMZ4QtdQzrGHEq5p/WX5LvOK6cSCXGwEH4lu 0vHg== 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=Te0ZJrNOu0axjX4X4WuET10vfouJudIS1g30i9rvIWc=; b=TgpFLOrhNdMOVv6l50h6TsGKa1O76qIdTOTKfC8HzbXkmBQJuNEaOdcWvXv/HOL/zU Fw9r6kneoK+qbGQKOasggGZEQuaCdT9riFSkvaPK5pdzqZSG8KpVTSKPtfACOzln3Zjw ZI911uZWvtA0Cg7+W38i0pTfVp2FrKHrm4v68kmYifcUWcCbPHHBqvtFJyYGZUAC5j55 Pv77QN6X54Lhf4N9c68AkXiuT6eBwQx83v1z9LcFsBWvN4QpF6jbI4wkH+qum2hBcHb3 YOPZ/14elaDZ6d3HA3IgVL95ftY2lX5ZLp/MuGbFh9zFUIDiT5vXL6LwtY7cIgF5QSl6 8Ckw== X-Gm-Message-State: ABUngvcSMzoAVB69cixKKcWAPlAK2N5eKZzKgJrCZd7vlQtsrr0sUjgyyW30OLhAEhWQKQ== X-Received: by 10.98.152.212 with SMTP id d81mr20274055pfk.12.1478581870058; Mon, 07 Nov 2016 21:11:10 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id 64sm32949710pfu.17.2016.11.07.21.11.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:11:09 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 42/49] thermal: core: small style fix when checking for __find_governor() Date: Mon, 7 Nov 2016 21:09:20 -0800 Message-Id: <1478581767-7009-43-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1478581767-7009-1-git-send-email-edubezval@gmail.com> References: <1478581767-7009-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 09d521a..f19fe03 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);