From patchwork Wed Nov 23 12:53:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 13053638 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCBF7C433FE for ; Wed, 23 Nov 2022 13:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237211AbiKWNMY (ORCPT ); Wed, 23 Nov 2022 08:12:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238776AbiKWNMF (ORCPT ); Wed, 23 Nov 2022 08:12:05 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3B75F2C27 for ; Wed, 23 Nov 2022 04:54:19 -0800 (PST) Received: from localhost.localdomain (unknown [182.253.183.240]) by gnuweeb.org (Postfix) with ESMTPSA id A587D816CA; Wed, 23 Nov 2022 12:53:55 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1669208039; bh=h0e0JzXCZRXQNtV2/YRT81wAEB+a4lz+1Ph/YPS2pZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rjRDnsUyqje1XFruGHaLkm/SnEOS2Di0qBxqxC8b4hYcvYjR3XBpOhB5ZZzxCloyj Y3ezRHNBcBTE9tRr8NYmUEc39bf7sEN/wmula3BPkzy1YRMCrTzbt79IYtIlbDTmX/ LJt+PAv6QqDqnZCbJg+LvWgj9r/G62Nn25k4TcggifJmrsScFWQO7ZNM1MnqIG40Vf TIDClmtDowHQ/Y25V63jkqJR90oDh7217w9+2WpDi2P7/b0ElonoPxtnm3vtE+eChV 797GmKT/h2w+k6nRDG6erpodGni4Mbu8ooMIM9cN6R+Olh0AemSAMLwrruiHAXtoeQ 9aEPfWF3XMFwQ== From: Ammar Faizi To: Jens Axboe Cc: Pavel Begunkov , io-uring Mailing List , GNU/Weeb Mailing List , Muhammad Rizki , Alviro Iskandar Setiawan , Gilang Fachrezy , kernel@vnlx.org, Ammar Faizi Subject: [PATCH liburing v1 1/5] register: Remove useless branches in {un,}register eventfd Date: Wed, 23 Nov 2022 19:53:13 +0700 Message-Id: <20221123124922.3612798-2-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123124922.3612798-1-ammar.faizi@intel.com> References: <20221123124922.3612798-1-ammar.faizi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi IORING_{UN,}REGISTER_EVENTFD and IORING_REGISTER_EVENTFD_ASYNC don't return a positive value. These branches are useless. Remove them. [1]: io_eventfd_register [2]: io_eventfd_unregister Kernel-code-ref: https://github.com/torvalds/linux/blob/v6.1-rc6/io_uring/io_uring.c#L2511-L2547 [1] Kernel-code-ref: https://github.com/torvalds/linux/blob/v6.1-rc6/io_uring/io_uring.c#L2549-L2564 [2] Signed-off-by: Ammar Faizi --- src/register.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/register.c b/src/register.c index e849825..6cd607e 100644 --- a/src/register.c +++ b/src/register.c @@ -208,30 +208,21 @@ int io_uring_unregister_files(struct io_uring *ring) int io_uring_register_eventfd(struct io_uring *ring, int event_fd) { - int ret; - - ret = __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_EVENTFD, - &event_fd, 1); - return (ret < 0) ? ret : 0; + return __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_EVENTFD, + &event_fd, 1); } int io_uring_unregister_eventfd(struct io_uring *ring) { - int ret; - - ret = __sys_io_uring_register(ring->ring_fd, IORING_UNREGISTER_EVENTFD, - NULL, 0); - return (ret < 0) ? ret : 0; + return __sys_io_uring_register(ring->ring_fd, IORING_UNREGISTER_EVENTFD, + NULL, 0); } int io_uring_register_eventfd_async(struct io_uring *ring, int event_fd) { - int ret; - - ret = __sys_io_uring_register(ring->ring_fd, - IORING_REGISTER_EVENTFD_ASYNC, &event_fd, - 1); - return (ret < 0) ? ret : 0; + return __sys_io_uring_register(ring->ring_fd, + IORING_REGISTER_EVENTFD_ASYNC, &event_fd, + 1); } int io_uring_register_probe(struct io_uring *ring, struct io_uring_probe *p, From patchwork Wed Nov 23 12:53:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 13053639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78A19C4332F for ; Wed, 23 Nov 2022 13:12:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236298AbiKWNMp (ORCPT ); Wed, 23 Nov 2022 08:12:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235777AbiKWNMW (ORCPT ); Wed, 23 Nov 2022 08:12:22 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 408F1F72DE for ; Wed, 23 Nov 2022 04:54:30 -0800 (PST) Received: from localhost.localdomain (unknown [182.253.183.240]) by gnuweeb.org (Postfix) with ESMTPSA id 0FCD8816E8; Wed, 23 Nov 2022 12:53:59 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1669208043; bh=9wtLnxSZR7iluiSivJYmlixu+O5bLsOm2cbIjp8hQpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gpsfRyysxeY5Ae29j5hqT3vjOmXCNPRbyf2VDjbnc1gBVj6kKdkw3Not71NHAxhue KRxWwuMYXJlC8ONsdEf8SUuLS5ViuDnmVVcWlag5lYi39cooGnYujotF9o0YO+c85S P/RjoF8Pw8u8neqDRrPmF4Qo9jwKMDh95qKNY1QyVN6mEgjTYGmjEk0BK7KjC99Og6 Ww6p0VNI+71ddMeME5pU74KL084TrwNZLn4Em7TmWOsjL3GNf/oHVR9LlTbU3wlH98 XRVlcn5L3NGJ2sR3A4S6T16lKvAkwjwRXhjT/c4tctTW1MhOu3Re30ZRPo4pBdNa4s ALf05PcJIy+qQ== From: Ammar Faizi To: Jens Axboe Cc: Pavel Begunkov , io-uring Mailing List , GNU/Weeb Mailing List , Muhammad Rizki , Alviro Iskandar Setiawan , Gilang Fachrezy , kernel@vnlx.org, Ammar Faizi Subject: [PATCH liburing v1 2/5] register: Remove useless branches in {un,}register buffers Date: Wed, 23 Nov 2022 19:53:14 +0700 Message-Id: <20221123124922.3612798-3-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123124922.3612798-1-ammar.faizi@intel.com> References: <20221123124922.3612798-1-ammar.faizi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi IORING_REGISTER_BUFFERS and IORING_UNREGISTER_BUFFERS don't return a positive value. These bracnes are useless. Remove them. [1]: io_sqe_buffers_register [2]: io_sqe_buffers_unregister Kernel-code-ref: https://github.com/torvalds/linux/blob/v6.1-rc6/io_uring/rsrc.c#L1250-L1307 [1] Kernel-code-ref: https://github.com/torvalds/linux/blob/v6.1-rc6/io_uring/rsrc.c#L1036-L1054 [2] Signed-off-by: Ammar Faizi --- src/register.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/register.c b/src/register.c index 6cd607e..adb64cc 100644 --- a/src/register.c +++ b/src/register.c @@ -54,20 +54,14 @@ int io_uring_register_buffers_sparse(struct io_uring *ring, unsigned nr) int io_uring_register_buffers(struct io_uring *ring, const struct iovec *iovecs, unsigned nr_iovecs) { - int ret; - - ret = __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_BUFFERS, - iovecs, nr_iovecs); - return (ret < 0) ? ret : 0; + return __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_BUFFERS, + iovecs, nr_iovecs); } int io_uring_unregister_buffers(struct io_uring *ring) { - int ret; - - ret = __sys_io_uring_register(ring->ring_fd, IORING_UNREGISTER_BUFFERS, - NULL, 0); - return (ret < 0) ? ret : 0; + return __sys_io_uring_register(ring->ring_fd, IORING_UNREGISTER_BUFFERS, + NULL, 0); } int io_uring_register_files_update_tag(struct io_uring *ring, unsigned off, From patchwork Wed Nov 23 12:53:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 13053640 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9220CC4332F for ; Wed, 23 Nov 2022 13:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237938AbiKWNM5 (ORCPT ); Wed, 23 Nov 2022 08:12:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238003AbiKWNMb (ORCPT ); Wed, 23 Nov 2022 08:12:31 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 524C7F8847 for ; Wed, 23 Nov 2022 04:54:33 -0800 (PST) Received: from localhost.localdomain (unknown [182.253.183.240]) by gnuweeb.org (Postfix) with ESMTPSA id 70E4B81642; Wed, 23 Nov 2022 12:54:04 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1669208048; bh=3fqkhmZgFdmIuypFqGHSrYYYxflG5WO0kGOle4KtvAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o4ko4gKjs9lgXOyReOvpOAYSN8PBDGvkeM+MXBT5Yfzk30kJRvTpJSNfa80WBubeC dc8JmsI68PY6WOc8lG7PvC9bhffMHS32BhIDH4PTAHaar0En4r/YDBss8Ra+s4vBZG Qt+5mdq2i6H1oLqUz7tDAugqcPPmWzIK+rmsjBkAHG4fWQ93ugI675YdpTXWCJG+iO hDA1x+/ObzI2VzXbPYDwJmu/2MWX0a1FOD4LjlTsSF3ubxezejCDaqvE9X/C9MczSw lL7cM+8gCQhV3qMCuUG/tQcJbAh0sI0v43fd4rxasCccS7TbPHAnqzGMicvecwB/O1 njQpJJar2jARg== From: Ammar Faizi To: Jens Axboe Cc: Pavel Begunkov , io-uring Mailing List , GNU/Weeb Mailing List , Muhammad Rizki , Alviro Iskandar Setiawan , Gilang Fachrezy , kernel@vnlx.org, Ammar Faizi Subject: [PATCH liburing v1 3/5] register: Remove useless branch in unregister files Date: Wed, 23 Nov 2022 19:53:15 +0700 Message-Id: <20221123124922.3612798-4-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123124922.3612798-1-ammar.faizi@intel.com> References: <20221123124922.3612798-1-ammar.faizi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi IORING_UNREGISTER_FILES doesn't return a positive value. This branch is useless. Remove it. [1]: io_sqe_files_unregister Kernel-code-ref: https://github.com/torvalds/linux/blob/v6.1-rc6/io_uring/rsrc.c#L787-L805 [1] Signed-off-by: Ammar Faizi --- src/register.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/register.c b/src/register.c index adb64cc..c66f63e 100644 --- a/src/register.c +++ b/src/register.c @@ -193,11 +193,8 @@ int io_uring_register_files(struct io_uring *ring, const int *files, int io_uring_unregister_files(struct io_uring *ring) { - int ret; - - ret = __sys_io_uring_register(ring->ring_fd, IORING_UNREGISTER_FILES, - NULL, 0); - return (ret < 0) ? ret : 0; + return __sys_io_uring_register(ring->ring_fd, IORING_UNREGISTER_FILES, + NULL, 0); } int io_uring_register_eventfd(struct io_uring *ring, int event_fd) From patchwork Wed Nov 23 12:53:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 13053641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D39F0C4332F for ; Wed, 23 Nov 2022 13:13:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236707AbiKWNNY (ORCPT ); Wed, 23 Nov 2022 08:13:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236616AbiKWNNI (ORCPT ); Wed, 23 Nov 2022 08:13:08 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15341FCDE3 for ; Wed, 23 Nov 2022 04:54:57 -0800 (PST) Received: from localhost.localdomain (unknown [182.253.183.240]) by gnuweeb.org (Postfix) with ESMTPSA id D0DF0816DC; Wed, 23 Nov 2022 12:54:08 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1669208052; bh=JK7/UCifqW8wTlavxsrzyY75SQ9viwdXe29FHFo0AQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FyyBq2oydhR3Kz9Z52H1d7pKqUwda8+nXClSqv8HltIPGRezDquhT4ukKeVWeutOu 0CzO7lDj6CAVfiOjfVFuPi4ktLzT470++nQ8X+FHRKeK53L16j6LjNfva6yAd3TTM2 EzeClH9J0yqWnfXKo8Y+HbLvaci0thu91POwHNtOrLjcABmEfFzDeA9/aX4BZDg/uV sdc6E8q/DElMj9SZnX11E/fmw+94i28+NGL4rbZpTVv3Y+gwnyF15oKaBcElt83iV2 gNMiuQz+mh8w6Zi3O0Mkcbyelb4vB+FwiqtOcmffe1qKc6i9l82rY66yybDhYUqviY LxBMdsFw2GFqA== From: Ammar Faizi To: Jens Axboe Cc: Pavel Begunkov , io-uring Mailing List , GNU/Weeb Mailing List , Muhammad Rizki , Alviro Iskandar Setiawan , Gilang Fachrezy , kernel@vnlx.org, Ammar Faizi Subject: [PATCH liburing v1 4/5] register: Remove useless branch in register probe Date: Wed, 23 Nov 2022 19:53:16 +0700 Message-Id: <20221123124922.3612798-5-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123124922.3612798-1-ammar.faizi@intel.com> References: <20221123124922.3612798-1-ammar.faizi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi IORING_REGISTER_PROBE doesn't return a positive value. This branch is useless. Remove it. [1]: io_probe Kernel-code-ref: https://github.com/torvalds/linux/blob/v6.1-rc6/io_uring/io_uring.c#L3608-L3646 [1] Signed-off-by: Ammar Faizi --- src/register.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/register.c b/src/register.c index c66f63e..6075f04 100644 --- a/src/register.c +++ b/src/register.c @@ -219,11 +219,8 @@ int io_uring_register_eventfd_async(struct io_uring *ring, int event_fd) int io_uring_register_probe(struct io_uring *ring, struct io_uring_probe *p, unsigned int nr_ops) { - int ret; - - ret = __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_PROBE, p, - nr_ops); - return (ret < 0) ? ret : 0; + return __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_PROBE, p, + nr_ops); } int io_uring_register_personality(struct io_uring *ring) From patchwork Wed Nov 23 12:53:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 13053642 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9276EC433FE for ; Wed, 23 Nov 2022 13:13:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237154AbiKWNNZ (ORCPT ); Wed, 23 Nov 2022 08:13:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiKWNNL (ORCPT ); Wed, 23 Nov 2022 08:13:11 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92999FCDF5 for ; Wed, 23 Nov 2022 04:54:59 -0800 (PST) Received: from localhost.localdomain (unknown [182.253.183.240]) by gnuweeb.org (Postfix) with ESMTPSA id 58093816F7; Wed, 23 Nov 2022 12:54:13 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1669208057; bh=AceEeefFFeGB0qMzUO5w2GRK4sjEAwRSlatli7g4VE4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dfqQ0rJ/iaZj+DGrhpBMcxjl/siasdPVdgUwjQGo3bR1Ps5T1JurQ8hHlxJKan3YF mmVzizqUE9ri4pyxgvZRCB6rIIYj4W2L1dX+aKpPKNtKQs1M5sim9Iwh5xjohQRh1Q FSWwpvhp5lh8+4HC28+ctxOaG1izJqeOVmUOyIr5x5DMeM1VL9NVdntHr9+4+0bu1z +aU8vZlPJbUxWMNJk4tt1+Ru4cipOXuLdO3iHdeNmJrGfHFkIICsw3e2OTdId52H7Q Mk0OE7K/HPks9pNp5+tKAY5tpw5lyux5rj1XHRXQVGpe9IcxVYVNHCC5ABj/9KhY46 RVaotgHfrwuuw== From: Ammar Faizi To: Jens Axboe Cc: Pavel Begunkov , io-uring Mailing List , GNU/Weeb Mailing List , Muhammad Rizki , Alviro Iskandar Setiawan , Gilang Fachrezy , kernel@vnlx.org, Ammar Faizi Subject: [PATCH liburing v1 5/5] register: Remove useless branch in register restrictions Date: Wed, 23 Nov 2022 19:53:17 +0700 Message-Id: <20221123124922.3612798-6-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123124922.3612798-1-ammar.faizi@intel.com> References: <20221123124922.3612798-1-ammar.faizi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi IORING_REGISTER_RESTRICTIONS doesn't return a positive value. This branch is useless. Remove it. [1]: io_register_restrictions Kernel-code-ref: https://github.com/torvalds/linux/blob/v6.1-rc6/io_uring/io_uring.c#L3665-L3733 [1] Signed-off-by: Ammar Faizi --- src/register.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/register.c b/src/register.c index 6075f04..5fdc6e5 100644 --- a/src/register.c +++ b/src/register.c @@ -239,12 +239,9 @@ int io_uring_register_restrictions(struct io_uring *ring, struct io_uring_restriction *res, unsigned int nr_res) { - int ret; - - ret = __sys_io_uring_register(ring->ring_fd, - IORING_REGISTER_RESTRICTIONS, res, - nr_res); - return (ret < 0) ? ret : 0; + return __sys_io_uring_register(ring->ring_fd, + IORING_REGISTER_RESTRICTIONS, res, + nr_res); } int io_uring_enable_rings(struct io_uring *ring)