* [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
* [U-Boot] [PATCH v1 2/5] common: scsi: Make private functions static
2016-11-30 20:46 [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions Michal Simek
@ 2016-11-30 20:46 ` 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
` (4 subsequent siblings)
5 siblings, 2 replies; 15+ messages in thread
From: Michal Simek @ 2016-11-30 20:46 UTC (permalink / raw)
To: u-boot
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(-)
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;
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 3/5] cmd: scsi: Make private functions static
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-11-30 20:46 ` 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
` (3 subsequent siblings)
5 siblings, 2 replies; 15+ messages in thread
From: Michal Simek @ 2016-11-30 20:46 UTC (permalink / raw)
To: u-boot
Two 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>
---
cmd/scsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/scsi.c b/cmd/scsi.c
index 387ca1a262ab..a9c954a82f3d 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -17,7 +17,7 @@ static int scsi_curr_dev; /* current device */
/*
* scsi boot command intepreter. Derived from diskboot
*/
-int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
return common_diskboot(cmdtp, "scsi", argc, argv);
}
@@ -25,7 +25,7 @@ int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
/*
* scsi command intepreter
*/
-int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
switch (argc) {
case 0:
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 4/5] scsi: Change scsi_scan() to be able to return value
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-11-30 20:46 ` [U-Boot] [PATCH v1 3/5] cmd: " Michal Simek
@ 2016-11-30 20:46 ` 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
` (2 subsequent siblings)
5 siblings, 2 replies; 15+ messages in thread
From: Michal Simek @ 2016-11-30 20:46 UTC (permalink / raw)
To: u-boot
With DM_SCSI this function will return more than one return value to
cover errors.
Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
cmd/scsi.c | 14 ++++++++++----
common/scsi.c | 3 ++-
include/scsi.h | 2 +-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/cmd/scsi.c b/cmd/scsi.c
index a9c954a82f3d..4213ec867751 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -27,6 +27,8 @@ static int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
*/
static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
+ int ret;
+
switch (argc) {
case 0:
case 1:
@@ -35,8 +37,10 @@ static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
if (strncmp(argv[1], "res", 3) == 0) {
printf("\nReset SCSI\n");
scsi_bus_reset();
- scsi_scan(1);
- return 0;
+ ret = scsi_scan(1);
+ if (ret)
+ return CMD_RET_FAILURE;
+ return ret;
}
if (strncmp(argv[1], "inf", 3) == 0) {
blk_list_devices(IF_TYPE_SCSI);
@@ -51,8 +55,10 @@ static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
if (strncmp(argv[1], "scan", 4) == 0) {
- scsi_scan(1);
- return 0;
+ ret = scsi_scan(1);
+ if (ret)
+ return CMD_RET_FAILURE;
+ return ret;
}
if (strncmp(argv[1], "part", 4) == 0) {
if (blk_list_part(IF_TYPE_SCSI))
diff --git a/common/scsi.c b/common/scsi.c
index ba6561605810..839b30b9bb8e 100644
--- a/common/scsi.c
+++ b/common/scsi.c
@@ -524,7 +524,7 @@ removable:
* (re)-scan the scsi bus and reports scsi device info
* to the user if mode = 1
*/
-void scsi_scan(int mode)
+int scsi_scan(int mode)
{
unsigned char i, lun;
int ret;
@@ -558,6 +558,7 @@ void scsi_scan(int mode)
#ifndef CONFIG_SPL_BUILD
setenv_ulong("scsidevs", scsi_max_devs);
#endif
+ return 0;
}
#ifdef CONFIG_BLK
diff --git a/include/scsi.h b/include/scsi.h
index eed8ff971731..c8796785a465 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -173,7 +173,7 @@ void scsi_low_level_init(int busdevfunc);
* functions residing inside cmd_scsi.c
*/
void scsi_init(void);
-void scsi_scan(int mode);
+int scsi_scan(int mode);
#define SCSI_IDENTIFY 0xC0 /* not used */
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 5/5] scsi: Separate SCSI private block description initialization
2016-11-30 20:46 [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions Michal Simek
` (2 preceding siblings ...)
2016-11-30 20:46 ` [U-Boot] [PATCH v1 4/5] scsi: Change scsi_scan() to be able to return value Michal Simek
@ 2016-11-30 20:46 ` 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
5 siblings, 2 replies; 15+ messages in thread
From: Michal Simek @ 2016-11-30 20:46 UTC (permalink / raw)
To: u-boot
When blk_create_device() is called some parameters in blk_desc are
automatically filled. Separate SCSI private initialization and SCSI full
block device initialization not to rewrite already prepared data.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
common/scsi.c | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/common/scsi.c b/common/scsi.c
index 839b30b9bb8e..04add624958f 100644
--- a/common/scsi.c
+++ b/common/scsi.c
@@ -422,12 +422,15 @@ static void scsi_setup_test_unit_ready(ccb *pccb)
pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */
}
-static void scsi_init_dev_desc(struct blk_desc *dev_desc, int devnum)
+/**
+ * scsi_init_dev_desc_priv - initialize only SCSI specific blk_desc properties
+ *
+ * @dev_desc: Block device description pointer
+ */
+static void scsi_init_dev_desc_priv(struct blk_desc *dev_desc)
{
dev_desc->target = 0xff;
dev_desc->lun = 0xff;
- dev_desc->lba = 0;
- dev_desc->blksz = 0;
dev_desc->log2blksz =
LOG2_INVALID(typeof(dev_desc->log2blksz));
dev_desc->type = DEV_TYPE_UNKNOWN;
@@ -435,15 +438,28 @@ static void scsi_init_dev_desc(struct blk_desc *dev_desc, int devnum)
dev_desc->product[0] = 0;
dev_desc->revision[0] = 0;
dev_desc->removable = false;
- dev_desc->if_type = IF_TYPE_SCSI;
- dev_desc->devnum = devnum;
- dev_desc->part_type = PART_TYPE_UNKNOWN;
#ifndef CONFIG_BLK
dev_desc->block_read = scsi_read;
dev_desc->block_write = scsi_write;
#endif
}
+/**
+ * scsi_init_dev_desc - initialize all SCSI specific blk_desc properties
+ *
+ * @dev_desc: Block device description pointer
+ * @devnum: Device number
+ */
+static void scsi_init_dev_desc(struct blk_desc *dev_desc, int devnum)
+{
+ dev_desc->lba = 0;
+ dev_desc->blksz = 0;
+ dev_desc->if_type = IF_TYPE_SCSI;
+ dev_desc->devnum = devnum;
+ dev_desc->part_type = PART_TYPE_UNKNOWN;
+
+ scsi_init_dev_desc_priv(dev_desc);
+}
/**
* scsi_detect_dev - Detect scsi device
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions
2016-11-30 20:46 [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions Michal Simek
` (3 preceding siblings ...)
2016-11-30 20:46 ` [U-Boot] [PATCH v1 5/5] scsi: Separate SCSI private block description initialization Michal Simek
@ 2016-12-01 1:01 ` Tom Rini
2016-12-01 2:20 ` Simon Glass
5 siblings, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-12-01 1:01 UTC (permalink / raw)
To: u-boot
On Wed, Nov 30, 2016 at 09:46:47PM +0100, Michal Simek wrote:
> 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>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161130/8f91806a/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 2/5] common: scsi: Make private functions static
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
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-12-01 1:02 UTC (permalink / raw)
To: u-boot
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>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161130/33b62d28/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 3/5] cmd: scsi: Make private functions static
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
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-12-01 1:02 UTC (permalink / raw)
To: u-boot
On Wed, Nov 30, 2016 at 09:46:49PM +0100, Michal Simek wrote:
> Two 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>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161130/34ee9f99/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 4/5] scsi: Change scsi_scan() to be able to return value
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
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-12-01 1:03 UTC (permalink / raw)
To: u-boot
On Wed, Nov 30, 2016 at 09:46:50PM +0100, Michal Simek wrote:
> With DM_SCSI this function will return more than one return value to
> cover errors.
>
> Suggested-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161130/77ffe918/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 5/5] scsi: Separate SCSI private block description initialization
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
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-12-01 1:04 UTC (permalink / raw)
To: u-boot
On Wed, Nov 30, 2016 at 09:46:51PM +0100, Michal Simek wrote:
> When blk_create_device() is called some parameters in blk_desc are
> automatically filled. Separate SCSI private initialization and SCSI full
> block device initialization not to rewrite already prepared data.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161130/1eb41b89/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions
2016-11-30 20:46 [U-Boot] [PATCH v1 1/5] common: scsi: Remove completely unused functions Michal Simek
` (4 preceding siblings ...)
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
5 siblings, 0 replies; 15+ messages in thread
From: Simon Glass @ 2016-12-01 2:20 UTC (permalink / raw)
To: u-boot
On 30 November 2016 at 13:46, Michal Simek <michal.simek@xilinx.com> wrote:
> 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(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 2/5] common: scsi: Make private functions static
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
1 sibling, 0 replies; 15+ messages in thread
From: Simon Glass @ 2016-12-01 2:20 UTC (permalink / raw)
To: u-boot
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>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 3/5] cmd: scsi: Make private functions static
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
1 sibling, 0 replies; 15+ messages in thread
From: Simon Glass @ 2016-12-01 2:20 UTC (permalink / raw)
To: u-boot
On 30 November 2016 at 13:46, Michal Simek <michal.simek@xilinx.com> wrote:
> Two 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>
> ---
>
> cmd/scsi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 4/5] scsi: Change scsi_scan() to be able to return value
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
1 sibling, 0 replies; 15+ messages in thread
From: Simon Glass @ 2016-12-01 2:20 UTC (permalink / raw)
To: u-boot
On 30 November 2016 at 13:46, Michal Simek <michal.simek@xilinx.com> wrote:
> With DM_SCSI this function will return more than one return value to
> cover errors.
>
> Suggested-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> cmd/scsi.c | 14 ++++++++++----
> common/scsi.c | 3 ++-
> include/scsi.h | 2 +-
> 3 files changed, 13 insertions(+), 6 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH v1 5/5] scsi: Separate SCSI private block description initialization
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
1 sibling, 0 replies; 15+ messages in thread
From: Simon Glass @ 2016-12-01 2:20 UTC (permalink / raw)
To: u-boot
On 30 November 2016 at 13:46, Michal Simek <michal.simek@xilinx.com> wrote:
> When blk_create_device() is called some parameters in blk_desc are
> automatically filled. Separate SCSI private initialization and SCSI full
> block device initialization not to rewrite already prepared data.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> common/scsi.c | 28 ++++++++++++++++++++++------
> 1 file changed, 22 insertions(+), 6 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.