From: Art Haas <ahaas@airmail.net>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] C99 initializers for drivers/md/md.c
Date: Sat, 15 Feb 2003 14:40:44 -0600 [thread overview]
Message-ID: <20030215204044.GD20146@debian> (raw)
Hi.
This patch converts the file to use C99 initializers to improve
readabillity and remove warnings if '-W' is used.
Art Haas
===== drivers/md/md.c 1.135 vs edited =====
--- 1.135/drivers/md/md.c Tue Feb 11 16:57:51 2003
+++ edited/drivers/md/md.c Sat Feb 15 13:20:13 2003
@@ -83,21 +83,45 @@
static struct ctl_table_header *raid_table_header;
static ctl_table raid_table[] = {
- {DEV_RAID_SPEED_LIMIT_MIN, "speed_limit_min",
- &sysctl_speed_limit_min, sizeof(int), 0644, NULL, &proc_dointvec},
- {DEV_RAID_SPEED_LIMIT_MAX, "speed_limit_max",
- &sysctl_speed_limit_max, sizeof(int), 0644, NULL, &proc_dointvec},
- {0}
+ {
+ .ctl_name = DEV_RAID_SPEED_LIMIT_MIN,
+ .procname = "speed_limit_min",
+ .data = &sysctl_speed_limit_min,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = DEV_RAID_SPEED_LIMIT_MAX,
+ .procname = "speed_limit_max",
+ .data = &sysctl_speed_limit_max,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ { .ctl_name = 0 }
};
static ctl_table raid_dir_table[] = {
- {DEV_RAID, "raid", NULL, 0, 0555, raid_table},
- {0}
+ {
+ .ctl_name = DEV_RAID,
+ .procname = "raid",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = raid_table,
+ },
+ { .ctl_name = 0 }
};
static ctl_table raid_root_table[] = {
- {CTL_DEV, "dev", NULL, 0, 0555, raid_dir_table},
- {0}
+ {
+ .ctl_name = CTL_DEV,
+ .procname = "dev",
+ .maxlen = 0,
+ .mode = 0555,
+ .proc_handler = raid_dir_table,
+ },
+ { .ctl_name = 0 }
};
static void md_recover_arrays(void);
--
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
-- Benjamin Franklin, Historical Review of Pennsylvania, 1759
reply other threads:[~2003-02-15 20:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030215204044.GD20146@debian \
--to=ahaas@airmail.net \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox