From: Chen Gang <gang.chen.5i5j@gmail.com>
To: nab@linux-iscsi.org
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Michal Simek <monstr@monstr.eu>
Subject: [PATCH] drivers/target/target_core_transport.c: Fix typo issue to use 'buf' instead of 'len'
Date: Wed, 03 Sep 2014 23:33:50 +0800 [thread overview]
Message-ID: <540734DE.6090306@gmail.com> (raw)
It is a typo issue, need use 'buf' instead of 'len', the related warning
with allmodconfig under microblaze:
drivers/target/target_core_transport.c: In function ‘transport_dump_vpd_ident_type’:
drivers/target/target_core_transport.c:956:9: warning: passing argument 1 of ‘strlen’ makes pointer from integer without a cast
len = strlen(len);
^
In file included from include/linux/bitmap.h:8:0,
from include/linux/cpumask.h:11,
from include/linux/mm_types.h:12,
from include/linux/kmemcheck.h:4,
from include/linux/net.h:25,
from drivers/target/target_core_transport.c:26:
include/linux/string.h:83:24: note: expected ‘const char *’ but argument is of type ‘int’
extern __kernel_size_t strlen(const char *);
^
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
drivers/target/target_core_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 1dd1181..3ce85ed 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -953,7 +953,7 @@ int transport_dump_vpd_ident_type(
strlcat(buf, "SCSI name string\n", sizeof(buf));
break;
default:
- len = strlen(len);
+ len = strlen(buf);
snprintf(&buf[len], sizeof(buf) - len, "Unsupported: 0x%02x\n",
vpd->device_identifier_type);
ret = -EINVAL;
--
1.9.3
reply other threads:[~2014-09-03 15:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=540734DE.6090306@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=monstr@monstr.eu \
--cc=nab@linux-iscsi.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox