Minor style(9) fixes for U-Boot API glue.

This commit is contained in:
Rafal Jaworowski 2008-10-04 13:19:15 +00:00
parent 4c0a9db94a
commit 0258b0bc1b
4 changed files with 23 additions and 25 deletions

View File

@ -118,7 +118,7 @@ struct sys_info {
#undef CFG_64BIT_LBA
#ifdef CFG_64BIT_LBA
typedef u_int64_t lbasize_t;
typedef uint64_t lbasize_t;
#else
typedef unsigned long lbasize_t;
#endif

View File

@ -477,7 +477,7 @@ char *
ub_mem_type(int flags)
{
switch(flags & 0x000F) {
switch (flags & 0x000F) {
case MR_ATTR_FLASH:
return ("FLASH");
case MR_ATTR_DRAM:

View File

@ -53,8 +53,8 @@ int api_search_sig(struct api_signature **sig);
/* console */
int ub_getc(void);
int ub_tstc(void);
void ub_putc(char c);
void ub_puts(const char *s);
void ub_putc(char);
void ub_puts(const char *);
/* system */
void ub_reset(void);
@ -65,19 +65,18 @@ void ub_udelay(unsigned long);
unsigned long ub_get_timer(unsigned long);
/* env vars */
char *ub_env_get(const char *name);
void ub_env_set(const char *name, char *value);
const char *ub_env_enum(const char *last);
char *ub_env_get(const char *);
void ub_env_set(const char *, char *);
const char *ub_env_enum(const char *);
/* devices */
int ub_dev_enum(void);
int ub_dev_open(int handle);
int ub_dev_close(int handle);
int ub_dev_read(int handle, void *buf, lbasize_t len, lbastart_t start,
lbasize_t *rlen);
int ub_dev_send(int handle, void *buf, int len);
int ub_dev_recv(int handle, void *buf, int len, int *rlen);
struct device_info * ub_dev_get(int);
int ub_dev_open(int);
int ub_dev_close(int);
int ub_dev_read(int, void *, lbasize_t, lbastart_t, lbasize_t *);
int ub_dev_send(int, void *, int);
int ub_dev_recv(int, void *, int, int *);
struct device_info *ub_dev_get(int);
void ub_dump_di(int);
void ub_dump_si(struct sys_info *);

View File

@ -59,8 +59,8 @@ static int net_get(struct iodesc *, void *, size_t, time_t);
static int net_put(struct iodesc *, void *, size_t);
static void net_end(struct netif *);
extern int devs_no;
extern struct netif_stats net_stats[];
extern int devs_no;
extern struct netif_stats net_stats[];
struct netif_dif net_ifs[] = {
/* dif_unit dif_nsel dif_stats dif_private */
@ -82,10 +82,10 @@ struct netif_driver uboot_net = {
};
struct uboot_softc {
u_int32_t sc_pad;
u_int8_t sc_rxbuf[ETHER_MAX_LEN];
u_int8_t sc_txbuf[ETHER_MAX_LEN + PKTALIGN];
u_int8_t *sc_txbufp;
uint32_t sc_pad;
uint8_t sc_rxbuf[ETHER_MAX_LEN];
uint8_t sc_txbuf[ETHER_MAX_LEN + PKTALIGN];
uint8_t *sc_txbufp;
int sc_handle; /* device handle for ub_dev_xxx */
};
@ -170,10 +170,10 @@ net_put(struct iodesc *desc, void *pkt, size_t len)
static int
net_get(struct iodesc *desc, void *pkt, size_t len, time_t timeout)
{
struct netif *nif = desc->io_netif;
struct uboot_softc *sc = nif->nif_devdata;
time_t t;
int err, rlen;
struct netif *nif = desc->io_netif;
struct uboot_softc *sc = nif->nif_devdata;
time_t t;
int err, rlen;
#if defined(NETIF_DEBUG)
printf("net_get: pkt %x, len %d, timeout %d\n", pkt, len, timeout);
@ -241,7 +241,6 @@ net_init(struct iodesc *desc, void *machdep_hint)
(unsigned long)sc->sc_txbufp % PKTALIGN;
}
static void
net_end(struct netif *nif)
{