From patchwork Tue Nov 8 05:09:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416611 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 326CC60459 for ; Tue, 8 Nov 2016 05:30:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 223F028B9D for ; Tue, 8 Nov 2016 05:30:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14CC928BA3; Tue, 8 Nov 2016 05:30:00 +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 5B80528B9D for ; Tue, 8 Nov 2016 05:29:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549AbcKHF35 (ORCPT ); Tue, 8 Nov 2016 00:29:57 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33381 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbcKHF35 (ORCPT ); Tue, 8 Nov 2016 00:29:57 -0500 Received: by mail-pf0-f194.google.com with SMTP id 144so9742279pfv.0; Mon, 07 Nov 2016 21:29:56 -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=LG1e4+Sdw8OA+7t1ZV6aQ8kiLaa7hDvlFvZMA+bxs+Y=; b=k3z0A2fQN/aub/PQOQG3HN/Vl7tFxDOu7FZxrpTGvrqJ2ogS68bLTpGSrlgEZkPgAM cU5lB2PYm+cBX0QzHKBff0caKi88pF/j9MCGwNgzX7wyJumayv4IQM/bjZOZgeaGrNbx pM4WPwTWEW6KuDxCF73fBP44NTGzCjkcYpHLy02VfM2AEyyx+34KdoF8De6T0NxY8Gge qZ0EX4SG3VRIyO+ziuIcFMpqYUkWmmw5NjVoYxwLXwGhc659OXHAF9IaxrCAbFL8H24S q1nx2T+gHmpJMy9BPh3Rd8Kv+8H3aSvY6Ug4Op+G0koWWnjrTfNbU2sHSNSMNeH6PpDA QIAA== 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=LG1e4+Sdw8OA+7t1ZV6aQ8kiLaa7hDvlFvZMA+bxs+Y=; b=dy0kKvRg8yXdtR5hUoqkFVlnk4n7TGa2tP7sMRz50yVqg2vJ7tcLGktFXMwrqgUekG jWc6mibhwe0Ko5zDB2/fX5Nd+Axk9KTFyM3Qm9Zcj90vy0s4du86b+HkOJ6NCQ2kIGwX 6eOzr4UB/ODduO9oVwG41Gsf+fp9owamb9DIRL/i0ar6g2PrQuiFuyybZhEpRoln7p4h qf0gsC47zA8qZJgUvqXLy/ktHgInY/4UJy/kpnj6dbOr1EOIcWvzOBQKaSSQlg+kRfPf FyMAhX9gR26c2vqrhRLOw5h0XMwgHnWInSJaGqlfAaLWyzi1mVL6VLeNWDnyxDp6HydC u/RA== X-Gm-Message-State: ABUngvcdyWOQ3zu4KHQICPpwQQuEq50IbWxS7JMvyRv7z42M0TYJd7XuM5hHo2fe2OWa1Q== X-Received: by 10.98.17.80 with SMTP id z77mr20056731pfi.166.1478581874699; Mon, 07 Nov 2016 21:11:14 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id c142sm41900743pfb.23.2016.11.07.21.11.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:11:14 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 45/49] thermal: core: remove style warnings and checks Date: Mon, 7 Nov 2016 21:09:23 -0800 Message-Id: <1478581767-7009-46-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 Removing several style issues in thermal code code. 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 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 8365d0b..e3cdba5 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -718,10 +718,10 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, mutex_lock(&tz->lock); mutex_lock(&cdev->lock); list_for_each_entry(pos, &tz->thermal_instances, tz_node) - if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { - result = -EEXIST; - break; - } + if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { + result = -EEXIST; + break; + } if (!result) { list_add_tail(&dev->tz_node, &tz->thermal_instances); list_add_tail(&dev->cdev_node, &cdev->thermal_instances); @@ -801,8 +801,8 @@ static void thermal_release(struct device *dev) sizeof("thermal_zone") - 1)) { tz = to_thermal_zone(dev); kfree(tz); - } else if(!strncmp(dev_name(dev), "cooling_device", - sizeof("cooling_device") - 1)) { + } else if (!strncmp(dev_name(dev), "cooling_device", + sizeof("cooling_device") - 1)) { cdev = to_cooling_device(dev); kfree(cdev); } @@ -1036,8 +1036,8 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) mutex_lock(&thermal_list_lock); list_for_each_entry(pos, &thermal_cdev_list, node) - if (pos == cdev) - break; + if (pos == cdev) + break; if (pos != cdev) { /* thermal cooling device not found */ mutex_unlock(&thermal_list_lock); @@ -1241,7 +1241,7 @@ thermal_zone_device_register(const char *type, int trips, int mask, /* Bind cooling devices for this zone */ bind_tz(tz); - INIT_DELAYED_WORK(&(tz->poll_queue), thermal_zone_device_check); + INIT_DELAYED_WORK(&tz->poll_queue, thermal_zone_device_check); thermal_zone_device_reset(tz); /* Update the new thermal zone and mark it as already updated. */ @@ -1275,8 +1275,8 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz) mutex_lock(&thermal_list_lock); list_for_each_entry(pos, &thermal_tz_list, node) - if (pos == tz) - break; + if (pos == tz) + break; if (pos != tz) { /* thermal zone device not found */ mutex_unlock(&thermal_list_lock);