Re: [PATCH v2 1/3] common/attr: add and use _attr_get_max()

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Tue, Apr 12, 2022 at 12:49:59PM +0200, David Disseldorp wrote:
> No functional change. The MAX_ATTRS and MAX_ATTRVAL_SIZE exports are
> only used by generic/020. In preparation for taking into account the
> attr name length when calculating MAX_ATTRVAL_SIZE, split the current
> logic out into a _attr_get_max() helper function.
> 
> Signed-off-by: David Disseldorp <ddiss@xxxxxxx>
> ---
>  common/attr       | 163 +++++++++++++++++++++++++---------------------
>  tests/generic/020 |  10 ++-
>  2 files changed, 95 insertions(+), 78 deletions(-)

Hmmm. when you said you were going to make these helper functions,
I thought you meant you were going to move them to generic/020
as helper functions as that is the only place that uses them.

I don't see any point in making them single use helper functions
specific to a single test and then leaving them in common/attr....

Then you can get rid of the exported variable and use a test local
variable for MAX_ATTRS and MAX_ATTRVAL_SIZE....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux