diff mbox

[U-Boot,v1,2/5] common: scsi: Make private functions static

Message ID 34f5b7609cc14a1ee76dd0d8bc211df8446bfc4d.1480538807.git.michal.simek@xilinx.com
State Accepted
Commit 545a284711eb767ccb67ee6746b64bb330fa9303
Delegated to: Michal Simek
Headers show

Commit Message

Michal Simek Nov. 30, 2016, 8:46 p.m. UTC
Several functions should be static because they are not exported to any
other file.
Warnings were reported by sparse C=1.

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

 common/scsi.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

Comments

Tom Rini Dec. 1, 2016, 1:02 a.m. UTC | #1
On Wed, Nov 30, 2016 at 09:46:48PM +0100, Michal Simek wrote:

> Several functions should be static because they are not exported to any
> other file.
> Warnings were reported by sparse C=1.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass Dec. 1, 2016, 2:20 a.m. UTC | #2
On 30 November 2016 at 13:46, Michal Simek <michal.simek@xilinx.com> wrote:
> Several functions should be static because they are not exported to any
> other file.
> Warnings were reported by sparse C=1.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  common/scsi.c | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/common/scsi.c b/common/scsi.c
index 60281f83361f..ba6561605810 100644
--- a/common/scsi.c
+++ b/common/scsi.c
@@ -78,7 +78,8 @@  void scsi_setup_read16(ccb *pccb, lbaint_t start, unsigned long blocks)
 }
 #endif
 
-void scsi_setup_read_ext(ccb *pccb, lbaint_t start, unsigned short blocks)
+static void scsi_setup_read_ext(ccb *pccb, lbaint_t start,
+				unsigned short blocks)
 {
 	pccb->cmd[0] = SCSI_READ10;
 	pccb->cmd[1] = pccb->lun << 5;
@@ -98,7 +99,8 @@  void scsi_setup_read_ext(ccb *pccb, lbaint_t start, unsigned short blocks)
 	      pccb->cmd[7], pccb->cmd[8]);
 }
 
-void scsi_setup_write_ext(ccb *pccb, lbaint_t start, unsigned short blocks)
+static void scsi_setup_write_ext(ccb *pccb, lbaint_t start,
+				 unsigned short blocks)
 {
 	pccb->cmd[0] = SCSI_WRITE10;
 	pccb->cmd[1] = pccb->lun << 5;
@@ -119,7 +121,7 @@  void scsi_setup_write_ext(ccb *pccb, lbaint_t start, unsigned short blocks)
 	      pccb->cmd[7], pccb->cmd[8]);
 }
 
-void scsi_setup_inquiry(ccb *pccb)
+static void scsi_setup_inquiry(ccb *pccb)
 {
 	pccb->cmd[0] = SCSI_INQUIRY;
 	pccb->cmd[1] = pccb->lun << 5;
@@ -321,7 +323,8 @@  void scsi_init(void)
 /* copy src to dest, skipping leading and trailing blanks
  * and null terminate the string
  */
-void scsi_ident_cpy(unsigned char *dest, unsigned char *src, unsigned int len)
+static void scsi_ident_cpy(unsigned char *dest, unsigned char *src,
+			   unsigned int len)
 {
 	int start, end;
 
@@ -342,7 +345,8 @@  void scsi_ident_cpy(unsigned char *dest, unsigned char *src, unsigned int len)
 	*dest = '\0';
 }
 
-int scsi_read_capacity(ccb *pccb, lbaint_t *capacity, unsigned long *blksz)
+static int scsi_read_capacity(ccb *pccb, lbaint_t *capacity,
+			      unsigned long *blksz)
 {
 	*capacity = 0;
 
@@ -406,7 +410,7 @@  int scsi_read_capacity(ccb *pccb, lbaint_t *capacity, unsigned long *blksz)
 /*
  * Some setup (fill-in) routines
  */
-void scsi_setup_test_unit_ready(ccb *pccb)
+static void scsi_setup_test_unit_ready(ccb *pccb)
 {
 	pccb->cmd[0] = SCSI_TST_U_RDY;
 	pccb->cmd[1] = pccb->lun << 5;