From patchwork Tue May 31 06:18:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9143411 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 25C4A60761 for ; Tue, 31 May 2016 06:22:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A75828187 for ; Tue, 31 May 2016 06:22:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D9662821C; Tue, 31 May 2016 06:22:57 +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 BBF9128213 for ; Tue, 31 May 2016 06:22:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755967AbcEaGUq (ORCPT ); Tue, 31 May 2016 02:20:46 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:35450 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755956AbcEaGUn (ORCPT ); Tue, 31 May 2016 02:20:43 -0400 Received: by mail-pa0-f65.google.com with SMTP id gp3so16997766pac.2; Mon, 30 May 2016 23:20:43 -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=GwFFdNj3SpeW8FiS35iNA8bdkOv1DeID5Z87Hnu1nRHfKW54asaNYU/WXOkLpA6l3V hI4/8H9ok9L5mBfdyZGnon7aZXCmeq9vV4eHr6e9JepknGLNVwVFHx97On8vRUhcGHNJ xZbLl3q9YKBS14rGSEHCnwf64JpyV4nLJ4tNXDmWCT9OXd66mlt/sOiEqv9rCbYCwmGq FqRpfjD+mDhTMbBZmSWpghD8IVpq4hLhtMMDvMdjY4yqk13/rbtx9l62pJyU/sKBP90R pjqD+vZA/iKfWtxZP1W9ERZHJS/EqKrd7QCyH/fRHkWARRKmA5uJ08lwBaAzuPtlBIQq fHeg== 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=Qhv6aQBV6Z9l5fpzS5eHQljLiC/Zv2vEwOm3C5PKxc4qN2eFZHEfk24ImrI8xZpxiQ gQuQ4+ocfuopLESbuvrihW0XfCtZmAXiuIw/M8q5iuA+fDdFH8875Hpfe+abd4z4yJsj dZs/mC1cGvCKAQieK0UbDYEC6/EEojKCUpQLsfUyExui0cjP9QNTKJQhtaTrgZsk3R77 wT+7ZPEclYRIdo70fvyb/zkpZUdc1HY3RyuFRhWYBquCVln9o0vuRAYFvkVAPSQmya+g 5m0QscpwlD88oyrlUkmFMcG6V/6T4It2lAqqx2pnF8oEWebagy1eNSNi8kOVnMqyGt3Q 0v9g== X-Gm-Message-State: ALyK8tKbn2MAp3Or8Pq7d/E82RxP9TxuGIYQbZ6Gd9BcfeA39ZV2+lr90BG9eoAPBPDXCQ== X-Received: by 10.66.65.169 with SMTP id y9mr52974907pas.102.1464675643139; Mon, 30 May 2016 23:20:43 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id e184sm37166492pfe.14.2016.05.30.23.20.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 23:20:42 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Keerthy , Eduardo Valentin Subject: [PATCHv4 42/48] thermal: core: small style fix when checking for __find_governor() Date: Mon, 30 May 2016 23:18:49 -0700 Message-Id: <1464675535-2433-43-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464675535-2433-1-git-send-email-edubezval@gmail.com> References: <1464675535-2433-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);