Received: by 10.223.176.5 with SMTP id f5csp2655124wra; Thu, 1 Feb 2018 04:04:20 -0800 (PST) X-Google-Smtp-Source: AH8x225MuZQ2b569+XJVvFv7IRlbOc6yuK56IQnMiCMWQxYQRDwH2cLCrlWZKpbe3jbkYf3F6B7F X-Received: by 10.98.215.70 with SMTP id v6mr36997134pfl.83.1517486660495; Thu, 01 Feb 2018 04:04:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517486660; cv=none; d=google.com; s=arc-20160816; b=Sidano449ipY35RYoUOLG3ySX9J9DSKNfhYp3fbwTRF3e5m3rteTsEyEW4kgX+0gF2 an34dx8ZEm+jn4Ri0WfXu1Db6U0oCxSqd828kov3r8V/UhScTAkk2bTuende6kYcYUFK O59ExPz3xcKlm020eY148YYItlbjosN2UImQ45Ig6StRiRry5X0RDqFUG1AcHCzYGaP2 ConhPlUujiggDEMffUbtDht2y7fCiSfbmz71LdvlDO1aC4ztBGm0gp+Ets3eUCYMZrmF bJ0TTmAh3k1kyGAXmYLzshliptuDO+f6IHEYM+/a0VasQr2gTpXjAM7dVpVijnrqXHdF vVRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=ajbg4yaEp5UxFuh+FaTZ7UyRhZBvgWK8hFkahbLMmDU=; b=xJ6u8k7mYLEV/sAEvsNBe7I/07/34gSh8l9Z1W0NVvjq6v9BZkavWZxVRC5/Frflfu 4xfNkXPmBU6e0fJ4J891ansCjzZXHMQnTsR/9JCfDmJxzC+hnkQWwbWzIVw3fmBu3elC SuBbEdHYz6824IfmS7zHdKTTZCtbrH9aEIKr7o/129TFRREPynm+hhbEnPgH5pB5yYk9 tESl7bUjNpPia4JIIskhdFQm50DSAUO6HfhJkDfR8ImRe/9zVuXKL1ODFAnW1f1poCtP 4SCLsGBURyGL3zlYxjmVOQzi/0TpilHMpUFQrzyca331DpeRHw6bJL0u0zobWpsNkbvM deEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si12591126pfi.167.2018.02.01.04.04.05; Thu, 01 Feb 2018 04:04:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752249AbeBAMDj (ORCPT + 99 others); Thu, 1 Feb 2018 07:03:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:40954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbeBAMDh (ORCPT ); Thu, 1 Feb 2018 07:03:37 -0500 Received: from saruman (jahogan.plus.com [212.159.75.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E6CE21748; Thu, 1 Feb 2018 12:03:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E6CE21748 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jhogan@kernel.org Date: Thu, 1 Feb 2018 12:03:06 +0000 From: James Hogan To: Mathieu Malaterre Cc: Ralf Baechle , Steven Rostedt , Ingo Molnar , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: ftrace: Remove pointer comparison to 0 in prepare_ftrace_return Message-ID: <20180201120306.GH7637@saruman> References: <20180117113157.25768-1-malat@debian.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="j2AXaZ4YhVcLc+PQ" Content-Disposition: inline In-Reply-To: <20180117113157.25768-1-malat@debian.org> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --j2AXaZ4YhVcLc+PQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 17, 2018 at 12:31:57PM +0100, Mathieu Malaterre wrote: > Replace pointer comparison to 0 with NULL in prepare_ftrace_return > to improve code readability. Identified with coccinelle script > 'badzero.cocci'. >=20 > Signed-off-by: Mathieu Malaterre I've applied to my 4.16 branch, Thanks James > --- > arch/mips/kernel/ftrace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c > index 99285be0e088..7f3dfdbc3657 100644 > --- a/arch/mips/kernel/ftrace.c > +++ b/arch/mips/kernel/ftrace.c > @@ -361,7 +361,7 @@ void prepare_ftrace_return(unsigned long *parent_ra_a= ddr, unsigned long self_ra, > * If fails when getting the stack address of the non-leaf function's > * ra, stop function graph tracer and return > */ > - if (parent_ra_addr =3D=3D 0) > + if (parent_ra_addr =3D=3D NULL) > goto out; > #endif > /* *parent_ra_addr =3D return_hooker; */ > --=20 > 2.11.0 >=20 >=20 --j2AXaZ4YhVcLc+PQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlpzAfkACgkQbAtpk944 dnrhQQ/9FJfs6Jryq+qC61qbYP6a7SwG53uTSZseQ/wngdpe4jcmX/L5PKDyLCfL 0ILvV3oRsqsdUUl7uRCBO3MNPB0VvVreRy6mUXie3SiAnIqKfqVmGTzE27kUhHMD P7+/0YTTYpliOTIw2eOInRcCrR3TtPCCOXSJTnvROzO5OcqPRR2qTk+mVWK5trC8 Ohf4cjfiFwj0SC0Iy5LtTS0isKPrc9/ipv6m4MoseE4/Tav1p6S6xt18f/CJqMfT guRJdjNBYgi6fGTeQjJ6Ug2/DgEyD6ZjjHTD4VeGvmkwnQ+tuOXrzzmlh8vo0vfD d79jKCtmZPsVRUhNP4zKQ7X1ME89XX0GsxXwDSC9xAs6piiUXxwshCrXuu2d+mRP G5XJ/gRq7PRm+aGBlPJLkYKk3+HmnvcEP7V+fcZIRJ0k4ljHJMSNN7J1RiAdfS1Q vmru+L9jXMkQV2AjgTjp01bMn51HgIXgcnAGeNyXtNwdJ15+b99eGBKc0/4R113i kHIFwf5BeaYxNaO47HKqMTBs+jimBvoidCsrJ87ZT2CZGbIdZN64UUp6EWirGMIM 64/yRi/aoAvZeDzbQkaFRkT8ATxY7sqlpRiOCgGBqLBvjvSOSqM1GDFmCXs7egLX l9hzBPMyxGKT3oSZrD5pnnr+ukLZqOFRnREnB2UP1BfmrRdSsEw= =X1Q3 -----END PGP SIGNATURE----- --j2AXaZ4YhVcLc+PQ--