From patchwork Fri Nov 18 18:23:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Beguin X-Patchwork-Id: 22433 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp344586wrr; Fri, 18 Nov 2022 10:24:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf74HxsfhOs4TqOp63+MuEyJbqF+tmHII43MaPJOQ++zR76u4NuEAfRu6TQTGR6yl64bvhFH X-Received: by 2002:a63:fe16:0:b0:46b:8e9:7d5f with SMTP id p22-20020a63fe16000000b0046b08e97d5fmr7810384pgh.597.1668795879888; Fri, 18 Nov 2022 10:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668795879; cv=none; d=google.com; s=arc-20160816; b=kup1+LZX67Q52aLLfDUwyt6axYoUD4NgSkSV+nFRNHFSx2yu+jt31nGkco945P7ACI GGKg+KGdeyQzfO1LUa3lyo12S3mbNzrTvtVFe8EsPmiu5Xl0/fHWLxiwxKY1WxbHFEc7 a+LI+I82V1FAPkaEgLHDRCVXf/CtWmcsjvyvMm+d8Y+5PwJsHisB/yJ6yEaVHbXLIVzV NjoZO2fQirW/5J2K82COswViYZh2SENqZ4rRruYv2yYjvZfDrI9VgsT2+0H5E8bL1UEI cAUnAT58I4Rt7ccwY0uXkxTAhJdPH5gs3g5r/WnTUDrsIR57h9rJ8xRoBXM18Evijq/b XdjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vrZu6MxE9V2lrmkTP7p6YrgX3yUV8vdw6JbzZsfWtro=; b=FxmJ6g8EIfeOszcurBCs4xfhrUdqpbTwI/dPjIuhYBWIUPyBq3cZ+D0lkkAI8vNIiq TwJdBewVMIB425tDmXfHyW7l992PEmB97l3cvpG2P89jJhKCSy6t+QdNB3t4PUeYZnXH dkGIMtfijBWOCrwpFT2nIbBPgC0w6GNkqNSPdomBOo1PTMC6/tD9lYFYpp1C6N+Qge0E 611Ee/FB5BFbHd9CsGH7VbPSOsgPNOldMW1072xZGrSVKBJCLEIF/vVgMt+9z0/Qq/nQ Xh+SNFItZuONqbVT4SnTcOfNkXZjsQU1L4izKnBv/l6qU21OeaHWk21Xbly1ZswOJn9O yb3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M0mVeRFP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq7-20020a17090b380700b0021876762826si5753333pjb.146.2022.11.18.10.24.26; Fri, 18 Nov 2022 10:24:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M0mVeRFP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242676AbiKRSYC (ORCPT + 99 others); Fri, 18 Nov 2022 13:24:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242641AbiKRSXV (ORCPT ); Fri, 18 Nov 2022 13:23:21 -0500 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCDC9942F5; Fri, 18 Nov 2022 10:23:20 -0800 (PST) Received: by mail-qt1-x833.google.com with SMTP id s4so3662843qtx.6; Fri, 18 Nov 2022 10:23:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vrZu6MxE9V2lrmkTP7p6YrgX3yUV8vdw6JbzZsfWtro=; b=M0mVeRFPGC+9qlEjwEetRK5+DS6SNGvQSlv/m2A+xNrwYtXIbXX24a36XThAaDwvqE bPpb3Sd4xO9/1fiymHJ9y0QaLdoO5d3H0v22bp3hE0eTgowt1cQKRPERbG7SOVgeqBSR rklzhXJeaAqFNEdoYIlES3etk/L3b0bXEqs/JL8s6UVeVQ62FJBnallgIaBFZRu62hZ0 sRuomxQ4KQFz/VGKkrysPPj1pBE56FLH7lPkkbP1GoLzNC0aOaOqEJ45CrVSkCMrkEEz jc3vj0qAzLbX5eKbfDY08yx63TZiEOf42bAJdiLWn9q+odepbPy/knIpqBLL4LYu4NZO eskA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vrZu6MxE9V2lrmkTP7p6YrgX3yUV8vdw6JbzZsfWtro=; b=W6mARYIapk2iELId0hDmoRhiodXNQG5qQA9lY5iLrQTJx3N+cQCKwrL2tU8+o+gAvz dN0jCMrRapAJX00uRQm03rmlsLQw8tltOYBmCOYEjL6yf7jCv+lFLj33Und2nBrJ0Ocy mhRD5soBuhPiVKjZMkwKVBhOO3QGs+42YCNQeW9ZhagGgKKytuLnq8+u360vZ8APLTh1 D0gOz7YTJ9ZVR/7lkNIoNQclkogcRReOA30xMkT5YyWFFNJo7Smy5w86vcNRoWTH+Viy xuX9y+6llzNLyuRPDgFlKme8Mj6fP/yGPVftC8q7S9ReqSuRX0iSWar9xSkIa0iDElX9 Ix7A== X-Gm-Message-State: ANoB5plTrBseSHQmybrdbwkRqaq8KuAbJDzFLmlCgBKXiQP1E0jNbvXB WOJQx/Ki0mcT0PWUcNvYun8= X-Received: by 2002:a05:622a:1e87:b0:3a5:4cee:6eb1 with SMTP id bz7-20020a05622a1e8700b003a54cee6eb1mr7719977qtb.20.1668795799974; Fri, 18 Nov 2022 10:23:19 -0800 (PST) Received: from shaak.xiphos.ca (modemcable055.92-163-184.mc.videotron.ca. [184.163.92.55]) by smtp.gmail.com with ESMTPSA id q46-20020a05620a2a6e00b006fbcab95d70sm2349025qkp.101.2022.11.18.10.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 10:23:19 -0800 (PST) From: Liam Beguin To: Liam Beguin , Jonathan Corbet , Randy Dunlap Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] math64: favor kernel-doc from header files Date: Fri, 18 Nov 2022 13:23:07 -0500 Message-Id: <20221118182309.3824530-1-liambeguin@gmail.com> X-Mailer: git-send-email 2.37.1.223.g6a475b71f8c4 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749859308216818624?= X-GMAIL-MSGID: =?utf-8?q?1749859308216818624?= Fix the kernel-doc markings for div64 functions to point to the header file instead of the lib/ directory. This avoids having implementation specific comments in generic documentation. Furthermore, given that some kernel-doc comments are identical, drop them from lib/math64 and only keep there comments that add implementation details. Signed-off-by: Liam Beguin Acked-by: Randy Dunlap Tested-by: Randy Dunlap --- Documentation/core-api/kernel-api.rst | 3 --- include/linux/math64.h | 12 ++++++------ lib/math/div64.c | 15 ++------------- 3 files changed, 8 insertions(+), 22 deletions(-) base-commit: 59d0d52c30d4991ac4b329f049cc37118e00f5b0 diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst index 06f4ab122697..c9412eb85552 100644 --- a/Documentation/core-api/kernel-api.rst +++ b/Documentation/core-api/kernel-api.rst @@ -171,9 +171,6 @@ Division Functions .. kernel-doc:: include/linux/math64.h :internal: -.. kernel-doc:: lib/math/div64.c - :functions: div_s64_rem div64_u64_rem div64_u64 div64_s64 - .. kernel-doc:: lib/math/gcd.c :export: diff --git a/include/linux/math64.h b/include/linux/math64.h index a14f40de1dca..1538844fcb51 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h @@ -29,7 +29,7 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) return dividend / divisor; } -/* +/** * div_s64_rem - signed 64bit divide with 32bit divisor with remainder * @dividend: signed 64bit dividend * @divisor: signed 32bit divisor @@ -43,7 +43,7 @@ static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) return dividend / divisor; } -/* +/** * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder * @dividend: unsigned 64bit dividend * @divisor: unsigned 64bit divisor @@ -57,7 +57,7 @@ static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) return dividend / divisor; } -/* +/** * div64_u64 - unsigned 64bit divide with 64bit divisor * @dividend: unsigned 64bit dividend * @divisor: unsigned 64bit divisor @@ -69,7 +69,7 @@ static inline u64 div64_u64(u64 dividend, u64 divisor) return dividend / divisor; } -/* +/** * div64_s64 - signed 64bit divide with 64bit divisor * @dividend: signed 64bit dividend * @divisor: signed 64bit divisor @@ -300,7 +300,7 @@ u64 mul_u64_u64_div_u64(u64 a, u64 mul, u64 div); #define DIV64_U64_ROUND_CLOSEST(dividend, divisor) \ ({ u64 _tmp = (divisor); div64_u64((dividend) + _tmp / 2, _tmp); }) -/* +/** * DIV_U64_ROUND_CLOSEST - unsigned 64bit divide with 32bit divisor rounded to nearest integer * @dividend: unsigned 64bit dividend * @divisor: unsigned 32bit divisor @@ -313,7 +313,7 @@ u64 mul_u64_u64_div_u64(u64 a, u64 mul, u64 div); #define DIV_U64_ROUND_CLOSEST(dividend, divisor) \ ({ u32 _tmp = (divisor); div_u64((u64)(dividend) + _tmp / 2, _tmp); }) -/* +/** * DIV_S64_ROUND_CLOSEST - signed 64bit divide with 32bit divisor rounded to nearest integer * @dividend: signed 64bit dividend * @divisor: signed 32bit divisor diff --git a/lib/math/div64.c b/lib/math/div64.c index 46866394fc84..55a81782e271 100644 --- a/lib/math/div64.c +++ b/lib/math/div64.c @@ -63,12 +63,6 @@ uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base) EXPORT_SYMBOL(__div64_32); #endif -/** - * div_s64_rem - signed 64bit divide with 64bit divisor and remainder - * @dividend: 64bit dividend - * @divisor: 64bit divisor - * @remainder: 64bit remainder - */ #ifndef div_s64_rem s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) { @@ -89,7 +83,7 @@ s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) EXPORT_SYMBOL(div_s64_rem); #endif -/** +/* * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder * @dividend: 64bit dividend * @divisor: 64bit divisor @@ -129,7 +123,7 @@ u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) EXPORT_SYMBOL(div64_u64_rem); #endif -/** +/* * div64_u64 - unsigned 64bit divide with 64bit divisor * @dividend: 64bit dividend * @divisor: 64bit divisor @@ -163,11 +157,6 @@ u64 div64_u64(u64 dividend, u64 divisor) EXPORT_SYMBOL(div64_u64); #endif -/** - * div64_s64 - signed 64bit divide with 64bit divisor - * @dividend: 64bit dividend - * @divisor: 64bit divisor - */ #ifndef div64_s64 s64 div64_s64(s64 dividend, s64 divisor) { From patchwork Fri Nov 18 18:23:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Beguin X-Patchwork-Id: 22437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp348906wrr; Fri, 18 Nov 2022 10:34:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4NOQtBlocM2etUsq89lnlqsm/hMNSU5ToH8sAqLh9E+WQmY8rkfYIlPUAglDJVdawCq9Ul X-Received: by 2002:a17:902:ab89:b0:186:88bd:e656 with SMTP id f9-20020a170902ab8900b0018688bde656mr645116plr.137.1668796480915; Fri, 18 Nov 2022 10:34:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668796480; cv=none; d=google.com; s=arc-20160816; b=PyD+eTBYGcmE/Tg9VQlceGzugChzSUn+ZPfzWOdsgMBzZWoi71JZdqYTsa8njnswVW OGazCuFryBtath8XKg4cpzgxzzKErRVcV5TeEvEFXBKemF9Irck9qk0D3reQniwXYniJ lGdX/W9ACMQ75gi6GqqpYLijKbnIStiM6V5zOk/v898ppazXBoblb2pE0RU0IXZO5H+W apzy7dk6Gskg9/dbk+AmABIupRI0txJd4gyvn4VXalTU1Cp5F+HVRlgXSowyggISak55 Z3UTF5EHEZSBmnzM4n3EritC18O2IsznwgNrsvdiXdE03m2TTzJnsT2B6qdITQXsmwq6 dgLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=njRDyo+4UkliIu7d/BjrERx6O7icrAQYdHMHglQ4OMk=; b=DxbHFIU5gp8i3erZVafIRE5O4TGuLfBIU3MrvKyNuHIWmtnMJQT+9hH3GAnQjDrkVN JwFU56oa9QmT44MxZsDit58D5pwn2a3NeaVL/LztZD7Oa2U4P9oJGjdv7i++dLdPLAni 8lajTE3R17b99G+pmDd8A1S3jEQ1Xe8TgShhzu7BkXAy8fa6rQopBE0eYYzbzPFVDFsP JcagDysMk+vp5swY9plYFYYIwvs4VJRG0jBTcZ5MwJWGRYUY3HYDojyKKJ4ib+UN0UWr Z9ma0PW8NBCcHGSubKozmELw8NuyaED3BtMwpHEI74b0u+VEcCP+7Cyv8FpTXncXhDe8 bQYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AKL0gy8t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a170902ea0d00b001886527ede6si5514921plg.91.2022.11.18.10.34.26; Fri, 18 Nov 2022 10:34:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AKL0gy8t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242794AbiKRSYN (ORCPT + 99 others); Fri, 18 Nov 2022 13:24:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242737AbiKRSXX (ORCPT ); Fri, 18 Nov 2022 13:23:23 -0500 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5D8A920B3; Fri, 18 Nov 2022 10:23:21 -0800 (PST) Received: by mail-qt1-x830.google.com with SMTP id h21so3673991qtu.2; Fri, 18 Nov 2022 10:23:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=njRDyo+4UkliIu7d/BjrERx6O7icrAQYdHMHglQ4OMk=; b=AKL0gy8tEfqOd0XHiB1jqjwiKwInZr58vFYrct0KPfTk55XqIMmhE0192ML2eq/1qx BEEmWi4LgNtnePSjs0njyh7au6SLzxetcup7f5Q9DYg+Uzzig3gqSIpBx316ga5CD7v4 UiqdcOiNz7kL1oDJeKxCElS6NOQLc6a8RIrN/WVT4UrAp/KPc4v3I4v0Qz76H6QLjcxi xgHkmPXD4e12CcWKrkOFlstrovYB9kAmKDf82KrrGW3+MuGzyivrM8eVZvAKciqAeoLv woy/3GTvfwayKZaRDIBTQ4OVSOQxukhwvYYLaLNR23mg3IKUbZ+DzPr186NCYqKXIArH I3fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=njRDyo+4UkliIu7d/BjrERx6O7icrAQYdHMHglQ4OMk=; b=jsKbHNAbjM8T9T9RSWesVrC1aPTbyTDoSwARRmFt0A6gI6YxOtQuYCXt698vhH44c4 KLXVfD4diOBpFmlO1rZMTTGrDr00YP/5K+XGFWh439i9YOWdeWR/J1F5x4jYSNXFLa3d IdUW7+PW88P9Qdw1WaLrWbCJxtu258WEWFIZQOp6gLgMzpSiBB55Yla6D6gbRGIlLbxo yOl2xKjQvoVCKpLarEpHhxQUU398dfWhlkfFId5OuM6YLwWKQldhCfzMUhm6hhVjBCgl 1PRWlFhGLgzwTRCMBSNPRHUjwNH/4XdR2NEOR5ABVCDIkQf/JFCGoTlyr8Q2PXSGFwUF Ec9g== X-Gm-Message-State: ANoB5pkp+nBVuEAqFGrQYBFaeOB45f/XWVeFVGdV1naKbBwx/Udd/4Ks poFZXgT6P0LEeTQI2bOPats= X-Received: by 2002:ac8:4501:0:b0:3a5:cb81:aff5 with SMTP id q1-20020ac84501000000b003a5cb81aff5mr7712731qtn.662.1668795800894; Fri, 18 Nov 2022 10:23:20 -0800 (PST) Received: from shaak.xiphos.ca (modemcable055.92-163-184.mc.videotron.ca. [184.163.92.55]) by smtp.gmail.com with ESMTPSA id q46-20020a05620a2a6e00b006fbcab95d70sm2349025qkp.101.2022.11.18.10.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 10:23:20 -0800 (PST) From: Liam Beguin To: Liam Beguin , Jonathan Corbet , Randy Dunlap Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] math64: add kernel-doc for DIV64_U64_ROUND_UP Date: Fri, 18 Nov 2022 13:23:08 -0500 Message-Id: <20221118182309.3824530-2-liambeguin@gmail.com> X-Mailer: git-send-email 2.37.1.223.g6a475b71f8c4 In-Reply-To: <20221118182309.3824530-1-liambeguin@gmail.com> References: <20221118182309.3824530-1-liambeguin@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749859938546739630?= X-GMAIL-MSGID: =?utf-8?q?1749859938546739630?= Add kernel-doc for DIV64_U64_ROUND_UP so that it appears in the documentation. Signed-off-by: Liam Beguin Acked-by: Randy Dunlap Tested-by: Randy Dunlap --- include/linux/math64.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/math64.h b/include/linux/math64.h index 1538844fcb51..cf3b0099674a 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h @@ -284,6 +284,16 @@ static inline u64 mul_u64_u32_div(u64 a, u32 mul, u32 divisor) u64 mul_u64_u64_div_u64(u64 a, u64 mul, u64 div); +/** + * DIV64_U64_ROUND_UP - unsigned 64bit divide with 64bit divisor rounded up + * @ll: unsigned 64bit dividend + * @d: unsigned 64bit divisor + * + * Divide unsigned 64bit dividend by unsigned 64bit divisor + * and round up. + * + * Return: dividend / divisor rounded up + */ #define DIV64_U64_ROUND_UP(ll, d) \ ({ u64 _tmp = (d); div64_u64((ll) + _tmp - 1, _tmp); }) From patchwork Fri Nov 18 18:23:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Beguin X-Patchwork-Id: 22434 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp346754wrr; Fri, 18 Nov 2022 10:30:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4c1IQHnnAy4H5bHwps/4p/bWMUvsavXHYnzVaTF5AiR4/tQDXP6oVxVQX5XDQ7iK/OhX3M X-Received: by 2002:a17:906:a891:b0:7ad:c3b6:fe89 with SMTP id ha17-20020a170906a89100b007adc3b6fe89mr6599269ejb.697.1668796212910; Fri, 18 Nov 2022 10:30:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668796212; cv=none; d=google.com; s=arc-20160816; b=gSCrhFnWxCtyafUjWyjLZAQTQPNk7Okb+eutzJtCgt8WO3OgMhiPpgOeiCgZXwFhUQ q6HB0FU1/IWQH0d50Pxw9x9pZaeSklnBuO4MpfbNj19RIbhsYhtIBAe0i9g1EbBN5wo7 X3U1hZ7HsRXhMYaDT8neUx/39i82wzYDMX+vMINwUQ00mAw3aCKZQeS4U5+OrjRXRWIg OAYJyjVhFuUk089cRRZqadUbEKMKkTVUp+swhWb9PT5cNHgFs3oIfd1YTRRs0XaxCavs LjojJHvgcluruhA31Lq+7tYjkYy+NhynGTH/YcgzBobZ4hGsKHwt3f1gdIIoVHy3Y1TH IxKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kFhfTRZE04WgcQuF4GSi7Znz8Feql0HEC4e01K8E/t8=; b=AO1Ws6J2Vv9b2G0NFQF2JkjvLAEE+lWNnXmzBZcmN6Dlxgav/Irre4wiNBVChhDRt/ q5lT1piDKVmvmcFi0tUl5CmkjG7niOdedSk4+pADXjb5ZHgEP8QmXJovcho/oPN/n0SL UY159/6NEpdCDdNFCFn2EW4CwA2m+wo7JpG5nRtlnRsrOe7PCMMvdDPXrRaWrPu+UeBR n0/+ZsYsVxPHAKE+STn54lf+dUGhkQZbOikie/ctuOq72Rlf6FONbm3+Yggno71hFVIz NiqNGcOVSK4Ys5XeCzNBpOKqlkFUuhNqdUp4/oDUxEHrZBbYl0TLbvzCacUtKPJ1iZrn RxyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="J/BdePGF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ez23-20020a056402451700b00458b42ff246si3429997edb.236.2022.11.18.10.29.44; Fri, 18 Nov 2022 10:30:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="J/BdePGF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242749AbiKRSYS (ORCPT + 99 others); Fri, 18 Nov 2022 13:24:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242740AbiKRSXX (ORCPT ); Fri, 18 Nov 2022 13:23:23 -0500 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C86097AB3; Fri, 18 Nov 2022 10:23:22 -0800 (PST) Received: by mail-qk1-x72f.google.com with SMTP id x18so4011628qki.4; Fri, 18 Nov 2022 10:23:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kFhfTRZE04WgcQuF4GSi7Znz8Feql0HEC4e01K8E/t8=; b=J/BdePGFFJCe26Q3hhZTT85fJXbohAS8/AFvrrJtFyNQIvzF1h22fgrMiUGPCpATb+ TIsSll4zWtskKOQYWUgkd15ZkOvnjwIiHhN6pwQgZa2sZWgJ1QYG8i16hsDAf/tnrrT4 66E1om9G0Rwms7yVowsL5P3gyonEvUeHqv6UxpZKL6MM83D956ZcD+aqCwnVIZnVy2CF 2pYre5MipdLGqzCqusa2bGfDkAsSw7fKW4OvIlozRwl3kgHCZsKkCHg3S+Bc0H1Tiq+q tnO/ZcMmtiGXeWJk4uCIIsYRpkkAuB37LX2L9qWVe62DRr2KU72tgUywLAIwTgt5vQUp tRIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=kFhfTRZE04WgcQuF4GSi7Znz8Feql0HEC4e01K8E/t8=; b=fGI4oyLZyjQaFGK97Im9tPVmbeUzKvQ5Ralxku1snaAUsO7tEWrOwr0os0edXZW8Tj V3aMZrWBA71ODwdoAu0EfIrqEOnDO+XXEB+a+Q1Tq3Q2lsXOWypOn+W/5VgppKnzewWS ahs14jOUGjVIeK8jmeWgVfA8eJ8ilLYgiXKmhEt4UFtPeCv+nmnhuds1vA/GWcTL2Zoa nbmyoowBfAhYq9xbL26dNBVQZhrXFnKrHrZipRiIeMwcjBZizhB4G7aQfJojklwmZaMQ /EY8tDIv9UCtn0CPofLKSn1weoXy7i2Kr0d1WIhFfkM5AK+diT9IUB9qU7PueHsuwpY5 AwOw== X-Gm-Message-State: ANoB5pm59NXQCNB0zBTY69xpf5OeZjYmQnBC4KZO6/zfackbGrcWzzW8 74AOfLhR2H/zTp0PgvD/iIE6phnGHmg= X-Received: by 2002:a05:620a:43a9:b0:6fa:18a5:376d with SMTP id a41-20020a05620a43a900b006fa18a5376dmr7011427qkp.220.1668795801766; Fri, 18 Nov 2022 10:23:21 -0800 (PST) Received: from shaak.xiphos.ca (modemcable055.92-163-184.mc.videotron.ca. [184.163.92.55]) by smtp.gmail.com with ESMTPSA id q46-20020a05620a2a6e00b006fbcab95d70sm2349025qkp.101.2022.11.18.10.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 10:23:21 -0800 (PST) From: Liam Beguin To: Liam Beguin , Jonathan Corbet , Randy Dunlap Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] math64: fix kernel-doc return value warnings Date: Fri, 18 Nov 2022 13:23:09 -0500 Message-Id: <20221118182309.3824530-3-liambeguin@gmail.com> X-Mailer: git-send-email 2.37.1.223.g6a475b71f8c4 In-Reply-To: <20221118182309.3824530-1-liambeguin@gmail.com> References: <20221118182309.3824530-1-liambeguin@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749859657757434282?= X-GMAIL-MSGID: =?utf-8?q?1749859657757434282?= Fix the following kernel-doc warnings by adding a description for return values of div_[us]64. math64.h:126: warning: No description found for return value of 'div_u64' math64.h:139: warning: No description found for return value of 'div_s64' Signed-off-by: Liam Beguin --- include/linux/math64.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/math64.h b/include/linux/math64.h index cf3b0099674a..8958f4c005c1 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h @@ -120,6 +120,8 @@ extern s64 div64_s64(s64 dividend, s64 divisor); * This is the most common 64bit divide and should be used if possible, * as many 32bit archs can optimize this variant better than a full 64bit * divide. + * + * Return: dividend / divisor */ #ifndef div_u64 static inline u64 div_u64(u64 dividend, u32 divisor) @@ -133,6 +135,8 @@ static inline u64 div_u64(u64 dividend, u32 divisor) * div_s64 - signed 64bit divide with 32bit divisor * @dividend: signed 64bit dividend * @divisor: signed 32bit divisor + * + * Return: dividend / divisor */ #ifndef div_s64 static inline s64 div_s64(s64 dividend, s32 divisor)