From patchwork Tue Nov 8 05:09:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416569 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 8600F60459 for ; Tue, 8 Nov 2016 05:23:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7626628B9B for ; Tue, 8 Nov 2016 05:23:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6821828B9D; Tue, 8 Nov 2016 05:23:24 +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 E29D628B9B for ; Tue, 8 Nov 2016 05:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753217AbcKHFXH (ORCPT ); Tue, 8 Nov 2016 00:23:07 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33095 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753178AbcKHFXD (ORCPT ); Tue, 8 Nov 2016 00:23:03 -0500 Received: by mail-pf0-f194.google.com with SMTP id 144so9724909pfv.0; Mon, 07 Nov 2016 21:23:03 -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=HzTxWypQ1NIfhTiIO0f9/CoYLlBkyXH/bU+y+ku0fws=; b=jHdLnnj4Dcoce6XxP0DA6J7/rdnozAwGZD4rvjEvRJPmfAPY2GUpYbvoD3h/T7bp69 93ZE3O6Thui3a2lS+8kghIMsyM2GFPHzkI4l2SpKKCxtbP0LR4gtuawMvpUZtxeW9KAA 7NkkRvBa8c+8ZrV2Lbtn4kpM2n3ACqXXAalY9JrsWbY9bMdpZGyQduW7eK16rkDsLdkH 95XT2DtIEYQ4usQhfWCjrAMdu6FzohL9f56KlJEZ9+U86/zoostIlvFUfM3edfBr+Ybz tqS/pMJbwrXSkApsBGoMS+y8QkzGzPdGtCTt4U7HpbS56WPb5MdV/3nGWbw4erzpzPRj DyTg== 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=HzTxWypQ1NIfhTiIO0f9/CoYLlBkyXH/bU+y+ku0fws=; b=O8eGpBA7Dt/NvURr+66nHQcz1tN1+Jze8QkgtDBmdBDe1cfMLmHqFNT1zae9TXFa30 hKw8C0I8bwB6nBYXSIsIqKkirLX9hMxLmcakUW1shrtNn+taVaMQ+cUs+/l8Gfj7cYRI 05tJ4p7iFKD3eXJFRkeAGQzQurhn8Q9TYifGDRU2YLKgmmEYzCmANtGNXwWn01Yp0lC8 im9omzzs8WLrwjwT2Hwmi9dwwQpHllmSoV32V34wydFI5I9GFmN8zi14blT78JXweihB yprRuprT/EmzqGw5SXfv6PL9DvkGWkdvMdQWFguP8+b6WGoRhtmBdH2URcEWFrCyJ2tz T0OA== X-Gm-Message-State: ABUngvcY+iwqK8GR9M3QstK63dF4/MJn30S+nbG3U+KtlqZyCLtiJ9jzCuWivpO88OjX2g== X-Received: by 10.98.72.81 with SMTP id v78mr20117997pfa.104.1478581838612; Mon, 07 Nov 2016 21:10:38 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id e7sm44363619pfa.65.2016.11.07.21.10.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:10:38 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 25/49] thermal: core: remove a couple of style issues on helpers Date: Mon, 7 Nov 2016 21:09:03 -0800 Message-Id: <1478581767-7009-26-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 Reorganizing the code of helper functions to improve readability and style, as recommended by checkpatch.pl. 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index fb19021..3a189fd 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -248,8 +248,9 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip) } EXPORT_SYMBOL(get_tz_trend); -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz, - struct thermal_cooling_device *cdev, int trip) +struct thermal_instance * +get_thermal_instance(struct thermal_zone_device *tz, + struct thermal_cooling_device *cdev, int trip) { struct thermal_instance *pos = NULL; struct thermal_instance *target_instance = NULL; @@ -513,7 +514,7 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) if (!ret && *temp < crit_temp) *temp = tz->emul_temperature; } - + mutex_unlock(&tz->lock); exit: return ret; @@ -1192,7 +1193,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev) /* Make sure cdev enters the deepest cooling state */ list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) { dev_dbg(&cdev->device, "zone%d->target=%lu\n", - instance->tz->id, instance->target); + instance->tz->id, instance->target); if (instance->target == THERMAL_NO_TARGET) continue; if (instance->target > target)