clang-format

This commit is contained in:
2024-09-10 13:03:02 -04:00
parent 53c617d779
commit d66450e427
381 changed files with 28864 additions and 34170 deletions

View File

@@ -37,33 +37,31 @@
#include "autoconf.h"
/* Lowest revision we support */
#define LOW_VERSION 2
#define LOW_VERSION 2
struct lhd_softc *
attach_lhd_to_lamebus(int lhdno, struct lamebus_softc *sc)
{
struct lhd_softc *lh;
int slot = lamebus_probe(sc, LB_VENDOR_CS161, LBCS161_DISK,
LOW_VERSION, NULL);
if (slot < 0) {
/* None found */
return NULL;
}
struct lhd_softc *attach_lhd_to_lamebus(int lhdno, struct lamebus_softc *sc) {
struct lhd_softc *lh;
int slot =
lamebus_probe(sc, LB_VENDOR_CS161, LBCS161_DISK, LOW_VERSION, NULL);
if (slot < 0) {
/* None found */
return NULL;
}
lh = kmalloc(sizeof(struct lhd_softc));
if (lh==NULL) {
/* Out of memory */
return NULL;
}
lh = kmalloc(sizeof(struct lhd_softc));
if (lh == NULL) {
/* Out of memory */
return NULL;
}
/* Record what the lhd is attached to */
lh->lh_busdata = sc;
lh->lh_buspos = slot;
lh->lh_unit = lhdno;
/* Record what the lhd is attached to */
lh->lh_busdata = sc;
lh->lh_buspos = slot;
lh->lh_unit = lhdno;
/* Mark the slot in use and collect interrupts */
lamebus_mark(sc, slot);
lamebus_attach_interrupt(sc, slot, lh, lhd_irq);
/* Mark the slot in use and collect interrupts */
lamebus_mark(sc, slot);
lamebus_attach_interrupt(sc, slot, lh, lhd_irq);
return lh;
return lh;
}