All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/target/target_core_transport.c: Fix typo issue to use 'buf' instead of 'len'
@ 2014-09-03 15:33 ` Chen Gang
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Gang @ 2014-09-03 15:33 UTC (permalink / raw)
  To: nab; +Cc: linux-scsi, target-devel, linux-kernel, Michal Simek

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

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

* [PATCH] drivers/target/target_core_transport.c: Fix typo issue to use 'buf' instead of 'len'
@ 2014-09-03 15:33 ` Chen Gang
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Gang @ 2014-09-03 15:33 UTC (permalink / raw)
  To: nab; +Cc: linux-scsi, target-devel, linux-kernel, Michal Simek

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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-09-03 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 15:33 [PATCH] drivers/target/target_core_transport.c: Fix typo issue to use 'buf' instead of 'len' Chen Gang
2014-09-03 15:33 ` Chen Gang

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.