summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2017-03-07 15:17:52 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-03-23 21:13:33 -0700
commit584a88709bf4880ba5f8fed72da50512fbd9bdbb (patch)
treee7906866ce11e71ff4251a18b636d12052b9e2c4 /Documentation
parent55877012d5588ce7427919d6b869922f1a5f60bc (diff)
downloadlinux-584a88709bf4880ba5f8fed72da50512fbd9bdbb.tar.bz2
i40e: make use of hlist_for_each_entry_continue
Replace a complex if->continue->else->break construction in i40e_next_filter. We can simply use hlist_for_each_entry_continue instead. This drops a lot of confusing code. The resulting code is much easier to understand the intention, and follows the more normal pattern for using hlist loops. We could have also used a break with a "return next" at the end of the function, instead of return NULL, but the current implementation is explicitly clear that when you reach the end of the loop you get a NULL value. The alternative construction is less clear since the reader would have to know that next is NULL at the end of the loop. Change-Id: Ife74ca451dd79d7f0d93c672bd42092d324d4a03 Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions