Page MenuHomeFreeBSD

nvme: Explicitly cast caddr_t values
ClosedPublic

Authored by des on Mon, Jul 20, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 28, 5:17 AM
Unknown Object (File)
Tue, Jul 28, 5:09 AM
Unknown Object (File)
Tue, Jul 28, 12:06 AM
Unknown Object (File)
Mon, Jul 27, 3:58 PM
Unknown Object (File)
Mon, Jul 27, 5:00 AM
Unknown Object (File)
Sun, Jul 26, 2:56 PM
Unknown Object (File)
Sun, Jul 26, 10:44 AM
Unknown Object (File)
Sun, Jul 26, 4:06 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 74953
Build 71836: arc lint + arc unit

Event Timeline

des requested review of this revision.Mon, Jul 20, 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.Mon, Jul 20, 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.