From 4b32857986a4fefc5f78977134fb7f7009b5ada4 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 13 Jul 2023 07:31:12 +0000 Subject: [PATCH] Change function definitions using the identifier-list form used in the 1st edition of Kernighan and Ritchie's The C Programming Language, to that of the parameter-type-list form described in the ANSI X3.159-1989 standard. In ISO/IEC 9899:2023 drafts, there is only one form of function definition. "N2432 Remove support for function definitions with identifier lists". --- sys/dev/ic/aac.c | 6 ++---- sys/dev/ic/aacvar.h | 16 +++++----------- sys/dev/pci/aac_pci.c | 11 +++-------- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index 33e5fc2687b..8847252d5c6 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac.c,v 1.94 2022/04/16 19:19:58 naddy Exp $ */ +/* $OpenBSD: aac.c,v 1.95 2023/07/13 07:31:12 jsg Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -2074,9 +2074,7 @@ aac_rkt_set_interrupts(struct aac_softc *sc, int enable) } void -aac_eval_mapping(size, cyls, heads, secs) - u_int32_t size; - int *cyls, *heads, *secs; +aac_eval_mapping(u_int32_t size, int *cyls, int *heads, int *secs) { *cyls = size / AAC_HEADS / AAC_SECS; if (*cyls < AAC_MAXCYLS) { diff --git a/sys/dev/ic/aacvar.h b/sys/dev/ic/aacvar.h index d2104d31d45..f87965e85ce 100644 --- a/sys/dev/ic/aacvar.h +++ b/sys/dev/ic/aacvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aacvar.h,v 1.16 2022/01/09 05:42:37 jsg Exp $ */ +/* $OpenBSD: aacvar.h,v 1.17 2023/07/13 07:31:12 jsg Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -429,31 +429,25 @@ int aac_intr(void *); /* These all require correctly aligned buffers */ static __inline__ void -aac_enc16(addr, value) - u_int8_t *addr; - u_int16_t value; +aac_enc16(u_int8_t *addr, u_int16_t value) { *(u_int16_t *)addr = htole16(value); } static __inline__ void -aac_enc32(addr, value) - u_int8_t *addr; - u_int32_t value; +aac_enc32(u_int8_t *addr, u_int32_t value) { *(u_int32_t *)addr = htole32(value); } static __inline__ u_int16_t -aac_dec16(addr) - u_int8_t *addr; +aac_dec16(u_int8_t *addr) { return letoh16(*(u_int16_t *)addr); } static __inline__ u_int32_t -aac_dec32(addr) - u_int8_t *addr; +aac_dec32(u_int8_t *addr) { return letoh32(*(u_int32_t *)addr); } diff --git a/sys/dev/pci/aac_pci.c b/sys/dev/pci/aac_pci.c index 480ad4e15e6..df15033af7c 100644 --- a/sys/dev/pci/aac_pci.c +++ b/sys/dev/pci/aac_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac_pci.c,v 1.26 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: aac_pci.c,v 1.27 2023/07/13 07:31:12 jsg Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -202,10 +202,7 @@ const struct cfattach aac_pci_ca = { * Determine whether this is one of our supported adapters. */ int -aac_pci_probe(parent, match, aux) - struct device *parent; - void *match; - void *aux; +aac_pci_probe(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = aux; struct aac_ident *m; @@ -224,9 +221,7 @@ aac_pci_probe(parent, match, aux) } void -aac_pci_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +aac_pci_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; pci_chipset_tag_t pc = pa->pa_pc; -- 2.20.1