Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2787940pxb; Tue, 24 Aug 2021 07:38:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlgnEPPjRNKT1vos6yn5rwm2i3cETtOcOYQG1nwmfAlpUY2v2ufyPSwy3dSMIu8eYF2B0m X-Received: by 2002:a92:db06:: with SMTP id b6mr26946746iln.305.1629815900754; Tue, 24 Aug 2021 07:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629815900; cv=none; d=google.com; s=arc-20160816; b=z5krq3zfKv2DDKDD/XmkNCzkRdF14J3ySfU+tirUTG7EtoO13rEUK4MDgkUxSh/kub aCXNnmVE40SR8P1TDWg5NmFYAROjHVTXyHV+254VbGNe2cQ0tfnIig9HF/fqV9Gd/sY3 qhEcaRaBcEID6V1Vs9M1Srs3XVVlecdMhXTj1pMLmNJS+qn/SuauUrGgfthjD80aRLhH xS2iBWDzhd49RBFSqkp1Li0pZeX+lRNXW61TVQ/sL/tvvBTIo2cPr2CxafX3xu9YSA3P iv7/tfvYm4EjVhk3aCTeJlkTPJUcYpFUNxltZj1eBh2aOVgaVSazu6HBgOOq5rlJuafy wdPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hfoMF6SGFqSHpHldUajmgBFLEl1tYqX+l2KPXDR9t9E=; b=ATPsLgZpaM3C7SaNudbrR9XAuNXT3YoJKPsOLQiCisR+zUZAUUdy3jfRRBuXZfvlYQ 2D73KKM0NVjzkjVX4BGb6TsTApIYeXbuPDcPtqU/YDUVIUV/Wav2tM69jZ2up/iIPcJk vo7auvasfZ2tHl3NAFBeW8in15ZvXFpKjbJCqoIoJbibMo97+K2QwPfjq3asmtrVg0o+ 3yyCHhRndHuMiVsbXI1rC9eISIetrZ+JXuIzOeHkx01dxFSHaoUma3z3mtrFdJPi7zZp M7zAFrD4azL/mICt5sKwKpHnuFixAXFLBk4++hGU9cm+xFk+hhrFvKD/yLVyYvY+tCUS fDNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Qcu1fYJq; spf=pass (google.com: 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si18359856ilq.160.2021.08.24.07.38.08; Tue, 24 Aug 2021 07:38:20 -0700 (PDT) Received-SPF: pass (google.com: 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=pass header.i=@alien8.de header.s=dkim header.b=Qcu1fYJq; spf=pass (google.com: 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237844AbhHXOhg (ORCPT + 99 others); Tue, 24 Aug 2021 10:37:36 -0400 Received: from mail.skyhub.de ([5.9.137.197]:55840 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237745AbhHXOhf (ORCPT ); Tue, 24 Aug 2021 10:37:35 -0400 Received: from zn.tnic (p200300ec2f11440070ccc1d7a1cb5edc.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:4400:70cc:c1d7:a1cb:5edc]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id F33D41EC030F; Tue, 24 Aug 2021 16:36:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629815805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hfoMF6SGFqSHpHldUajmgBFLEl1tYqX+l2KPXDR9t9E=; b=Qcu1fYJqbKqJ7kYnHDZVTAVyluKJX5rdTFNozSQZEZpJbShdBVDrSsV0tUagP5ekFGm1/4 oiAZDxtrza60ZKEx5eH+f45J4eP4mstqFQt50EHDeC8FmmiYIVMu1xTeb724y+1L+24dj/ 62OLBED0ZTdaiz5THH119s4sjXcmhOk= Date: Tue, 24 Aug 2021 16:37:22 +0200 From: Borislav Petkov To: "Lazar, Lijo" Cc: Alex Deucher , Alex Deucher , Pratik Vishwakarma , amd-gfx list , lkml Subject: Re: [PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state module export Message-ID: References: <94ff5309-f71a-6107-01e8-8d7d544dd4e1@amd.com> <1bb0baef-7924-98ab-b125-aa3c2ac405d4@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1bb0baef-7924-98ab-b125-aa3c2ac405d4@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 07:22:46PM +0530, Lazar, Lijo wrote: > 'pm_suspend_target_state' is only available when CONFIG_PM_SLEEP > is set/enabled. pm_suspend_target_state is available only when CONFIG_SUSPEND is enabled. The extern thing is only a forward declaration. > OTOH, when both SUSPEND and HIBERNATION are not set, > PM_SLEEP is not set, so this variable cannot be used. And it will not be used. > ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function > ‘amdgpu_acpi_is_s0ix_active’: > ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1046:11: error: > ‘pm_suspend_target_state’ undeclared (first use in this function); did you > mean ‘__KSYM_pm_suspend_target_state’? > return pm_suspend_target_state == PM_SUSPEND_TO_IDLE; > ^~~~~~~~~~~~~~~~~~~~~~~ > __KSYM_pm_suspend_target_state That looks like the .config didn't have CONFIG_SUSPEND enabled. > Also use shorter IS_ENABLED(CONFIG_foo) notation for checking the > 2 config symbols. What shorter notation? > So it does look like that error can be extracted as well in some > config. Yah, when CONFIG_SUSPEND=n. > Well, now it doesn't seem to be a better one. The original one checked > both. I don't see a reason for checking both. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette