From 51d3b00dfa277f79ef1f277a65407bb675d242ae Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 9 Apr 2022 20:10:26 +0000 Subject: [PATCH] atascsi: constify method tables ok miod@ --- sys/dev/ata/atascsi.c | 4 ++-- sys/dev/ata/atascsi.h | 4 ++-- sys/dev/ic/ahci.c | 4 ++-- sys/dev/ic/sili.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 46c681203e8..c1b3237c622 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.151 2022/01/09 05:42:37 jsg Exp $ */ +/* $OpenBSD: atascsi.c,v 1.152 2022/04/09 20:10:26 naddy Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -42,7 +42,7 @@ struct atascsi { struct atascsi_host_port **as_host_ports; - struct atascsi_methods *as_methods; + const struct atascsi_methods *as_methods; struct scsi_adapter as_switch; struct scsibus_softc *as_scsibus; diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h index a992001e82c..e33b91dbfae 100644 --- a/sys/dev/ata/atascsi.h +++ b/sys/dev/ata/atascsi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.h,v 1.53 2019/08/19 17:16:55 krw Exp $ */ +/* $OpenBSD: atascsi.h,v 1.54 2022/04/09 20:10:26 naddy Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -374,7 +374,7 @@ struct atascsi_methods { struct atascsi_attach_args { void *aaa_cookie; - struct atascsi_methods *aaa_methods; + const struct atascsi_methods *aaa_methods; void (*aaa_minphys)(struct buf *, struct scsi_link *); int aaa_nports; diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c index 571b29c29c4..a4004001c14 100644 --- a/sys/dev/ic/ahci.c +++ b/sys/dev/ic/ahci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci.c,v 1.37 2020/07/16 21:18:30 krw Exp $ */ +/* $OpenBSD: ahci.c,v 1.38 2022/04/09 20:10:26 naddy Exp $ */ /* * Copyright (c) 2006 David Gwynne @@ -160,7 +160,7 @@ struct ata_xfer * ahci_ata_get_xfer(void *, int); void ahci_ata_put_xfer(struct ata_xfer *); void ahci_ata_cmd(struct ata_xfer *); -struct atascsi_methods ahci_atascsi_methods = { +const struct atascsi_methods ahci_atascsi_methods = { ahci_ata_probe, ahci_ata_free, ahci_ata_get_xfer, diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c index b2df117d41b..82d57e3a9b8 100644 --- a/sys/dev/ic/sili.c +++ b/sys/dev/ic/sili.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sili.c,v 1.60 2022/01/09 05:42:42 jsg Exp $ */ +/* $OpenBSD: sili.c,v 1.61 2022/04/09 20:10:26 naddy Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -202,7 +202,7 @@ void sili_simulate_error(struct sili_ccb *ccb, int *need_restart, int *err_port); #endif -struct atascsi_methods sili_atascsi_methods = { +const struct atascsi_methods sili_atascsi_methods = { sili_ata_probe, sili_ata_free, sili_ata_get_xfer, -- 2.20.1