tools: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2023-11-24 13:12:57 -07:00
parent 6dced2c635
commit 6bfca4dcab
55 changed files with 6 additions and 57 deletions

View File

@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsicum.h>

View File

@ -26,7 +26,7 @@
*/
#include <stdio.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#include <string.h>

View File

@ -35,7 +35,6 @@
*/
#pragma once
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <errno.h>

View File

@ -38,7 +38,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/disk.h>
#include <sys/ioctl.h>

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsicum.h>
#include <sys/procdesc.h>

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsicum.h>
#include <sys/procdesc.h>

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/ioctl.h>

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/select.h>
#include <sys/socket.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <assert.h>
#include <err.h>

View File

@ -32,7 +32,6 @@
*
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kthread.h>

View File

@ -28,7 +28,6 @@
* Test utility for IPv4 broadcast sockets.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/ioctl.h>

View File

@ -32,7 +32,6 @@
* TODO: Merge multicast socket option tests from ipsockopt.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/ioctl.h>

View File

@ -25,7 +25,6 @@
*
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>

View File

@ -25,7 +25,6 @@
*
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdio.h>

View File

@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/_semaphore.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>

View File

@ -34,7 +34,6 @@
* various object types.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/errno.h>

View File

@ -31,7 +31,6 @@
* whether or not they return the expected ECAPMODE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/errno.h>

View File

@ -29,7 +29,6 @@
* Test that fcntl works in capability mode.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsicum.h>
#include <sys/errno.h>

View File

@ -31,7 +31,6 @@
* whether or not they return the expected ECAPMODE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsium.h>

View File

@ -31,7 +31,6 @@
* whether or not they return the expected ECAPMODE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsicum.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/errno.h>

View File

@ -29,7 +29,6 @@
* Test that various sysctls are (and aren't) available on capability mode.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsicum.h>
#include <sys/errno.h>

View File

@ -89,7 +89,6 @@
* XXXRW: message queue and shared memory fds?
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/mman.h>
#include <sys/mount.h>

View File

@ -34,7 +34,6 @@
* sure it makes sense.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ucred.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/limits.h>
#include <sys/socket.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <err.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/endian.h>

View File

@ -26,7 +26,6 @@
*
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <err.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/syscall.h>

View File

@ -46,7 +46,6 @@ EOF
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <machine/cpufunc.h>

View File

@ -284,7 +284,6 @@ EOF
cat > fault.c <<EOF
/* \$Id: fault.c,v 1.5 2008/10/28 17:39:16 kostik Exp \$ */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/ucontext.h>
#include <errno.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/endian.h>
#include <sys/pciio.h>

View File

@ -9,7 +9,6 @@
* Dave Airlie
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>

View File

@ -28,7 +28,7 @@
#include <sys/types.h>
#include <sys/callout.h>
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/protosw.h>
#include <sys/queue.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/sysctl.h>

View File

@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/sysctl.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>

View File

@ -30,7 +30,6 @@
* the number of cpu's identified.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <x86/mptable.h>

View File

@ -1538,8 +1538,7 @@ uniform_delay_run(struct _qs *q, struct _cfg *arg)
{
uint64_t x = my_random24();
q->cur_delay = arg->d[0] + ((arg->d[2] * x) >> 24);
#if 0 /* COMPUTE_STATS */
#endif /* COMPUTE_STATS */
return 0;
}

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/pciio.h>

View File

@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/mman.h>

View File

@ -17,7 +17,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>

View File

@ -25,8 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/cpuset.h>
#include <machine/atomic.h>

View File

@ -26,7 +26,7 @@
/*
* Virtual HBA defines
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/endian.h>