Page MenuHomeFreeBSD

nvme: Explicitly cast caddr_t values
ClosedPublic

Authored by des on Mon, Jul 20, 1:18 PM.
Tags
None
Referenced Files
F163676054: D58357.id.diff
Sat, Jul 25, 9:20 AM
F163672360: D58357.id182376.diff
Sat, Jul 25, 8:36 AM
Unknown Object (File)
Fri, Jul 24, 8:43 PM
Unknown Object (File)
Fri, Jul 24, 8:29 PM
Unknown Object (File)
Fri, Jul 24, 8:27 PM
Unknown Object (File)
Fri, Jul 24, 3:46 PM
Unknown Object (File)
Fri, Jul 24, 8:45 AM
Unknown Object (File)
Fri, Jul 24, 8:16 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 Not Applicable
Unit
Tests Not Applicable

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.