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

This commit is contained in:
mjg 2020-09-01 21:39:37 +00:00
parent 65c48cc3d3
commit 6a06c4d5ed
5 changed files with 5 additions and 33 deletions

View File

@ -371,7 +371,6 @@ amr_init_sysctl(struct amr_softc *sc)
"");
}
/*******************************************************************************
* Free resources associated with a controller instance
*/
@ -777,7 +776,6 @@ amr_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct threa
ap = NULL;
switch(cmd) {
case AMR_IO_VERSION:
debug(1, "AMR_IO_VERSION");
*arg.result = AMR_IO_VERSION_NUMBER;
@ -977,7 +975,6 @@ amr_query_controller(struct amr_softc *sc)
*/
if ((aex = amr_enquiry(sc, 2048, AMR_CMD_CONFIG, AMR_CONFIG_ENQ3,
AMR_CONFIG_ENQ3_SOLICITED_FULL, &status)) != NULL) {
/*
* Fetch current state of logical drives.
*/
@ -1011,7 +1008,6 @@ amr_query_controller(struct amr_softc *sc)
device_printf(sc->amr_dev, "delete logical drives supported by controller\n");
}
} else {
/* failed, try the 8LD ENQUIRY commands */
if ((ae = (struct amr_enquiry *)amr_enquiry(sc, 2048, AMR_CMD_EXT_ENQUIRY2, 0, 0, &status)) == NULL) {
if ((ae = (struct amr_enquiry *)amr_enquiry(sc, 2048, AMR_CMD_ENQUIRY, 0, 0, &status)) == NULL) {
@ -1173,7 +1169,6 @@ amr_support_ext_cdb(struct amr_softc *sc)
mbox[0] = 0xA4;
mbox[2] = 0x16;
/* we have to poll, as the system may be going down or otherwise damaged */
if (sc->amr_poll_command(ac))
goto out;
@ -1203,7 +1198,6 @@ amr_startio(struct amr_softc *sc)
/* spin until something prevents us from doing any work */
for (;;) {
/* Don't bother to queue commands no bounce buffers are available. */
if (sc->amr_state & AMR_STATE_QUEUE_FRZN)
break;
@ -1342,7 +1336,6 @@ amr_bio_command(struct amr_softc *sc, struct amr_command **acp)
/* we fill in the s/g related data when the command is mapped */
*acp = ac;
return(error);
}
@ -1643,7 +1636,7 @@ amr_setup_data(void *arg, bus_dma_segment_t *segs, int nsegs, int err)
amr_requeue_ready(ac);
}
}
static void
amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegs, int err)
{
@ -1730,9 +1723,7 @@ amr_unmapcmd(struct amr_command *ac)
/* if the command involved data at all and was mapped */
if (ac->ac_flags & AMR_CMD_MAPPED) {
if (ac->ac_data != NULL) {
flag = 0;
if (ac->ac_flags & AMR_CMD_DATAIN)
flag |= BUS_DMASYNC_POSTREAD;
@ -1834,7 +1825,6 @@ amr_done(struct amr_softc *sc)
/* really a busy command? */
if (ac != NULL) {
/* pull the command from the busy index */
amr_freeslot(ac);
@ -2144,7 +2134,6 @@ amr_quartz_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave)
/* work waiting for us? */
if ((outd = AMR_QGET_ODB(sc)) == AMR_QODB_READY) {
/* acknowledge interrupt */
AMR_QPUT_ODB(sc, AMR_QODB_READY);
@ -2275,7 +2264,7 @@ amr_std_init(struct amr_softc *sc)
device_printf(sc->amr_dev, "initial init status %x\n", AMR_SGET_INITSTATUS(sc));
AMR_SRESET(sc);
ostatus = 0xff;
while ((status = AMR_SGET_INITSTATUS(sc)) != AMR_SINIT_DONE) {
if (status != ostatus) {
@ -2331,7 +2320,6 @@ amr_describe_controller(struct amr_softc *sc)
prod = amr_describe_code(amr_table_adaptertype, ae->ae_signature);
} else if ((ae = (struct amr_enquiry *)amr_enquiry(sc, 2048, AMR_CMD_ENQUIRY, 0, 0, &status)) != NULL) {
/*
* Try to work it out based on the PCI signatures.
*/
@ -2366,7 +2354,6 @@ amr_describe_controller(struct amr_softc *sc)
ae->ae_adapter.aa_bios[2] <= 'Z' &&
ae->ae_adapter.aa_bios[1] < ' ' &&
ae->ae_adapter.aa_bios[0] < ' ') {
/* this looks like we have an HP NetRaid version of the MegaRaid */
if(ae->ae_signature == AMR_SIG_438) {
@ -2429,8 +2416,6 @@ amr_dump_blocks(struct amr_softc *sc, int unit, u_int32_t lba, void *data, int b
return (error);
}
#ifdef AMR_DEBUG
/********************************************************************************
* Print the command (ac) in human-readable format

View File

@ -175,7 +175,6 @@ amr_cam_attach(device_t dev)
* Iterate over our channels, registering them with CAM
*/
for (chn = 0; chn < sc->amr_maxchan; chn++) {
/* allocate a sim */
if ((sc->amr_cam_sim[chn] = cam_sim_alloc(amr_cam_action,
amr_cam_poll, "amr", sc, device_get_unit(sc->amr_dev),
@ -247,7 +246,6 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb)
struct amr_softc *sc = cam_sim_softc(sim);
switch(ccb->ccb_h.func_code) {
/*
* Perform SCSI I/O to a physical device.
*/
@ -266,7 +264,7 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb)
if ((csio->cdb_len > AMR_MAX_CDB_LEN) &&
(sc->support_ext_cdb == 0))
ccbh->status = CAM_REQ_INVALID;
/* check that the CDB pointer is not to a physical address */
if ((ccbh->flags & CAM_CDB_POINTER) &&
(ccbh->flags & CAM_CDB_PHYS))
@ -280,7 +278,7 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb)
/* we can't map it */
ccbh->status = CAM_REQ_INVALID;
}
/*
* If the command is to a LUN other than 0, fail it.
* This is probably incorrect, but during testing the
@ -292,7 +290,6 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb)
/* if we're happy with the request, queue it for attention */
if (ccbh->status == CAM_REQ_INPROG) {
/* save the channel number in the ccb */
csio->ccb_h.sim_priv.entries[0].field= cam_sim_bus(sim);
@ -397,7 +394,6 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb)
ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
break;
/*
* Reject anything else as unsupported.
*/

View File

@ -148,7 +148,6 @@ amrd_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t l
int driveno = amrd_sc->amrd_drive - amr_sc->amr_drive;
if ((error = amr_dump_blocks(amr_sc,driveno,offset / AMR_BLKSIZE ,(void *)virtual,(int) length / AMR_BLKSIZE )) != 0)
return(error);
}
return(0);
}
@ -266,4 +265,3 @@ amrd_detach(device_t dev)
#endif
return(0);
}

View File

@ -155,7 +155,6 @@ amr_find_ident(device_t dev)
for (id = amr_device_ids; id->vendor != 0; id++) {
if ((pci_get_vendor(dev) == id->vendor) &&
(pci_get_device(dev) == id->device)) {
/* do we need to test for a signature? */
if (id->flags & AMR_ID_PROBE_SIG) {
sig = pci_read_config(dev, AMR_CFG_SIG, 2);
@ -167,7 +166,7 @@ amr_find_ident(device_t dev)
}
return (NULL);
}
static int
amr_pci_probe(device_t dev)
{
@ -332,7 +331,6 @@ amr_pci_attach(device_t dev)
goto out;
debug(2, "ccb mapped");
/*
* Do bus-independant initialisation, bring controller online.
*/
@ -389,7 +387,6 @@ amr_pci_shutdown(device_t dev)
/* mark ourselves as in-shutdown */
sc->amr_state |= AMR_STATE_SHUTDOWN;
/* flush controller */
device_printf(sc->amr_dev, "flushing cache...");
printf("%s\n", amr_flush(sc) ? "failed" : "done");
@ -706,4 +703,3 @@ amr_ccb_map(struct amr_softc *sc)
return (0);
}

View File

@ -191,7 +191,6 @@
#define AMR_BATT_CHARGE_FAIL 0x20
#define AMR_BATT_CYCLES_EXCEEDED 0x40
/********************************************************************************
********************************************************************************
8LD Firmware Interface
@ -278,7 +277,6 @@ struct amr_enquiry
u_int8_t res2[844]; /* X */
} __packed;
/********************************************************************************
********************************************************************************
40LD Firmware Interface
@ -409,7 +407,6 @@ struct amr_enquiry3
u_int8_t res1[263]; /* pad to 1024 bytes */
} __packed;
/********************************************************************************
********************************************************************************
Mailbox and Command Structures