ata: libata-core: make ata_exec_internal_sg() *static*
authorSergey Shtylyov <s.shtylyov@omp.ru>
Wed, 15 Jun 2022 19:38:20 +0000 (22:38 +0300)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Fri, 17 Jun 2022 07:45:23 +0000 (16:45 +0900)
ata_exec_internal_sg() is only called by ata_exec_internal() further in
the same file, so we can make it *static* and remove its prototype from
drivers/ata/libata.h...

Suggested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/libata-core.c
drivers/ata/libata.h

index 035092184c08050ce03f8754b67383d058ba294d..4658aa9bfdc2d8ab95fa98ba8c409dca5fb0593e 100644 (file)
@@ -1467,10 +1467,10 @@ static void ata_qc_complete_internal(struct ata_queued_cmd *qc)
  *     RETURNS:
  *     Zero on success, AC_ERR_* mask on failure
  */
-unsigned ata_exec_internal_sg(struct ata_device *dev,
-                             struct ata_taskfile *tf, const u8 *cdb,
-                             int dma_dir, struct scatterlist *sgl,
-                             unsigned int n_elem, unsigned long timeout)
+static unsigned ata_exec_internal_sg(struct ata_device *dev,
+                                    struct ata_taskfile *tf, const u8 *cdb,
+                                    int dma_dir, struct scatterlist *sgl,
+                                    unsigned int n_elem, unsigned long timeout)
 {
        struct ata_link *link = dev->link;
        struct ata_port *ap = link->ap;
index 926a7f41303dc534435a9bb72fd79c2cda04bc36..1446a482835d1621defcb4087d34a7732136f34c 100644 (file)
@@ -53,10 +53,6 @@ extern unsigned ata_exec_internal(struct ata_device *dev,
                                  struct ata_taskfile *tf, const u8 *cdb,
                                  int dma_dir, void *buf, unsigned int buflen,
                                  unsigned long timeout);
-extern unsigned ata_exec_internal_sg(struct ata_device *dev,
-                                    struct ata_taskfile *tf, const u8 *cdb,
-                                    int dma_dir, struct scatterlist *sg,
-                                    unsigned int n_elem, unsigned long timeout);
 extern int ata_wait_ready(struct ata_link *link, unsigned long deadline,
                          int (*check_ready)(struct ata_link *link));
 extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,