From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH] drm/gem-cma-helper: Change the level of the allocation failure message Date: Wed, 04 Oct 2017 15:28:54 -0700 Message-ID: <87y3oq7djt.fsf@anholt.net> References: <20171004130839.20285-1-boris.brezillon@free-electrons.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1405262952==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id F30E16E17A for ; Wed, 4 Oct 2017 22:28:56 +0000 (UTC) In-Reply-To: <20171004130839.20285-1-boris.brezillon@free-electrons.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Cc: Boris Brezillon List-Id: dri-devel@lists.freedesktop.org --===============1405262952== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Boris Brezillon writes: > drm_gem_cma_create() prints an error message when dma_alloc_wc() fails to > allocate the amount of memory we requested. This can lead to annoying > error messages when CMA is only one possible source of memory for the BO > allocation. > > Turn this error message into a debug one and add a __must_check specifier > to make sure all callers are checking the return value. > > Signed-off-by: Boris Brezillon The __must_check seems unnecessary to me -- you're definitely going to be doing something with the return value, because otherwise why did you call the object allocate function? That said, thanks for cleaning up the error message. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlnVYKYACgkQtdYpNtH8 nugtpA//fDsfjR5K6lS/e7slzMn2imCSx4qWBLCLi5mxbjirsK8/a+rEJFcNF93I XAkZfdI1m6ZZEMxmpoUMm36+PtYBpkJk64/6xpB9ICv45jF7zbZexM+OeGX5Sin1 pSu0CgTX6EjMBcT+4Zf3uZ1g5Tcml+w+Va9ioHL/2B6jylzC1QIpBkQitJNsQ4na H9yuBHAtb7/q1FUoF16DqTrl4MPH0in21nk8lpOMwhqxJRSbwpxujmu6NGST7B1J zBowM72vhEisHoOPp5+48PCFdipLEJX1osyJFzfh4x7uNZImPP7yE4PFvnFx7XFF j2/8gHbBVmhqJdw1ISLuOWCN710U+ugWumU2Y9TkYhtsSa7T+JMTkuV5LOCV/gmA 3loDqcbahe9H+glVwnVigyl84mkbEOBMuHEMdpVhFKlc8UGd3rs/kFK6Y7VPmtca 9Ehgi3rsbX+vMCW00uJMQolJK4RziDIEp9gLUBYr1o1ZYzk1Ge0Qofd8kGZ4viJf yAaBHhIYWRZA0E/vyCIra0xwsDJtHUl9BflY6+pcOexUbCtqxxIrncfCbPhftLQO 6ggJadVFutZIuTrNAch14yCQVjNciWAViSAaHuqJZqdsdQdhYDHw4X2r0DIKupL0 DyiAW2l3L6FoY1fD1cZiE+wTLHON08xSpXAll+vNIBsLEZdrKcA= =TIAG -----END PGP SIGNATURE----- --=-=-=-- --===============1405262952== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1405262952==--