From owner-svn-src-stable@FreeBSD.ORG Sat Jun 20 13:25:29 2015 Return-Path: Delivered-To: svn-src-stable@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDF8F542; Sat, 20 Jun 2015 13:25:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB93DB14; Sat, 20 Jun 2015 13:25:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5KDPTh2043267; Sat, 20 Jun 2015 13:25:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5KDPTuc043266; Sat, 20 Jun 2015 13:25:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201506201325.t5KDPTuc043266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 20 Jun 2015 13:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284642 - in stable: 10/sys/i386/i386 9/sys/i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2015 13:25:30 -0000 Author: dim Date: Sat Jun 20 13:25:28 2015 New Revision: 284642 URL: https://svnweb.freebsd.org/changeset/base/284642 Log: MFC r284167: Merge r283870 from amd64: Remove unneeded NULL checks in trap_fatal(). Since td_name is an array member of struct thread, it can never be NULL, so the check can be removed. In addition, curproc can never be NULL, so remove the if statement, and splice the two printfs() together. While here, remove the u_long cast, and use the correct printf format specifier for curproc->p_pid. Requested by: jhb Modified: stable/10/sys/i386/i386/trap.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/i386/i386/trap.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/10/sys/i386/i386/trap.c ============================================================================== --- stable/10/sys/i386/i386/trap.c Sat Jun 20 13:02:57 2015 (r284641) +++ stable/10/sys/i386/i386/trap.c Sat Jun 20 13:25:28 2015 (r284642) @@ -1001,12 +1001,8 @@ trap_fatal(frame, eva) if (frame->tf_eflags & PSL_VM) printf("vm86, "); printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12); - printf("current process = "); - if (curproc) { - printf("%lu (%s)\n", (u_long)curproc->p_pid, curthread->td_name); - } else { - printf("Idle\n"); - } + printf("current process = %d (%s)\n", + curproc->p_pid, curthread->td_name); #ifdef KDB if (debugger_on_panic || kdb_active) {