All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
	David Miller <davem@davemloft.net>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers/block/floppy.c: stylistic cleanups
Date: Tue, 1 Dec 2009 19:39:45 +0100	[thread overview]
Message-ID: <200912011939.45158.bzolnier@gmail.com> (raw)
In-Reply-To: <1259640820.13592.37.camel@Joe-Laptop.home>

On Tuesday 01 December 2009 05:13:40 am Joe Perches wrote:
> On Mon, 2009-11-30 at 09:28 -0800, Stephen Hemminger wrote:
> > Rather than playing with the dangling operator format which seems to be a coding
> > style that only David cares about. Why not go through and fix the really ugly old
> > drivers that need it. For a good horror experience, go look at the floppy driver.
> 
> Just for you Stephen, here's a cleaned up version.
> Now to see if it gets applied, which I rather doubt.


>  drivers/block/floppy.c | 1853 +++++++++++++++++++++++++++++++++---------------
>  1 files changed, 1279 insertions(+), 574 deletions(-)

+700 LOC for cleanup patch is a bit excessive, I like macro removals and other
improvements from your patch but the following change is an insanity:

>  /*
>   * this struct defines the different floppy drive types.
>   */
> -static struct {
> +struct drive_params {
>  	struct floppy_drive_params params;
>  	const char *name;	/* name printed while booting */
> -} default_drive_params[] = {
> -/* NOTE: the time values in jiffies should be in msec!
> - CMOS drive type
> -  |     Maximum data rate supported by drive type
> -  |     |   Head load time, msec
> -  |     |   |   Head unload time, msec (not used)
> -  |     |   |   |     Step rate interval, usec
> -  |     |   |   |     |       Time needed for spinup time (jiffies)
> -  |     |   |   |     |       |      Timeout for spinning down (jiffies)
> -  |     |   |   |     |       |      |   Spindown offset (where disk stops)
> -  |     |   |   |     |       |      |   |     Select delay
> -  |     |   |   |     |       |      |   |     |     RPS
> -  |     |   |   |     |       |      |   |     |     |    Max number of tracks
> -  |     |   |   |     |       |      |   |     |     |    |     Interrupt timeout
> -  |     |   |   |     |       |      |   |     |     |    |     |   Max nonintlv. sectors
> -  |     |   |   |     |       |      |   |     |     |    |     |   | -Max Errors- flags */
> -{{0,  500, 16, 16, 8000,    1*HZ, 3*HZ,  0, SEL_DLY, 5,  80, 3*HZ, 20, {3,1,2,0,2}, 0,
> -      0, { 7, 4, 8, 2, 1, 5, 3,10}, 3*HZ/2, 0 }, "unknown" },
> -
> -{{1,  300, 16, 16, 8000,    1*HZ, 3*HZ,  0, SEL_DLY, 5,  40, 3*HZ, 17, {3,1,2,0,2}, 0,
> -      0, { 1, 0, 0, 0, 0, 0, 0, 0}, 3*HZ/2, 1 }, "360K PC" }, /*5 1/4 360 KB PC*/
> -
> -{{2,  500, 16, 16, 6000, 4*HZ/10, 3*HZ, 14, SEL_DLY, 6,  83, 3*HZ, 17, {3,1,2,0,2}, 0,
> -      0, { 2, 5, 6,23,10,20,12, 0}, 3*HZ/2, 2 }, "1.2M" }, /*5 1/4 HD AT*/
> -
> -{{3,  250, 16, 16, 3000,    1*HZ, 3*HZ,  0, SEL_DLY, 5,  83, 3*HZ, 20, {3,1,2,0,2}, 0,
> -      0, { 4,22,21,30, 3, 0, 0, 0}, 3*HZ/2, 4 }, "720k" }, /*3 1/2 DD*/
> -
> -{{4,  500, 16, 16, 4000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 20, {3,1,2,0,2}, 0,
> -      0, { 7, 4,25,22,31,21,29,11}, 3*HZ/2, 7 }, "1.44M" }, /*3 1/2 HD*/
> -
> -{{5, 1000, 15,  8, 3000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 40, {3,1,2,0,2}, 0,
> -      0, { 7, 8, 4,25,28,22,31,21}, 3*HZ/2, 8 }, "2.88M AMI BIOS" }, /*3 1/2 ED*/
> -
> -{{6, 1000, 15,  8, 3000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 40, {3,1,2,0,2}, 0,
> -      0, { 7, 8, 4,25,28,22,31,21}, 3*HZ/2, 8 }, "2.88M" } /*3 1/2 ED*/
> -/*    |  --autodetected formats---    |      |      |
> - *    read_track                      |      |    Name printed when booting
> - *				      |     Native format
> - *	            Frequency of disk change checks */
> +};
> +
> +static struct drive_params default_drive_params[] = {
> +/* NOTE: the time values in jiffies should be in msec! */
> +	{
> +		.params = {
> +			.cmos = 0,
> +			.max_dtr = 500,
> +			.hlt = 16,
> +			.hut = 16,
> +			.srt = 8000,
> +			.spinup = 1 * HZ,
> +			.spindown = 3 * HZ,
> +			.spindown_offset = 0,
> +			.select_delay = SEL_DLY,
> +			.rps = 5,
> +			.tracks = 80,
> +			.timeout = 3 * HZ,
> +			.interleave_sect = 20,
> +			.max_errors = {
> +				.abort = 3,
> +				.read_track = 1,
> +				.reset = 2,
> +				.recal = 0,
> +				.reporting = 2
> +			},
> +			.flags = 0,
> +			.read_track = 0,
> +			.autodetect = {7, 4, 8, 2, 1, 5, 3, 10},
> +			.checkfreq = 3 * HZ / 2,
> +			.native_format = 0
> +		},
> +		.name = "unknown"
> +	},
> +
> +	{				/*5 1/4 360 KB PC */
> +		.params = {
> +			.cmos = 1,
> +			.max_dtr = 300,
> +			.hlt = 16,
> +			.hut = 16,
> +			.srt = 8000,
> +			.spinup = 1 * HZ,
> +			.spindown = 3 * HZ,
> +			.spindown_offset = 0,
> +			.select_delay = SEL_DLY,
> +			.rps = 5,
> +			.tracks = 40,
> +			.timeout = 3 * HZ,
> +			.interleave_sect = 17,
> +			.max_errors = {
> +				.abort = 3,
> +				.read_track = 1,
> +				.reset = 2,
> +				.recal = 0,
> +				.reporting = 2
> +			},
> +			.flags = 0,
> +			.read_track = 0,
> +			.autodetect = {1, 0, 0, 0, 0, 0, 0, 0},
> +			.checkfreq = 3 * HZ / 2,
> +			.native_format = 1
> +		},
> +		.name = "360K PC"
> +	},
> +
> +	{				/*5 1/4 HD AT */
> +		.params = {
> +			.cmos = 2,
> +			.max_dtr = 500,
> +			.hlt = 16,
> +			.hut = 16,
> +			.srt = 6000,
> +			.spinup = 4 * HZ / 10,
> +			.spindown = 3 * HZ,
> +			.spindown_offset = 14,
> +			.select_delay = SEL_DLY,
> +			.rps = 6,
> +			.tracks = 83,
> +			.timeout = 3 * HZ,
> +			.interleave_sect = 17,
> +			.max_errors = {
> +				.abort = 3,
> +				.read_track = 1,
> +				.reset = 2,
> +				.recal = 0,
> +				.reporting = 2
> +			},
> +			.flags = 0,
> +			.read_track = 0,
> +			.autodetect = {2, 5, 6, 23, 10, 20, 12, 0},
> +			.checkfreq = 3 * HZ / 2,
> +			.native_format = 2
> +		},
> +		.name = "1.2M"
> +	},
> +
> +	{				/*3 1/2 DD */
> +		.params = {
> +			.cmos = 3,
> +			.max_dtr = 250,
> +			.hlt = 16,
> +			.hut = 16,
> +			.srt = 3000,
> +			.spinup = 1 * HZ,
> +			.spindown = 3 * HZ,
> +			.spindown_offset = 0,
> +			.select_delay = SEL_DLY,
> +			.rps = 5,
> +			.tracks = 83,
> +			.timeout = 3 * HZ,
> +			.interleave_sect = 20,
> +			.max_errors = {
> +				.abort = 3,
> +				.read_track = 1,
> +				.reset = 2,
> +				.recal = 0,
> +				.reporting = 2
> +			},
> +			.flags = 0,
> +			.read_track = 0,
> +			.autodetect = {4, 22, 21, 30, 3, 0, 0, 0},
> +			.checkfreq = 3 * HZ / 2,
> +			.native_format = 4
> +		},
> +		.name = "720k"
> +	},
> +
> +	{				/*3 1/2 HD */
> +		.params = {
> +			.cmos = 4,
> +			.max_dtr = 500,
> +			.hlt = 16,
> +			.hut = 16,
> +			.srt = 4000,
> +			.spinup = 4 * HZ / 10,
> +			.spindown = 3 * HZ,
> +			.spindown_offset = 10,
> +			.select_delay = SEL_DLY,
> +			.rps = 5,
> +			.tracks = 83,
> +			.timeout = 3 * HZ,
> +			.interleave_sect = 20,
> +			.max_errors = {
> +				.abort = 3,
> +				.read_track = 1,
> +				.reset = 2,
> +				.recal = 0,
> +				.reporting = 2
> +			},
> +			.flags = 0,
> +			.read_track = 0,
> +			.autodetect = {7, 4, 25, 22, 31, 21, 29, 11},
> +			.checkfreq = 3 * HZ / 2,
> +			.native_format = 7
> +		},
> +		.name = "1.44M"
> +	},
> +
> +	{				/*3 1/2 ED */
> +		.params = {
> +			.cmos = 5,
> +			.max_dtr = 1000,
> +			.hlt = 15,
> +			.hut = 8,
> +			.srt = 3000,
> +			.spinup = 4 * HZ / 10,
> +			.spindown = 3 * HZ,
> +			.spindown_offset = 10,
> +			.select_delay = SEL_DLY,
> +			.rps = 5,
> +			.tracks = 83,
> +			.timeout = 3 * HZ,
> +			.interleave_sect = 40,
> +			.max_errors = {
> +				.abort = 3,
> +				.read_track = 1,
> +				.reset = 2,
> +				.recal = 0,
> +				.reporting = 2
> +			},
> +			.flags = 0,
> +			.read_track = 0,
> +			.autodetect = {7, 8, 4, 25, 28, 22, 31, 21},
> +			.checkfreq = 3 * HZ / 2,
> +			.native_format = 8
> +		},
> +		.name = "2.88M AMI BIOS"
> +	},
> +
> +	{				/*3 1/2 ED */
> +		.params = {
> +			.cmos = 6,
> +			.max_dtr = 1000,
> +			.hlt = 15,
> +			.hut = 8,
> +			.srt = 3000,
> +			.spinup = 4 * HZ / 10,
> +			.spindown = 3 * HZ,
> +			.spindown_offset = 10,
> +			.select_delay = SEL_DLY,
> +			.rps = 5,
> +			.tracks = 83,
> +			.timeout = 3 * HZ,
> +			.interleave_sect = 40,
> +			.max_errors = {
> +				.abort = 3,
> +				.read_track = 1,
> +				.reset = 2,
> +				.recal = 0,
> +				.reporting = 2
> +			},
> +			.flags = 0,
> +			.read_track = 0,
> +			.autodetect = {7, 8, 4, 25, 28, 22, 31, 21},
> +			.checkfreq = 3 * HZ / 2,
> +			.native_format = 8
> +		},
> +		.name = "2.88M"
> +	}
>  };
>  
>  static struct floppy_drive_params drive_params[N_DRIVE];
> @@ -434,52 +615,391 @@ static struct floppy_raw_cmd *raw_cmd, default_raw_cmd;
>   *
>   * Other parameters should be self-explanatory (see also setfdprm(8)).
>   */
> -/*
> -	    Size
> -	     |  Sectors per track
> -	     |  | Head
> -	     |  | |  Tracks
> -	     |  | |  | Stretch
> -	     |  | |  | |  Gap 1 size
> -	     |  | |  | |    |  Data rate, | 0x40 for perp
> -	     |  | |  | |    |    |  Spec1 (stepping rate, head unload
> -	     |  | |  | |    |    |    |    /fmt gap (gap2) */
> -static struct floppy_struct floppy_type[32] = {
> -	{    0, 0,0, 0,0,0x00,0x00,0x00,0x00,NULL    },	/*  0 no testing    */
> -	{  720, 9,2,40,0,0x2A,0x02,0xDF,0x50,"d360"  }, /*  1 360KB PC      */
> -	{ 2400,15,2,80,0,0x1B,0x00,0xDF,0x54,"h1200" },	/*  2 1.2MB AT      */
> -	{  720, 9,1,80,0,0x2A,0x02,0xDF,0x50,"D360"  },	/*  3 360KB SS 3.5" */
> -	{ 1440, 9,2,80,0,0x2A,0x02,0xDF,0x50,"D720"  },	/*  4 720KB 3.5"    */
> -	{  720, 9,2,40,1,0x23,0x01,0xDF,0x50,"h360"  },	/*  5 360KB AT      */
> -	{ 1440, 9,2,80,0,0x23,0x01,0xDF,0x50,"h720"  },	/*  6 720KB AT      */
> -	{ 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,"H1440" },	/*  7 1.44MB 3.5"   */
> -	{ 5760,36,2,80,0,0x1B,0x43,0xAF,0x54,"E2880" },	/*  8 2.88MB 3.5"   */
> -	{ 6240,39,2,80,0,0x1B,0x43,0xAF,0x28,"E3120" },	/*  9 3.12MB 3.5"   */
> -
> -	{ 2880,18,2,80,0,0x25,0x00,0xDF,0x02,"h1440" }, /* 10 1.44MB 5.25"  */
> -	{ 3360,21,2,80,0,0x1C,0x00,0xCF,0x0C,"H1680" }, /* 11 1.68MB 3.5"   */
> -	{  820,10,2,41,1,0x25,0x01,0xDF,0x2E,"h410"  },	/* 12 410KB 5.25"   */
> -	{ 1640,10,2,82,0,0x25,0x02,0xDF,0x2E,"H820"  },	/* 13 820KB 3.5"    */
> -	{ 2952,18,2,82,0,0x25,0x00,0xDF,0x02,"h1476" },	/* 14 1.48MB 5.25"  */
> -	{ 3444,21,2,82,0,0x25,0x00,0xDF,0x0C,"H1722" },	/* 15 1.72MB 3.5"   */
> -	{  840,10,2,42,1,0x25,0x01,0xDF,0x2E,"h420"  },	/* 16 420KB 5.25"   */
> -	{ 1660,10,2,83,0,0x25,0x02,0xDF,0x2E,"H830"  },	/* 17 830KB 3.5"    */
> -	{ 2988,18,2,83,0,0x25,0x00,0xDF,0x02,"h1494" },	/* 18 1.49MB 5.25"  */
> -	{ 3486,21,2,83,0,0x25,0x00,0xDF,0x0C,"H1743" }, /* 19 1.74 MB 3.5"  */
> -
> -	{ 1760,11,2,80,0,0x1C,0x09,0xCF,0x00,"h880"  }, /* 20 880KB 5.25"   */
> -	{ 2080,13,2,80,0,0x1C,0x01,0xCF,0x00,"D1040" }, /* 21 1.04MB 3.5"   */
> -	{ 2240,14,2,80,0,0x1C,0x19,0xCF,0x00,"D1120" }, /* 22 1.12MB 3.5"   */
> -	{ 3200,20,2,80,0,0x1C,0x20,0xCF,0x2C,"h1600" }, /* 23 1.6MB 5.25"   */
> -	{ 3520,22,2,80,0,0x1C,0x08,0xCF,0x2e,"H1760" }, /* 24 1.76MB 3.5"   */
> -	{ 3840,24,2,80,0,0x1C,0x20,0xCF,0x00,"H1920" }, /* 25 1.92MB 3.5"   */
> -	{ 6400,40,2,80,0,0x25,0x5B,0xCF,0x00,"E3200" }, /* 26 3.20MB 3.5"   */
> -	{ 7040,44,2,80,0,0x25,0x5B,0xCF,0x00,"E3520" }, /* 27 3.52MB 3.5"   */
> -	{ 7680,48,2,80,0,0x25,0x63,0xCF,0x00,"E3840" }, /* 28 3.84MB 3.5"   */
> -	{ 3680,23,2,80,0,0x1C,0x10,0xCF,0x00,"H1840" }, /* 29 1.84MB 3.5"   */
> -
> -	{ 1600,10,2,80,0,0x25,0x02,0xDF,0x2E,"D800"  },	/* 30 800KB 3.5"    */
> -	{ 3200,20,2,80,0,0x1C,0x00,0xCF,0x2C,"H1600" }, /* 31 1.6MB 3.5"    */
> + static struct floppy_struct floppy_type[32] = {
> +	 {
> +		 .size = 0,
> +		 .sect = 0,
> +		 .head = 0,
> +		 .track = 0,
> +		 .stretch = 0,
> +		 .gap = 0x00,
> +		 .rate = 0x00,
> +		 .spec1 = 0x00,
> +		 .fmt_gap = 0x00,
> +		 .name = NULL
> +	 },	/*  0 no testing    */
> +	 {
> +		 .size = 720,
> +		 .sect = 9,
> +		 .head = 2,
> +		 .track = 40,
> +		 .stretch = 0,
> +		 .gap = 0x2A,
> +		 .rate = 0x02,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x50,
> +		 .name = "d360"
> +	 },	/*  1 360KB PC      */
> +	 {
> +		 .size = 2400,
> +		 .sect = 15,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x1B,
> +		 .rate = 0x00,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x54,
> +		 .name = "h1200"
> +	 },	/*  2 1.2MB AT      */
> +	 {
> +		 .size = 720,
> +		 .sect = 9,
> +		 .head = 1,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x2A,
> +		 .rate = 0x02,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x50,
> +		 .name = "D360"
> +	 },	/*  3 360KB SS 3.5" */
> +	 {
> +		 .size = 1440,
> +		 .sect = 9,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x2A,
> +		 .rate = 0x02,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x50,
> +		 .name = "D720"
> +	 },	/*  4 720KB 3.5"    */
> +	 {
> +		 .size = 720,
> +		 .sect = 9,
> +		 .head = 2,
> +		 .track = 40,
> +		 .stretch = 1,
> +		 .gap = 0x23,
> +		 .rate = 0x01,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x50,
> +		 .name = "h360"
> +	 },	/*  5 360KB AT      */
> +	 {
> +		 .size = 1440,
> +		 .sect = 9,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x23,
> +		 .rate = 0x01,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x50,
> +		 .name = "h720"
> +	 },	/*  6 720KB AT      */
> +	 {
> +		 .size = 2880,
> +		 .sect = 18,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x1B,
> +		 .rate = 0x00,
> +		 .spec1 = 0xCF,
> +		 .fmt_gap = 0x6C,
> +		 .name = "H1440"
> +	 },	/*  7 1.44MB 3.5"   */
> +	 {
> +		 .size = 5760,
> +		 .sect = 36,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x1B,
> +		 .rate = 0x43,
> +		 .spec1 = 0xAF,
> +		 .fmt_gap = 0x54,
> +		 .name = "E2880"
> +	 },	/*  8 2.88MB 3.5"   */
> +	 {
> +		 .size = 6240,
> +		 .sect = 39,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x1B,
> +		 .rate = 0x43,
> +		 .spec1 = 0xAF,
> +		 .fmt_gap = 0x28,
> +		 .name = "E3120"
> +	 },	/*  9 3.12MB 3.5"   */
> +	 {
> +		 .size = 2880,
> +		 .sect = 18,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x25,
> +		 .rate = 0x00,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x02,
> +		 .name = "h1440"
> +	 },	/* 10 1.44MB 5.25"  */
> +	 {
> +		 .size = 3360,
> +		 .sect = 21,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x1C,
> +		 .rate = 0x00,
> +		 .spec1 = 0xCF,
> +		 .fmt_gap = 0x0C,
> +		 .name = "H1680"
> +	 },	/* 11 1.68MB 3.5"   */
> +	 {
> +		 .size = 820,
> +		 .sect = 10,
> +		 .head = 2,
> +		 .track = 41,
> +		 .stretch = 1,
> +		 .gap = 0x25,
> +		 .rate = 0x01,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x2E,
> +		 .name = "h410"
> +	 },	/* 12 410KB 5.25"   */
> +	 {
> +		 .size = 1640,
> +		 .sect = 10,
> +		 .head = 2,
> +		 .track = 82,
> +		 .stretch = 0,
> +		 .gap = 0x25,
> +		 .rate = 0x02,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x2E,
> +		 .name = "H820"
> +	 },	/* 13 820KB 3.5"    */
> +	 {
> +		 .size = 2952,
> +		 .sect = 18,
> +		 .head = 2,
> +		 .track = 82,
> +		 .stretch = 0,
> +		 .gap = 0x25,
> +		 .rate = 0x00,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x02,
> +		 .name = "h1476"
> +	 },	/* 14 1.48MB 5.25"  */
> +	 {
> +		 .size = 3444,
> +		 .sect = 21,
> +		 .head = 2,
> +		 .track = 82,
> +		 .stretch = 0,
> +		 .gap = 0x25,
> +		 .rate = 0x00,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x0C,
> +		 .name = "H1722"
> +	 },	/* 15 1.72MB 3.5"   */
> +	 {
> +		 .size = 840,
> +		 .sect = 10,
> +		 .head = 2,
> +		 .track = 42,
> +		 .stretch = 1,
> +		 .gap = 0x25,
> +		 .rate = 0x01,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x2E,
> +		 .name = "h420"
> +	 },	/* 16 420KB 5.25"   */
> +	 {
> +		 .size = 1660,
> +		 .sect = 10,
> +		 .head = 2,
> +		 .track = 83,
> +		 .stretch = 0,
> +		 .gap = 0x25,
> +		 .rate = 0x02,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x2E,
> +		 .name = "H830"
> +	 },	/* 17 830KB 3.5"    */
> +	 {
> +		 .size = 2988,
> +		 .sect = 18,
> +		 .head = 2,
> +		 .track = 83,
> +		 .stretch = 0,
> +		 .gap = 0x25,
> +		 .rate = 0x00,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x02,
> +		 .name = "h1494"
> +	 },	/* 18 1.49MB 5.25"  */
> +	 {
> +		 .size = 3486,
> +		 .sect = 21,
> +		 .head = 2,
> +		 .track = 83,
> +		 .stretch = 0,
> +		 .gap = 0x25,
> +		 .rate = 0x00,
> +		 .spec1 = 0xDF,
> +		 .fmt_gap = 0x0C,
> +		 .name = "H1743"
> +	 },	/* 19 1.74 MB 3.5"  */
> +	 {
> +		 .size = 1760,
> +		 .sect = 11,
> +		 .head = 2,
> +		 .track = 80,
> +		 .stretch = 0,
> +		 .gap = 0x1C,
> +		 .rate = 0x09,
> +		 .spec1 = 0xCF,
> +		 .fmt_gap = 0x00,
> +		 .name = "h880"
> +	},	/* 20 880KB 5.25"   */
> +	{
> +		.size = 2080,
> +		.sect = 13,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x1C,
> +		.rate = 0x01,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x00,
> +		.name = "D1040"
> +	},	/* 21 1.04MB 3.5"   */
> +	{
> +		.size = 2240,
> +		.sect = 14,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x1C,
> +		.rate = 0x19,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x00,
> +		.name = "D1120"
> +	},	/* 22 1.12MB 3.5"   */
> +	{
> +		.size = 3200,
> +		.sect = 20,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x1C,
> +		.rate = 0x20,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x2C,
> +		.name = "h1600"
> +	},	/* 23 1.6MB 5.25"   */
> +	{
> +		.size = 3520,
> +		.sect = 22,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x1C,
> +		.rate = 0x08,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x2e,
> +		.name = "H1760"
> +	},	/* 24 1.76MB 3.5"   */
> +	{
> +		.size = 3840,
> +		.sect = 24,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x1C,
> +		.rate = 0x20,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x00,
> +		.name = "H1920"
> +	},	/* 25 1.92MB 3.5"   */
> +	{
> +		.size = 6400,
> +		.sect = 40,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x25,
> +		.rate = 0x5B,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x00,
> +		.name = "E3200"
> +	},	/* 26 3.20MB 3.5"   */
> +	{
> +		.size = 7040,
> +		.sect = 44,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x25,
> +		.rate = 0x5B,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x00,
> +		.name = "E3520"
> +	},	/* 27 3.52MB 3.5"   */
> +	{
> +		.size = 7680,
> +		.sect = 48,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x25,
> +		.rate = 0x63,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x00,
> +		.name = "E3840"
> +	},	/* 28 3.84MB 3.5"   */
> +	{
> +		.size = 3680,
> +		.sect = 23,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x1C,
> +		.rate = 0x10,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x00,
> +		.name = "H1840"
> +	},	/* 29 1.84MB 3.5"   */
> +	{
> +		.size = 1600,
> +		.sect = 10,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x25,
> +		.rate = 0x02,
> +		.spec1 = 0xDF,
> +		.fmt_gap = 0x2E,
> +		.name = "D800"
> +	},	/* 30 800KB 3.5"    */
> +	{
> +		.size = 3200,
> +		.sect = 20,
> +		.head = 2,
> +		.track = 80,
> +		.stretch = 0,
> +		.gap = 0x1C,
> +		.rate = 0x00,
> +		.spec1 = 0xCF,
> +		.fmt_gap = 0x2C,
> +		.name = "H1600"
> +	},	/* 31 1.6MB 3.5"    */
>  };

The code was far more readable before the conversion and the usage
of C99 initializers is not mandatory.  Please drop it.

--
Bartlomiej Zolnierkiewicz

  parent reply	other threads:[~2009-12-01 18:41 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 14:04 [net-next-2.6 PATCH v7 0/7 RFC] TCPCT part 1: cookie option exchange William Allen Simpson
2009-11-20 14:12 ` [net-next-2.6 PATCH v7 1/7 RFC] TCPCT part 1a: add request_values parameter for sending SYNACK William Allen Simpson
2009-11-20 17:20   ` David Miller
2009-11-20 14:23 ` [net-next-2.6 PATCH v7 2/7 RFC] TCPCT part 1b: generate Responder Cookie secret William Allen Simpson
2009-11-20 17:22   ` David Miller
2009-11-20 20:47     ` Andi Kleen
2009-11-20 20:51       ` David Miller
2009-11-21 16:09         ` William Allen Simpson
2009-11-20 14:33 ` [net-next-2.6 PATCH v7 3/7 RFC] TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS William Allen Simpson
2009-11-20 17:24   ` David Miller
2009-11-21 16:51     ` William Allen Simpson
2009-11-21 19:18       ` David Miller
2009-11-21 19:22         ` David Miller
2009-11-22  4:40         ` William Allen Simpson
2009-11-20 14:38 ` [net-next-2.6 PATCH v7 4/7 RFC] TCPCT part 1d: define TCP cookie option, extend existing struct's William Allen Simpson
2009-11-20 17:25   ` David Miller
2009-11-22  4:53     ` William Allen Simpson
2009-11-20 14:48 ` [net-next-2.6 PATCH v7 5/7 RFC] TCPCT part 1e: implement socket option TCP_COOKIE_TRANSACTIONS William Allen Simpson
2009-11-20 17:26   ` David Miller
2009-11-20 20:54     ` Joe Perches
2009-11-22  6:25     ` William Allen Simpson
2009-11-22  7:10       ` Joe Perches
2009-11-23 11:16         ` William Allen Simpson
2009-11-23 17:25           ` Joe Perches
2009-11-23 17:49           ` David Miller
2009-11-23  0:31       ` David Miller
2009-11-23 18:28         ` [net-next-2.6 PATCH] net/ipv4: Move && and || to end of previous line Joe Perches
2009-11-23 18:31           ` David Miller
2009-11-23 18:38             ` Joe Perches
2009-11-23 18:41               ` David Miller
2009-11-29 21:00                 ` [PATCH net-next-2.6 PATCH] net: " Joe Perches
2009-11-30  0:55                   ` David Miller
2009-11-30 17:28                     ` Stephen Hemminger
2009-11-30 17:57                       ` Joe Perches
2009-11-30 21:00                       ` David Miller
2009-12-01  4:13                       ` [PATCH] drivers/block/floppy.c: stylistic cleanups Joe Perches
2009-12-01 16:45                         ` Stephen Hemminger
2009-12-01 19:09                           ` Bartlomiej Zolnierkiewicz
2009-12-01 17:36                         ` Marcin Slusarz
2009-12-01 17:46                           ` Joe Perches
2009-12-01 18:39                         ` Bartlomiej Zolnierkiewicz [this message]
2009-12-03 17:58                     ` [PATCH net-next-2.6] drivers/net: Move && and || to end of previous line Joe Perches
2009-12-03 20:40                       ` David Miller
2009-12-04 13:10                       ` Brice Goglin
2009-12-04 17:21                         ` Joe Perches
2009-12-05 12:43                           ` William Allen Simpson
2009-12-05 17:50                             ` Joe Perches
2009-12-05 22:05                               ` Jarek Poplawski
2009-12-06  3:36                               ` William Allen Simpson
2009-12-05 22:21                             ` David Miller
2009-12-06  3:00                               ` William Allen Simpson
2009-12-06 17:01                                 ` Jonathan Corbet
2009-12-04 22:42                         ` David Miller
2009-11-23 22:08           ` [net-next-2.6 PATCH] net/ipv4: " Ilpo Järvinen
2009-11-23 22:14             ` Joe Perches
2009-11-23 22:32               ` Ilpo Järvinen
2009-11-23 18:58         ` [net-next-2.6 PATCH] net/ipv6: " Joe Perches
2009-11-24 22:53           ` David Miller
2009-11-23 19:49         ` [net-next-2.6 PATCH] net/ipv[46]/netfilter: " Joe Perches
2009-11-23 22:20           ` Patrick McHardy
2009-11-20 14:55 ` [net-next-2.6 PATCH v7 6/7 RFC] TCPCT part 1f: Initiator Cookie => Responder William Allen Simpson
2009-11-20 17:29   ` David Miller
2009-11-20 15:06 ` [net-next-2.6 PATCH v7 7/7 RFC] TCPCT part 1g: Responder Cookie => Initiator William Allen Simpson
2009-11-20 17:31   ` David Miller

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=200912011939.45158.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.