svn commit: r284167 - head/sys/i386/i386

Konstantin Belousov kostikbel at gmail.com
Thu Jun 11 04:37:49 UTC 2015


On Tue, Jun 09, 2015 at 08:05:55PM +0200, Dimitry Andric wrote:
> On 09 Jun 2015, at 08:44, Bruce Evans <brde at optusnet.com.au> wrote:
> > 
> > On Mon, 8 Jun 2015, Dimitry Andric wrote:
> > 
> >> Log:
> >> 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
> > 
> > Er. I gave a longer review which implicity requested not doing all of
> > this.  The format was correct (it matched the cast), and the cast was
> > less wrong than not casting.
> 
> Please read https://reviews.freebsd.org/D2695, where Kostik argued
> "pid_t is int32_t on all arches", and I agreed with that.  The previous
> obfuscation is unnecessary now.
> 
> 
> > Both amd64/trap.c i386/trap.c still print pids portably (by casting
> > to long) in one place.  They each had 2 unportable printings of pids;
> > now they each have 3 unportable printings of pids.
Please note that arguing about portability of the {i386,amd64}/trap.c is
not very useful due to the nature of the code.

> 
> I wasn't updating the other parts of the code, so I stayed out of there
> for now.  Feel free to put a review in Phabricator to make everything
> consistent.
> 
> -Dimitry
> 




More information about the svn-src-head mailing list