From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757649AbcC2RBp (ORCPT ); Tue, 29 Mar 2016 13:01:45 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:51912 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753843AbcC2RBn (ORCPT ); Tue, 29 Mar 2016 13:01:43 -0400 Date: Tue, 29 Mar 2016 10:01:33 -0700 From: Mark Brown To: Colin King Cc: Support Opensource , Liam Girdwood , linux-kernel@vger.kernel.org Message-ID: <20160329170133.GU2350@sirena.org.uk> References: <1459179703-13036-1-git-send-email-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fxBYc4U7HLIDBZ2G" Content-Disposition: inline In-Reply-To: <1459179703-13036-1-git-send-email-colin.king@canonical.com> X-Cookie: If anything can go wrong, it will. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 64.55.107.4 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] regulator: da9053: regulators is an array, so no need to check if NULL 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 --fxBYc4U7HLIDBZ2G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 28, 2016 at 04:41:43PM +0100, Colin King wrote: > From: Colin Ian King >=20 > pdata->regulators is an array, so can never be null, so the > null check on this array is redundant and can be removed. What is the value in this change? The check is always true so it will be optimised away if the compiler is sensible but leaving it there means that there's one less thing that can go wrong if the platform data is changed. --fxBYc4U7HLIDBZ2G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJW+rTsAAoJECTWi3JdVIfQm8kH/i0J9kezvn72P41kmH4swows hDAVq7Ywin/h0CjhSfhLhPsHKR/7uqnuEiUm9VcHjxSrzZW7yJpp1qJFCbLjbnW1 fVxdYQ2ry6b9Bj7mzAnQ0b0ucR5yJGzdUyJiGPXGw+Qi6gqVNBSf/vUxJHDpjfWz aHYntYwKqYoYUjYocZ5nMQKuNz6VVU0UzoSCwWtB3NQDdlG3wO5ZIxiQWRR9n3xB m1tStH1Kc80tE/WZAs066+b2D0b9a/mOZBFqBdTPdkBRW8Jh07XmI7JBSjG+JXo+ 7sPgTd/grXDbA3QYLM9g+BEaB3uQkVwi2bSKtNBBP7Gxp5T2T17Hr3M5vBFy0Qk= =w294 -----END PGP SIGNATURE----- --fxBYc4U7HLIDBZ2G--