Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1716483ybn; Thu, 26 Sep 2019 00:46:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdFyJDYwdz+JX/TP3ivwfzr/MBZ/vzUK3+TjR0PxidPOS0DZQiRxft0Kx3hYvMV4jhhcUp X-Received: by 2002:a50:fa98:: with SMTP id w24mr2120677edr.47.1569483993140; Thu, 26 Sep 2019 00:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569483993; cv=none; d=google.com; s=arc-20160816; b=UXhE2oBHHNrnGY0Vjy08J41bGrbo+PDccrkb3Z/cbLsX3pAQTHzi1ERSpxRxvVFL6F swF2TPsmIIllBilWF7LANRv9MZOMogfDnB2WA/711ihljoHDLnuZ6dwBPHj9S/i2M6kz 14fq/9MIV+g4jL9fDeXA3a4AYXvZQtJOOeFNLCoMDjrRhL7MFipaqr5itjkwhAo9w3Oi gSbOldHgqdlr4t4BMVrSogi3C824oh3YFYJT+Tq9yycCnwhHsB2+bofWijOFGi6onIYA 7aOb3Cn38gakHlNWf3DjP+U+CXWC0kEU1jO37uV0ObPzVNovRTH/ZxlMX6j9D5wlTiU8 QyaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=Fk/UaCgnTILFJleUu498uCJn9UxWpH5XQY4VNGTGDLo=; b=cyweGIRaFcVeVHDyyaPALjceLHNsFql53MDiMzDrzq+xx6vRDAp372pr4W3xk0m/z4 iDKZdLJfv+V4tUh3vQljxYotafln1MwtrrNOfzYPeAcz//hRDvbualZkCtxfmCUWQx+d F5XCC7jhqudfpqOuiJPwRXy6dzBIPbodlina4kGPkKvQ9t2vORjvGoE2SkZlT/ia4Zb9 spJEoBEqRfuSXkq9pouDUYaA0bqoio0Yq0vtxrJivqeCfYyqPn45suWzeWnkx6YIvDx0 rlaFi3rY0nwLIbttrHaxIoh5hSOOroY7h9bbq4/G6/HyryXcS5iaUOoh+QmBM+B4RBgr 8zMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hTyCZYT9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12si897738edb.262.2019.09.26.00.46.09; Thu, 26 Sep 2019 00:46:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hTyCZYT9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504286AbfIXJhX (ORCPT + 99 others); Tue, 24 Sep 2019 05:37:23 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45526 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504261AbfIXJhW (ORCPT ); Tue, 24 Sep 2019 05:37:22 -0400 Received: by mail-pl1-f194.google.com with SMTP id u12so734842pls.12; Tue, 24 Sep 2019 02:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=Fk/UaCgnTILFJleUu498uCJn9UxWpH5XQY4VNGTGDLo=; b=hTyCZYT9lVPFMWGnYjJu2Xz8UN2LdOqqKyrJda6baRd7yNK/iH6uG7fd64y30tdysf MeHA+qniRDZwlGr1LChPrhIFpTUoNsk+FtQsKjXtzu5XIKTSIr2LBF+F9UTXs7UzApei jeDVTZAYtlSLhjNiXln4IrbdbfwZrVmb4j/uWsOBUtIftt0fhkelJn7Wl1B9C7muOIIn jdxLrSOfTyson6LWHAyqVG+xJ2mQ4mVCByNqS2XGDdQI0tX6bhsMyQ6u2xq80uImQ6cQ 7RV0asWl6a6YMeLkQ5gE7bsIaBnoBsSm5sUSQEpsLwEKQmKZUGxj3fH6+VTZqRjNP2H2 zKSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=Fk/UaCgnTILFJleUu498uCJn9UxWpH5XQY4VNGTGDLo=; b=aB+y2GcvFw39EMFuCpV4KW+BKOLE/xtunw0Is5Zp3gC61vAZ8cAEFzGkTxSohP57VR hjumA2Y4H8rS1QKFbI7PCqFhlcjuClAa4y554dvzxAFOYJoUBqN/yjbUOdmyYlqnxn2S OV841Y2WQb//0+LClBbb9++Tpowr9y1m+e2fBuqlPDUspu2uAiCfgtDsbU9GEolT9kvT SHOu+jzJCbo1bq6uUvqy4CdW6wqCWBBDwmK7ialrKLx5v2+3S/0b5hgFNNPCULHWH2we AQUFO3PaG0PDe9bKGi4Glyq+nS20rJ5wTjf97xkxYVWkBYaO7keI8z9nWCHeTL2k8426 HwWg== X-Gm-Message-State: APjAAAWBQ1hB5EKyComAbeybhnF8ph+qmj4cxkI3uMWDcq6pa6h8xwEp QnvxtTZKHEQDLcwJg+bgc7A= X-Received: by 2002:a17:902:aa08:: with SMTP id be8mr2244253plb.82.1569317841957; Tue, 24 Sep 2019 02:37:21 -0700 (PDT) Received: from LGEARND20B15 ([27.122.242.75]) by smtp.gmail.com with ESMTPSA id a18sm1435746pgv.5.2019.09.24.02.37.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Sep 2019 02:37:21 -0700 (PDT) Date: Tue, 24 Sep 2019 18:37:16 +0900 From: Austin Kim To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, varun@chelsio.com, axboe@kernel.dk, davem@davemloft.net, austindh.kim@gmail.com Subject: [PATCH] scsi: libcxgbi: remove unused function to stop warning Message-ID: <20190924093716.GA78230@LGEARND20B15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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