util_filter_walk() does the looping through bus/dimm/region/namespace that a lot of the operations in ndctl uses. Converting them to common code and reduce maintenance on individual versions of the same code. In this series we are convering namespace, region, and dimm actions.
--- v6: - removed unintended changes (Vishal) - added common function filter_bus_passhthrough() (Vishal, Dan) v5: - fix behavior regression in filter_namespace (Dan) - fix segfault caused by no namespace for create_namespace actions. v4: - change struct names to be less confusing. (Dan) v3: - fixed some corner cases in namespace patch. - changed param renaming to reduce change for util_filter_params. (Dan) - Adding conversion to region - Adding conversion to dimm v2: - split out the conversion of util_filter_params to make things more readable (Dan). - Not pass in mode as util_filter_params and put back the mode check in util_filter_walk() (Dan). Dave Jiang (4): ndctl: convert namespace actions to use util_filter_params ndctl: convert namespace actions to use util_filter_walk() ndctl: convert region actions to use util_filter_walk() ndctl: convert dimm actions to use util_filter_walk() ndctl/dimm.c | 78 +++++++++++++--------- ndctl/namespace.c | 189 +++++++++++++++++++++++++++++------------------------ ndctl/region.c | 54 +++++++++------ util/filter.c | 11 +++ util/filter.h | 25 +++++++ 5 files changed, 212 insertions(+), 145 deletions(-) -- _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm