From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 10/20] drm: move __OS_HAS_AGP into drm_agpsupport.h Date: Fri, 29 Aug 2014 14:03:12 +0200 Message-ID: <20140829120306.GJ17519@ulmo> References: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> <1409307166-12396-11-git-send-email-dh.herrmann@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1251203535==" Return-path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 64F926E6C3 for ; Fri, 29 Aug 2014 05:03:15 -0700 (PDT) Received: by mail-wg0-f49.google.com with SMTP id y10so2050714wgg.8 for ; Fri, 29 Aug 2014 05:03:14 -0700 (PDT) In-Reply-To: <1409307166-12396-11-git-send-email-dh.herrmann@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: David Herrmann Cc: Daniel Vetter , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1251203535== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sU4rRG038CsJurvk" Content-Disposition: inline --sU4rRG038CsJurvk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 29, 2014 at 12:12:36PM +0200, David Herrmann wrote: > With drm_memory.h gone, there is no header left that uses __OS_HAS_AGP. > Move it into drm_agpsupport.h (which is itself included from drmP.h) to > hide it harder from public eyes. >=20 > Signed-off-by: David Herrmann > --- > include/drm/drmP.h | 2 -- > include/drm/drm_agpsupport.h | 3 +++ > 2 files changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/include/drm/drmP.h b/include/drm/drmP.h > index 294f7da..c6f337c 100644 > --- a/include/drm/drmP.h > +++ b/include/drm/drmP.h > @@ -67,8 +67,6 @@ > =20 > #include > =20 > -#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE)= && defined(MODULE))) > - > struct module; > =20 > struct drm_file; > diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h > index 3bebeb4..4f1724c 100644 > --- a/include/drm/drm_agpsupport.h > +++ b/include/drm/drm_agpsupport.h > @@ -8,6 +8,9 @@ > #include > #include > =20 > +#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE)= && \ > + defined(MODULE))) I'm not really sure what the intent was of the final defined(MODULE). Surely the fact whether a driver is being built as a module or not does not influence whether or not the OS supports AGP. And if this is merely meant to make sure that drivers that are built-in don't break to build if AGP is a module, then that should be a job for Kconfig rather than some macro. So I think the above could simply become: #define __OS_HAS_AGP IS_ENABLED(CONFIG_AGP) And once we have that I think we could even easily get rid of the custom __OS_HAS_AGP macro and use IS_ENABLED(CONFIG_AGP) directly. Thierry --sU4rRG038CsJurvk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUAGv6AAoJEN0jrNd/PrOh9i0P/09enb37CQIBk347FEahngZw 5qO01pXza7RVJ0LYpORwcj30L8cdwrMT31L0XLE/QwQ4n5SqlyFaH+AX9E4cd636 n8Y1tXeKViRSTwxs6ZATGCTgJTDJFbXfSk5QeseRAkrJLfsfLw8g6y1dj5rV6n1u JCQeo6QZ8/Gb0vO+HjGA+13moGSZliOtl633e4gql0+zbSHB/JjsApTUFSlt3F43 R2WxTIMEoafcX/8maF7xoN6TlvljKPGv1YzTVw5l8fRvfUMETiW2PT3B5EebZKwh VmSdtNtfAetLCT2eLNs2Q50RAnHu1ntIvzoztqrDuzmtRygAv0+0dCe9/RaQcRa+ D5E3ZD8TOR/jsdIxPznK8foMDAHHpSGVcKW5FpDKoHk8bMhTQodTHtxb8qtRaWOq 5X2+eWURlu/2IhDcQHiLWLCqETkDUXsWjgwSWNwdj0cFDrBdTw+8BQ+063JyaGH4 L86krAfrPnEoG0TCozYdeG3xFGggCn/8baSt0oHvuJYAhNc4DpsKGU21ye7+haTi FmS8cNqrdqbw68TOUCgwu7uL9CNWOCM2xfINwROMXfQV/WYBc1Hrj0hLX5Kx0RYW i0WsvWvjSTDUpW1fSZBfhkpcuIEsBFEwvt1WokRIxfyX1DeGpiaeODipntB5rTEL vZHqLxN9JaGx7BrXNrSw =litJ -----END PGP SIGNATURE----- --sU4rRG038CsJurvk-- --===============1251203535== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1251203535==--