2015-02-02 06:26:27

by Fengguang Wu

[permalink] [raw]
Subject: [target:for-next 16/21] drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not declared. Should it be static?

tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next
head: 2936f1d4f3e8247bd519feba7892371d5e4c6603
commit: 105acf608f25d5e0d9fef669299a5438b7b114ee [16/21] vhost/scsi: Add ANY_LAYOUT vhost_skip_iovec_bytes helper
reproduce:
# apt-get install sparse
git checkout 105acf608f25d5e0d9fef669299a5438b7b114ee
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not declared. Should it be static?
drivers/vhost/scsi.c:969:1: warning: 'vhost_scsi_mapal' defined but not used [-Wunused-function]
vhost_scsi_mapal(struct tcm_vhost_cmd *cmd, int max_niov,
^

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation


2015-02-02 06:26:24

by Fengguang Wu

[permalink] [raw]
Subject: [PATCH target] vhost/scsi: vhost_skip_iovec_bytes() can be static

drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <[email protected]>
---
scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index d888bd9..8ac003f 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1078,7 +1078,7 @@ vhost_scsi_send_bad_target(struct vhost_scsi *vs,
pr_err("Faulted on virtio_scsi_cmd_resp\n");
}

-int vhost_skip_iovec_bytes(size_t bytes, int max_niov,
+static int vhost_skip_iovec_bytes(size_t bytes, int max_niov,
struct iovec *iov_in, size_t off_in,
struct iovec **iov_out, size_t *off_out)
{

2015-02-02 06:36:06

by Fam Zheng

[permalink] [raw]
Subject: Re: [PATCH target] vhost/scsi: vhost_skip_iovec_bytes() can be static

On Mon, 02/02 14:25, kbuild test robot wrote:
> drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not declared. Should it be static?
>
> Signed-off-by: Fengguang Wu <[email protected]>
> ---
> scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index d888bd9..8ac003f 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -1078,7 +1078,7 @@ vhost_scsi_send_bad_target(struct vhost_scsi *vs,
> pr_err("Faulted on virtio_scsi_cmd_resp\n");
> }
>
> -int vhost_skip_iovec_bytes(size_t bytes, int max_niov,
> +static int vhost_skip_iovec_bytes(size_t bytes, int max_niov,
> struct iovec *iov_in, size_t off_in,
> struct iovec **iov_out, size_t *off_out)

Probably keep the parameter list lines aligned?

Fam

2015-02-03 00:24:15

by Nicholas A. Bellinger

[permalink] [raw]
Subject: Re: [target:for-next 16/21] drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not declared. Should it be static?

On Mon, 2015-02-02 at 14:25 +0800, kbuild test robot wrote:
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next
> head: 2936f1d4f3e8247bd519feba7892371d5e4c6603
> commit: 105acf608f25d5e0d9fef669299a5438b7b114ee [16/21] vhost/scsi: Add ANY_LAYOUT vhost_skip_iovec_bytes helper
> reproduce:
> # apt-get install sparse
> git checkout 105acf608f25d5e0d9fef669299a5438b7b114ee
> make ARCH=x86_64 allmodconfig
> make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
> >> drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not declared. Should it be static?
> drivers/vhost/scsi.c:969:1: warning: 'vhost_scsi_mapal' defined but not used [-Wunused-function]
> vhost_scsi_mapal(struct tcm_vhost_cmd *cmd, int max_niov,
> ^
>
> Please review and possibly fold the followup patch.

Fixing up for -v3.

Thanks Fengguang!

--nab