Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1124356imm; Thu, 4 Oct 2018 08:32:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV62I80FCLItijwMXqnObCGPaItqUu+p9YGhQkVOYEKEzvTVCtxv5vSYuW6YqyL7bYp7yepQ4 X-Received: by 2002:a17:902:a504:: with SMTP id s4-v6mr7258736plq.101.1538667121553; Thu, 04 Oct 2018 08:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538667121; cv=none; d=google.com; s=arc-20160816; b=vuww3SR0HXIAsI+2x1mtNIHprD1A/I3+LdZsgyJwQiVONC7o04DUxF1kqH90MMopgO sjzZPe76/GLmA+Xg645hTAp+/frPzAvLlAvuALjOtUmG/kz+j1kcvz6LHxX3UpsMHqOh cPKCaYgxuCuMCaFW7oPLrRQAxkUSFc8rHknMGHgNj1mj2Hog6AIbI0iLXpURClIQe+tW q6myLKta4kEboNQfx+LT8TmHwo6QcAYWqzRstn8Fo43KWoZ48Vl8rS7ghwCLqGeH2E4N uF+4JIcNaPPAnICGbSLz/3OKr92cDIZevjn0Dkbbc1ko0ziPHotw1DSN4d9LSCkdrX1r ltpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=tRUjTd5lbmx1zwUzfGmFm5AR3LSBQR44E8qEpwE9/ng=; b=YvbKNWIODH8JhF2T+oB0kpWGIkeDAVuX4uXOcR2exmL7uuGGRXES/fe4BcVox9CY2+ H1Fv1WSv6oVbmCSI1FXOyOIzS/q93sICeN3QwPEk4ptXTLNEFHpP9D9nZ6Zawf+m5sDR xP7oSE3RdKBq+cRmjlnf/d3sgLvUXZsBxMGYOJ7HMxIFYaZaGxa93oRcBiPt49xiO3ny DSGcZdwblm2NtkvlgtlkXa+gV04/mJ5FkI4Qt+S9huNh7wWS63rF6pAxJQizdoYu1Kod O+NDoPPGMxT0rBWSJdrZqRmP9i7q1uir2xONUpx8+BQWoQEoaHgo5l3NOMpNIXpUvlzK myeQ== 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 k3-v6si5711358pld.6.2018.10.04.08.31.45; Thu, 04 Oct 2018 08:32:01 -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 S1727873AbeJDWZF (ORCPT + 99 others); Thu, 4 Oct 2018 18:25:05 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:42531 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727771AbeJDWZF (ORCPT ); Thu, 4 Oct 2018 18:25:05 -0400 Received: by mail-qk1-f195.google.com with SMTP id g20-v6so5991158qke.9; Thu, 04 Oct 2018 08:31:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tRUjTd5lbmx1zwUzfGmFm5AR3LSBQR44E8qEpwE9/ng=; b=Ju895hVzqGemLKNZ8AcQNDLcO66ed9Mp8V/+oxMFUNhYMKiHgEZmWDkMPzlcVVzgbH gRm5VTS3Fy0HW2ugb79R4LD94sEj3dNaCCmWWbHRaz/kIKWYaYQenVXoJgvFrGb01Nmg keFz29BD8tK5SKoUFUIHWBYsUnat3KnJ61VV8JWdPPxNTE8WgPpUtquB4AxiX2EON85N m0Xcr4pvT6wR34zdn8bVOk/TtJCTVa9nLyDPwoNHGMa7KWOGK7nBWcgbY+0DS0q7nk1t VyExzKjANkcrhLkCX+siVRG4d3tSjjHJiwug9mFo0c7Cy2SeHFbpZ8uyHlxWSBl6QXLK aC8A== X-Gm-Message-State: ABuFfohySYuO3i6OlddhPdF97mIvXrfh5IPRtI87Kqf0DOl7Wlc1gx5E oWBSzB5bGJljPUW/7iNf+QVFIRSbXQjpojM+eBVqFg== X-Received: by 2002:a37:e21a:: with SMTP id g26-v6mr5506938qki.330.1538667077739; Thu, 04 Oct 2018 08:31:17 -0700 (PDT) MIME-Version: 1.0 References: <20181002212208.2971433-1-arnd@arndb.de> <64a99db8-85e4-52ab-d0fa-0faa5bb7187a@nvidia.com> <31707122-ae73-c608-e9f6-c114d6db2b25@nvidia.com> In-Reply-To: <31707122-ae73-c608-e9f6-c114d6db2b25@nvidia.com> From: Arnd Bergmann Date: Thu, 4 Oct 2018 17:31:01 +0200 Message-ID: Subject: Re: [PATCH] firmware: tegra-bpmp: mark PM function as __maybe_unused To: talho@nvidia.com Cc: Jonathan Hunter , Thierry Reding , Mikko Perttunen , "open list:TEGRA ARCHITECTURE SUPPORT" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 4, 2018 at 5:11 PM Timo Alho wrote: > On 03.10.2018 11:26, Jonathan Hunter wrote: > > On 02/10/18 22:21, Arnd Bergmann wrote: > >> The newly added tegra_bpmp_resume function is unused when CONFIG_PM > >> is disabled: > >> > >> drivers/firmware/tegra/bpmp.c:847:12: error: 'tegra_bpmp_resume' defined but not used [-Werror=unused-function] > >> static int tegra_bpmp_resume(struct device *dev) > >> > >> Mark it as __maybe_unused to avoid the warning and let the compiler > >> drop it silently. > >> > >> Fixes: cd40f6ff124c ("firmware: tegra: bpmp: Implement suspend/resume support") > >> Signed-off-by: Arnd Bergmann > >> --- > >> drivers/firmware/tegra/bpmp.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c > >> index 41448ba78be9..a3d5b518c10e 100644 > >> --- a/drivers/firmware/tegra/bpmp.c > >> +++ b/drivers/firmware/tegra/bpmp.c > >> @@ -844,7 +844,7 @@ static int tegra_bpmp_probe(struct platform_device *pdev) > >> return err; > >> } > >> > >> -static int tegra_bpmp_resume(struct device *dev) > >> +static int __maybe_unused tegra_bpmp_resume(struct device *dev) > >> { > >> struct tegra_bpmp *bpmp = dev_get_drvdata(dev); > >> unsigned int i; > > > > Arnd, is this seen with 32-bit ARM configs? This was with a randconfig build on 64-bit ARM. I don't know exactly what combination of options caused it. > > Timo, does it make sense to make BPMP dependent on ARCH_TEGRA_186_SOC > > and ARCH_TEGRA_194_SOC instead of just ARCH_TEGRA? For 64-bit Tegra we > > have a dependency on PM so this should not be seen for 64-bit Tegra. CONFIG_PM does not imply CONFIG_PM_SLEEP, so probably it was just broken for PM=y, PM_SLEEP=n. > Jon, there will be eventually a BPMP driver for ARCH_TEGRA_210_SOC as > well. So it is probably more appropriate to make BPMP dependent on ARM64 > & ARCH_TEGRA. Generally speaking, we are trying to allow building all drivers at least with CONFIG_COMPILE_TEST, in order to get the best build coverage. Arnd