- 16 Feb, 2018 40 commits
-
-
Ajay Singh authored
Refactor wilc_spi_read_int() to fix the line over 80 char issues reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Modified wilc_spi_init() to fix the line over 80 char issues reported by checkpatch.pl script. To overcome the checkpatch.pl reported issue modified debug logs and comments used in wilc_spi_init(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Refactor spi_cmd_complete() to fix the line over 80 char issues reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Cleanup patch to remove the unused commented code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Cleanup patch to follow the comments style as per the Linux coding style. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Fix "Avoid camelCase" issue reported by checkpatch.pl. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Fix "Avoid camelCase" issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Fix "Avoid camleCase" issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Fix "Avoid camelCase" issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ajay Singh authored
Fix "Avoid CamelCase:" issue reported by checkpatch.pl script. Rename host_int_ParseJoinBssParam() & its variables using camelCase. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Arnd Bergmann authored
There are two incompatible definitions of 'vchiq_instance_struct', so passing them through vchiq_initialise(), vchiq_connect() or another such interface is broken, as shown by building the driver with link-time optimizations: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h:129:0: error: type of 'vchiq_initialise' does not match original declaration [-Werror=lto-type-mismatch] extern VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *pinstance); drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:68:0: note: 'vchiq_initialise' was previously declared here VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *instance_out) drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:68:0: note: code may be misoptimized unless -fno-strict-aliasing is used drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h:131:0: error: type of 'vchiq_connect' does not match original declaration [-Werror=lto-type-mismatch] extern VCHIQ_STATUS_T vchiq_connect(VCHIQ_INSTANCE_T instance); drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:168:0: note: 'vchiq_connect' was previously declared here VCHIQ_STATUS_T vchiq_connect(VCHIQ_INSTANCE_T instance) It's possible that only one of the two sides actually access the members, but it's clear that they need to agree on the layout. The easiest way to achieve this appears to be to merge the two files into one. I tried moving the structure definition into a shared header first, but ended up running into too many interdependencies that way. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Corentin Labbe authored
All thoses files are not used by anybody. Lets just remove them. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
These macros are no longer used, so they can be removed. Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Patrick Farrell <paf@cray.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
This l_wait_event_exclusive_head() will wait indefinitely if the timeout is zero. If it does wait with a timeout and times out, the timeout for next time is set to zero. The can be mapped to a call to either wait_event_idle_exclusive() or wait_event_idle_exclusive_timeout() depending in the timeout setting. The current code arranges for LIFO queuing of waiters, but include/event.h doesn't support that yet. Until it does, fall back on FIFO with wait_event_idle_exclusive{,_timeout}(). 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>
-
NeilBrown authored
This is the last remaining use of l_wait_event(). It is the only use of LWI_TIMEOUT_INTR_ALL() which has a meaning that timeouts can be interrupted. Only interrupts by "fatal" signals are allowed, so introduce l_wait_event_abortable_timeout() to support this. 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>
-
NeilBrown authored
replace l_wait_event() with wait_event_idle_timeout() and explicit loop. This approach is easier to understand. 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>
-
NeilBrown authored
Rather an using l_wait_event(), use wait_event_idle_timeout() with an explicit loop so it is easier to see what is happening. 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>
-
NeilBrown authored
Replace l_wait_event with wait_event_idle_timeout() and call the handler function explicitly. This makes it more clear what is happening. 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>
-
NeilBrown authored
We can replace l_wait_event() with wait_event_idle_timeout() here providing we call the timeout function when wait_event_idle_timeout() returns zero. As ptlrpc_expired_set() returns 1, the l_wait_event() aborts of the first timeout. 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>
-
NeilBrown authored
This use of l_wait_event() is a polling loop that re-checks every second. Make this more obvious with a while loop and wait_event_idle_timeout(). 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>
-
NeilBrown authored
When 'back_to_sleep()' is passed as the 'timeout' function, the effect is to wait indefinitely for the event, polling once after the timeout. If LWI_ON_SIGNAL_NOOP is given, then after the timeout we allow fatal signals to interrupt the wait. Make this more obvious in both places "back_to_sleep()" is used but using two explicit sleeps. The code in ptlrpcd_add_req() looks odd - why not just have one wait_event_idle()? However I believe this is a faithful transformation of the existing code. 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>
-
NeilBrown authored
This waiter currently wakes up every second to re-test if imp_flight is zero. If we ensure wakeup is called whenever imp_flight is decremented to zero, we can just have a simple wait_event_idle_timeout(). So add a wake_up_all to the one place it is missing, and simplify the wait_event. 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>
-
NeilBrown authored
Two places that LWI_TIMEOUT_INTERVAL() is used, the outcome is a simple polling loop that polls every second for some event (with a limit). So write a simple loop to make this more apparent. 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>
-
NeilBrown authored
If a signal-callback (lwi_on_signal) is set without lwi_allow_intr, as is the case in ldlm_completion_ast(), the behavior depends on the timeout set. If a timeout is set, then signals are ignored. If the timeout is reached, the timeout handler is called. If the timeout handler return 0, which ldlm_expired_completion_wait() always does, the l_wait_event() switches to exactly the behavior if no timeout was set. If no timeout is set, then "fatal" signals are not ignored. If one arrives the callback is run, but as the callback is empty in this case, that is not relevant. This can be simplified to: if a timeout is wanted wait_event_idle_timeout() if that timed out, call the timeout handler l_wait_event_abortable() i.e. the code always waits indefinitely. Sometimes it performs a non-abortable wait first. Sometimes it doesn't. But it only aborts before the condition is true if it is signaled. This doesn't quite agree with the comments and debug messages. Now that we call the timeout handler (ldlm_expired_completion_wait()) wait directly, we can pass the two args directly rather then using a special-purpose struct. Reviewed-by: Patrick Farrell <paf@cray.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
If l_wait_event() is given a function to be called on a signal, but no timeout or timeout handler, then the intr function is simply called at the end if the wait was aborted by a signal. So a simpler way to write the code (in the one place this case is used) it to open-code the body of the function after the wait_event, if -ERESTARTSYS was returned. 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>
-
NeilBrown authored
lustre sometimes wants to wait for an event, but abort if one of a specific list of signals arrives. This is a little bit like wait_event_killable(), except that the signals are identified a different way. So introduce l_wait_event_abortable() which provides this functionality. Having separate functions for separate needs is more in line with the pattern set by include/linux/wait.h, than having a single function which tries to include all possible needs. Also introduce l_wait_event_abortable_exclusive(). Note that l_wait_event() return -EINTR on a signal, while Linux wait_event functions return -ERESTARTSYS. l_wait_event_{abortable_,}exclusive follow the Linux pattern. 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>
-
NeilBrown authored
When the lwi arg has a timeout, but no timeout callback function, l_wait_event() acts much the same as wait_event_idle_timeout() - the wait is not interruptible and simply waits for the event or the timeouts. The most noticable difference is that the return value is -ETIMEDOUT or 0, rather than 0 or non-zero. Another difference is that if the timeout is zero, l_wait_event() will not time out at all. In the one case where that is possible we need to conditionally use wait_event_idle(). So replace all such calls with wait_event_idle_timeout(), being careful of the return value. In one case, there is no event expected, only the timeout is needed. So use schedule_timeout_uninterruptible(). Note that the presence or absence of LWI_ON_SIGNAL_NOOP has no effect in these cases. It only has effect if the timeout callback is non-NULL, or the timeout is zero, or LWI_TIMEOUT_INTR_ALL() is used. 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>
-
NeilBrown authored
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>
-
NeilBrown authored
When the lwi arg is full of zeros, l_wait_event() behaves almost identically to the standard wait_event_idle() interface, so use that instead. l_wait_event() uses TASK_INTERRUPTIBLE, but blocks all signals. wait_event_idle() uses the new TASK_IDLE and so avoids adding to the load average without needing to block signals. In one case, wait_event_idle_exclusive() is needed. Also remove all l_wait_condition*() macros which were short-cuts for setting lwi to {0}. 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>
-
NeilBrown authored
This flag is never set, so remove checks and remove the flag. 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>
-
NeilBrown authored
The new TASK_IDLE state (TASK_UNINTERRUPTIBLE | __TASK_NOLOAD) is not much used. One way to make it easier to use is to add wait_event*() family functions that make use of it. This patch adds: wait_event_idle() wait_event_idle_timeout() wait_event_idle_exclusive() wait_event_idle_exclusive_timeout() This set was chosen because lustre needs them before it can discard its own l_wait_event() macro. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> 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>
-
NeilBrown authored
The task of ll_find_alias() is now very similar to d_exact_alias(). We cannot use that function directly, but we can copy much of the structure so that the similarities and differences are more obvious. Examining d_exact_alias() shows that the d_lock spinlock does not need to be held in ll_find_alias as much as it currently is. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
Now that ll_find_alias is only searching for one type of dentry, we can return as soon as we find it. This allows substantial simplification, and brings the bonus that we don't need to take the d_lock again just to increment the ref-count. We can increment it immediately that the dentry is found. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
Now that ll_find_alias() is never called for directories, we can remove code that only applies to directories. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
In the Linux dcache a directory only ever has one dentry, so d_splice_alias() can be used by ll_splice_alias() for directories. It will find the one dentry whether it is DCACHE_DISCONNECTED or IS_ROOT() or d_lustre_invalid(). Separating out the directories from non-directories will allow us to simplify the non-directory code. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
ll_dcompare is used in two slightly different contexts. It is called (from __d_lookup, __d_lookup_rcu, and d_exact_alias) to compare a name against a dentry that is already in the dcache. It is also called (from d_alloc_parallel) to compare a name against a dentry that is not in the dcache yet, but is part of an active "lookup" or "atomic_open" call. In the first case we need to avoid matching against "invalid" dentries as a match implies something about ldlm locks which is not accurate. In the second case we need to allow matching against "invalid" dentries as the dentry will always be invalid (set by ll_d_init()) but we still want to guard against multiple concurrent lookups of the same name. d_alloc_parallel() will repeat the call to ll_dcompare() after the lookup has finished, and if the dentry is still invalid, the whole d_alloc_parallel() process is repeated. This assures us that it is safe to report success whenever d_in_lookup(). With this patch, there will never be two threads concurrently in ll_lookup_nd(), looking up the same name in the same directory. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
Commit 020ecc6f ("staging: lustre: llite: Remove IS_ERR tests") changed ll_prep_inode to assume any error from ll_iget() meant -ENOMEM because at that time it only returned NULL for errors. Commit c3397e7e ("staging: lustre: llite: add error handler in inode prepare phase") changed ll_iget() to once again return meaningful codes, but nobody told ll_prep_inode(). So change ll_prep_inode() back to using PTR_ERR(*inode). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
NeilBrown authored
This code tests various fields to see if they are different, except for one where there test is if they are the same. This is clearly wrong for a function that is tesding for equality. So change "!strcmp()" which I always find hard to read, to "strcmp() != 0" which obviously means that the strings are not equal. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-