Date: Mon, 8 Jun 2015 19:44:04 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r284164 - in stable: 10/sys/amd64/amd64 9/sys/amd64/amd64 Message-ID: <201506081944.t58Ji4lZ007701@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Mon Jun 8 19:44:04 2015 New Revision: 284164 URL: https://svnweb.freebsd.org/changeset/base/284164 Log: MFC r283870: Remove unneeded NULL checks in amd64's 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 curproc->p_pid. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D2695 Modified: stable/9/sys/amd64/amd64/trap.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/amd64/amd64/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Mon Jun 8 19:24:18 2015 (r284163) +++ stable/9/sys/amd64/amd64/trap.c Mon Jun 8 19:44:04 2015 (r284164) @@ -863,14 +863,8 @@ trap_fatal(frame, eva) if (frame->tf_rflags & PSL_RF) printf("resume, "); printf("IOPL = %ld\n", (frame->tf_rflags & PSL_IOPL) >> 12); - printf("current process = "); - if (curproc) { - printf("%lu (%s)\n", - (u_long)curproc->p_pid, curthread->td_name ? - 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506081944.t58Ji4lZ007701>