Re: [PATCH v2 3/6] cocci & cache.h: apply pending "index_cache_pos" rule

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> -				int dst_pos = cache_name_pos(dst, strlen(dst));
> +				int dst_pos = index_name_pos(&the_index, dst,
> +							     strlen(dst));

This is not wrong per-se, but open coding what cache_name_pos() did
does not reduce the reliance of the singleton default instance of
the in-core index data structure.

What may have more value may be passing the pointer to an in-core
index structure through the codebase, which may help more parts to
be made callable as if they were library functions, but that would
be a much larger task and won't belong to this "finish the
conversion" topic.  But doing this change will not help us to get
closer to such a longer term clean-up, I am afraid.

Will queue.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux