sbni: clean up empty lines in .c and .h files

This commit is contained in:
Mateusz Guzik 2020-09-01 21:54:35 +00:00
parent fe81abdeb4
commit 1683952de1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365159
5 changed files with 3 additions and 39 deletions

View File

@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
*
* Written with reference to NE2000 driver developed by David Greenman.
*/
#include <sys/param.h>
#include <sys/bus.h>
@ -169,7 +168,6 @@ sbni_outsb(struct sbni_softc *sc, u_char *from, u_int len)
sc->io_off + DAT, from, len);
}
/*
Valid combinations in CSR0 (for probing):
@ -195,7 +193,6 @@ sbni_outsb(struct sbni_softc *sc, u_char *from, u_int len)
#define VALID_DECODER (2 + 8 + 0x10 + 0x20 + 0x80 + 0x100 + 0x200)
int
sbni_probe(struct sbni_softc *sc)
{
@ -214,7 +211,6 @@ sbni_probe(struct sbni_softc *sc)
return (ENXIO);
}
/*
* Install interface into kernel networking data structures
*/
@ -341,7 +337,6 @@ sbni_start_locked(struct ifnet *ifp)
prepare_to_send(sc);
}
static void
sbni_stop(struct sbni_softc *sc)
{
@ -402,7 +397,6 @@ sbni_intr(void *arg)
} while (repeat);
}
static void
handle_channel(struct sbni_softc *sc)
{
@ -442,7 +436,6 @@ handle_channel(struct sbni_softc *sc)
sbni_outb(sc, CSR0, sbni_inb(sc, CSR0) | EN_INT);
}
/*
* Routine returns 1 if it need to acknoweledge received frame.
* Empty frame received without errors won't be acknoweledged.
@ -482,7 +475,6 @@ recv_frame(struct sbni_softc *sc)
return (!frame_ok || framelen > 4);
}
static void
send_frame(struct sbni_softc *sc)
{
@ -491,7 +483,6 @@ send_frame(struct sbni_softc *sc)
crc = CRC32_INITIAL;
if (sc->state & FL_NEED_RESEND) {
/* if frame was sended but not ACK'ed - resend it */
if (sc->trans_errors) {
sc->trans_errors--;
@ -512,7 +503,6 @@ send_frame(struct sbni_softc *sc)
* frame sended then in prepare_to_send next frame
*/
if (sc->framelen) {
download_data(sc, &crc);
sc->in_stats.all_tx_number++;
@ -531,7 +521,6 @@ send_frame(struct sbni_softc *sc)
}
}
static void
download_data(struct sbni_softc *sc, u_int32_t *crc_p)
{
@ -588,7 +577,6 @@ download_data(struct sbni_softc *sc, u_int32_t *crc_p)
} while (pos < sc->framelen);
}
static int
upload_data(struct sbni_softc *sc, u_int framelen, u_int frameno,
u_int is_first, u_int32_t crc)
@ -601,7 +589,6 @@ upload_data(struct sbni_softc *sc, u_int framelen, u_int frameno,
}
if (sc->wait_frameno == frameno) {
if (sc->inppos + framelen <= ETHER_MAX_LEN) {
frame_ok = append_frame_to_pkt(sc, framelen, crc);
@ -630,7 +617,6 @@ upload_data(struct sbni_softc *sc, u_int framelen, u_int frameno,
return (frame_ok);
}
static __inline void send_complete(struct sbni_softc *);
static __inline void
@ -641,7 +627,6 @@ send_complete(struct sbni_softc *sc)
if_inc_counter(sc->ifp, IFCOUNTER_OPACKETS, 1);
}
static void
interpret_ack(struct sbni_softc *sc, u_int ack)
{
@ -664,7 +649,6 @@ interpret_ack(struct sbni_softc *sc, u_int ack)
sc->state &= ~FL_WAIT_ACK;
}
/*
* Glue received frame with previous fragments of packet.
* Indicate packet when last frame would be accepted.
@ -695,7 +679,6 @@ append_frame_to_pkt(struct sbni_softc *sc, u_int framelen, u_int32_t crc)
return (1);
}
/*
* Prepare to start output on adapter. Current priority must be set to splimp
* before this routine is called.
@ -746,7 +729,6 @@ prepare_to_send(struct sbni_softc *sc)
BPF_MTAP(sc->ifp, sc->tx_buf_p);
}
static void
drop_xmit_queue(struct sbni_softc *sc)
{
@ -773,7 +755,6 @@ drop_xmit_queue(struct sbni_softc *sc)
sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
}
static void
send_frame_header(struct sbni_softc *sc, u_int32_t *crc_p)
{
@ -807,7 +788,6 @@ send_frame_header(struct sbni_softc *sc, u_int32_t *crc_p)
*crc_p = crc;
}
/*
* if frame tail not needed (incorrect number or received twice),
* it won't store, but CRC will be calculated
@ -822,7 +802,6 @@ skip_tail(struct sbni_softc *sc, u_int tail_len, u_int32_t crc)
return (crc == CRC32_REMAINDER);
}
static int
check_fhdr(struct sbni_softc *sc, u_int *framelen, u_int *frameno,
u_int *ack, u_int *is_first, u_int32_t *crc_p)
@ -858,7 +837,6 @@ check_fhdr(struct sbni_softc *sc, u_int *framelen, u_int *frameno,
return (1);
}
static int
get_rx_buf(struct sbni_softc *sc)
{
@ -895,7 +873,6 @@ get_rx_buf(struct sbni_softc *sc)
return (1);
}
static void
indicate_pkt(struct sbni_softc *sc)
{
@ -930,7 +907,6 @@ sbni_timeout(void *xsc)
csr0 = sbni_inb(sc, CSR0);
if (csr0 & RC_CHK) {
if (sc->timer_ticks) {
if (csr0 & (RC_RDY | BU_EMP))
/* receiving not active */
@ -1005,7 +981,6 @@ set_initial_values(struct sbni_softc *sc, struct sbni_flags flags)
}
}
#ifdef SBNI_DUAL_COMPOUND
void
sbni_add(struct sbni_softc *sc)
@ -1042,7 +1017,6 @@ connect_to_master(struct sbni_softc *sc)
#endif /* SBNI_DUAL_COMPOUND */
/* Receive level auto-selection */
static void
@ -1066,7 +1040,6 @@ change_level(struct sbni_softc *sc)
sc->cur_rxl_rcvd = 0;
}
static void
timeout_change_level(struct sbni_softc *sc)
{

View File

@ -29,7 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
@ -100,7 +99,6 @@ sbni_probe_isa(device_t dev)
return (0);
}
static int
sbni_attach_isa(device_t dev)
{

View File

@ -77,7 +77,7 @@ sbni_pci_probe(device_t dev)
{
struct sbni_softc *sc;
u_int32_t ports;
ports = SBNI_PORTS;
if (pci_get_vendor(dev) != SBNI_PCI_VENDOR ||
pci_get_device(dev) != SBNI_PCI_DEVICE)
@ -183,7 +183,7 @@ sbni_pci_detach(device_t dev)
sbni_detach(sc);
if (sc->slave_sc)
sbni_detach(sc);
sbni_release_resources(sc);
if (sc->slave_sc)
free(sc->slave_sc, M_DEVBUF);

View File

@ -55,7 +55,6 @@ enum {
RC_RDY = 0x80
};
/* CSR1 mapping */
#define PR_RES 0x80
@ -65,8 +64,6 @@ struct sbni_csr1 {
unsigned : 1;
};
#define FRAME_ACK_MASK (u_int16_t)0x7000
#define FRAME_LEN_MASK (u_int16_t)0x03FF
#define FRAME_FIRST (u_int16_t)0x8000
@ -75,7 +72,6 @@ struct sbni_csr1 {
#define FRAME_SENT_BAD (u_int16_t)0x4000
#define FRAME_SENT_OK (u_int16_t)0x3000
enum {
FL_WAIT_ACK = 1,
FL_NEED_RESEND = 2,
@ -83,7 +79,6 @@ enum {
FL_SLOW_MODE = 8
};
enum {
DEFAULT_IOBASEADDR = 0x210,
DEFAULT_INTERRUPTNUMBER = 5,

View File

@ -63,7 +63,6 @@ struct sbni_flags {
u_int fixed_rate : 1;
};
#ifdef _KERNEL /* to avoid compile this decls with sbniconfig */
struct sbni_softc {
@ -81,7 +80,7 @@ struct sbni_softc {
struct mbuf *rx_buf_p; /* receive buffer ptr */
struct mbuf *tx_buf_p; /* transmit buffer ptr */
u_int pktlen; /* length of transmitting pkt */
u_int framelen; /* current frame length */
u_int maxframe; /* maximum valid frame length */
@ -148,7 +147,6 @@ struct sbni_softc *connect_to_master(struct sbni_softc *);
#define SIOCGINSTATS _IOWR('i', 60, struct ifreq) /* get internal stats */
#define SIOCRINSTATS _IOWR('i', 63, struct ifreq) /* reset internal stats */
/*
* CRC-32 stuff
*/