From patchwork Mon May 22 22:01:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 69825 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 822A33858C2B for ; Mon, 22 May 2023 22:02:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 822A33858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684792930; bh=9BBhtx+boORYBxBqfiip+uZ+wTsgM0mMhPA3QPl1jfk=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=uGyp0IoZLhuIs5K3W4iak5rnK4Z40Q9YoVZAiuE/VBUh2vDMRNBEL/k5rkbBk+zhY 4xAoOQmyMJ7pxI2v6IbTyG0jPJfMSDZOZZj8iCFC7tQIGZaRGqmAVhYAhNBOx9rTSi t2Qe+i2qWOoMCVgVrxEqW5TgoWg3Hh9dW88delyE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id B99793858D35 for ; Mon, 22 May 2023 22:01:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B99793858D35 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-30796c0cbcaso6629606f8f.1 for ; Mon, 22 May 2023 15:01:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684792906; x=1687384906; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9BBhtx+boORYBxBqfiip+uZ+wTsgM0mMhPA3QPl1jfk=; b=jdjURzJxoaV0cF0qJeaFYdsCXdEEdbBlqZqKQqowq3Z2ptMh5WLwWyuJCMwELH3H86 s6mb9GOvGlfhKNynKDs74pKs+kPVztzv72RvvpcI/z5DqzVwKK1+SS+Bbq1Bj2fx1Z9n UTAzyh9s3sicZHxbnojrWcq2BXc7W7/1HxmI0WlGKx1gvnEZ8FRAj9lQWa8ZxGPR0PMT 3KTHkrDaQqly304w5HT4CMaenOnXJeWEp6CPm39+QDpd3ztxwBGmqr+8lJf4vQMfTkjW UgTa6VNi+yx733xQoLVaPMK1VtOwDFvfCnA9/esiQ2kNhLRgjadyRBdZRgZ7IFrZtOeP BR7w== X-Gm-Message-State: AC+VfDx4HMJPEK2GbsuCEBSqgLIgcXquGQg7HMcBSsO+zrKemA9vGZ2U xB9jB+PHb4WovJA3BSeaeKYB3/Y6I5w= X-Google-Smtp-Source: ACHHUZ6Vb3EZaITM7u5Yg6+94O7bDkdwF1YQ5LPMe/t2FBoGPr2DpaOtEb2bwaB9BxVbYcjVADNjTg== X-Received: by 2002:a5d:5584:0:b0:309:5d9:bc81 with SMTP id i4-20020a5d5584000000b0030905d9bc81mr8500654wrv.49.1684792906169; Mon, 22 May 2023 15:01:46 -0700 (PDT) Received: from asus5775.alejandro-colomar.es ([170.253.51.134]) by smtp.googlemail.com with ESMTPSA id l1-20020a05600012c100b0030630de6fbdsm8907603wrx.13.2023.05.22.15.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 15:01:45 -0700 (PDT) X-Google-Original-From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Alejandro Colomar , Adhemerval Zanella Netto Subject: [PATCH] Use __nonnull for the epoll_wait(2) family of syscalls Date: Tue, 23 May 2023 00:01:21 +0200 Message-Id: <20230522220120.37208-1-alx@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <6c399f6b-6e89-17c4-2a56-1219a1b86448@linaro.org> References: <6c399f6b-6e89-17c4-2a56-1219a1b86448@linaro.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2489; i=alx@kernel.org; h=from:subject; bh=grxMQoaLX3Z7p590C0m+fZ5O4fsj0geXBW3nHM5/2IM=; b=owEBbQKS/ZANAwAKAZ6MGvu+/9syAcsmYgBka+YvnFAvl3J51UpXzIZs1y+Nrlo+5/6+6PWr9 guQZ9r1qmyJAjMEAAEKAB0WIQTqOofwpOugMORd8kCejBr7vv/bMgUCZGvmLwAKCRCejBr7vv/b MhQVD/9LEY4zv4JL8GRjs6dPJTJrCpF8S/V7hj1t4MQXIRWVnLZEX3dNGymU1OTywYwD0YltxF3 /vd8miMokatOXlf34188zEr2WK1bR2CB/qvyDcdoL+BkQtOqcDhNAn3QxMVf/vf748/OUO7GfVO 0mgezbJ0dnIllIi5IzP/gEUDlpPeFgIQAST4wvkIWTKhFkvU3Y7QO5W7RAjx5oPMWqdSxwKH6zy I7S1IAuGo10Bcn7akJrZkTDku6HiCc9cY4m8s+kqULfi0gb3e+0/fYtpp5dom9g3uMXKu+a50uH FvghzexT9hHD4wXcuztnwHGqxNHe8Cz0Mtm+GrdZv/d5RPyC69QgVTivKrM0Tm8OmcxORAm6gY2 PBTzlzOIXxjllUp/YZN+ESyASVldD9dq+CMhkpRAgadVnpYbNuyPnLh+t27zjtnznr2ZHFr6vjM 3d9xdFeRcB5JYDgUhEWh8mdibv4XRxWp7QX9KLBUrO6wUaeRLWfP9cF3hbckEYBCoxVQR2aXrxl tTy0BEBFg8R6HL17UWrB8NlERJ+VHzGZqobgWstUeUTvgdY2kQ7u7kX1STLY42UtubqvRptXBou J2/EjBwaVm6u02LVtOvUlxPNxFtntZhf0uD3jNKa3LWGJo5yRDXzECejywhKGG/myl0Uc144kUW HyPpmjUe/SCUrpA== X-Developer-Key: i=alx@kernel.org; a=openpgp; fpr=A9348594CE31283A826FBDD8D57633D441E25BB5 X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar Reviewed-by: Adhemerval Zanella --- include/sys/epoll.h | 3 ++- sysdeps/unix/sysv/linux/sys/epoll.h | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/sys/epoll.h b/include/sys/epoll.h index 8049381a26..b23bc9c7c0 100644 --- a/include/sys/epoll.h +++ b/include/sys/epoll.h @@ -9,7 +9,8 @@ libc_hidden_proto (epoll_pwait) #else extern int __epoll_pwait2_time64 (int fd, struct epoll_event *ev, int maxev, const struct __timespec64 *tmo, - const sigset_t *s); + const sigset_t *s) + __nonnull ((2)); libc_hidden_proto (__epoll_pwait2_time64) #endif diff --git a/sysdeps/unix/sysv/linux/sys/epoll.h b/sysdeps/unix/sysv/linux/sys/epoll.h index b17d344e79..23872c9438 100644 --- a/sysdeps/unix/sysv/linux/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/sys/epoll.h @@ -123,7 +123,7 @@ extern int epoll_ctl (int __epfd, int __op, int __fd, __THROW. */ extern int epoll_wait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout) - __attr_access ((__write_only__, 2, 3)); + __attr_access ((__write_only__, 2, 3)) __nonnull ((2)); /* Same as epoll_wait, but the thread's signal mask is temporarily @@ -134,7 +134,7 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events, extern int epoll_pwait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout, const __sigset_t *__ss) - __attr_access ((__write_only__, 2, 3)); + __attr_access ((__write_only__, 2, 3)) __nonnull ((2)); /* Same as epoll_pwait, but the timeout as a timespec. @@ -144,7 +144,7 @@ extern int epoll_pwait (int __epfd, struct epoll_event *__events, extern int epoll_pwait2 (int __epfd, struct epoll_event *__events, int __maxevents, const struct timespec *__timeout, const __sigset_t *__ss) - __attr_access ((__write_only__, 2, 3)); + __attr_access ((__write_only__, 2, 3)) __nonnull ((2)); #else # ifdef __REDIRECT extern int __REDIRECT (epoll_pwait2, (int __epfd, struct epoll_event *__ev, @@ -152,7 +152,7 @@ extern int __REDIRECT (epoll_pwait2, (int __epfd, struct epoll_event *__ev, const struct timespec *__timeout, const __sigset_t *__ss), __epoll_pwait2_time64) - __attr_access ((__write_only__, 2, 3)); + __attr_access ((__write_only__, 2, 3)) __nonnull ((2)); # else # define epoll_pwait2 __epoll_pwait2_time64 # endif