* [PATCH] C99 initializers for drivers/mtd/devices
@ 2003-04-22 15:56 Art Haas
2003-04-22 19:03 ` Jörn Engel
0 siblings, 1 reply; 5+ messages in thread
From: Art Haas @ 2003-04-22 15:56 UTC (permalink / raw)
To: linux-kernel, Simon Evans, Abraham vd Merwe, linux-mtd; +Cc: Linus Torvalds
Hi.
Here are two trivial patches adding C99 initializers to the files. The
patches are against the current BK.
Art Haas
===== drivers/mtd/devices/blkmtd.c 1.29 vs edited =====
--- 1.29/drivers/mtd/devices/blkmtd.c Sun Mar 23 00:14:13 2003
+++ edited/drivers/mtd/devices/blkmtd.c Mon Mar 24 11:44:57 2003
@@ -287,12 +287,9 @@
return 0;
}
-
static struct address_space_operations blkmtd_aops = {
- writepage: blkmtd_writepage,
- readpage: NULL,
+ .writepage = blkmtd_writepage,
};
-
/* This is the kernel thread that empties the write queue to disk */
static int write_queue_task(void *data)
===== drivers/mtd/devices/lart.c 1.1 vs edited =====
--- 1.1/drivers/mtd/devices/lart.c Tue Feb 5 14:20:55 2002
+++ edited/drivers/mtd/devices/lart.c Mon Mar 3 12:21:44 2003
@@ -584,46 +584,41 @@
static struct mtd_info mtd;
-static struct mtd_erase_region_info erase_regions[] =
-{
- /* parameter blocks */
- {
- offset: 0x00000000,
- erasesize: FLASH_BLOCKSIZE_PARAM,
- numblocks: FLASH_NUMBLOCKS_16m_PARAM
- },
- /* main blocks */
- {
- offset: FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM,
- erasesize: FLASH_BLOCKSIZE_MAIN,
- numblocks: FLASH_NUMBLOCKS_16m_MAIN
- }
+static struct mtd_erase_region_info erase_regions[] = {
+ /* parameter blocks */
+ {
+ .offset = 0x00000000,
+ .erasesize = FLASH_BLOCKSIZE_PARAM,
+ .numblocks = FLASH_NUMBLOCKS_16m_PARAM,
+ },
+ /* main blocks */
+ {
+ .offset = FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM,
+ .erasesize = FLASH_BLOCKSIZE_MAIN,
+ .numblocks = FLASH_NUMBLOCKS_16m_MAIN,
+ }
};
#ifdef HAVE_PARTITIONS
-static struct mtd_partition lart_partitions[] =
-{
- /* blob */
- {
- name: "blob",
- offset: BLOB_START,
- size: BLOB_LEN,
- mask_flags: 0
- },
- /* kernel */
- {
- name: "kernel",
- offset: KERNEL_START, /* MTDPART_OFS_APPEND */
- size: KERNEL_LEN,
- mask_flags: 0
- },
- /* initial ramdisk / file system */
- {
- name: "file system",
- offset: INITRD_START, /* MTDPART_OFS_APPEND */
- size: INITRD_LEN, /* MTDPART_SIZ_FULL */
- mask_flags: 0
- }
+static struct mtd_partition lart_partitions[] = {
+ /* blob */
+ {
+ .name = "blob",
+ .offset = BLOB_START,
+ .size = BLOB_LEN,
+ },
+ /* kernel */
+ {
+ .name = "kernel",
+ .offset = KERNEL_START, /* MTDPART_OFS_APPEND */
+ .size = KERNEL_LEN,
+ },
+ /* initial ramdisk / file system */
+ {
+ .name = "file system",
+ .offset = INITRD_START, /* MTDPART_OFS_APPEND */
+ .size = INITRD_LEN, /* MTDPART_SIZ_FULL */
+ }
};
#endif
--
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] C99 initializers for drivers/mtd/devices
2003-04-22 15:56 [PATCH] C99 initializers for drivers/mtd/devices Art Haas
@ 2003-04-22 19:03 ` Jörn Engel
2003-04-22 19:18 ` Art Haas
2003-04-22 19:25 ` Art Haas
0 siblings, 2 replies; 5+ messages in thread
From: Jörn Engel @ 2003-04-22 19:03 UTC (permalink / raw)
To: Art Haas
Cc: Simon Evans, Abraham vd Merwe, Linus Torvalds, linux-mtd,
David Woodhouse, linux-kernel
On Tue, 22 April 2003 10:56:53 -0500, Art Haas wrote:
>
> Here are two trivial patches adding C99 initializers to the files. The
> patches are against the current BK.
IIRC, you sent four patches for mtd some time ago, but only two of
those applied cleanly to the infradead cvs. The following thread ended
quickly.
Anyway, David, Art, maybe you should discuss this one.
David, do you want to have patches against cvs and feed them to Linus
the next round? Or would you prefer to pull the changes from Linus, so
this should be applied as is?
Art, would you be willing to provide a patch against mtd cvs, in case
David prefers that one? Use either cvs:
cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs login (password: anoncvs)
cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs co mtd
or the dayly ftp snapshot:
ftp://ftp.uk.linux.org/pub/people/dwmw2/mtd/cvs/
Jörn
--
Victory in war is not repetitious.
-- Sun Tzu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] C99 initializers for drivers/mtd/devices
2003-04-22 19:03 ` Jörn Engel
@ 2003-04-22 19:18 ` Art Haas
2003-04-22 19:25 ` Art Haas
1 sibling, 0 replies; 5+ messages in thread
From: Art Haas @ 2003-04-22 19:18 UTC (permalink / raw)
To: J?rn Engel; +Cc: linux-mtd
On Tue, Apr 22, 2003 at 09:03:24PM +0200, J?rn Engel wrote:
> On Tue, 22 April 2003 10:56:53 -0500, Art Haas wrote:
> >
> > Here are two trivial patches adding C99 initializers to the files. The
> > patches are against the current BK.
>
> Art, would you be willing to provide a patch against mtd cvs, in case
> David prefers that one? Use either cvs:
> cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs login (password: anoncvs)
> cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs co mtd
> or the dayly ftp snapshot:
> ftp://ftp.uk.linux.org/pub/people/dwmw2/mtd/cvs/
I'm grabbing the cvs code now. Sorry I didn't follow up on the earlier
threads - I should have grabbed the cvs code then.
Art Haas
--
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] C99 initializers for drivers/mtd/devices
2003-04-22 19:03 ` Jörn Engel
2003-04-22 19:18 ` Art Haas
@ 2003-04-22 19:25 ` Art Haas
2003-04-22 20:13 ` Jörn Engel
1 sibling, 1 reply; 5+ messages in thread
From: Art Haas @ 2003-04-22 19:25 UTC (permalink / raw)
To: linux-mtd
Here's a patch against the CVS lart.c to convert it to C99. The
'blkmtd.c' file from CVS doesn't match the file I generated the C99
patch for that was in the kernel.
Art Haas
Index: drivers/mtd/devices/lart.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/lart.c,v
retrieving revision 1.2
diff -u -u -r1.2 lart.c
--- drivers/mtd/devices/lart.c 2 Oct 2001 15:05:13 -0000 1.2
+++ drivers/mtd/devices/lart.c 22 Apr 2003 19:23:43 -0000
@@ -584,46 +584,41 @@
static struct mtd_info mtd;
-static struct mtd_erase_region_info erase_regions[] =
-{
- /* parameter blocks */
- {
- offset: 0x00000000,
- erasesize: FLASH_BLOCKSIZE_PARAM,
- numblocks: FLASH_NUMBLOCKS_16m_PARAM
- },
- /* main blocks */
- {
- offset: FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM,
- erasesize: FLASH_BLOCKSIZE_MAIN,
- numblocks: FLASH_NUMBLOCKS_16m_MAIN
- }
+static struct mtd_erase_region_info erase_regions[] = {
+ /* parameter blocks */
+ {
+ .offset = 0x00000000,
+ .erasesize = FLASH_BLOCKSIZE_PARAM,
+ .numblocks = FLASH_NUMBLOCKS_16m_PARAM,
+ },
+ /* main blocks */
+ {
+ .offset = FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM,
+ .erasesize = FLASH_BLOCKSIZE_MAIN,
+ .numblocks = FLASH_NUMBLOCKS_16m_MAIN,
+ }
};
#ifdef HAVE_PARTITIONS
-static struct mtd_partition lart_partitions[] =
-{
- /* blob */
- {
- name: "blob",
- offset: BLOB_START,
- size: BLOB_LEN,
- mask_flags: 0
- },
- /* kernel */
- {
- name: "kernel",
- offset: KERNEL_START, /* MTDPART_OFS_APPEND */
- size: KERNEL_LEN,
- mask_flags: 0
- },
- /* initial ramdisk / file system */
- {
- name: "file system",
- offset: INITRD_START, /* MTDPART_OFS_APPEND */
- size: INITRD_LEN, /* MTDPART_SIZ_FULL */
- mask_flags: 0
- }
+static struct mtd_partition lart_partitions[] = {
+ /* blob */
+ {
+ .name = "blob",
+ .offset = BLOB_START,
+ .size = BLOB_LEN,
+ },
+ /* kernel */
+ {
+ .name = "kernel",
+ .offset = KERNEL_START, /* MTDPART_OFS_APPEND */
+ .size = KERNEL_LEN,
+ },
+ /* initial ramdisk / file system */
+ {
+ .name = "file system",
+ .offset = INITRD_START, /* MTDPART_OFS_APPEND */
+ .size = INITRD_LEN, /* MTDPART_SIZ_FULL */
+ }
};
#endif
--
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] C99 initializers for drivers/mtd/devices
2003-04-22 19:25 ` Art Haas
@ 2003-04-22 20:13 ` Jörn Engel
0 siblings, 0 replies; 5+ messages in thread
From: Jörn Engel @ 2003-04-22 20:13 UTC (permalink / raw)
To: Art Haas; +Cc: linux-mtd
On Tue, 22 April 2003 14:25:29 -0500, Art Haas wrote:
>
> Here's a patch against the CVS lart.c to convert it to C99. The
> 'blkmtd.c' file from CVS doesn't match the file I generated the C99
> patch for that was in the kernel.
Committed, thanks!
Jörn
--
Fantasy is more important than knowlegde. Knowlegde is limited,
while fantasy embraces the whole world.
-- Albert Einstein
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-04-22 20:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-22 15:56 [PATCH] C99 initializers for drivers/mtd/devices Art Haas
2003-04-22 19:03 ` Jörn Engel
2003-04-22 19:18 ` Art Haas
2003-04-22 19:25 ` Art Haas
2003-04-22 20:13 ` Jörn Engel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox