Date: Mon, 4 May 2020 20:18:29 +0200 From: Gunther Nikl <gnikl@justmail.de> To: David Bright <dab@FreeBSD.org> Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r360568 - head/sys/dev/nvme Message-ID: <20200504201540.00005dc5@justmail.de> In-Reply-To: <202005022047.042Klwcr068812@repo.freebsd.org> References: <202005022047.042Klwcr068812@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, > Modified: head/sys/dev/nvme/nvme_test.c > ============================================================================== > --- head/sys/dev/nvme/nvme_test.c Sat May 2 20:14:592020 (r360567) > +++ head/sys/dev/nvme/nvme_test.c Sat May 2 20:47:582020 (r360568) > @@ -100,7 +100,7 @@ nvme_ns_bio_test(void *arg) > idx = atomic_fetchadd_int(&io_test->td_idx, 1); > dev = io_test->ns->cdev; > - offset = idx * 2048 * nvme_ns_get_sector_size(io_test->ns); > + offset = idx * 2048ULL * nvme_ns_get_sector_size(io_test->ns); > > while (1) { I have read the differential where a cast was used on the 2048. AFAICT, the "ULL" is only correct if uint64 is a "unsigned long long". On a LP64 system it is normally a simple "unsigned long" and then the correct suffix would be "UL". In that sense the cast was probably more correct. my 2c Gunther
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200504201540.00005dc5>