From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752084AbcADPpa (ORCPT ); Mon, 4 Jan 2016 10:45:30 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:35596 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751344AbcADPp1 (ORCPT ); Mon, 4 Jan 2016 10:45:27 -0500 Date: Mon, 4 Jan 2016 15:45:11 +0000 From: Mark Brown To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, Brian Austin , Liam Girdwood , Paul Handrigan , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Message-ID: <20160104154511.GL16023@sirena.org.uk> References: <2884997.s8B8BuE04L@wuerfel> <20160102141746.GH16023@sirena.org.uk> <9222694.IRNnfpj6Tn@wuerfel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Uus2/pBTyv0r7Av1" Content-Disposition: inline In-Reply-To: <9222694.IRNnfpj6Tn@wuerfel> X-Cookie: Honk if you love peace and quiet. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] ASoC: cs35l32: avoid uninitialized variable access X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Uus2/pBTyv0r7Av1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 04, 2016 at 04:17:47PM +0100, Arnd Bergmann wrote: > On Saturday 02 January 2016 14:17:46 Mark Brown wrote: > > This would be a lot nicer if there was an __always_null annotation we > > could put on of_node for !OF configurations, that'd Just Work and this > > can't be the only case where we have this idiom. > How about an inline helper like > static inline struct device_node *dev_of_node(struct device *dev) > { > if (IS_ENABLED(CONFIG_OF)) > return dev->of_node;=09 > } Yeah, that'd work as well (with the correction Russell mentioned) - it's a bit more typing but we already do similar things for the ID tables and it looks nicer than the IS_ENABLED() in code does. --Uus2/pBTyv0r7Av1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWipOHAAoJECTWi3JdVIfQDscH/0/I17MLpIYja4Wqp5vyhO5d DGloM3wUstCkK0MI0gsZwa++ozFnyiv2Jqmz659SGLcv+vwZradQW+EA7ytjSYww QrMIq5oyepwsLyu5FFPDN8+Ofo4/PHpBMehPzskmuscSS/eNoIEQhcbuKoP6kPPk zs1au3Sxe1TOAPHVQkNhdo6ue4lJrcKNB7E6c8N+GVJ6mqyAVBK0lhC0ke0+1c9d Qya7K2l6uE+C3J8FKattEVCAq/ejU3RkwscL3Dx765kDKj+Su/40qdnaA60s7edI UI/pCrLWl7DNFNiipgnWcJS9tNLLo3Ak/4RFBL2f8+D0l7JVxEcouKW+f1RXHrI= =/fXq -----END PGP SIGNATURE----- --Uus2/pBTyv0r7Av1--