diff mbox series

[v10,07/11] Documentation: core-api: Add math.h macros and functions

Message ID 20240530171740.2763221-1-devarsht@ti.com (mailing list archive)
State New, archived
Headers show
Series Add V4L2 M2M Driver for E5010 JPEG Encoder | expand

Commit Message

Devarsh Thakkar May 30, 2024, 5:17 p.m. UTC
Add documentation for rounding, scaling, absolute value and difference,
32-bit division related macros and functions exported by math.h header
file.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
---
V1->V9 (No change)
V10: Patch introduced
---
 Documentation/core-api/kernel-api.rst | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Andy Shevchenko May 30, 2024, 7:21 p.m. UTC | #1
On Thu, May 30, 2024 at 10:47:40PM +0530, Devarsh Thakkar wrote:
> Add documentation for rounding, scaling, absolute value and difference,
> 32-bit division related macros and functions exported by math.h header
> file.

...

> +Rounding, absolute value, scaling and 32bit division functions
> +--------------------------------------------------------------
> +
> +.. kernel-doc:: include/linux/math.h
> +   :internal:

Please, double check that this is correct keyword in this case.

Otherwise LGTM.
Randy Dunlap May 30, 2024, 10:44 p.m. UTC | #2
On 5/30/24 10:17 AM, Devarsh Thakkar wrote:
> Add documentation for rounding, scaling, absolute value and difference,
> 32-bit division related macros and functions exported by math.h header
> file.
> 
> Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
> ---
> V1->V9 (No change)
> V10: Patch introduced
> ---
>  Documentation/core-api/kernel-api.rst | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst
> index ae92a2571388..fb467783d491 100644
> --- a/Documentation/core-api/kernel-api.rst
> +++ b/Documentation/core-api/kernel-api.rst
> @@ -185,6 +185,12 @@ Division Functions
>  .. kernel-doc:: lib/math/gcd.c
>     :export:
>  
> +Rounding, absolute value, scaling and 32bit division functions

                                         32-bit
please.

> +--------------------------------------------------------------
> +
> +.. kernel-doc:: include/linux/math.h
> +   :internal:
> +
>  UUID/GUID
>  ---------
>
Devarsh Thakkar May 31, 2024, 8:44 a.m. UTC | #3
On 31/05/24 00:51, Andy Shevchenko wrote:
> On Thu, May 30, 2024 at 10:47:40PM +0530, Devarsh Thakkar wrote:
>> Add documentation for rounding, scaling, absolute value and difference,
>> 32-bit division related macros and functions exported by math.h header
>> file.
> 
> ...
> 
>> +Rounding, absolute value, scaling and 32bit division functions
>> +--------------------------------------------------------------
>> +
>> +.. kernel-doc:: include/linux/math.h
>> +   :internal:
> 
> Please, double check that this is correct keyword in this case.
> 

Yes, this is inline as per what is described here [1] as there are no export
symbols in the header. Also the rendered output looks good.

[1] :
https://docs.kernel.org/doc-guide/kernel-doc.html#:~:text=net/mac80211/*.c-,internal,-%3A%20%5Bsource%2Dpattern

Regards
Devarsh
Devarsh Thakkar May 31, 2024, 10:57 a.m. UTC | #4
Hi Randy,

Thanks for the review.

On 31/05/24 04:14, Randy Dunlap wrote:
> 
> 
> On 5/30/24 10:17 AM, Devarsh Thakkar wrote:
>> Add documentation for rounding, scaling, absolute value and difference,
>> 32-bit division related macros and functions exported by math.h header
>> file.
>>
>> Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
>> ---
>> V1->V9 (No change)
>> V10: Patch introduced
>> ---
>>  Documentation/core-api/kernel-api.rst | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst
>> index ae92a2571388..fb467783d491 100644
>> --- a/Documentation/core-api/kernel-api.rst
>> +++ b/Documentation/core-api/kernel-api.rst
>> @@ -185,6 +185,12 @@ Division Functions
>>  .. kernel-doc:: lib/math/gcd.c
>>     :export:
>>  
>> +Rounding, absolute value, scaling and 32bit division functions
> 
>                                          32-bit
> please.
> 

Good catch. Also I see some division functions supporting non-32bit functions
too, so I would make it as below :
Rounding, absolute value, division and 32-bit scaling functions
---------------------------------------------------------------

Regards
Devarsh
diff mbox series

Patch

diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst
index ae92a2571388..fb467783d491 100644
--- a/Documentation/core-api/kernel-api.rst
+++ b/Documentation/core-api/kernel-api.rst
@@ -185,6 +185,12 @@  Division Functions
 .. kernel-doc:: lib/math/gcd.c
    :export:
 
+Rounding, absolute value, scaling and 32bit division functions
+--------------------------------------------------------------
+
+.. kernel-doc:: include/linux/math.h
+   :internal:
+
 UUID/GUID
 ---------