]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ide: Make function static
authorSimon Glass <sjg@chromium.org>
Tue, 25 Apr 2023 16:54:36 +0000 (10:54 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 27 Apr 2023 17:51:06 +0000 (13:51 -0400)
Only one function is called from outside this file. Make all the others
static.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/block/ide.c
include/ide.h

index 875192cba16335e78090b4425b8c32e69ff386fa..1d5e54d6eb98e8970d43323bb3109995d237ae51 100644 (file)
@@ -219,8 +219,8 @@ static uchar atapi_wait_mask(int dev, ulong t, uchar mask, uchar res)
 /*
  * issue an atapi command
  */
-unsigned char atapi_issue(int device, unsigned char *ccb, int ccblen,
-                         unsigned char *buffer, int buflen)
+static unsigned char atapi_issue(int device, unsigned char *ccb, int ccblen,
+                                unsigned char *buffer, int buflen)
 {
        unsigned char c, err, mask, res;
        int n;
@@ -343,10 +343,9 @@ AI_OUT:
 #define ATAPI_DRIVE_NOT_READY  100
 #define ATAPI_UNIT_ATTN                10
 
-unsigned char atapi_issue_autoreq(int device,
-                                 unsigned char *ccb,
-                                 int ccblen,
-                                 unsigned char *buffer, int buflen)
+static unsigned char atapi_issue_autoreq(int device, unsigned char *ccb,
+                                        int ccblen,
+                                        unsigned char *buffer, int buflen)
 {
        unsigned char sense_data[18], sense_ccb[12];
        unsigned char res, key, asc, ascq;
@@ -421,8 +420,8 @@ error:
 #define ATAPI_READ_BLOCK_SIZE  2048    /* assuming CD part */
 #define ATAPI_READ_MAX_BLOCK   (ATAPI_READ_MAX_BYTES/ATAPI_READ_BLOCK_SIZE)
 
-ulong atapi_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
-                void *buffer)
+static ulong atapi_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
+                       void *buffer)
 {
        struct blk_desc *block_dev = dev_get_uclass_plat(dev);
        int device = block_dev->devnum;
@@ -810,8 +809,8 @@ static void ide_input_data(int dev, ulong *sect_buf, int words)
        }
 }
 
-ulong ide_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
-              void *buffer)
+static ulong ide_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
+                     void *buffer)
 {
        struct blk_desc *block_dev = dev_get_uclass_plat(dev);
        int device = block_dev->devnum;
@@ -930,8 +929,8 @@ IDE_READ_E:
        return n;
 }
 
-ulong ide_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
-               const void *buffer)
+static ulong ide_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
+                      const void *buffer)
 {
        struct blk_desc *block_dev = dev_get_uclass_plat(dev);
        int device = block_dev->devnum;
index b586ba3df4bff951d77329f81f0978bc4f13dae8..2c25e74ede08e478759cd536466543db8b38e718 100644 (file)
 
 #define IDE_BUS(dev)   (dev / (CONFIG_SYS_IDE_MAXDEVICE / CONFIG_SYS_IDE_MAXBUS))
 
-/*
- * Function Prototypes
- */
-
-struct blk_desc;
-struct udevice;
-ulong ide_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
-              void *buffer);
-ulong ide_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
-               const void *buffer);
-
 /**
  * ide_set_reset() - Assert or de-assert reset for the IDE device
  *