From patchwork Sat May 25 12:29:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10960749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 00CAF933 for ; Sat, 25 May 2019 12:29:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7106289CC for ; Sat, 25 May 2019 12:29:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5D4F28A0B; Sat, 25 May 2019 12:29:45 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 70614289CC for ; Sat, 25 May 2019 12:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726817AbfEYM3o (ORCPT ); Sat, 25 May 2019 08:29:44 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:54680 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726808AbfEYM3n (ORCPT ); Sat, 25 May 2019 08:29:43 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E5E25F651719228DE6B0; Sat, 25 May 2019 20:29:37 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Sat, 25 May 2019 20:29:27 +0800 From: YueHaibing To: , CC: , , , YueHaibing Subject: [PATCH -next] io_uring: remove set but not used variable 'ret' Date: Sat, 25 May 2019 20:29:04 +0800 Message-ID: <20190525122904.12792-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: fs/io_uring.c: In function io_ring_submit: fs/io_uring.c:2279:7: warning: variable ret set but not used [-Wunused-but-set-variable] It's not used since commit f3fafe4103bd ("io_uring: add support for sqe links") Signed-off-by: YueHaibing --- fs/io_uring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 8ef9d8d3c88b..e2bbd227ab2a 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2276,7 +2276,6 @@ static int io_ring_submit(struct io_ring_ctx *ctx, unsigned int to_submit) for (i = 0; i < to_submit; i++) { struct sqe_submit s; - int ret; if (!io_get_sqring(ctx, &s)) break; @@ -2292,7 +2291,7 @@ static int io_ring_submit(struct io_ring_ctx *ctx, unsigned int to_submit) s.needs_fixed_file = false; submit++; - ret = io_submit_sqe(ctx, &s, statep, &link); + io_submit_sqe(ctx, &s, statep, &link); } io_commit_sqring(ctx);