Received: by 10.223.148.5 with SMTP id 5csp6406453wrq; Wed, 17 Jan 2018 13:16:22 -0800 (PST) X-Google-Smtp-Source: ACJfBovqR5g6Tc4iD9CBNRVaysEhj3xwmBQyDF2vTyEh0HZLhVxy9mcY0wVLywSei15zQ6QDj37z X-Received: by 10.98.172.7 with SMTP id v7mr17537714pfe.66.1516223782536; Wed, 17 Jan 2018 13:16:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516223782; cv=none; d=google.com; s=arc-20160816; b=t9EAmbjTyXLHwM84LTQP6g5K8rR8tRC0GKAoNwMVCMwQbFnR6B3NkytnQI1Gv2FDZy 6yNVA3ncfLs/s6nEQlunEFQXCyf5nAFucPgxQoCTFTQTsXWiDPSQmlVuHp2i9GxLAiiX 3OiWDpfVIieeIydzOnU1GdeuK7zcydG7x9gtRXXnqiEclVk8i+DLIFSF/5U2Bjgpp3sA Msxs2XdacnOwuQUJ54SHSqT+eWxoSgzNF/Nn2azjA2zeJh7a/OwUBIjch1o30XTuMQoG pgfwdRo5PWKLcEIfMrkkt9y7d4H6EjQkNmLrTtkhYt9tCpW8e+npmbgO9dakqtIE9uuD Wa/Q== 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:arc-authentication-results; bh=AsrREOTHgjgKK1w2mI5GPDOiHH0hrNtvSdfEgcI/jQo=; b=bbL7R1ucel5ABmMwgkHm1ObxpHQtU/ntSe9caZ+Qq5eiGk84B+KEhdRiRlNHGjj71d N+20pJVD6ZZ+Gl/LUoljYfn04o45hRwwd/pGOBUCBNCa1CKduNkJGtyWBilBpL8K+xj2 ZhHQT4YUmxiBXPjqYm4MQklMxMMgNhSlFSGLlhDJK/aMxoxC3ZTTYgNTO3CTNmR9HdHH JaKEM14VWScYFjmfCoH1o0m1KRNP/+MgGu37aIPOarzHOhuAH4svpI28pT6WrMX+DxS1 nuyVt5Uocat8pH2l/fDlTFMtBIXaknBkf3uOnY7FMTPHzdzt/3bTjrt7G5c621E9k5Z6 036Q== 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 a89si5066716pla.153.2018.01.17.13.16.08; Wed, 17 Jan 2018 13:16:22 -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 S1754915AbeAQVPX (ORCPT + 99 others); Wed, 17 Jan 2018 16:15:23 -0500 Received: from 9pmail.ess.barracuda.com ([64.235.154.211]:52134 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753887AbeAQVPS (ORCPT ); Wed, 17 Jan 2018 16:15:18 -0500 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx1401.ess.rzc.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Wed, 17 Jan 2018 21:14:26 +0000 Received: from localhost (192.168.154.110) by MIPSMAIL01.mipstec.com (10.20.43.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 17 Jan 2018 13:13:41 -0800 Date: Wed, 17 Jan 2018 21:13:39 +0000 From: James Hogan To: Mathieu Malaterre CC: Ralf Baechle , Steven Rostedt , Ingo Molnar , , Subject: Re: [PATCH] MIPS: ftrace: Remove pointer comparison to 0 in prepare_ftrace_return Message-ID: <20180117211339.GB27409@jhogan-linux.mipstec.com> References: <20180117113157.25768-1-malat@debian.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wwSFAA0Com6UqrPP" Content-Disposition: inline In-Reply-To: <20180117113157.25768-1-malat@debian.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Originating-IP: [192.168.154.110] X-BESS-ID: 1516223666-321457-32186-5898-1 X-BESS-VER: 2017.17-r1801171719 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.189084 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wwSFAA0Com6UqrPP 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 Reviewed-by: James Hogan Cheers 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 --wwSFAA0Com6UqrPP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlpfvIMACgkQbAtpk944 dnrrfhAAjQRR+6kWFQh0Xt71sQZEBS3b1bNi81tc+yvwICe7sj1OQ8Jwn2YkWgRH gjcBfAdBQYtCFrxWSnvBOZVVbtuYnfwFLyG66RZ0poaIs8Wl72o6Um4gSGpXgBlb IS+Y27GYbNgCE86rBU6BwHe5HoYbi4TKRmqS2W29BrcZZ1iSe24Os89m43aOq6Vg J+tETr/E4egZPoR9kAtYgEGPbsegRxnnfdehM9FT7/SgN0pFMQ84snq05tDXCwYZ X4CPp0rdO3LqCSAh57zvqoTD1jveQv0vQzIb70efRtYE9M71KHZFIP3QFjB5uvqw OYJk9aIjYHVE4uq+0rqFCBHnUW7FTYn24uz/8jUctJ8gisc/ETO1/QuHumee7BOD CSEndG6xl+m9QtkbWUtyzHPP51kUZhHKpCgVQVfG5lfIht79APVf2wrrH6PfQfwK OvTt75iNfIr6eybsKL0dv+AayaZsz2n86bsroTUxLLWlNW6zlO7zSbcOOxaZEn6T C5dYth//jmqF7Mjngfn32qKj43n1lEsEPwSD3xlin+85vzV91W62WAsDFKAgJT4h nZ4TiXRM6eYzlpgdrcLI6z4IW+a9pVTBv0xDHslCyc9iSbdP6dsvUE52eudAOxQ3 pHZyBVxEBEmo4y2Vf0L56owswxjBJ9wg524+YfZfvZPZkHgRQWc= =mal1 -----END PGP SIGNATURE----- --wwSFAA0Com6UqrPP--