Page MenuHomeFreeBSD

linuxkpi: Move `ARRAY_SIZE` to <linux/array_size.h>
ClosedPublic

Authored by dumbbell on Wed, Apr 22, 8:16 AM.

Details

Summary

The DRM generic code started to import this header directly in Linux 6.12.x. Let's move the definition of ARRAY_SIZE() (the only thing that <linux/array_size.h> defines) to this header.

Also, include <linux/array_size.h> from the same headers as Linux. This includes <linux/kernel.h>, so the change should not break anything.

This is part of the update of DRM drivers to Linux 6.12.81.

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

dumbbell added a reviewer: linuxkpi.
dumbbell set the repository for this revision to rG FreeBSD src repository.
bz requested changes to this revision.Wed, Apr 22, 1:59 PM
bz added a subscriber: bz.
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/array_size.h
9

When ARRAY_SIZE came into LinuxKPI in aa0a1e58f0189 there were only three (c) on the file:

+ * Copyright (c) 2010 Isilon Systems, Inc.
+ * Copyright (c) 2010 iX Systems, Inc.
+ * Copyright (c) 2010 Panasas, Inc.

I think we can trim it down to them ast least for this.

This revision now requires changes to proceed.Wed, Apr 22, 1:59 PM
This revision is now accepted and ready to land.Wed, Apr 22, 7:20 PM