From patchwork Tue May 31 06:18:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9143405 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 A4DD860777 for ; Tue, 31 May 2016 06:22:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98D1028213 for ; Tue, 31 May 2016 06:22:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D38328223; Tue, 31 May 2016 06:22:38 +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=unavailable 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 176A828213 for ; Tue, 31 May 2016 06:22:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755806AbcEaGWV (ORCPT ); Tue, 31 May 2016 02:22:21 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:32922 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755983AbcEaGUs (ORCPT ); Tue, 31 May 2016 02:20:48 -0400 Received: by mail-pa0-f65.google.com with SMTP id f8so23994141pag.0; Mon, 30 May 2016 23:20:47 -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=thby53x13J373nuatZLPzOpAkl/ap6QlPgQWogGPRIg=; b=hCkmYVTdDdktoQ1gKjMfJ+G9k7RPURXMtVmNff6xP024Y6h+t77crdBSXjzmXo970F gWN5E/ttr42HwxRPoKKoX3W0ZZRVNztPGmd1W6wmIv9z8NIj7QUMrXjf14BcVz9oXmsu l7DsdFKOUmu6QNEBbFEThBXhnANsa2eMx50H97FxUvdFQXAJo4rwfc2nO1Ui5v6to2hr J9+7kzDGFCj3nwo0DMYDp55RFHgiZBSyp+TajKawDS2PUPJUuM+2RHY9Nn/cUtpMxzch lOHLK6MB/Qw2x8HDYLW2bdl6DGRLXIhWPnl+2MaToj+Tn3/Eo0OCRGhZhT+nwWWZHgdJ 4j4w== 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=thby53x13J373nuatZLPzOpAkl/ap6QlPgQWogGPRIg=; b=e8M82foeIeLmso+/G/lzmwAjWMqcH+Ue6UOL4LicjqlO0XgO1iMbNGVp+5xFhtedrD sM09UmHlFAH0lHRdT59iiMuHKlp6o8N58kAirKRdcYMji57qr7QaYH9KxyU70dp5JkLZ DFJ+m5ADSPQIm5mUpVHeDXocOS6qiPwkDmetZuvllbLOEHsSONYIrBn8pt7cwFtv7TCK FefLsR8Mditd4eDSHoIqSqMvdnKmt70FMFLqUSlVQ3adrUszfQnm4OkLWf5UVfH7jfLu ahb2uSJrED7+17WSxCnQwOtKUkb1eu18S6PJtSzFDq/1iu859SUEu0OoMwRlBIDnAHTo nj9g== X-Gm-Message-State: ALyK8tIpHYR8mcoS8Gwv4YSIKxKe3J6r2rK/lBF2Lcvy1NzgfbD7gGa30r4ikQI87k8H2g== X-Received: by 10.66.1.99 with SMTP id 3mr51859789pal.26.1464675647354; Mon, 30 May 2016 23:20:47 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id m81sm23838722pfi.51.2016.05.30.23.20.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 23:20:46 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Keerthy , Eduardo Valentin Subject: [PATCHv4 45/48] thermal: core: remove style warnings and checks Date: Mon, 30 May 2016 23:18:52 -0700 Message-Id: <1464675535-2433-46-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 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 6e248bb..3957768 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -711,10 +711,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); @@ -794,8 +794,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); } @@ -1028,8 +1028,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); @@ -1233,7 +1233,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. */ @@ -1267,8 +1267,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);