From owner-svn-src-all@freebsd.org Thu Feb 22 18:05:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B296FF1C524 for ; Thu, 22 Feb 2018 18:05:07 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 39F7470588 for ; Thu, 22 Feb 2018 18:05:06 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: d9bb1b23-17fa-11e8-bb8e-b35b57339d60 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id d9bb1b23-17fa-11e8-bb8e-b35b57339d60; Thu, 22 Feb 2018 18:04:40 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w1MI4vIX064331; Thu, 22 Feb 2018 11:04:57 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1519322697.91697.138.camel@freebsd.org> Subject: Re: svn commit: r329830 - head/sbin/nvmecontrol From: Ian Lepore To: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 22 Feb 2018 11:04:57 -0700 In-Reply-To: <201802221747.w1MHlGJS032223@repo.freebsd.org> References: <201802221747.w1MHlGJS032223@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 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: Thu, 22 Feb 2018 18:05:07 -0000 On Thu, 2018-02-22 at 17:47 +0000, Alan Somers wrote: > Author: asomers > Date: Thu Feb 22 17:47:16 2018 > New Revision: 329830 > URL: https://svnweb.freebsd.org/changeset/base/329830 > > Log: >   nvmecontrol: fix build on amd64/clang >    >   Broken by: 329824 >   Sponsored by: Spectra Logic Corp > > Modified: >   head/sbin/nvmecontrol/identify.c > > Modified: head/sbin/nvmecontrol/identify.c > ============================================================================== > --- head/sbin/nvmecontrol/identify.c Thu Feb 22 17:09:26 2018 (r329829) > +++ head/sbin/nvmecontrol/identify.c Thu Feb 22 17:47:16 2018 (r329830) > @@ -112,7 +112,7 @@ print_controller(struct nvme_controller_data *cdata) >   if (cdata->mdts == 0) >   printf("Unlimited\n"); >   else > - printf("%ld\n", PAGE_SIZE * (1 << cdata->mdts)); > + printf("%d\n", PAGE_SIZE * (1 << cdata->mdts)); >   printf("Controller ID:              0x%02x\n", cdata->ctrlr_id); >   printf("\n"); If cdata->mdts > 19 that'll overflow 32 bits.  I'm not sure if that can happen in the real world or not.  If so, maybe it'd be better to do   printf("%ju\n", PAGE_SIZE * ((uintmax_t)1 << cdata->mdts)); -- Ian