From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751542AbdGQVDM (ORCPT ); Mon, 17 Jul 2017 17:03:12 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:38064 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751338AbdGQVDK (ORCPT ); Mon, 17 Jul 2017 17:03:10 -0400 MIME-Version: 1.0 In-Reply-To: <20170717201631.GA13024@amd> References: <20170716023610.4658-1-f.fainelli@gmail.com> <20170717200628.7018-1-f.fainelli@gmail.com> <20170717201631.GA13024@amd> From: "Rafael J. Wysocki" Date: Mon, 17 Jul 2017 23:03:09 +0200 X-Google-Sender-Auth: M_Hgv1Z6gNpVmAUIERon_ips97I Message-ID: Subject: Re: [PATCH v2] PM / suspend: Add suspend_target_state() To: Pavel Machek , Florian Fainelli Cc: Linux Kernel Mailing List , "Rafael J. Wysocki" , Alexandre Belloni , "Rafael J. Wysocki" , Ulf Hansson , Daniel Lezcano , linux-pm , Thibaud Cornic , JB , Mason , Kevin Hilman , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 17, 2017 at 10:16 PM, Pavel Machek wrote: > Hi! > >> Have the core suspend/resume framework store the system-wide suspend >> state (suspend_state_t) we are about to enter, and expose it to drivers >> via suspend_target_state() in order to retrieve that. The state is >> assigned in suspend_devices_and_enter(). > > Do we really want to have variable + inline functions that just read > that variable? Florian, Pavel is right, you can simply export the variable. Anything accessing it should go under CONFIG_PM_SLEEP anyway. Thanks, Rafael From mboxrd@z Thu Jan 1 00:00:00 1970 From: rafael@kernel.org (Rafael J. Wysocki) Date: Mon, 17 Jul 2017 23:03:09 +0200 Subject: [PATCH v2] PM / suspend: Add suspend_target_state() In-Reply-To: <20170717201631.GA13024@amd> References: <20170716023610.4658-1-f.fainelli@gmail.com> <20170717200628.7018-1-f.fainelli@gmail.com> <20170717201631.GA13024@amd> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Jul 17, 2017 at 10:16 PM, Pavel Machek wrote: > Hi! > >> Have the core suspend/resume framework store the system-wide suspend >> state (suspend_state_t) we are about to enter, and expose it to drivers >> via suspend_target_state() in order to retrieve that. The state is >> assigned in suspend_devices_and_enter(). > > Do we really want to have variable + inline functions that just read > that variable? Florian, Pavel is right, you can simply export the variable. Anything accessing it should go under CONFIG_PM_SLEEP anyway. Thanks, Rafael