[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/10] Use `unsigned char *' for byte buffers
From: |
Guillem Jover |
Subject: |
[PATCH 08/10] Use `unsigned char *' for byte buffers |
Date: |
Thu, 17 Dec 2009 14:39:28 +0100 |
* linux/src/drivers/net/apricot.c (struct i596_tbd): Change `data'
member type to `unsigned char *'.
(struct i596_rfd): Change `data' member type to `unsigned char'.
(print_eth): Change argument type to `unsigned char'. Remove
unneeded casts.
(set_multicast_list): Change cast for print_eth to `unsigned char *'.
---
linux/src/drivers/net/apricot.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/linux/src/drivers/net/apricot.c b/linux/src/drivers/net/apricot.c
index 0799f62..d106e50 100644
--- a/linux/src/drivers/net/apricot.c
+++ b/linux/src/drivers/net/apricot.c
@@ -98,7 +98,7 @@ struct i596_tbd {
unsigned short size;
unsigned short pad;
struct i596_tbd *next;
- char *data;
+ unsigned char *data;
};
struct tx_cmd {
@@ -115,7 +115,7 @@ struct i596_rfd {
long rbd;
unsigned short count;
unsigned short size;
- char data[1532];
+ unsigned char data[1532];
};
#define RX_RING_SIZE 8
@@ -187,7 +187,7 @@ static void i596_interrupt(int irq, void *dev_id, struct
pt_regs *regs);
static int i596_close(struct device *dev);
static struct enet_statistics *i596_get_stats(struct device *dev);
static void i596_add_cmd(struct device *dev, struct i596_cmd *cmd);
-static void print_eth(char *);
+static void print_eth(unsigned char *);
static void set_multicast_list(struct device *dev);
@@ -659,20 +659,20 @@ i596_start_xmit(struct sk_buff *skb, struct device *dev)
}
-static void print_eth(char *add)
+static void print_eth(unsigned char *add)
{
int i;
printk ("Dest ");
for (i = 0; i < 6; i++)
- printk(" %2.2X", (unsigned char)add[i]);
+ printk(" %2.2X", add[i]);
printk ("\n");
printk ("Source");
for (i = 0; i < 6; i++)
- printk(" %2.2X", (unsigned char)add[i+6]);
+ printk(" %2.2X", add[i+6]);
printk ("\n");
- printk ("type %2.2X%2.2X\n", (unsigned char)add[12], (unsigned
char)add[13]);
+ printk ("type %2.2X%2.2X\n", add[12], add[13]);
}
int apricot_probe(struct device *dev)
@@ -980,7 +980,7 @@ static void set_multicast_list(struct device *dev)
memcpy(cp, dmi,6);
cp+=6;
}
- print_eth (((char *)(cmd + 1)) + 2);
+ print_eth (((unsigned char *)(cmd + 1)) + 2);
i596_add_cmd(dev, cmd);
}
else
--
1.6.5.4
- [PATCH 00/10] Warnings cleanup to make way for amd64 porting, Guillem Jover, 2009/12/17
- [PATCH 01/10] Use explicit type int when defining register variables, Guillem Jover, 2009/12/17
- [PATCH 02/10] Match function types with `struct tty' member functions, Guillem Jover, 2009/12/17
- [PATCH 05/10] Interrupt handlers do not return any value, Guillem Jover, 2009/12/17
- [PATCH 08/10] Use `unsigned char *' for byte buffers,
Guillem Jover <=
- [PATCH 07/10] Mark macro arguments as used, Guillem Jover, 2009/12/17
- [PATCH 06/10] Missing `*' in assembler indirect lcall, Guillem Jover, 2009/12/17
- [PATCH 04/10] Use selector definitions from Mach for Linux code, Guillem Jover, 2009/12/17
- [PATCH 03/10] Move linux/dev/include/asm-i386/segment.h to src tree, Guillem Jover, 2009/12/17
- [PATCH 09/10] Add missing function prototypes, Guillem Jover, 2009/12/17
- [PATCH 10/10] Add missing casts, Guillem Jover, 2009/12/17
- Re: [PATCH 00/10] Warnings cleanup to make way for amd64 porting, Samuel Thibault, 2009/12/17