* [PATCH] scsi: libcxgbi: remove unused function to stop warning
@ 2019-09-24 9:37 Austin Kim
2019-10-01 3:27 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Austin Kim @ 2019-09-24 9:37 UTC (permalink / raw)
To: jejb, martin.petersen
Cc: linux-scsi, linux-kernel, varun, axboe, davem, austindh.kim
Since 'commit fc8d0590d914 ("libcxgbi: Add ipv6 api to driver")' was
introduced, there is no call to csk_print_port()
and csk_print_ip() is made.
Hence kernel build with clang complains below message:
drivers/scsi/cxgbi/libcxgbi.c:2287:19: warning: unused function 'csk_print_port' [-Wunused-function]
static inline int csk_print_port(struct cxgbi_sock *csk, char *buf)
^
drivers/scsi/cxgbi/libcxgbi.c:2298:19: warning: unused function 'csk_print_ip' [-Wunused-function]
static inline int csk_print_ip(struct cxgbi_sock *csk, char *buf)
^
So it had better remove csk_print_port() and csk_print_ip()
to stop warning.
Signed-off-by: Austin Kim <austindh.kim@gmail.com>
---
drivers/scsi/cxgbi/libcxgbi.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 3e17af8..0d044c1 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2284,34 +2284,6 @@ int cxgbi_set_conn_param(struct iscsi_cls_conn *cls_conn,
}
EXPORT_SYMBOL_GPL(cxgbi_set_conn_param);
-static inline int csk_print_port(struct cxgbi_sock *csk, char *buf)
-{
- int len;
-
- cxgbi_sock_get(csk);
- len = sprintf(buf, "%hu\n", ntohs(csk->daddr.sin_port));
- cxgbi_sock_put(csk);
-
- return len;
-}
-
-static inline int csk_print_ip(struct cxgbi_sock *csk, char *buf)
-{
- int len;
-
- cxgbi_sock_get(csk);
- if (csk->csk_family == AF_INET)
- len = sprintf(buf, "%pI4",
- &csk->daddr.sin_addr.s_addr);
- else
- len = sprintf(buf, "%pI6",
- &csk->daddr6.sin6_addr);
-
- cxgbi_sock_put(csk);
-
- return len;
-}
-
int cxgbi_get_ep_param(struct iscsi_endpoint *ep, enum iscsi_param param,
char *buf)
{
--
2.6.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: libcxgbi: remove unused function to stop warning
2019-09-24 9:37 [PATCH] scsi: libcxgbi: remove unused function to stop warning Austin Kim
@ 2019-10-01 3:27 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-10-01 3:27 UTC (permalink / raw)
To: Austin Kim
Cc: jejb, martin.petersen, linux-scsi, linux-kernel, varun, axboe, davem
Austin,
> Since 'commit fc8d0590d914 ("libcxgbi: Add ipv6 api to driver")' was
> introduced, there is no call to csk_print_port()
> and csk_print_ip() is made.
Applied to 5.5/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-01 3:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 9:37 [PATCH] scsi: libcxgbi: remove unused function to stop warning Austin Kim
2019-10-01 3:27 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).