Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4423738ybi; Mon, 27 May 2019 18:19:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzs3JzMXOk9Ktd9TGtwmVQQSoiAB6+5Rl54HgC5Xd96hQ1MLZhGW4gf+kg/SOvT3aY1JJ3R X-Received: by 2002:a17:90a:3310:: with SMTP id m16mr2011177pjb.7.1559006354377; Mon, 27 May 2019 18:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559006354; cv=none; d=google.com; s=arc-20160816; b=mM6ui+g+5DmRJC4AWW9vPjXqrTFyWahLoZVNgGA4ktXJ+Mk+u9T6Jwps4KD1XA0AnE WhkbnM+wnu5ChMlH6uT7ZyfVGlHVwhOteqnE9IQ3caWrsPmTpq2gFMhB/c6yZRJIfhCF KH1pCaG3PaGS7NEaoAQBcg56uDCKZr56+RS4I25SZms5pZPkbemE7/w7RHZFAYRQrAO5 PTYJBbu3R0qbLVmda6Ya+/4AgTH99JoWRo84XVZDfIckQ4BG2AcKjIlibCphQ4xAFDSu l7PDT/Kj1PDNmnRPEVUeIwQ8wNVkpLVAOjD4tSmfPk8ZBMPziNgAFJ2Nh1rKFdra6vqZ pfnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=Xe9TzR6aDwdf7BAeNJeIcs0BPVuG+1VLkNnh9uyVtK8=; b=BKaljiDzwGtxOcElZdxUuM0aFPuzWUVVzCvOJ+6rSsl+hYIje+fZ/O5HnUpgASMUYp laCUi4FCfCSHH0Qk3w1gNojdyi7A+hlPkzumrI2y7e0eC0IMLUWQvLy/ivAKcYET34ez YE+OYBCbvT5jdLvMC8Lyljn5IM4cqjx5n14gPrJV/WojZktxjhaR26euI8s5wygnIz7x b215HPraAJYUF6jYB/ZCi6iH/6Hb6UI3dGEUF6knQ9lDndOaUlWTNtVgT9vlz6YXkwQw KKesFBDVlxqOSF3qPHmgwgPhn1YSuvdMz3Iv+t19NCAch70TgL/LvB1hNcoB8hbJyNDg TKjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si21186718pgl.310.2019.05.27.18.18.59; Mon, 27 May 2019 18:19:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727809AbfE1BQd (ORCPT + 99 others); Mon, 27 May 2019 21:16:33 -0400 Received: from ozlabs.org ([203.11.71.1]:44227 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727736AbfE1BQc (ORCPT ); Mon, 27 May 2019 21:16:32 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45CbXG1YsPz9s3Z; Tue, 28 May 2019 11:16:30 +1000 (AEST) From: Michael Ellerman To: "Rafael J. Wysocki" , Mathieu Malaterre Cc: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , Pavel Machek , Len Brown , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v2] powerpc/power: Expose pfn_is_nosave prototype In-Reply-To: <1929721.iDiXxTFbjN@kreacher> References: <20190523114736.30268-1-malat@debian.org> <20190524104418.17194-1-malat@debian.org> <1929721.iDiXxTFbjN@kreacher> Date: Tue, 28 May 2019 11:16:30 +1000 Message-ID: <875zpvqsy9.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Rafael J. Wysocki" writes: > On Friday, May 24, 2019 12:44:18 PM CEST Mathieu Malaterre wrote: >> The declaration for pfn_is_nosave is only available in >> kernel/power/power.h. Since this function can be override in arch, >> expose it globally. Having a prototype will make sure to avoid warning >> (sometime treated as error with W=1) such as: >> >> arch/powerpc/kernel/suspend.c:18:5: error: no previous prototype for 'pfn_is_nosave' [-Werror=missing-prototypes] >> >> This moves the declaration into a globally visible header file and add >> missing include to avoid a warning on powerpc. Also remove the >> duplicated prototypes since not required anymore. >> >> Cc: Christophe Leroy >> Signed-off-by: Mathieu Malaterre >> --- >> v2: As suggestion by christophe remove duplicates prototypes >> >> arch/powerpc/kernel/suspend.c | 1 + >> arch/s390/kernel/entry.h | 1 - >> include/linux/suspend.h | 1 + >> kernel/power/power.h | 2 -- >> 4 files changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/kernel/power/power.h b/kernel/power/power.h >> index 9e58bdc8a562..44bee462ff57 100644 >> --- a/kernel/power/power.h >> +++ b/kernel/power/power.h >> @@ -75,8 +75,6 @@ static inline void hibernate_reserved_size_init(void) {} >> static inline void hibernate_image_size_init(void) {} >> #endif /* !CONFIG_HIBERNATION */ >> >> -extern int pfn_is_nosave(unsigned long); >> - >> #define power_attr(_name) \ >> static struct kobj_attribute _name##_attr = { \ >> .attr = { \ >> > > With an ACK from the powerpc maintainers, I could apply this one. Sent. cheers