public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions
@ 2016-11-30 20:46 Michal Simek
  2016-11-30 20:46 ` [U-Boot] [PATCH v1 2/5] common: scsi: Make private functions static Michal Simek
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Michal Simek @ 2016-11-30 20:46 UTC (permalink / raw)
  To: u-boot

These functions are not called for any location.
This patch removes them scsi_trim_trail(), scsi_get_disk_count()
and scsi_setup_read6().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 common/scsi.c  | 35 -----------------------------------
 include/scsi.h |  3 ---
 2 files changed, 38 deletions(-)

diff --git a/common/scsi.c b/common/scsi.c
index 9e4ef54a9be8..60281f83361f 100644
--- a/common/scsi.c
+++ b/common/scsi.c
@@ -119,22 +119,6 @@ void scsi_setup_write_ext(ccb *pccb, lbaint_t start, unsigned short blocks)
 	      pccb->cmd[7], pccb->cmd[8]);
 }
 
-void scsi_setup_read6(ccb *pccb, lbaint_t start, unsigned short blocks)
-{
-	pccb->cmd[0] = SCSI_READ6;
-	pccb->cmd[1] = pccb->lun << 5 | ((unsigned char)(start >> 16) & 0x1f);
-	pccb->cmd[2] = (unsigned char)(start >> 8) & 0xff;
-	pccb->cmd[3] = (unsigned char)start & 0xff;
-	pccb->cmd[4] = (unsigned char)blocks & 0xff;
-	pccb->cmd[5] = 0;
-	pccb->cmdlen = 6;
-	pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */
-	debug("scsi_setup_read6: cmd: %02X %02X startblk %02X%02X blccnt %02X\n",
-	      pccb->cmd[0], pccb->cmd[1],
-	      pccb->cmd[2], pccb->cmd[3], pccb->cmd[4]);
-}
-
-
 void scsi_setup_inquiry(ccb *pccb)
 {
 	pccb->cmd[0] = SCSI_INQUIRY;
@@ -277,11 +261,6 @@ static ulong scsi_write(struct blk_desc *block_dev, lbaint_t blknr,
 	return blkcnt;
 }
 
-int scsi_get_disk_count(void)
-{
-	return scsi_max_devs;
-}
-
 #if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
 void scsi_init(void)
 {
@@ -363,20 +342,6 @@ void scsi_ident_cpy(unsigned char *dest, unsigned char *src, unsigned int len)
 	*dest = '\0';
 }
 
-
-/* Trim trailing blanks, and NUL-terminate string
- */
-void scsi_trim_trail(unsigned char *str, unsigned int len)
-{
-	unsigned char *p = str + len - 1;
-
-	while (len-- > 0) {
-		*p-- = '\0';
-		if (*p != ' ')
-			return;
-	}
-}
-
 int scsi_read_capacity(ccb *pccb, lbaint_t *capacity, unsigned long *blksz)
 {
 	*capacity = 0;
diff --git a/include/scsi.h b/include/scsi.h
index 7e3759140b34..eed8ff971731 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -175,9 +175,6 @@ void scsi_low_level_init(int busdevfunc);
 void scsi_init(void);
 void scsi_scan(int mode);
 
-/** @return the number of scsi disks */
-int scsi_get_disk_count(void);
-
 #define SCSI_IDENTIFY					0xC0  /* not used */
 
 /* Hardware errors  */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-12-01  2:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 20:46 [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions Michal Simek
2016-11-30 20:46 ` [U-Boot] [PATCH v1 2/5] common: scsi: Make private functions static Michal Simek
2016-12-01  1:02   ` Tom Rini
2016-12-01  2:20   ` Simon Glass
2016-11-30 20:46 ` [U-Boot] [PATCH v1 3/5] cmd: " Michal Simek
2016-12-01  1:02   ` Tom Rini
2016-12-01  2:20   ` Simon Glass
2016-11-30 20:46 ` [U-Boot] [PATCH v1 4/5] scsi: Change scsi_scan() to be able to return value Michal Simek
2016-12-01  1:03   ` Tom Rini
2016-12-01  2:20   ` Simon Glass
2016-11-30 20:46 ` [U-Boot] [PATCH v1 5/5] scsi: Separate SCSI private block description initialization Michal Simek
2016-12-01  1:04   ` Tom Rini
2016-12-01  2:20   ` Simon Glass
2016-12-01  1:01 ` [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions Tom Rini
2016-12-01  2:20 ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox