Page MenuHomeFreeBSD

nvme: Explicitly cast caddr_t values
ClosedPublic

Authored by des on Jul 20 2026, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 21, 4:54 AM
Unknown Object (File)
Sun, Aug 16, 5:38 PM
Unknown Object (File)
Thu, Aug 13, 12:29 PM
Unknown Object (File)
Tue, Aug 11, 11:41 AM
Unknown Object (File)
Tue, Aug 11, 11:16 AM
Unknown Object (File)
Tue, Aug 11, 9:29 AM
Unknown Object (File)
Sun, Aug 9, 6:22 AM
Unknown Object (File)
Sat, Aug 8, 11:05 PM
Subscribers

Details

Summary

Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
MFC after: 1 week
Fixes: 6d0001d44490 ("nvme: add support for DIOCGIDENT")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Jul 20 2026, 1:18 PM
In D58357#1338417, @imp wrote:

Why bother?

It's causing a build failure downstream.

This revision is now accepted and ready to land.Jul 20 2026, 9:54 PM
In D58357#1338418, @des wrote:
In D58357#1338417, @imp wrote:

Why bother?

It's causing a build failure downstream.

What's the failure. the change is fine (I should have hit accept the first time), but I was hoping to learn something since caddr_t and uint8_t* should be the same (modulo signedness... is that causing the issue or something else?).

In D58357#1338639, @imp wrote:
In D58357#1338418, @des wrote:

It's causing a build failure downstream.

What's the failure. the change is fine (I should have hit accept the first time), but I was hoping to learn something since caddr_t and uint8_t* should be the same (modulo signedness... is that causing the issue or something else?).

The code is being built in an environment where caddr_t is defined as intptr_t rather than char * (still allows pointer arithmetic but prevents dereferencing). Every other assignment of a caddr_t value in the nvme driver already has the correct cast in place, this one didn't.

This revision was automatically updated to reflect the committed changes.