Commit 8b21985c91ffb3062bfbd3f2bfbeceb5333afaac

Authored by Jan Beulich
Committed by Linus Torvalds
1 parent edde08f2a8

constify tables in kernel/sysctl_check.c

Remains the question whether it is intended that many, perhaps even large,
tables are compiled in without ever having a chance to get used, i.e.
whether there shouldn't #ifdef CONFIG_xxx get added.

[akpm@linux-foundation.org: fix cut-n-paste error]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 75 additions and 76 deletions Side-by-side Diff

kernel/sysctl_check.c
... ... @@ -8,10 +8,10 @@
8 8 struct trans_ctl_table {
9 9 int ctl_name;
10 10 const char *procname;
11   - struct trans_ctl_table *child;
  11 + const struct trans_ctl_table *child;
12 12 };
13 13  
14   -static struct trans_ctl_table trans_random_table[] = {
  14 +static const struct trans_ctl_table trans_random_table[] = {
15 15 { RANDOM_POOLSIZE, "poolsize" },
16 16 { RANDOM_ENTROPY_COUNT, "entropy_avail" },
17 17 { RANDOM_READ_THRESH, "read_wakeup_threshold" },
18 18  
... ... @@ -21,13 +21,13 @@
21 21 {}
22 22 };
23 23  
24   -static struct trans_ctl_table trans_pty_table[] = {
  24 +static const struct trans_ctl_table trans_pty_table[] = {
25 25 { PTY_MAX, "max" },
26 26 { PTY_NR, "nr" },
27 27 {}
28 28 };
29 29  
30   -static struct trans_ctl_table trans_kern_table[] = {
  30 +static const struct trans_ctl_table trans_kern_table[] = {
31 31 { KERN_OSTYPE, "ostype" },
32 32 { KERN_OSRELEASE, "osrelease" },
33 33 /* KERN_OSREV not used */
... ... @@ -107,7 +107,7 @@
107 107 {}
108 108 };
109 109  
110   -static struct trans_ctl_table trans_vm_table[] = {
  110 +static const struct trans_ctl_table trans_vm_table[] = {
111 111 { VM_OVERCOMMIT_MEMORY, "overcommit_memory" },
112 112 { VM_PAGE_CLUSTER, "page-cluster" },
113 113 { VM_DIRTY_BACKGROUND, "dirty_background_ratio" },
... ... @@ -139,7 +139,7 @@
139 139 {}
140 140 };
141 141  
142   -static struct trans_ctl_table trans_net_core_table[] = {
  142 +static const struct trans_ctl_table trans_net_core_table[] = {
143 143 { NET_CORE_WMEM_MAX, "wmem_max" },
144 144 { NET_CORE_RMEM_MAX, "rmem_max" },
145 145 { NET_CORE_WMEM_DEFAULT, "wmem_default" },
146 146  
... ... @@ -165,14 +165,14 @@
165 165 {},
166 166 };
167 167  
168   -static struct trans_ctl_table trans_net_unix_table[] = {
  168 +static const struct trans_ctl_table trans_net_unix_table[] = {
169 169 /* NET_UNIX_DESTROY_DELAY unused */
170 170 /* NET_UNIX_DELETE_DELAY unused */
171 171 { NET_UNIX_MAX_DGRAM_QLEN, "max_dgram_qlen" },
172 172 {}
173 173 };
174 174  
175   -static struct trans_ctl_table trans_net_ipv4_route_table[] = {
  175 +static const struct trans_ctl_table trans_net_ipv4_route_table[] = {
176 176 { NET_IPV4_ROUTE_FLUSH, "flush" },
177 177 { NET_IPV4_ROUTE_MIN_DELAY, "min_delay" },
178 178 { NET_IPV4_ROUTE_MAX_DELAY, "max_delay" },
... ... @@ -195,7 +195,7 @@
195 195 {}
196 196 };
197 197  
198   -static struct trans_ctl_table trans_net_ipv4_conf_vars_table[] = {
  198 +static const struct trans_ctl_table trans_net_ipv4_conf_vars_table[] = {
199 199 { NET_IPV4_CONF_FORWARDING, "forwarding" },
200 200 { NET_IPV4_CONF_MC_FORWARDING, "mc_forwarding" },
201 201  
202 202  
... ... @@ -222,14 +222,14 @@
222 222 {}
223 223 };
224 224  
225   -static struct trans_ctl_table trans_net_ipv4_conf_table[] = {
  225 +static const struct trans_ctl_table trans_net_ipv4_conf_table[] = {
226 226 { NET_PROTO_CONF_ALL, "all", trans_net_ipv4_conf_vars_table },
227 227 { NET_PROTO_CONF_DEFAULT, "default", trans_net_ipv4_conf_vars_table },
228 228 { 0, NULL, trans_net_ipv4_conf_vars_table },
229 229 {}
230 230 };
231 231  
232   -static struct trans_ctl_table trans_net_neigh_vars_table[] = {
  232 +static const struct trans_ctl_table trans_net_neigh_vars_table[] = {
233 233 { NET_NEIGH_MCAST_SOLICIT, "mcast_solicit" },
234 234 { NET_NEIGH_UCAST_SOLICIT, "ucast_solicit" },
235 235 { NET_NEIGH_APP_SOLICIT, "app_solicit" },
236 236  
... ... @@ -251,13 +251,13 @@
251 251 {}
252 252 };
253 253  
254   -static struct trans_ctl_table trans_net_neigh_table[] = {
  254 +static const struct trans_ctl_table trans_net_neigh_table[] = {
255 255 { NET_PROTO_CONF_DEFAULT, "default", trans_net_neigh_vars_table },
256 256 { 0, NULL, trans_net_neigh_vars_table },
257 257 {}
258 258 };
259 259  
260   -static struct trans_ctl_table trans_net_ipv4_netfilter_table[] = {
  260 +static const struct trans_ctl_table trans_net_ipv4_netfilter_table[] = {
261 261 { NET_IPV4_NF_CONNTRACK_MAX, "ip_conntrack_max" },
262 262  
263 263 { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, "ip_conntrack_tcp_timeout_syn_sent" },
... ... @@ -294,7 +294,7 @@
294 294 {}
295 295 };
296 296  
297   -static struct trans_ctl_table trans_net_ipv4_table[] = {
  297 +static const struct trans_ctl_table trans_net_ipv4_table[] = {
298 298 { NET_IPV4_FORWARD, "ip_forward" },
299 299 { NET_IPV4_DYNADDR, "ip_dynaddr" },
300 300  
301 301  
... ... @@ -393,13 +393,13 @@
393 393 {}
394 394 };
395 395  
396   -static struct trans_ctl_table trans_net_ipx_table[] = {
  396 +static const struct trans_ctl_table trans_net_ipx_table[] = {
397 397 { NET_IPX_PPROP_BROADCASTING, "ipx_pprop_broadcasting" },
398 398 /* NET_IPX_FORWARDING unused */
399 399 {}
400 400 };
401 401  
402   -static struct trans_ctl_table trans_net_atalk_table[] = {
  402 +static const struct trans_ctl_table trans_net_atalk_table[] = {
403 403 { NET_ATALK_AARP_EXPIRY_TIME, "aarp-expiry-time" },
404 404 { NET_ATALK_AARP_TICK_TIME, "aarp-tick-time" },
405 405 { NET_ATALK_AARP_RETRANSMIT_LIMIT, "aarp-retransmit-limit" },
... ... @@ -407,7 +407,7 @@
407 407 {},
408 408 };
409 409  
410   -static struct trans_ctl_table trans_net_netrom_table[] = {
  410 +static const struct trans_ctl_table trans_net_netrom_table[] = {
411 411 { NET_NETROM_DEFAULT_PATH_QUALITY, "default_path_quality" },
412 412 { NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER, "obsolescence_count_initialiser" },
413 413 { NET_NETROM_NETWORK_TTL_INITIALISER, "network_ttl_initialiser" },
... ... @@ -423,7 +423,7 @@
423 423 {}
424 424 };
425 425  
426   -static struct trans_ctl_table trans_net_ax25_param_table[] = {
  426 +static const struct trans_ctl_table trans_net_ax25_param_table[] = {
427 427 { NET_AX25_IP_DEFAULT_MODE, "ip_default_mode" },
428 428 { NET_AX25_DEFAULT_MODE, "ax25_default_mode" },
429 429 { NET_AX25_BACKOFF_TYPE, "backoff_type" },
430 430  
... ... @@ -441,12 +441,12 @@
441 441 {}
442 442 };
443 443  
444   -static struct trans_ctl_table trans_net_ax25_table[] = {
  444 +static const struct trans_ctl_table trans_net_ax25_table[] = {
445 445 { 0, NULL, trans_net_ax25_param_table },
446 446 {}
447 447 };
448 448  
449   -static struct trans_ctl_table trans_net_bridge_table[] = {
  449 +static const struct trans_ctl_table trans_net_bridge_table[] = {
450 450 { NET_BRIDGE_NF_CALL_ARPTABLES, "bridge-nf-call-arptables" },
451 451 { NET_BRIDGE_NF_CALL_IPTABLES, "bridge-nf-call-iptables" },
452 452 { NET_BRIDGE_NF_CALL_IP6TABLES, "bridge-nf-call-ip6tables" },
... ... @@ -455,7 +455,7 @@
455 455 {}
456 456 };
457 457  
458   -static struct trans_ctl_table trans_net_rose_table[] = {
  458 +static const struct trans_ctl_table trans_net_rose_table[] = {
459 459 { NET_ROSE_RESTART_REQUEST_TIMEOUT, "restart_request_timeout" },
460 460 { NET_ROSE_CALL_REQUEST_TIMEOUT, "call_request_timeout" },
461 461 { NET_ROSE_RESET_REQUEST_TIMEOUT, "reset_request_timeout" },
... ... @@ -469,7 +469,7 @@
469 469 {}
470 470 };
471 471  
472   -static struct trans_ctl_table trans_net_ipv6_conf_var_table[] = {
  472 +static const struct trans_ctl_table trans_net_ipv6_conf_var_table[] = {
473 473 { NET_IPV6_FORWARDING, "forwarding" },
474 474 { NET_IPV6_HOP_LIMIT, "hop_limit" },
475 475 { NET_IPV6_MTU, "mtu" },
476 476  
... ... @@ -497,14 +497,14 @@
497 497 {}
498 498 };
499 499  
500   -static struct trans_ctl_table trans_net_ipv6_conf_table[] = {
  500 +static const struct trans_ctl_table trans_net_ipv6_conf_table[] = {
501 501 { NET_PROTO_CONF_ALL, "all", trans_net_ipv6_conf_var_table },
502 502 { NET_PROTO_CONF_DEFAULT, "default", trans_net_ipv6_conf_var_table },
503 503 { 0, NULL, trans_net_ipv6_conf_var_table },
504 504 {}
505 505 };
506 506  
507   -static struct trans_ctl_table trans_net_ipv6_route_table[] = {
  507 +static const struct trans_ctl_table trans_net_ipv6_route_table[] = {
508 508 { NET_IPV6_ROUTE_FLUSH, "flush" },
509 509 { NET_IPV6_ROUTE_GC_THRESH, "gc_thresh" },
510 510 { NET_IPV6_ROUTE_MAX_SIZE, "max_size" },
511 511  
... ... @@ -518,12 +518,12 @@
518 518 {}
519 519 };
520 520  
521   -static struct trans_ctl_table trans_net_ipv6_icmp_table[] = {
  521 +static const struct trans_ctl_table trans_net_ipv6_icmp_table[] = {
522 522 { NET_IPV6_ICMP_RATELIMIT, "ratelimit" },
523 523 {}
524 524 };
525 525  
526   -static struct trans_ctl_table trans_net_ipv6_table[] = {
  526 +static const struct trans_ctl_table trans_net_ipv6_table[] = {
527 527 { NET_IPV6_CONF, "conf", trans_net_ipv6_conf_table },
528 528 { NET_IPV6_NEIGH, "neigh", trans_net_neigh_table },
529 529 { NET_IPV6_ROUTE, "route", trans_net_ipv6_route_table },
... ... @@ -538,7 +538,7 @@
538 538 {}
539 539 };
540 540  
541   -static struct trans_ctl_table trans_net_x25_table[] = {
  541 +static const struct trans_ctl_table trans_net_x25_table[] = {
542 542 { NET_X25_RESTART_REQUEST_TIMEOUT, "restart_request_timeout" },
543 543 { NET_X25_CALL_REQUEST_TIMEOUT, "call_request_timeout" },
544 544 { NET_X25_RESET_REQUEST_TIMEOUT, "reset_request_timeout" },
545 545  
... ... @@ -548,13 +548,13 @@
548 548 {}
549 549 };
550 550  
551   -static struct trans_ctl_table trans_net_tr_table[] = {
  551 +static const struct trans_ctl_table trans_net_tr_table[] = {
552 552 { NET_TR_RIF_TIMEOUT, "rif_timeout" },
553 553 {}
554 554 };
555 555  
556 556  
557   -static struct trans_ctl_table trans_net_decnet_conf_vars[] = {
  557 +static const struct trans_ctl_table trans_net_decnet_conf_vars[] = {
558 558 { NET_DECNET_CONF_DEV_FORWARDING, "forwarding" },
559 559 { NET_DECNET_CONF_DEV_PRIORITY, "priority" },
560 560 { NET_DECNET_CONF_DEV_T2, "t2" },
561 561  
... ... @@ -562,12 +562,12 @@
562 562 {}
563 563 };
564 564  
565   -static struct trans_ctl_table trans_net_decnet_conf[] = {
  565 +static const struct trans_ctl_table trans_net_decnet_conf[] = {
566 566 { 0, NULL, trans_net_decnet_conf_vars },
567 567 {}
568 568 };
569 569  
570   -static struct trans_ctl_table trans_net_decnet_table[] = {
  570 +static const struct trans_ctl_table trans_net_decnet_table[] = {
571 571 { NET_DECNET_CONF, "conf", trans_net_decnet_conf },
572 572 { NET_DECNET_NODE_ADDRESS, "node_address" },
573 573 { NET_DECNET_NODE_NAME, "node_name" },
... ... @@ -585,7 +585,7 @@
585 585 {}
586 586 };
587 587  
588   -static struct trans_ctl_table trans_net_sctp_table[] = {
  588 +static const struct trans_ctl_table trans_net_sctp_table[] = {
589 589 { NET_SCTP_RTO_INITIAL, "rto_initial" },
590 590 { NET_SCTP_RTO_MIN, "rto_min" },
591 591 { NET_SCTP_RTO_MAX, "rto_max" },
... ... @@ -606,7 +606,7 @@
606 606 {}
607 607 };
608 608  
609   -static struct trans_ctl_table trans_net_llc_llc2_timeout_table[] = {
  609 +static const struct trans_ctl_table trans_net_llc_llc2_timeout_table[] = {
610 610 { NET_LLC2_ACK_TIMEOUT, "ack" },
611 611 { NET_LLC2_P_TIMEOUT, "p" },
612 612 { NET_LLC2_REJ_TIMEOUT, "rej" },
613 613  
614 614  
615 615  
... ... @@ -614,23 +614,23 @@
614 614 {}
615 615 };
616 616  
617   -static struct trans_ctl_table trans_net_llc_station_table[] = {
  617 +static const struct trans_ctl_table trans_net_llc_station_table[] = {
618 618 { NET_LLC_STATION_ACK_TIMEOUT, "ack_timeout" },
619 619 {}
620 620 };
621 621  
622   -static struct trans_ctl_table trans_net_llc_llc2_table[] = {
  622 +static const struct trans_ctl_table trans_net_llc_llc2_table[] = {
623 623 { NET_LLC2, "timeout", trans_net_llc_llc2_timeout_table },
624 624 {}
625 625 };
626 626  
627   -static struct trans_ctl_table trans_net_llc_table[] = {
  627 +static const struct trans_ctl_table trans_net_llc_table[] = {
628 628 { NET_LLC2, "llc2", trans_net_llc_llc2_table },
629 629 { NET_LLC_STATION, "station", trans_net_llc_station_table },
630 630 {}
631 631 };
632 632  
633   -static struct trans_ctl_table trans_net_netfilter_table[] = {
  633 +static const struct trans_ctl_table trans_net_netfilter_table[] = {
634 634 { NET_NF_CONNTRACK_MAX, "nf_conntrack_max" },
635 635 { NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, "nf_conntrack_tcp_timeout_syn_sent" },
636 636 { NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV, "nf_conntrack_tcp_timeout_syn_recv" },
637 637  
... ... @@ -667,12 +667,12 @@
667 667 {}
668 668 };
669 669  
670   -static struct trans_ctl_table trans_net_dccp_table[] = {
  670 +static const struct trans_ctl_table trans_net_dccp_table[] = {
671 671 { NET_DCCP_DEFAULT, "default" },
672 672 {}
673 673 };
674 674  
675   -static struct trans_ctl_table trans_net_irda_table[] = {
  675 +static const struct trans_ctl_table trans_net_irda_table[] = {
676 676 { NET_IRDA_DISCOVERY, "discovery" },
677 677 { NET_IRDA_DEVNAME, "devname" },
678 678 { NET_IRDA_DEBUG, "debug" },
... ... @@ -690,7 +690,7 @@
690 690 {}
691 691 };
692 692  
693   -static struct trans_ctl_table trans_net_table[] = {
  693 +static const struct trans_ctl_table trans_net_table[] = {
694 694 { NET_CORE, "core", trans_net_core_table },
695 695 /* NET_ETHER not used */
696 696 /* NET_802 not used */
... ... @@ -716,7 +716,7 @@
716 716 {}
717 717 };
718 718  
719   -static struct trans_ctl_table trans_fs_quota_table[] = {
  719 +static const struct trans_ctl_table trans_fs_quota_table[] = {
720 720 { FS_DQ_LOOKUPS, "lookups" },
721 721 { FS_DQ_DROPS, "drops" },
722 722 { FS_DQ_READS, "reads" },
... ... @@ -729,7 +729,7 @@
729 729 {}
730 730 };
731 731  
732   -static struct trans_ctl_table trans_fs_xfs_table[] = {
  732 +static const struct trans_ctl_table trans_fs_xfs_table[] = {
733 733 { XFS_RESTRICT_CHOWN, "restrict_chown" },
734 734 { XFS_SGID_INHERIT, "irix_sgid_inherit" },
735 735 { XFS_SYMLINK_MODE, "irix_symlink_mode" },
736 736  
737 737  
738 738  
... ... @@ -750,24 +750,24 @@
750 750 {}
751 751 };
752 752  
753   -static struct trans_ctl_table trans_fs_ocfs2_nm_table[] = {
  753 +static const struct trans_ctl_table trans_fs_ocfs2_nm_table[] = {
754 754 { 1, "hb_ctl_path" },
755 755 {}
756 756 };
757 757  
758   -static struct trans_ctl_table trans_fs_ocfs2_table[] = {
  758 +static const struct trans_ctl_table trans_fs_ocfs2_table[] = {
759 759 { 1, "nm", trans_fs_ocfs2_nm_table },
760 760 {}
761 761 };
762 762  
763   -static struct trans_ctl_table trans_inotify_table[] = {
  763 +static const struct trans_ctl_table trans_inotify_table[] = {
764 764 { INOTIFY_MAX_USER_INSTANCES, "max_user_instances" },
765 765 { INOTIFY_MAX_USER_WATCHES, "max_user_watches" },
766 766 { INOTIFY_MAX_QUEUED_EVENTS, "max_queued_events" },
767 767 {}
768 768 };
769 769  
770   -static struct trans_ctl_table trans_fs_table[] = {
  770 +static const struct trans_ctl_table trans_fs_table[] = {
771 771 { FS_NRINODE, "inode-nr" },
772 772 { FS_STATINODE, "inode-state" },
773 773 /* FS_MAXINODE unused */
774 774  
... ... @@ -793,11 +793,11 @@
793 793 {}
794 794 };
795 795  
796   -static struct trans_ctl_table trans_debug_table[] = {
  796 +static const struct trans_ctl_table trans_debug_table[] = {
797 797 {}
798 798 };
799 799  
800   -static struct trans_ctl_table trans_cdrom_table[] = {
  800 +static const struct trans_ctl_table trans_cdrom_table[] = {
801 801 { DEV_CDROM_INFO, "info" },
802 802 { DEV_CDROM_AUTOCLOSE, "autoclose" },
803 803 { DEV_CDROM_AUTOEJECT, "autoeject" },
804 804  
... ... @@ -807,12 +807,12 @@
807 807 {}
808 808 };
809 809  
810   -static struct trans_ctl_table trans_ipmi_table[] = {
  810 +static const struct trans_ctl_table trans_ipmi_table[] = {
811 811 { DEV_IPMI_POWEROFF_POWERCYCLE, "poweroff_powercycle" },
812 812 {}
813 813 };
814 814  
815   -static struct trans_ctl_table trans_mac_hid_files[] = {
  815 +static const struct trans_ctl_table trans_mac_hid_files[] = {
816 816 /* DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES unused */
817 817 /* DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES unused */
818 818 { DEV_MAC_HID_MOUSE_BUTTON_EMULATION, "mouse_button_emulation" },
819 819  
820 820  
821 821  
822 822  
823 823  
... ... @@ -822,35 +822,35 @@
822 822 {}
823 823 };
824 824  
825   -static struct trans_ctl_table trans_raid_table[] = {
  825 +static const struct trans_ctl_table trans_raid_table[] = {
826 826 { DEV_RAID_SPEED_LIMIT_MIN, "speed_limit_min" },
827 827 { DEV_RAID_SPEED_LIMIT_MAX, "speed_limit_max" },
828 828 {}
829 829 };
830 830  
831   -static struct trans_ctl_table trans_scsi_table[] = {
  831 +static const struct trans_ctl_table trans_scsi_table[] = {
832 832 { DEV_SCSI_LOGGING_LEVEL, "logging_level" },
833 833 {}
834 834 };
835 835  
836   -static struct trans_ctl_table trans_parport_default_table[] = {
  836 +static const struct trans_ctl_table trans_parport_default_table[] = {
837 837 { DEV_PARPORT_DEFAULT_TIMESLICE, "timeslice" },
838 838 { DEV_PARPORT_DEFAULT_SPINTIME, "spintime" },
839 839 {}
840 840 };
841 841  
842   -static struct trans_ctl_table trans_parport_device_table[] = {
  842 +static const struct trans_ctl_table trans_parport_device_table[] = {
843 843 { DEV_PARPORT_DEVICE_TIMESLICE, "timeslice" },
844 844 {}
845 845 };
846 846  
847   -static struct trans_ctl_table trans_parport_devices_table[] = {
  847 +static const struct trans_ctl_table trans_parport_devices_table[] = {
848 848 { DEV_PARPORT_DEVICES_ACTIVE, "active" },
849 849 { 0, NULL, trans_parport_device_table },
850 850 {}
851 851 };
852 852  
853   -static struct trans_ctl_table trans_parport_parport_table[] = {
  853 +static const struct trans_ctl_table trans_parport_parport_table[] = {
854 854 { DEV_PARPORT_SPINTIME, "spintime" },
855 855 { DEV_PARPORT_BASE_ADDR, "base-addr" },
856 856 { DEV_PARPORT_IRQ, "irq" },
857 857  
... ... @@ -864,13 +864,13 @@
864 864 { DEV_PARPORT_AUTOPROBE + 4, "autoprobe3" },
865 865 {}
866 866 };
867   -static struct trans_ctl_table trans_parport_table[] = {
  867 +static const struct trans_ctl_table trans_parport_table[] = {
868 868 { DEV_PARPORT_DEFAULT, "default", trans_parport_default_table },
869 869 { 0, NULL, trans_parport_parport_table },
870 870 {}
871 871 };
872 872  
873   -static struct trans_ctl_table trans_dev_table[] = {
  873 +static const struct trans_ctl_table trans_dev_table[] = {
874 874 { DEV_CDROM, "cdrom", trans_cdrom_table },
875 875 /* DEV_HWMON unused */
876 876 { DEV_PARPORT, "parport", trans_parport_table },
877 877  
878 878  
... ... @@ -881,19 +881,19 @@
881 881 {}
882 882 };
883 883  
884   -static struct trans_ctl_table trans_bus_isa_table[] = {
  884 +static const struct trans_ctl_table trans_bus_isa_table[] = {
885 885 { BUS_ISA_MEM_BASE, "membase" },
886 886 { BUS_ISA_PORT_BASE, "portbase" },
887 887 { BUS_ISA_PORT_SHIFT, "portshift" },
888 888 {}
889 889 };
890 890  
891   -static struct trans_ctl_table trans_bus_table[] = {
  891 +static const struct trans_ctl_table trans_bus_table[] = {
892 892 { CTL_BUS_ISA, "isa", trans_bus_isa_table },
893 893 {}
894 894 };
895 895  
896   -static struct trans_ctl_table trans_arlan_conf_table0[] = {
  896 +static const struct trans_ctl_table trans_arlan_conf_table0[] = {
897 897 { 1, "spreadingCode" },
898 898 { 2, "channelNumber" },
899 899 { 3, "scramblingDisable" },
... ... @@ -964,7 +964,7 @@
964 964 {}
965 965 };
966 966  
967   -static struct trans_ctl_table trans_arlan_conf_table1[] = {
  967 +static const struct trans_ctl_table trans_arlan_conf_table1[] = {
968 968 { 1, "spreadingCode" },
969 969 { 2, "channelNumber" },
970 970 { 3, "scramblingDisable" },
... ... @@ -1035,7 +1035,7 @@
1035 1035 {}
1036 1036 };
1037 1037  
1038   -static struct trans_ctl_table trans_arlan_conf_table2[] = {
  1038 +static const struct trans_ctl_table trans_arlan_conf_table2[] = {
1039 1039 { 1, "spreadingCode" },
1040 1040 { 2, "channelNumber" },
1041 1041 { 3, "scramblingDisable" },
... ... @@ -1106,7 +1106,7 @@
1106 1106 {}
1107 1107 };
1108 1108  
1109   -static struct trans_ctl_table trans_arlan_conf_table3[] = {
  1109 +static const struct trans_ctl_table trans_arlan_conf_table3[] = {
1110 1110 { 1, "spreadingCode" },
1111 1111 { 2, "channelNumber" },
1112 1112 { 3, "scramblingDisable" },
... ... @@ -1177,7 +1177,7 @@
1177 1177 {}
1178 1178 };
1179 1179  
1180   -static struct trans_ctl_table trans_arlan_table[] = {
  1180 +static const struct trans_ctl_table trans_arlan_table[] = {
1181 1181 { 1, "arlan0", trans_arlan_conf_table0 },
1182 1182 { 2, "arlan1", trans_arlan_conf_table1 },
1183 1183 { 3, "arlan2", trans_arlan_conf_table2 },
1184 1184  
... ... @@ -1185,13 +1185,13 @@
1185 1185 {}
1186 1186 };
1187 1187  
1188   -static struct trans_ctl_table trans_s390dbf_table[] = {
  1188 +static const struct trans_ctl_table trans_s390dbf_table[] = {
1189 1189 { 5678 /* CTL_S390DBF_STOPPABLE */, "debug_stoppable" },
1190 1190 { 5679 /* CTL_S390DBF_ACTIVE */, "debug_active" },
1191 1191 {}
1192 1192 };
1193 1193  
1194   -static struct trans_ctl_table trans_sunrpc_table[] = {
  1194 +static const struct trans_ctl_table trans_sunrpc_table[] = {
1195 1195 { CTL_RPCDEBUG, "rpc_debug" },
1196 1196 { CTL_NFSDEBUG, "nfs_debug" },
1197 1197 { CTL_NFSDDEBUG, "nfsd_debug" },
... ... @@ -1203,7 +1203,7 @@
1203 1203 {}
1204 1204 };
1205 1205  
1206   -static struct trans_ctl_table trans_pm_table[] = {
  1206 +static const struct trans_ctl_table trans_pm_table[] = {
1207 1207 { 1 /* CTL_PM_SUSPEND */, "suspend" },
1208 1208 { 2 /* CTL_PM_CMODE */, "cmode" },
1209 1209 { 3 /* CTL_PM_P0 */, "p0" },
1210 1210  
... ... @@ -1211,13 +1211,13 @@
1211 1211 {}
1212 1212 };
1213 1213  
1214   -static struct trans_ctl_table trans_frv_table[] = {
  1214 +static const struct trans_ctl_table trans_frv_table[] = {
1215 1215 { 1, "cache-mode" },
1216 1216 { 2, "pin-cxnr" },
1217 1217 {}
1218 1218 };
1219 1219  
1220   -static struct trans_ctl_table trans_root_table[] = {
  1220 +static const struct trans_ctl_table trans_root_table[] = {
1221 1221 { CTL_KERN, "kernel", trans_kern_table },
1222 1222 { CTL_VM, "vm", trans_vm_table },
1223 1223 { CTL_NET, "net", trans_net_table },
1224 1224  
1225 1225  
1226 1226  
... ... @@ -1261,15 +1261,14 @@
1261 1261 return table;
1262 1262 }
1263 1263  
1264   -static struct trans_ctl_table *sysctl_binary_lookup(struct ctl_table *table)
  1264 +static const struct trans_ctl_table *sysctl_binary_lookup(struct ctl_table *table)
1265 1265 {
1266 1266 struct ctl_table *test;
1267   - struct trans_ctl_table *ref;
1268   - int depth, cur_depth;
  1267 + const struct trans_ctl_table *ref;
  1268 + int cur_depth;
1269 1269  
1270   - depth = sysctl_depth(table);
  1270 + cur_depth = sysctl_depth(table);
1271 1271  
1272   - cur_depth = depth;
1273 1272 ref = trans_root_table;
1274 1273 repeat:
1275 1274 test = sysctl_parent(table, cur_depth);
... ... @@ -1437,7 +1436,7 @@
1437 1436  
1438 1437 static void sysctl_check_bin_path(struct ctl_table *table, const char **fail)
1439 1438 {
1440   - struct trans_ctl_table *ref;
  1439 + const struct trans_ctl_table *ref;
1441 1440  
1442 1441 ref = sysctl_binary_lookup(table);
1443 1442 if (table->ctl_name && !ref)