lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1360708860-23466-7-git-send-email-linus.walleij@linaro.org>
Date:	Tue, 12 Feb 2013 23:40:56 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	linux-kernel@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH 5/9] block: xd: avoid using typedefs

Two of the structs in the driver were using typedef, which we
avoid since ages in the kernel.

Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
 drivers/block/xd.c | 12 ++++++------
 drivers/block/xd.h | 10 +++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/block/xd.c b/drivers/block/xd.c
index 18f51e9..9e00753 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -77,7 +77,7 @@ static int xd[5] = { -1,-1,-1,-1, };
  * (ST11M controller) or resetting a controller (WD) appears
  */
 
-static XD_INFO xd_info[XD_MAXDRIVES];
+static struct xd_info xd_info[XD_MAXDRIVES];
 
 /*
  * If you try this driver and find that your card is not detected by the
@@ -121,7 +121,7 @@ static XD_INFO xd_info[XD_MAXDRIVES];
 #define xd_dma_mem_free(addr, size) free_pages(addr, get_order(size))
 static char *xd_dma_buffer;
 
-static XD_SIGNATURE xd_sigs[] __initdata = {
+static struct xd_signature xd_sigs[] __initdata = {
 	{ 0x0000,"Override geometry handler",NULL,xd_override_init_drive,"n unknown" }, /* Pat Mackinlay, pat@...com.au */
 	{ 0x0008,"[BXD06 (C) DTC 17-MAY-1985]",xd_dtc_init_controller,xd_dtc5150cx_init_drive," DTC 5150CX" }, /* Andrzej Krzysztofowicz, ankry@....pg.gda.pl */
 	{ 0x000B,"CRD18A   Not an IBM rom. (C) Copyright Data Technology Corp. 05/31/88",xd_dtc_init_controller,xd_dtc_init_drive," DTC 5150X" }, /* Todd Fries, tfries@....edu */
@@ -235,7 +235,7 @@ static int __init xd_init(void)
 		goto out3;
 
 	for (i = 0; i < xd_drives; i++) {
-		XD_INFO *p = &xd_info[i];
+		struct xd_info *p = &xd_info[i];
 		struct gendisk *disk = alloc_disk(64);
 		if (!disk)
 			goto Enomem;
@@ -339,7 +339,7 @@ static void do_xd_request(struct request_queue * q)
 	while (req) {
 		unsigned block = blk_rq_pos(req);
 		unsigned count = blk_rq_cur_sectors(req);
-		XD_INFO *disk = req->rq_disk->private_data;
+		struct xd_info *disk = req->rq_disk->private_data;
 		int res = 0;
 		int retry;
 
@@ -365,7 +365,7 @@ static void do_xd_request(struct request_queue * q)
 
 static int xd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
 {
-	XD_INFO *p = bdev->bd_disk->private_data;
+	struct xd_info *p = bdev->bd_disk->private_data;
 
 	geo->heads = p->heads;
 	geo->sectors = p->sectors;
@@ -416,7 +416,7 @@ static int xd_ioctl(struct block_device *bdev, fmode_t mode,
 }
 
 /* xd_readwrite: handle a read/write request */
-static int xd_readwrite(u_char operation, XD_INFO *p, char *buffer,
+static int xd_readwrite(u_char operation, struct xd_info *p, char *buffer,
 			u_int block, u_int count)
 {
 	int drive = p->unit;
diff --git a/drivers/block/xd.h b/drivers/block/xd.h
index 489e1ce..40630db 100644
--- a/drivers/block/xd.h
+++ b/drivers/block/xd.h
@@ -81,22 +81,22 @@
 #endif /* DEBUG */
 
 /* this structure defines the XT drives and their types */
-typedef struct {
+struct xd_info {
 	u_char heads;
 	u_short cylinders;
 	u_char sectors;
 	u_char control;
 	int unit;
-} XD_INFO;
+};
 
 /* this structure defines a ROM BIOS signature */
-typedef struct {
+struct xd_signature {
 	unsigned int offset;
 	const char *string;
 	void (*init_controller)(unsigned int address);
 	void (*init_drive)(u_char drive);
 	const char *name;
-} XD_SIGNATURE;
+};
 
 #ifndef MODULE
 static int xd_manual_geo_init (char *command);
@@ -106,7 +106,7 @@ static u_char xd_initdrives (void (*init_drive)(u_char drive));
 
 static void do_xd_request (struct request_queue * q);
 static int xd_ioctl (struct block_device *bdev,fmode_t mode,unsigned int cmd,unsigned long arg);
-static int xd_readwrite (u_char operation,XD_INFO *disk,char *buffer,u_int block,u_int count);
+static int xd_readwrite (u_char operation, struct xd_info *disk,char *buffer,u_int block,u_int count);
 static void xd_recalibrate (u_char drive);
 
 static irqreturn_t xd_interrupt_handler(int irq, void *dev_id);
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ