From patchwork Tue Nov 8 05:09:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416499 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 7DEAD60512 for ; Tue, 8 Nov 2016 05:12:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C76028B99 for ; Tue, 8 Nov 2016 05:12:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E40428B9B; Tue, 8 Nov 2016 05:12:18 +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 BEC3E28B99 for ; Tue, 8 Nov 2016 05:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753150AbcKHFL7 (ORCPT ); Tue, 8 Nov 2016 00:11:59 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33959 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752899AbcKHFLI (ORCPT ); Tue, 8 Nov 2016 00:11:08 -0500 Received: by mail-pf0-f193.google.com with SMTP id y68so18088410pfb.1; Mon, 07 Nov 2016 21:11:07 -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 :mime-version:content-transfer-encoding; bh=qfQDoqj4/vdETannKA9LHrC0nbS2TRf5P5aSdPnHBG4=; b=Igw8L8M6ONeLBbjDZGXxfXETszsQ6yfn5GvOPUy741ktdgTi4Xc6AtRTmK16/UZ7Yn eGVlK6qRXNzWVVq2J1zB3iI+WgRUWpVOXGfhhkj78RqiEP4chorP28Jja1ZRGK1p3KgI lsQjGxSVi14X0OHmA9PZv1RnZS8IxtaD+84t9t/mmiFaoCF9xPUpQ1LJDO0xXvBzgDZH TbbIk5oizJoj/Un0AmgJq/if6gaH6Bw2QjKGohXDIDKyLkmGtq5zjCTnouSPBV7/535n WxreqncB/uDQKSxzCSsWToswDJUSZhw8Rbv2AaCUPwPOy1AFsYoKVHV9hvefc86XIxKT vfyA== 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=qfQDoqj4/vdETannKA9LHrC0nbS2TRf5P5aSdPnHBG4=; b=UZfeQwJyLbqGDch/qkFsDQW7W/EAQ5LTnjYjmTzl/RpA3mn8omUhnN+WK5WnFx4Toz J6IuN8VY9+Js25xR78HZgDT2HdXemsIal8E9qFlXggLXJBsBkHQdnIJ8OqVnns2CvcCV smVSBF6CNUbxECAHC8hlCGvbQ1yF4UfEz9KyVq6yrqz2TPQ3kVWVzNHclKmDMixSV6Ib DKy5VRALQ5qOAbIhCbXeIP3lY8foUBw5Bi+4lfiSYenXqLQtKbQLJzBBxtyAV4KDZek6 32s013LkcmLKxtFPqXkEE+Q9mOWC20JfCEsul0NTDZRPZHknGkOBWanghgub5SWPAhQY E8dQ== X-Gm-Message-State: ABUngvd29C1lBIezk3emRKoRkSLoCQQ1rDoCzY3BdcxSk85j8bhg8m//D1pKar3VrYcyng== X-Received: by 10.99.251.5 with SMTP id o5mr4071194pgh.160.1478581867256; Mon, 07 Nov 2016 21:11:07 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id 131sm44358038pfx.92.2016.11.07.21.11.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:11:06 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 40/49] thermal: sysfs: remove symbols of emul_temp when config is disabled Date: Mon, 7 Nov 2016 21:09:18 -0800 Message-Id: <1478581767-7009-41-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> 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 87d9f4d..4807015 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -292,6 +292,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) @@ -316,6 +317,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, @@ -395,7 +398,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,