Page MenuHomeFreeBSD

LinuxKPI: Add linux/types.h to pm_qos.h, fixes issue in new drm-kmod patches
ClosedPublic

Authored by siri_racha.ca on Wed, Jun 3, 4:56 PM.
Referenced Files
Unknown Object (File)
Thu, Jun 11, 6:23 AM
Unknown Object (File)
Wed, Jun 10, 4:29 PM
Unknown Object (File)
Wed, Jun 10, 3:53 AM
Unknown Object (File)
Sun, Jun 7, 2:03 AM
Unknown Object (File)
Thu, Jun 4, 6:01 PM

Details

Summary

false is not a type in C, and false is defined in linux/types.h, so when linux/types.h is not implicitly included, there is a compile error. This is fixed by including linux/types.h in pm_qos.h.

This patch is targeted at fixing a compile error in drm-kmod when porting over new stuff.

Diff Detail

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

Event Timeline

This is why I want to have C23 in base, but it's not the right time yet... LGTM:)

This revision is now accepted and ready to land.Wed, Jun 3, 5:06 PM

May I ask, what gives you this error?

In D57415#1315548, @bz wrote:

May I ask, what gives you this error?

When I was patching drm-kmod, I got to a patch which didn't compile, upon further investigation I found that the error was within this file, and it was because it was missing types. I'd assume that previously it was implicitly included.

Cool. Can you mention the drm-kmod details in the commit message?

Sounds good, I don't remember which specific drm-kmod patch it was, so can I just say something along the lines of "fixes issue when applying patches to drm-kmod from upstream linux source"?

Sounds good, I don't remember which specific drm-kmod patch it was, so can I just say something along the lines of "fixes issue when applying patches to drm-kmod from upstream linux source"?

Yes, sounds good. It's just so we know which consumer of LinuxKPI needs/triggers things.

I sometimes just said "needed by a new version of a wireless driver" for example (if I couldn't remember which of the 7 it was) but that means we know that wireless pull this in.

siri_racha.ca retitled this revision from LinuxKPI: Add linux/types.h to pm_qos.h to LinuxKPI: Add linux/types.h to pm_qos.h, fixes issue in new drm-kmod patches.Wed, Jun 3, 8:59 PM
siri_racha.ca edited the summary of this revision. (Show Details)

needed by a new version of a wireless driver

Yeah, if we can find a rough version, text along the lines of "needed by amdgpu between Linux 6.xx and 6.yy"

needed by a new version of a wireless driver

Yeah, if we can find a rough version, text along the lines of "needed by amdgpu between Linux 6.xx and 6.yy"

Should "needed by amdgpu between Linux 6.12, and 6.15" do it? It's a bit of a wide net I will admit.

FWIW Linux does not include types.h from pm_qos.h, but it has three other #includes, one of which presumably transitively includes types.h.

This revision was automatically updated to reflect the committed changes.