From patchwork Wed May 31 20:44:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 70414 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 235BC3858035 for ; Wed, 31 May 2023 20:45:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 235BC3858035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685565938; bh=bYlr7ZfF+HZKeUhdV0ISDBVJiXNM+l2QNUPSm/etEdg=; 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=EKLsb04qfH1efnYs2DtKCuMFTVDJtrVTF8nbq0ld4v7mzzjZje1NccQ4tAkoVRJB+ ibBKXF20MMrORWeLKy6HpMekI36KnBRNioX2SeR+xxvBMN/n1USy+Jfn+bv1tDxRi8 q/jB/yfulR1lDjMIqbgiPwN1hAdcJi3Zv3yZh8v4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id DC0A53858CD1 for ; Wed, 31 May 2023 20:44:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DC0A53858CD1 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-30af20f5f67so67718f8f.1 for ; Wed, 31 May 2023 13:44:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685565872; x=1688157872; 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=bYlr7ZfF+HZKeUhdV0ISDBVJiXNM+l2QNUPSm/etEdg=; b=DWs7dmo9aD/OPjiL1QPoL6+bIVAcD+qht3qd8lNg92VAPNT2FWKLpEUISPhFAsZFH/ P9U/iP4JizDCeKcJrTTSdSKr4frtSuL/HJoICM7/TuylbaTayVXE9C9z++dv6opMLDET c2jpWAItWOXxbk76pajTGflDbIpce5XwPL5sJpB6xJbdGvkefptv7D8JU68189u8xF+K ZKlsZAgv5Q1ak8TepuLWd9KKZ72/0OBPs8PkdGXDLdZAipPt7muSlplHcspmrcs2MbNk /Ak4LxSq2ger3RthpBgbGu4VTpyDj/xXTWTe0DiCOB94BDgSTyfXKIn+a7sbZ1bGeKwt V9TQ== X-Gm-Message-State: AC+VfDz9fTsy2aFQY3zjOmUc0h46409Cy5HkrV9iz2A2K9YThNX7N1Md vnDl+dBmA/HlX25aHpFF9eD0DLeaXWk= X-Google-Smtp-Source: ACHHUZ4gpmtYpabkqb5LxAyyuXaS/kVzt/elObZ/v3cl80Ig6E8+2UD7hgZPDIiZXHbHHkF9IS1qNw== X-Received: by 2002:a5d:670a:0:b0:306:3a16:1c2 with SMTP id o10-20020a5d670a000000b003063a1601c2mr197537wru.12.1685565872467; Wed, 31 May 2023 13:44:32 -0700 (PDT) Received: from asus5775.alejandro-colomar.es ([170.253.51.134]) by smtp.googlemail.com with ESMTPSA id z17-20020a1c4c11000000b003f4ecf1fcbcsm25947150wmf.22.2023.05.31.13.44.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 13:44:32 -0700 (PDT) X-Google-Original-From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Alejandro Colomar , Adhemerval Zanella Netto Subject: [PATCH v2 2/2] Use __nonnull for the epoll_wait(2) family of syscalls Date: Wed, 31 May 2023 22:44:23 +0200 Message-Id: <20230531204422.18052-2-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=2551; i=alx@kernel.org; h=from:subject; bh=bRLmnhjX0XRsGDhfeA6Xq6teXrexppOLNQUQ/OVQT1M=; b=owEBbQKS/ZANAwAKAZ6MGvu+/9syAcsmYgBkd7GkEISFuHSOVMY7mttACBSD1uwXYp6BIn6Oc X2/2+26IH2JAjMEAAEKAB0WIQTqOofwpOugMORd8kCejBr7vv/bMgUCZHexpAAKCRCejBr7vv/b MlN4D/4iMCvgQ/XunyIc2JdSHC89nyc86oekHpkOVgHdW6jeQ1DkKVMeQtm+Qs8DZ3jIX2GVvKz GqSI9B+goPrNgy/yeEy02OzCZt78xce02nTy7rtUrvnyx6r4S/iGYOnYnxdkZCD+9D2PPKQrYZy mbZOOP9Z5REGG00ePXu6n/UpfiNyIE2P64oP25xzEvJ7oJRvSMyd0dcpjEBuLLrgdNZx6urWWKS VvBCyQ8DTUJAxUHoFx7q5hYH7XY8XNFBauzla1is6BeoaMReZGf+s+FCimhSE8U+qrcE/RuXjBf R8FA4fUA9rYY5B7JSKFSpFESKQgyaFapkP1kgA69D8XSSvdb9EwyHFylepCwSdz7edjJgOlds9k U6dP2wXhi4E6KpSCHN1Zhu7EHJgjAJZ51TeId1p9er131YLYM4dl4coXCxibD8jLcyz8QnrJY3O w1AgvuHwYl6Bvklbf5an9RUqvYOSP5WZR+Z3FqCGcqflU3rH9gjarcwUohRkehEkkrs+jFAxtIi wpyonk4xINKd8RCPiM50HmA4T7s6z4DsUK5eSLO2/yfWN6wjjD7+hGqR6Pr53LC+mCuRFQsI32e G4nYLDKfAkf18ypbDBU7ELUAtHa45yWlmx5LVF4RB55EIa2Yr7GSpcuBYLzqN/pi5vHDvah0ktz LZZ9bShUz1M6Fig== X-Developer-Key: i=alx@kernel.org; a=openpgp; fpr=A9348594CE31283A826FBDD8D57633D441E25BB5 X-Spam-Status: No, score=-10.3 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" Cc: Adhemerval Zanella Netto 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