summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/selftest/selftest.h
AgeCommit message (Collapse)Author
2018-06-05staging: lustre: delete the filesystem from the tree.Greg Kroah-Hartman
The Lustre filesystem has been in the kernel tree for over 5 years now. While it has been an endless source of enjoyment for new kernel developers learning how to do basic codingstyle cleanups, as well as an semi-entertaining source of bewilderment from the vfs developers any time they have looked into the codebase to try to figure out how to port their latest api changes to this filesystem, it has not really moved forward into the "this is in shape to get out of staging" despite many half-completed attempts. And getting code out of staging is the main goal of that portion of the kernel tree. Code should not stagnate and it feels like having this code in staging is only causing the development cycle of the filesystem to take longer than it should. There is a whole separate out-of-tree copy of this codebase where the developers work on it, and then random changes are thrown over the wall at staging at some later point in time. This dual-tree development model has never worked, and the state of this codebase is proof of that. So, let's just delete the whole mess. Now the lustre developers can go off and work in their out-of-tree codebase and not have to worry about providing valid changelog entries and breaking their patches up into logical pieces. They can take the time they have spend doing those types of housekeeping chores and get the codebase into a much better shape, and it can be submitted for inclusion into the real part of the kernel tree when ready. Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25staging: lustre: remove libcfs_all.h from includes lustre/lnetNeilBrown
Some of these include files didn't need to include libcfs_all.h. A couple did so replace with just the base include files needed. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25staging: lustre: start moving includes out of libcfs.hNeilBrown
Lots of places include libcfs.h, and it includes lots of other include files. Many of these aren't needed in many places. It is tidier and better documentation to just include what is needed. So remove all the includes from libcfs.h and create libcfs_all.h which contains them. Then change every reference to libcfs.h to instead include libcfs_all.h Next several patches will remove that from various files in small batches Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16staging: lustre: discard cfs_time_seconds()NeilBrown
cfs_time_seconds() converts a number of seconds to the matching number of jiffies. The standard way to do this in Linux is "* HZ". So discard cfs_time_seconds() and use "* HZ" instead. Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: NeilBrown <neilb@suse.com> Reviewed-by: Patrick Farrell <paf@cray.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: lustre: lnet: convert selftest to use workqueuesNeilBrown
Instead of the cfs workitem library, use workqueues. As lnet wants to provide a cpu mask of allowed cpus, it needs to be a WQ_UNBOUND work queue so that tasks can run on cpus other than where they were submitted. This patch also exported apply_workqueue_attrs() which is a documented part of the workqueue API, that isn't currently exported. lustre needs it to allow workqueue thread to be limited to a subset of CPUs. Acked-by: Tejun Heo <tj@kernel.org> (for export of apply_workqueue_attrs) Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09staging: lustre: more conversions to GFP_KERNEL allocations.NeilBrown
These are not called from filesystem context, so use GFP_KERNEL, not LIBCFS_ALLOC(). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: lustre: libcfs: remove wi_data from cfs_workitemNeilBrown
In every case, the value passed via wi_data can be determined from the cfs_workitem pointer using container_of(). So use container_of(), and discard wi_data. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-11staging: lustre: add SPDX identifiers to all lustre filesGreg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/lustre files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: James Simmons <jsimmons@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22staging: lustre: lnet: selftest: add include path to MakefileJames Simmons
Rationalize include paths in the lnet selftest source code files. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22staging: lustre: lnet: migrate headers to lnet uapi directoryJames Simmons
Migrate the headers used by user land and kernel space to the libcfs/lnet uapi directory. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/28089 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Olaf Weber <olaf.weber@hpe.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22staging: lustre: lnet: delete lnet.hJames Simmons
The header lnet.h is just a bunch of headers included in a header. Just delete it and include the appropriate headers where needed. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/28089 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Olaf Weber <olaf.weber@hpe.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: lustre: lnet: use struct bio_vec instead of typedefJames Simmons
Kill off lnet_kiov_t and use struct bio_vec directly. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: lustre: lnet: change lnet_event_kind_t to proper enumJames Simmons
Change lnet_event_kind_t from typedef to proper enum. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: lustre: lnet: change lnet_process_id_t to proper structureJames Simmons
Change lnet_process_id_t from typedef to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: lustre: lnet: change lnet_handle_md_t to proper structJames Simmons
Change lnet_handle_md_t from a typedef of another typedef into a proper stand alone structure. Create the inline functions LNetInvalidateMDHandle and LNetMDHandleIsInvalid to handle this new piece of data. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-23staging: lustre: lnet: change lnet_process_id_packed_t to proper structureJames Simmons
Change lnet_process_id_packed_t from typedef to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: lustre: lnet: change srpc_counters_t to proper structureJames Simmons
Change srpc_counters_t from typedef to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: lustre: lnet: change lst_bid_t to proper structureJames Simmons
Change lst_bid_t from typedef to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: lustre: lnet: change lst_nid_t to proper structureJames Simmons
Change lst_nid_t from typedef to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24188 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18staging: lustre: lnet: resolve trailing */ errorsJames Simmons
This patch resolves the checkpatch error: Block comments use a trailing */ on a separate line for the LNet/libcfs layer Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18staging: lustre: lnet: don't use bare unsignedJames Simmons
Turn all bare unsigned to unsigned int that were detected by checkpatch in the LNet/libcfs layer. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14staging: lustre: lnet: add offset for selftest brwLiang Zhen
In current lnet selftest, both client and server side bulk have no offset and we can only test page aligned IO, this patch changed this: - user can set brw offset by lst add_test ... brw off=OFFSET ... - offset is only effective on client side so far - to simply implementation, offset needs to be eight bytes aligned Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5718 Reviewed-on: http://review.whamcloud.com/12496 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/lustre: Remove stray line from selftest/selftest.hOleg Drokin
The 'copy of GPLv2]' is an ending from template that's no longer needed, so remove it to avoid any extra confusion. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/lustre: Replace sun.com GPLv2 URL with gnu.org one.Oleg Drokin
http://www.sun.com/software/products/lustre/docs/GPLv2.pdf is no longer around, so replae it with (hopefully more permanent) http://http://www.gnu.org/licenses/gpl-2.0.html Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/lustre: Remove the "Please contact SUN for GPL" from headersOleg Drokin
Since SUN is no longer around and there's no point in contacting them, just remove that whole thing. Copy of GPL is available online anyway (URLs to be updated in next patch). This patch was generated with: find drivers/staging/lustre -name "*.[ch]" -exec perl -0777 -i -pe 's/ \* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,\n \* CA 95054 USA or visit www.sun.com if you need additional information or\n \* have any questions.\n \*\n//igs' {} \; Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-26staging: lustre: selftest: convert wire protocol to use structJames Simmons
Change all the wire protocol typedefs to proper structures Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert srpc_msg_t to proper structJames Simmons
Turn typedef struct srpc_msg to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert sfw_test_case_t to proper structJames Simmons
Turn typedef sfw_test_case_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert sfw_test_unit_t to proper structJames Simmons
Turn typedef sfw_test_unit_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert sfw_test_instance_t to proper structJames Simmons
Turn typedef sfw_test_instance_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert sfw_test_client_ops_t to proper structJames Simmons
Turn typedef sfw_test_client_ops_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert sfw_batch_t to proper structJames Simmons
Turn typedef sfw_batch_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert sfw_session_t to proper structJames Simmons
Turn typedef sfw_session_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert srpc_service_t to proper structJames Simmons
Turn typedef srpc_service_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert srpc_client_rpc_t to proper structJames Simmons
Turn typedef srpc_client_rpc_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert swi_workitem_t to proper structJames Simmons
Turn typedef swi_workitem_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert srpc_buffer_t to proper structJames Simmons
Turn typedef srpc_buffer_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert srpc_bulk_t to proper structJames Simmons
Turn typedef srpc_bulk_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert srpc_event_t to proper structJames Simmons
Turn typedef srpc_event_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11staging: lustre: selftest: convert srpc_event_type to proper enumJames Simmons
Turn tyepdef srpc_event_type to proper enum Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11Merge 4.6-rc3 into staging-nextGreg Kroah-Hartman
This resolves a lot of merge issues with PAGE_CACHE_* changes, and an iio driver merge issue. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-04mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usageKirill A. Shutemov
Mostly direct substitution with occasional adjustment or removing outdated comments. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-04-04mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macrosKirill A. Shutemov
PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time ago with promise that one day it will be possible to implement page cache with bigger chunks than PAGE_SIZE. This promise never materialized. And unlikely will. We have many places where PAGE_CACHE_SIZE assumed to be equal to PAGE_SIZE. And it's constant source of confusion on whether PAGE_CACHE_* or PAGE_* constant should be used in a particular case, especially on the border between fs and mm. Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much breakage to be doable. Let's stop pretending that pages in page cache are special. They are not. The changes are pretty straight-forward: - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>; - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>; - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN}; - page_cache_get() -> get_page(); - page_cache_release() -> put_page(); This patch contains automated changes generated with coccinelle using script below. For some reason, coccinelle doesn't patch header files. I've called spatch for them manually. The only adjustment after coccinelle is revert of changes to PAGE_CAHCE_ALIGN definition: we are going to drop it later. There are few places in the code where coccinelle didn't reach. I'll fix them manually in a separate patch. Comments and documentation also will be addressed with the separate patch. virtual patch @@ expression E; @@ - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT) + E @@ expression E; @@ - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) + E @@ @@ - PAGE_CACHE_SHIFT + PAGE_SHIFT @@ @@ - PAGE_CACHE_SIZE + PAGE_SIZE @@ @@ - PAGE_CACHE_MASK + PAGE_MASK @@ expression E; @@ - PAGE_CACHE_ALIGN(E) + PAGE_ALIGN(E) @@ expression E; @@ - page_cache_get(E) + get_page(E) @@ expression E; @@ - page_cache_release(E) + put_page(E) Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-03-29staging: lustre: libcfs: remove cfs_workitem_t typedefsJames Simmons
Convert cfs_workitem_t to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17202 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: lustre: filter remaining extra spacing for lnet selftestJames Simmons
This patch is a result of a filter applied to the lnet selftest code to remove the last bits of hidden white spaces. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: lustre: remove extra spacing when setting variable for lnet selftestJames Simmons
Remove any extra spacing for the lines of code setting variables to some value. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: lustre: fix spacing issues checkpatch reported in lnet selftestJames Simmons
Remove any extra spacing as reported by checkpatch. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: lustre: remove returns in void function for lnet selftestJames Simmons
No reason to have returns at end of void function. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-02Staging: lustre: lnet: Remove and rename struct typedefsBhumika Goyal
Remove typedefs from structures stt_timer_t and lst_ping_data_t as typedef for a structure type is not preferred. The suffix '_t' and the typedefs are removed using coccinelle. Script 1: //Drop typedefs and '_t' @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_t": coccinelle.T2 = T[:-2]; print T else: coccinelle.T2=T; @@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; Script 2: //Replacement @@ typedef stt_timer_t; typedef lst_ping_data_t; @@ ( - stt_timer_t + struct stt_timer | - lst_ping_data_t + struct lst_ping_data ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: lustre: fix all conditional comparison to zero in LNet layerJames Simmons
Doing if (rc != 0) or if (rc == 0) is bad form. This patch corrects the LNet code to behavior according to kernel coding standards. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>