[PATCH 11/20] rtems: Move _Partition_Is_buffer_on_boundary()

Gedare Bloom gedare at rtems.org
Fri Nov 20 16:50:27 UTC 2020


On Fri, Nov 20, 2020 at 9:38 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
>
> On 20/11/2020 17:10, Gedare Bloom wrote:
>
> >> -/**
> >> - *  @brief Checks whether is on a valid buffer boundary for
the_partition.
> >> - *
> >> - *  This function returns TRUE if the_buffer is on a valid buffer
> >> - *  boundary for the_partition, and FALSE otherwise.
> > I think keep these two lines. This function is not so clear without
> > thinking through what it means to do pointer arithmetic (subtraction
> > and mod).
> >
> >> - */
> >> -RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_on_boundary (
> >> -  void              *the_buffer,
> >> -  Partition_Control *the_partition
> >> -)
>
> The function name is _Partition_Is_buffer_on_boundary().
>
> The brief description is "Checks whether is on a valid buffer boundary
> for the_partition". This sentence is ill formed. If we disregard this,
> the only extra information is "valid". So, maybe rename it to
> _Partition_Is_buffer_on_valid_boundary().
>
> The "This function returns TRUE if the_buffer is on a valid buffer
> boundary for the_partition, and FALSE otherwise." tells you the obvious.
>

It depends on whether "valid boundary" has a good meaning at this level of
the code. Adding valid to the function name is helpful. Thanks.

Just trying to help you pass those code comment density metrics :'D

> --
> embedded brains GmbH
> Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> Phone: +49-89-18 94 741 - 16
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> embedded brains GmbH
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201120/3ed34f41/attachment-0001.html>


More information about the devel mailing list