From patchwork Sun Mar 11 16:27:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 10274849 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0A8526055C for ; Sun, 11 Mar 2018 16:28:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEDE8287A4 for ; Sun, 11 Mar 2018 16:28:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E37EC28B68; Sun, 11 Mar 2018 16:28:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CE40287A4 for ; Sun, 11 Mar 2018 16:28:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932168AbeCKQ2G (ORCPT ); Sun, 11 Mar 2018 12:28:06 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:44011 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932136AbeCKQ2F (ORCPT ); Sun, 11 Mar 2018 12:28:05 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ev3pE-0005B1-D6; Sun, 11 Mar 2018 16:27:56 +0000 From: Colin King To: Santosh Shilimkar , "David S . Miller" , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][rds-next] rds: remove redundant variable 'sg_off' Date: Sun, 11 Mar 2018 17:27:56 +0100 Message-Id: <20180311162756.26950-1-colin.king@canonical.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King Variable sg_off is assigned a value but it is never read, hence it is redundant and can be removed. Cleans up clang warning: net/rds/message.c:373:2: warning: Value stored to 'sg_off' is never read Signed-off-by: Colin Ian King Acked-by: Sowmini Varadhan Acked-by: Santosh Shilimkar --- net/rds/message.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/rds/message.c b/net/rds/message.c index 90dcdcfe9f62..9c41bdd9e444 100644 --- a/net/rds/message.c +++ b/net/rds/message.c @@ -357,7 +357,6 @@ struct rds_message *rds_message_map_pages(unsigned long *page_addrs, unsigned in int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *from) { - unsigned long sg_off; struct scatterlist *sg; int ret = 0; int length = iov_iter_count(from); @@ -370,7 +369,6 @@ int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *from) * now allocate and copy in the data payload. */ sg = rm->data.op_sg; - sg_off = 0; /* Dear gcc, sg->page will be null from kzalloc. */ info = kzalloc(sizeof(*info), GFP_KERNEL); if (!info)