- 06 Mar, 2017 40 commits
-
-
Katie Dunne authored
Remove spaces after casts found by checkpatch.pl. In some cases, remove returns after casts and place them on a single line. Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shiva Kerdel authored
Braces should be used on all arms of these statements (CHECK).. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shiva Kerdel authored
Changed bit swifting operators to BIT macros (preferred), This change will also solve the preferred space surrounding the operator checks. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kenneth Hsu authored
This fixes a coding style issue where whitespace characters were missing around some binary OR operators. Signed-off-by: Kenneth Hsu <kennethhsu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
simran singhal authored
The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This occurence was detected using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
When compiling the kernel without optimization, when using GCOV, the lprocfs_stats_alloc_one() symbol is not properly exported to other modules and causes the ptlrpc module to fail loading with an unknown symbol. There is no reason to export the function lprocfs_stats_alloc_one. The reason is due to the functions lprocfs_stats_[un]lock being inline functions in a header file. Lets untangle this mess and turn those inline functions into real functions in a source file. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8836 Reviewed-on: https://review.whamcloud.com/23773Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Niu Yawei authored
There is race in the code of starting bl threads which leads to thread number exceeds the maximum number when race happened, it can also lead to duplicated thread name. This patch fixes the race and cleanup the code a bit. Signed-off-by: Niu Yawei <yawei.niu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7330 Reviewed-on: http://review.whamcloud.com/17026Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Vitaly Fertman authored
disconnect takes too long time if there are many locks to cancel. besides the amount of time spent on each lock cancel, there is a resched() in cfs_hash_for_each_relax(), i.e. disconnect or eviction may take unexpectedly long time. While this patch only contains the client side fixes the original fix covered changes to both the server and client code to ensure proper disconnect handling. Below details the change done on both the server and client so people can examine the disconnect behavior with both source bases. - do not cancel locks on disconnect_export; - export will be left in obd_unlinked_exports list pinned by live locks; - new re-connects will created other non-conflicting exports; - new locks will cancel obsolete locks on conflicts; - once all the locks on the disconnected export will be cancelled, the export will be destroyed on the last ref put; - do not cancel in small portions, cancel all together in just 1 dedicated thread - use server side blocking thread for that; - cancel blocked locks first so that waiting locks could proceed; - take care about blocked waiting locks, so that they would get cancelled quickly too; - do not remove lock from waiting list on AST error before moving it to elt_expired_locks list, because it removes it from export list too; otherwise this blocked lock will not be cancelled immediately on failed export; - cancel lock instead of just destroy for failed export, to make full cleanup, i.e. remove it from export list. Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3031 Xyratex-bug-id: MRP-395 MRP-1366 MRP-1366 Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com> Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com> Reviewed-on: http://review.whamcloud.com/5843Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Andreas Dilger <andreas.dilger@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>
-
Vitaly Fertman authored
Reduce the sleep period from 50 seconds down to LDLM_POOL_CLI_DEF_RECALC_PERIOD which is 10 seconds. Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3031 Xyratex-bug-id: MRP-395 MRP-1366 MRP-1366 Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com> Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com> Reviewed-on: http://review.whamcloud.com/5843Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Andreas Dilger <andreas.dilger@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>
-
Andreas Dilger authored
The ll_close_inode_openhandle() and ll_md_close() functions passed an extra "obd_export *md_exp" parameter, but it turns out that all of the callers already pass inode->i_sb->s_fs_info->lsi_llsbi->ll_md_exp in one form or another, so it can just be extracted from "inode" directly as needed. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6627 Reviewed-on: http://review.whamcloud.com/14953Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Bobi Jam <bobijam@hotmail.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>
-
Yang Sheng authored
Reduce struct lov_io_sub to smaller memory usage on wide-stripe file systems. Signed-off-by: Yang Sheng <yang.sheng@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7085 Reviewed-on: http://review.whamcloud.com/17476Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Jian Yu <jian.yu@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@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>
-
Jinshan Xiong authored
Define osc_lru_reserve() and osc_lru_unreserve() to reserve LRU slots in osc_io_write_iter_init() and unreserve them in fini(); Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: John L. Hammond <john.hammond@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>
-
Jinshan Xiong authored
A ldlm lock could be canceled simutaneously by ldlm bl thread and cleanup_resource(). In this case, only one side will win the race and the other side should wait for the work to complete. Eviction on group lock is now well supported. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: John L. Hammond <john.hammond@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>
-
Jinshan Xiong authored
In lov_io_iter_init(), if cl_io_iter_init() against sub io fails, it should call cl_io_iter_fini() to cleanup leftover information; Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: John L. Hammond <john.hammond@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>
-
Jinshan Xiong authored
Remove the no longer needed assert in the function osc_cache_truncate_start(). The assertion in osc_object_prune() will become faulty with upcoming changes. The reason this will become a problem is that there may exist freeing pages in object's radix tree at the time of osc_object_prune(), which causes failure at the assertion of (osc->oo_npages == 0). This patch prevents that problem from happening. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456 Reviewed-on: http://review.whamcloud.com/16727Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: John L. Hammond <john.hammond@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>
-
Bobi Jam authored
In ll_setattr_raw(), after op_data->op_attr has been copied, the attr is updated and op_data->op_attr does not get updated afterward. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6813 Reviewed-on: http://review.whamcloud.com/16462Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Niu Yawei <yawei.niu@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>
-
Bobi Jam authored
Truncate and write can happen at the same time, so that a file can be set modified even though the file is not restored from released state, and ll_hsm_state_set() is not applicable for the file, and it will return error in this case, we'd lower the error message level in this case. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6817 Reviewed-on: http://review.whamcloud.com/15541Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@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>
-
Doug Oucharek authored
In Linux kernel 4.9-rc1, the function ib_get_dma_mr() was removed and a second parameter was added to ib_alloc_pd(). As this broke the building of the ko2iblnd module in staging, the Kconfig for LNet has marked ko2iblnd as broken and stopped building it. This patch fixes this breakage by: - Removing the BROKEN tag from lnet/Kconfig. - Make it so the module parameter map_on_demand can no longer be zero (we have to configure FMR/FastReg pools; it can no longer be off). - No longer try to use the global DMA memory region, but make use of the FMR/FastReg pool for all RDMA Tx operations. - Everywhere we are using the device DMA mr to derive the L-key for non-registered memory regions, use the pd->local_dma_lkey value instead. - Make the default map_on_demand = 256. This will allow nodes with this patch to still connected to older nodes without this patch and FMR/FastReg turned off. When FMR/FastReg is turned off, we use 256 as the max frags so the two sides will still be able to communicate and work. - Fix a mistake with BUILD_BUG_ON calls in o2iblnd.c which caused compiling to fail. Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9026 Reviewed-on: https://review.whamcloud.com/#/c/24931/Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgios Emmanouil authored
Removed an empty line. Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gargi Sharma authored
Removes extra parentheses around function arguments. Issue detected and resolved using the following coccinelle script: @@ expression e; identifier f; @@ f(..., -( e -) ,...) Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lucian Zala authored
Fix for "WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'" found by checkpatch.pl in bus/irq-gic-v3-its-fsl-mc-msi.c. Signed-off-by: Lucian Zala <zala.lucian@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Arushi Singhal authored
function prototype argument 'struct vb_device_info *' and 'unsigned long' should also have an identifier name. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Katie Dunne authored
Add braces to instances of if-statements found by checkpatch.pl to conform to kernel style. Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gargi Sharma authored
add braces around if statment to fix the checkpatch issue, braces {} should be used on all arms of this statement. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Joe Perches authored
Using const reduces data size. $ size drivers/staging/fbtft/built-in.o* text data bss dec hex filename 89909 41584 2928 134421 20d15 drivers/staging/fbtft/built-in.o.new 88053 43392 2928 134373 20ce5 drivers/staging/fbtft/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Joe Perches authored
This allows making some of the actual arrays const. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anthony Brandon authored
Running make C=1 M=drivers/staging/fbtft reports warnings about conversion from __be16 to unsigned short. Change the type of the variables being assigned into __be16 to remove those warnings. Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Julián de Gortari authored
__be16 type variables should be used with return value of macro cpu_to_be16() Signed-off-by: Julián de Gortari <kiototeko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gargi Sharma authored
Remove blank line before closing brace to fix the checkpatch issue blank lines aren't necessary before a close brace '}'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gargi Sharma authored
Indent code to match alignment with open parentheses, to fix the checkpatch issue alignment should match open parenthesis. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tobin C. Harding authored
Return value of strlcpy() is not checked. Name string is silently truncated if longer that SPI_NAME_SIZE, whilst not detrimental to the program logic it would be nice to notify the user. Module is currently quite verbose, adding extra pr_warn() calls will not overly impact this verbosity. Check return value from call to strlcpy(). If source string is truncated call pr_warn() to notify user. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tobin C. Harding authored
Current call to strncmp() uses a magic number. There is a compile time constant defined for this buffer, included and used already at other sites in the file. Remove magic number. Replace with pre-existing compile time constant. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tobin C. Harding authored
Module copies a user supplied string (module parameter) into a buffer using strncpy() and does not check that the buffer is null terminated. Replace call to strncpy() with call to strlcpy() ensuring that the buffer is null terminated. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
simran singhal authored
Removed initialisation of a varible if it is immediately reassigned. Changes were made using Coccinelle. @@ type T; constant C; expression e; identifier i; @@ T i - = C ; i = e; Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Javier Rodriguez authored
The icmp6_checksum was returning an invalid data type as the expected type is __sum16. For returning such data type, icmp6_checksum, now, is using the kernel functions for computing the checksum. Here, the sparse message: drivers/staging/gdm724x/gdm_lte.c:311:39: warning: incorrect type in assignment (different base types) drivers/staging/gdm724x/gdm_lte.c:311:39: expected restricted __sum16 [addressable] [assigned] [usertype] icmp6_cksum drivers/staging/gdm724x/gdm_lte.c:311:39: got int Signed-off-by: Javier Rodriguez <jrodbar@yahoo.es> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cheah Kok Cheong authored
Fix checkpatch warning "Avoid multiple line dereference" using a pointer variable to avoid line wrap. Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
simran singhal authored
The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This occurence was detected using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tobin C. Harding authored
Checkpatch emits WARNING: Block comments use a trailing */ on a separate line. Offending comments are commenting variables within the main data structure of s626 driver. We can move these comments to kernel doc format with the benefit of clearing the warning and improving the documentation for the driver. Remove comments on structure members. Add original comments to the head of the structure definition in kernel doc format. Signed-off-by: Tobin C. Harding <me@tobin.cc> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
The "jr3_pci" driver currently uses the `iobase` member of its private device data `struct jr3_pci_dev_private` to store a pointer to its ioremapped register region. Use the `mmio` member of the `struct comedi_device` to store this instead, and remove the `iobase` member. The `iobase` member was of type `struct jr3_t __iomem *`, with the board's complicated register layout described by `struct jr3_t`. The `mmio` member is a generic `void __iomem *`, so its value needs converting to a `struct jr3_t __iomem *` for our purposes. Change the clean-up in `jr3_pci_detach()` to call `comedi_pci_detach()` instead of `comedi_pci_disable()`, as that will iounmap `dev->mmio` for us. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Local function `set_transforms` has a parameter of type `struct jr3_pci_transform`. This has a size 32 bytes, which is quite large for passing around in a function call. Change it to use type `const struct jr3_pci_transform *`. (In practice, it is probably inlined by the compiler anyway, but doing this seems to save a few bytes.) Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-