Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4270243ybb; Tue, 14 Apr 2020 04:04:48 -0700 (PDT) X-Google-Smtp-Source: APiQypLLQjv4hitYc76VVVrVpZKp32cxoSIL08L4qtOoHCy1Yb71cB08ZgCEiefBQQAOW7QUvMmH X-Received: by 2002:a17:906:38c:: with SMTP id b12mr9189686eja.332.1586862288516; Tue, 14 Apr 2020 04:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586862288; cv=none; d=google.com; s=arc-20160816; b=H8mgUOd5mZwNw6zvdoyppe+KLHgt6GS5c64HPHemjwp+zQyIs58UeRBFmZFDHm1phd 6160LO4YS4qZn5YJdDvSHsNUA1EXccfx2kSfUS6V38pSRcbfyLRdqqKZMXJUwLL5NqWl Ob/UQlSu9fmu/uPgMtk74oLPaQYgM9Lbr19bat2hH+UTEtBBIWn2u9bt09JonV0tIkRH Ft9OP/qkeWFFiuFx/zkBiHdetBZj1iLj/9c/ZLcQxHYF2vGNltQeLrcQwMVMcTqU6fXr 2o51TFNs69ppdyJykkg8ULQ6QiPjV89hb1dCN+xPZqOMK4REdavb2A4FGzNipBrF/1X4 jaGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/VVfu6H9KODoFY0A3raww+c9Oss15tNQdxGds+ellWQ=; b=C7BOnhsCzV/NBY6YXq6S4fSWeBJ4KaWzHvZ2GttRufqtIxovnlMQEBDiRaBbF5AG1O YAKtqWGfpah9P0DTid7CwKWJepB88ae3wpHkhvQvLj6VuDieYsqZWE0GcBNd6jjqCHuA d/tA7NHMhUqYrmUzRW2xQlBU45IWhqcYrf98CeDUUfhIIaWdeUXvMiCkNQ+cgZiZ64// NuEydsjV4ZbDuDgIhEsnZzeI4F/DAx+3BJ7toDKmN85ENl3oFTHXZbLk6B9lefEnFglE SB8cZzJiqvJsgu58nqecXgA6gWFoI9shU26hxak3+GbR8di0cxCAKQHXMY0D+r8aGNyJ 5oMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b="MF7/qoYv"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb18si4404468ejb.318.2020.04.14.04.04.17; Tue, 14 Apr 2020 04:04:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b="MF7/qoYv"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728493AbgDMMcY (ORCPT + 99 others); Mon, 13 Apr 2020 08:32:24 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:38288 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728392AbgDMMcX (ORCPT ); Mon, 13 Apr 2020 08:32:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1586781133; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/VVfu6H9KODoFY0A3raww+c9Oss15tNQdxGds+ellWQ=; b=MF7/qoYvm7gxXkQzfeAA4I2UB7fq+Qkr+r1xUogxTqJYRNFRFQJ6+LZOeVCj5CWpQ9/lm6 nIhvPDd0XX6ZT7cCH7pNX2Ngjq9etWEiu9vBm54059CwB2qvwfLOew6G/eALqWX6xRPo1Q QCMJ5UHSfIJDlgCH43OkG+s9yV0f+G0= From: Paul Cercueil To: Ulf Hansson , "Rafael J . Wysocki" , Pavel Machek , Len Brown Cc: od@zcrc.me, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Paul Cercueil Subject: [PATCH v2 2/3] PM: Make *_DEV_PM_OPS macros use __maybe_unused Date: Mon, 13 Apr 2020 14:32:06 +0200 Message-Id: <20200413123207.74552-2-paul@crapouillou.net> In-Reply-To: <20200413123207.74552-1-paul@crapouillou.net> References: <20200413123207.74552-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This way, when the dev_pm_ops instance is not referenced anywhere, it will simply be dropped by the compiler without a warning. Signed-off-by: Paul Cercueil --- Notes: v2: No change include/linux/pm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index 1c0eec06905d..5c9760f32d4f 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -351,7 +351,7 @@ struct dev_pm_ops { * to RAM and hibernation. */ #define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ -const struct dev_pm_ops name = { \ +const struct dev_pm_ops __maybe_unused name = { \ SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ } @@ -369,7 +369,7 @@ const struct dev_pm_ops name = { \ * .runtime_resume(), respectively (and analogously for hibernation). */ #define UNIVERSAL_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ -const struct dev_pm_ops name = { \ +const struct dev_pm_ops __maybe_unused name = { \ SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ } -- 2.25.1