From patchwork Tue Dec 29 09:45:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 7929341 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7627DBEEE5 for ; Tue, 29 Dec 2015 10:00:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99386201B4 for ; Tue, 29 Dec 2015 10:00:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4377220173 for ; Tue, 29 Dec 2015 09:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752706AbbL2J76 (ORCPT ); Tue, 29 Dec 2015 04:59:58 -0500 Received: from mail-bl2on0094.outbound.protection.outlook.com ([65.55.169.94]:16647 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751319AbbL2J74 (ORCPT ); Tue, 29 Dec 2015 04:59:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zvR+45WDQyEIyUZ6G4/FA9c+FGfST79Pal3BThEuwPY=; b=Eb/TfWzvXdPqt+l5vNbDLUtkqHCYaL/LVpCy14h3sNggEPoVPICDjM8K/U6JaLyqRxJq/HUdbDSsYwqFT3alwfWmDv+2cw2sUOlk+wJ0jhao29JAXYEaZZqykSxzZE0VgGkNfJ1gWzamj6XMn8wfh1x+ei2OMkh+eee9FNAR/os= Received: from BLUPR02CA037.namprd02.prod.outlook.com (10.160.23.155) by BN1PR0201MB0817.namprd02.prod.outlook.com (10.160.170.15) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 29 Dec 2015 09:45:08 +0000 Received: from BN1AFFO11OLC004.protection.gbl (2a01:111:f400:7c10::114) by BLUPR02CA037.outlook.office365.com (2a01:111:e400:8ad::27) with Microsoft SMTP Server (TLS) id 15.1.361.13 via Frontend Transport; Tue, 29 Dec 2015 09:45:08 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.173 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.173; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.173) by BN1AFFO11OLC004.mail.protection.outlook.com (10.58.53.75) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Tue, 29 Dec 2015 09:45:07 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep12.sandisk.com (Symantec Messaging Gateway) with SMTP id DE.5D.32178.12652865; Tue, 29 Dec 2015 01:45:05 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.248.2; Tue, 29 Dec 2015 01:45:06 -0800 X-AuditID: ac160a69-f79f76d000007db2-be-568256219b2c Received: from [10.50.231.66] ( [10.177.8.100]) by milsmgip11.sandisk.com (Symantec Messaging Gateway) with SMTP id DA.C8.15370.02652865; Tue, 29 Dec 2015 01:45:05 -0800 (PST) To: Doug Ledford CC: Sagi Grimberg , Christoph Hellwig , "linux-rdma@vger.kernel.org" From: Bart Van Assche Subject: [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages() Message-ID: <5682561F.7000400@sandisk.com> Date: Tue, 29 Dec 2015 10:45:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsWyRoxnka5iWFOYwcx5xhYvz39gtVi5+iiT xbNDvSwWN9oesDmweOy+2cDm8Wz6YSaP9/uusnl83iQXwBLFZZOSmpNZllqkb5fAlbGouZul YAtHxcNz+9gbGD+xdTFyckgImEh0dl9kgrDFJC7cWw8U5+IQEjjBKPF+3S1WCGcHo8TZuUdZ YTq2z50HldjMKLH6zCV2kISIgJrEpleL2EESzALNjBLbfk1lBkmwCRhJfHs/kwXEFhYIkZg/ exLYJF4BLYkn/xvA4iwCqhJXHv4EinNwiApESCzakQlRIihxcuYTFpAws4CmxPpd+iBhZgF5 ie1v5zCDrJIQmMUq0dj9GmykkIC6xMkl85kmMArNQtI+C6F9FpL2BYzMqxjFcjNzinPTUwsM jfSKE/NSMouz9ZLzczcxggOeK3MH44pJ5ocYBTgYlXh4MyY1hgmxJpYVV+YeYpTgYFYS4XXd AhTiTUmsrEotyo8vKs1JLT7EKM3BoiTOa92iFiYkkJ5YkpqdmlqQWgSTZeLglGpgbN1YYzdx yco9d9UfGElNaHaoSvq8ar9QQZS0l5PublOeGZG8x/5prihl02aU69j87I7d+afWpvc3HtT4 bXrh0uyvr6p5PatsVijNOtDDqxIxw/REd+H/8jeaZhfjtkq5MmYwd//6fFC18frsF0kWL/db TZQW8X636G+s5vuZPAaz+91utEtVKrEUZyQaajEXFScCANz39bF0AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOJMWRmVeSWpSXmKPExsXCtZEjRVcxrCnMYPMzTYuX5z+wWqxcfZTJ 4tmhXhaLG20P2BxYPHbfbGDzeDb9MJPH+31X2Tw+b5ILYInisklJzcksSy3St0vgyljU3M1S sIWj4uG5fewNjJ/Yuhg5OSQETCS2z53HCmGLSVy4tx4ozsUhJLCRUeL4zdVgRSICahKbXi1i B7GZBZoZJZr+x4PYbAJGEt/ez2QBsYUFQiTmz54ENohXQEviyf8GsDiLgKrElYc/geIcHKIC ERKLdmRClAhKnJz5hAVipLrEn3mXmCFseYntb+cwT2DknYWkbBaSsllIyhYwMq9iFMvNzCnO Tc8sMDTUK07MS8ksztZLzs/dxAgOOs7IHYxPJ5ofYmTi4JRqYBT4teRzH+sE35iNluduPGNc ezlpbnJlgveBBLFL0x587eP4/OXJl033u/+rpnrw7n61Uv2jwTZ/n78nsxWefwsOUOq8WKWn ciT183mdJoZTM5lfXb86abnI3Ysb+H/OPH5gxpfO01vSJswyWGP+NsZs6X6jN/rzvhVEi+0V sDBxldrO2Xf/3PP5SizFGYmGWsxFxYkA8tUk/uoBAAA= X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC004; 1:JzsoIXKIIL6n5itewRYfxYBiZsJ6Gp6JTAFRqNKkvskcDkv9IV3alZiW0PQ9lExOc7FHuvB09kYLWa+8rraAmMXiZernZYhvoQOncWV4uITehsw1/A2UMIjesPeihVdX6nZLHaDWgkJc9TNJPZRvYEfsfG8NHWDxHFMI9uPg5Cr6ntuTovuNHRxlgDOFP7i1ebtQZtpvdKOOO4nq+LVejNPcT1y1lkSW6YEWsz5KN80cX/sINXXhr0VpVB4yyuQd3tEB1UWzmJn685YFoCvm7NNG42pWxaU3P3FMdj1vgf1vR7UgHPIRW3RkdPDjCiMB8Pc1/4l9lGf/VPVcKE54b1qV/UXN9NnPW5CMfq1/rJN5hmpqkD7kXBG4/zMAqSamYombPKdsp4319dTLN/lzxQ== X-Forefront-Antispam-Report: CIP:63.163.107.173; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(229853001)(5008740100001)(99136001)(36756003)(11100500001)(1096002)(65816999)(1220700001)(586003)(81156007)(23676002)(189998001)(230700001)(5001960100002)(110136002)(97736004)(33656002)(92566002)(77096005)(65806001)(86362001)(64126003)(230783001)(4001350100001)(59896002)(47776003)(65956001)(54356999)(50986999)(80316001)(19580405001)(69596002)(83506001)(50466002)(87266999)(106466001)(19580395003)(87936001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0201MB0817; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0817; 2:Jtcpki1Qm09FrdAE44mJhQFQN+KBdOHZYQzNrN9ivVAxTtuY8OKbOJ4h487jS1kfXKhbAr/6rdtWXLNXV80qWGSWt6iklk56nco+E142zLIb22EUF06S1h8Cjv21yQh12J9dVcAkF6ogz/a7V4kUIQ==; 3:IU818W+x2CTR+31CAdKkM/RVCyRwPJTrMW1R1PjNRcTAztawsnOkziqhE/qoGpoNvDpznaOQw381GX0xXNqiujfcGlyQNq9U6lRQWyxo+ID+W1+kVJIdol7mKNx/WZDu/aZq2OqJJN7bs3V0AMvAl3tuUZtTQUdqEINxQ0eYGn+WwZ2B7T00V2ctpTbo468wK1JtyziGJzL7PlZKRtu7tA/R6hwdLJOIQUBb8Gn8EUjlbsC8w+qg4HuEX53JRX42F204iGvijPwyPDMMV+K6LA==; 25:n/DSuhRvCJ6f3i70vCXhpq7VkV1vcgNPoMJ34tuyh0pvirEPzy2hl/DfjVGuRgYoNMlJ3k7cl3h86mkMUpN9WRXBYW+/pwKf9Bi27rHkdgatOHkG7ioPt4Ukz6AkzM0+H67LhkL6KI+LBa6EVnV1/x+BUyPnFdueIRyqRTt8Ydw3Ni/KCReuCUIHUDV6qc4eXfnkOEVRLyfAH3zT6C9MFwGOzRGhP80sZs/oe2aTqGruMljyRyLJNBffTVYkHuBP4WiDEIuRKhtRkj2nTa6uOg== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BN1PR0201MB0817; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0817; 20:mhPJnBqdXpfTG21kgeuymnn55h2ClDMDMowmco0fyoVGSQ4kdaP0bCmiqtQdXbQacifpzplW8oR6ptoIiGZwlrVw9woNloz4Ex0Dycaz3NkiXmFR30LuMzzwz3JN8Ek2nNCu/raLcoyaw1i/WUotESyuFVoXGckH7I5I0GS3k7EONxcxR1TV6GpSLVTUq59uhSYgG6ltsCA8W1fZH8AuY3JK8FwRj2byVT20CMcN6FlhvsuDHiIC/95JcQBz97he1xxo2ko5U+xP3GiHo96CSWL5YD1Kp2G0rlGmNzpI0zxje70K18xWnrmTnQZtySIaflgi4r7SSEYVDBbSY1FiRYYAP3H3etwXDW9So6dcS5drDJalQB1aSFK90LfP0t53fipAM3svoLAJ7Y1GM1uGvPs074HTELR3ATUcnbrD7JWz8wXFRZVMs2XRo3mv0FLQipx0MER4kU+X1ntzAcGqO6e2+u8bTSOD1tbDtodoF3oS/DX7sfD59eNPcJRGWI/T X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(34787635062028)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046); SRVR:BN1PR0201MB0817; BCL:0; PCL:0; RULEID:; SRVR:BN1PR0201MB0817; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0817; 4:GDxoKqfA5/bkBGGtS4muQ1CgNgTtDSdXSHwr2OCrFc/x/PSzsd24xZa6DbE+qIkAZiUJ/TnvvJKts4L48ni+RBVfwOSIT1C01nXflKj35L/RkzoPnGshqYoPMko60vhHN+LGnaw7Z//WtYOlWOkY53aAaioXd0hWOTA3mNyXYgeifpPFsi6oQr05tTHix/aWE/v7tE4/XTY1k2iLRTz7yNlpCiciGrCP72GGf5Gtb+7gBeg29/F/L62uPDOuGXTGl5kL8AWlRcg/7wPTIYfkZHR/b5cOfOF7BSDpiMGPS9XnB5gSjXn8RrBzmKyNqNeXcOSyFulFtl5WdrfjLRMNLHlIBpOgnJlfOx159i5ypRM1ZcTQwK9Olp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mz317H7IuFkVb6dBTlzGJnsZzvdV1MVn4RjFT88ag==; 24:hGyP+A+HEqkOVmGPvj92XQlnY6UAvLyrh34QJpHPPo3peWLavT7nNDMtSNjCWgxHUMGADDf9z97n9fYQhtO8Uv/Rvlc5xtXP+y6huV0SYPU=; 20:4jckACst11gzY0U8Td8C7+eelWsxHM5Jdg7fobu/leY7qAcKWtFn6XOoNEsCcTqLxh3cD4GQDXyA4nV4ZUUa8sW9fzradFJTZTVjGaXs/UPsL5bMCWGN/X2muCkF4kX+YnNt7tUtOraYjYCxvCKl3zIKhJByThkmYhBYZiQDuYEoC421BUiMzt0TITAAyjPjgke9OUdvNKTXGxadRrmSNaLci1NqVCNonNlgMKcI5royrnUcaKjY1wLKNmOkq+3/ SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2015 09:45:07.1714 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.173]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0201MB0817 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Detected this by building the IB core with W=1. See also patch "IB core: Fix ib_sg_to_pages()" (commit 8f5ba10ed40a). Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Christoph Hellwig Reviewed-by: Leon Romanovsky Acked-by: Sagi Grimberg Reviewed-by: Christoph Hellwig --- drivers/infiniband/core/verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 545906d..c90ed29 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -1530,7 +1530,7 @@ int ib_sg_to_pages(struct ib_mr *mr, int (*set_page)(struct ib_mr *, u64)) { struct scatterlist *sg; - u64 last_end_dma_addr = 0, last_page_addr = 0; + u64 last_end_dma_addr = 0; unsigned int last_page_off = 0; u64 page_mask = ~((u64)mr->page_size - 1); int i, ret; @@ -1572,7 +1572,6 @@ next_page: mr->length += dma_len; last_end_dma_addr = end_dma_addr; - last_page_addr = end_dma_addr & page_mask; last_page_off = end_dma_addr & ~page_mask; }