Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Constify atu_devs[] so that it lands in .rodata ...
details: https://anonhg.NetBSD.org/src/rev/33d052eeb0d2
branches: trunk
changeset: 832966:33d052eeb0d2
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Jun 03 10:59:35 2018 +0000
description:
Constify atu_devs[] so that it lands in .rodata (600 bytes).
diffstat:
sys/dev/usb/if_atu.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 256b766a42ac -r 33d052eeb0d2 sys/dev/usb/if_atu.c
--- a/sys/dev/usb/if_atu.c Sun Jun 03 10:45:16 2018 +0000
+++ b/sys/dev/usb/if_atu.c Sun Jun 03 10:59:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_atu.c,v 1.57 2018/05/01 16:18:13 maya Exp $ */
+/* $NetBSD: if_atu.c,v 1.58 2018/06/03 10:59:35 maxv Exp $ */
/* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
/*
* Copyright (c) 2003, 2004
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.57 2018/05/01 16:18:13 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.58 2018/06/03 10:59:35 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -108,7 +108,7 @@
/*
* Various supported device vendors/products/radio type.
*/
-struct atu_type atu_devs[] = {
+static const struct atu_type atu_devs[] = {
{ USB_VENDOR_3COM, USB_PRODUCT_3COM_3CRSHEW696,
RadioRFMD, ATU_NO_QUIRK },
{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_BWU613,
@@ -1101,7 +1101,7 @@
int i;
for (i = 0; i < __arraycount(atu_devs); i++) {
- struct atu_type *t = &atu_devs[i];
+ const struct atu_type *t = &atu_devs[i];
if (uaa->uaa_vendor == t->atu_vid &&
uaa->uaa_product == t->atu_pid) {
@@ -1280,7 +1280,7 @@
* basically does the same as atu_match
*/
for (i = 0; i < __arraycount(atu_devs); i++) {
- struct atu_type *t = &atu_devs[i];
+ const struct atu_type *t = &atu_devs[i];
if (uaa->uaa_vendor == t->atu_vid &&
uaa->uaa_product == t->atu_pid) {
Home |
Main Index |
Thread Index |
Old Index