From patchwork Tue May 31 06:18:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9143419 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 7EA2560761 for ; Tue, 31 May 2016 06:23:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 736ED28187 for ; Tue, 31 May 2016 06:23:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 685EA28213; Tue, 31 May 2016 06:23:23 +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 0F8BB28187 for ; Tue, 31 May 2016 06:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755719AbcEaGXV (ORCPT ); Tue, 31 May 2016 02:23:21 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:36754 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755924AbcEaGUl (ORCPT ); Tue, 31 May 2016 02:20:41 -0400 Received: by mail-pa0-f68.google.com with SMTP id fg1so23774963pad.3; Mon, 30 May 2016 23:20:40 -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 :mime-version:content-transfer-encoding; bh=b2zgOuoWpXRtxntdGA4+MEq/21KvznqnFqAFifR5cfw=; b=qMaPhCeamYw71WynhAIv/YCRRCq1+wINUXv79qxp89VPmUxK6gfUnS1p6/aDHjAjYb tROK2V/LUv03iLTThoQ7qfzuaZW0mRnM7kVR8hKOrsbfDG1nCFjB78tQPzPAWIstcilF oAj9EArn5eXKC/+7k0/970h9wdYp+ZD6TZydFFoOhw8xnsS8WJFT762+xNI9DDjJk0/x eZKprPj8FOQ+icbPweK39eGare5QE1N1Dzr9daamcBssLpmJckXZxwPCkRfRZFiuksde GaYpbM3EEi7AYFjs3rWcVZUyyeIRzn9AuofQ7bSOD8L/hgNFh+LAcd8uEKFznQ48bbwv 534w== 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:mime-version:content-transfer-encoding; bh=b2zgOuoWpXRtxntdGA4+MEq/21KvznqnFqAFifR5cfw=; b=MV3NdZZcm3SYJ8INbcPxtes6R1JuTDJHDG5oeVPflskcg6pO0Ll5JCA4Exny9W7OFI xgACAsVs0V1h2b5hz8qOoHeaewzE2NwI47QWfOM+7agBlKCBWX8aZ6ERTXx6LvyQQ9Fw UFaxJhHKOpq05nA9jiF3+WNiOvV//VTYUrKdHY+6R9/VxAWTQiboooV2s4g5jbWu9qjF ng/xH2G6TQqlPsfm4LzwtjymD+dvWgSd7nXOf8yhc62976Q8nzEe8vF1OwIBQhgjCpMG YCnOIttpqiRmJZo8py7Ouqj4fuFMKFjF5SPdWPs6rs08e6/HUHixawum/RL6+1Ol+Oyj PoFQ== X-Gm-Message-State: ALyK8tL5muU3x+VAM2bRlXIMeB0Pji/Hz7pXjdpadd8rWIc9ipDXnX9OpibgCYJYaPbqvg== X-Received: by 10.66.182.45 with SMTP id eb13mr36376905pac.40.1464675640304; Mon, 30 May 2016 23:20:40 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id z125sm27838067pfb.27.2016.05.30.23.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 23:20:39 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Keerthy , Eduardo Valentin Subject: [PATCHv4 40/48] thermal: sysfs: remove symbols of emul_temp when config is disabled Date: Mon, 30 May 2016 23:18:47 -0700 Message-Id: <1464675535-2433-41-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> MIME-Version: 1.0 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 the following warning: In file included from drivers/thermal/thermal_sysfs.c:19:0: include/linux/device.h:575:26: warning: ‘dev_attr_emul_temp’ defined but not used [-Wunused-variable] struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) ^ drivers/thermal/thermal_sysfs.c:395:8: note: in expansion of macro ‘DEVICE_ATTR’ when emul temp is disabled at Kconfig. Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 24a0c97..ca4b83a 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -289,6 +289,7 @@ available_policies_show(struct device *dev, struct device_attribute *devattr, return thermal_build_list_of_policies(buf); } +#if (IS_ENABLED(CONFIG_THERMAL_EMULATION)) static ssize_t emul_temp_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) @@ -313,6 +314,8 @@ emul_temp_store(struct device *dev, struct device_attribute *attr, return ret ? ret : count; } +static DEVICE_ATTR(emul_temp, S_IWUSR, NULL, emul_temp_store); +#endif static ssize_t sustainable_power_show(struct device *dev, struct device_attribute *devattr, @@ -392,7 +395,6 @@ create_s32_tzp_attr(offset); */ static DEVICE_ATTR(type, 0444, type_show, NULL); static DEVICE_ATTR(temp, 0444, temp_show, NULL); -static DEVICE_ATTR(emul_temp, S_IWUSR, NULL, emul_temp_store); static DEVICE_ATTR(policy, S_IRUGO | S_IWUSR, policy_show, policy_store); static DEVICE_ATTR(available_policies, S_IRUGO, available_policies_show, NULL); static DEVICE_ATTR(sustainable_power, S_IWUSR | S_IRUGO, sustainable_power_show,