Skip to content

Commit

Permalink
Merge pull request #1726 from ghaerr/cleanup
Browse files Browse the repository at this point in the history
[kernel] Minor reformatting for readability
  • Loading branch information
ghaerr authored Sep 18, 2023
2 parents c04784a + e130ec8 commit a232960
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 85 deletions.
8 changes: 2 additions & 6 deletions elks/arch/i86/drivers/block/bioshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,16 +754,10 @@ static void do_bioshd_request(void)

#if UNUSED
static struct wait_queue busy_wait;
static int revalidate_hddisk(int, int); /* Currently not used*/

#define DEVICE_BUSY busy[target]
#define USAGE access_count[target]
#define CAPACITY ((sector_t)drive_info[target].heads*drive_info[target].sectors*drive_info[target].cylinders)

/* We assume that the the bios parameters do not change,
* so the disk capacity will not change
*/

#define GENDISK_STRUCT bioshd_gendisk
#define MAYBE_REINIT

Expand All @@ -773,6 +767,8 @@ static int revalidate_hddisk(int, int); /* Currently not used*/
* enter with usage == 0. If we are using an ioctl, we automatically
* have usage == 1 (we need an open channel to use an ioctl :-), so
* this is our limit.
* We assume that the the bios parameters do not change,
* so the disk capacity will not change
*/

static int revalidate_hddisk(int dev, int maxusage)
Expand Down
7 changes: 0 additions & 7 deletions elks/arch/i86/drivers/block/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ extern void resetup_one_dev(struct gendisk *dev, int drive);
#define DEVICE_NAME "rd"
#define DEVICE_REQUEST do_rd_request
#define DEVICE_NR(device) ((device) & 1)
#define DEVICE_ON(device)
#define DEVICE_OFF(device)

#endif
Expand All @@ -68,20 +67,17 @@ extern void resetup_one_dev(struct gendisk *dev, int drive);
#define DEVICE_NAME "ssd"
#define DEVICE_REQUEST do_ssd_request
#define DEVICE_NR(device) ((device) & 0)
#define DEVICE_ON(device)
#define DEVICE_OFF(device)

#endif

#ifdef FLOPPYDISK

static void floppy_on(int nr);
static void floppy_off(int nr);

#define DEVICE_NAME "df"
#define DEVICE_REQUEST do_fd_request
#define DEVICE_NR(device) ((device) & 3)
#define DEVICE_ON(device) floppy_on(DEVICE_NR(device))
#define DEVICE_OFF(device) floppy_off(DEVICE_NR(device))

#endif
Expand All @@ -91,7 +87,6 @@ static void floppy_off(int nr);
#define DEVICE_NAME "hd"
#define DEVICE_REQUEST do_directhd_request
#define DEVICE_NR(device) (MINOR(device)>>6)
#define DEVICE_ON(device)
#define DEVICE_OFF(device)

#endif
Expand All @@ -101,7 +96,6 @@ static void floppy_off(int nr);
#define DEVICE_NAME "bioshd"
#define DEVICE_REQUEST do_bioshd_request
#define DEVICE_NR(device) (MINOR(device)>>MINOR_SHIFT)
#define DEVICE_ON(device)
#define DEVICE_OFF(device)

#endif
Expand All @@ -111,7 +105,6 @@ static void floppy_off(int nr);
#define DEVICE_NAME "udd"
#define DEVICE_REQUEST do_meta_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)

#endif
Expand Down
Loading

0 comments on commit a232960

Please sign in to comment.