From owner-svn-src-all@FreeBSD.ORG Sun Apr 15 01:27:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9987D1065673; Sun, 15 Apr 2012 01:27:59 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2E5608FC0C; Sun, 15 Apr 2012 01:27:59 +0000 (UTC) Received: by obqv19 with SMTP id v19so4646093obq.13 for ; Sat, 14 Apr 2012 18:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=QP30u+I2nR8+m4iXU+tmsaOFU+4HJBjzFzsNgYwpGvE=; b=ZtTeyEWxA5TGe9bRMIlH5pj0o7fP7C+mhy+L5H1ohZi4HvhSWE7XAfW2bzifjH+R4P zZLUz3pyEpW/A+OohZR30trK7GY6CUJ7qGnURyUDO9+wWQmEA0y32PWqOFo/zCZ4H9Mt BwUWG1leawVN7VfyvWV4LgqH8cXBGg3Crc9DWjogQov7JCfPaglS+CtsGOXbButhWCmz eFM7qTk6bWHAow4u/9IbQP6FNojkuTPrkm41V+OC2KtPAuDhDchBaGfIXdJ71k1Hx01v 2B/wwS8PAaw3VMgHX7Q4YKoO/CLY/LxH2sK3KYt3/RikLj7Bo5RkDW7M0NPkTS7KWwNM t1Qg== Received: by 10.182.36.3 with SMTP id m3mr9303691obj.8.1334453277927; Sat, 14 Apr 2012 18:27:57 -0700 (PDT) Received: from [192.168.2.5] (dpc691939029.direcpc.com. [69.19.39.29]) by mx.google.com with ESMTPS id h2sm14971216obn.20.2012.04.14.18.27.47 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 Apr 2012 18:27:57 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=windows-1252 From: Garrett Cooper In-Reply-To: <201204141644.q3EGiJ3h038632@svn.freebsd.org> Date: Sat, 14 Apr 2012 18:27:37 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <26482E9C-4636-4820-AD24-5F5642E5D0A5@gmail.com> References: <201204141644.q3EGiJ3h038632@svn.freebsd.org> To: Luigi Rizzo X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234290 - head/sys/dev/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Apr 2012 01:27:59 -0000 On Apr 14, 2012, at 9:44 AM, Luigi Rizzo wrote: > Author: luigi > Date: Sat Apr 14 16:44:18 2012 > New Revision: 234290 > URL: http://svn.freebsd.org/changeset/base/234290 >=20 > Log: > i prefer this fix for the -Wformat warning (just one cast, > all the other variables are already correct for %x). > My previous attempt put the cast in the wrong place. >=20 > Modified: > head/sys/dev/netmap/netmap_mem2.c >=20 > Modified: head/sys/dev/netmap/netmap_mem2.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/netmap/netmap_mem2.c Sat Apr 14 16:42:17 2012 = (r234289) > +++ head/sys/dev/netmap/netmap_mem2.c Sat Apr 14 16:44:18 2012 = (r234290) > @@ -161,11 +161,9 @@ netmap_ofstophys(vm_offset_t offset) > return p[i]->lut[offset / p[i]->_objsize].paddr + > offset % p[i]->_objsize; > } > - D("invalid ofs 0x%jx out of 0x%jx 0x%jx 0x%jx", (uintmax_t)o, > - (uintmax_t)p[0]->_memtotal, > - (uintmax_t)(p[0]->_memtotal + p[1]->_memtotal), > - (uintmax_t)(p[0]->_memtotal + p[1]->_memtotal + > - p[2]->_memtotal)); > + D("invalid ofs 0x%x out of 0x%x 0x%x 0x%x", (u_int)o, > + p[0]->_memtotal, p[0]->_memtotal + p[1]->_memtotal, > + p[0]->_memtotal + p[1]->_memtotal + p[2]->_memtotal); > return 0; // XXX bad address > } As I mentioned before in private email, wouldn't it make more = sense to make `"%x=85", (u_int)o` into `%lx=85`, o because vm_offset_t = is uint32_t on 32-bit archs and uint64_t on 64-bit archs? What's done = above truncates the represented value for 64-bit archs. Thanks! -Garrett=