diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-09-07 12:15:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-13 09:23:06 +0200 |
commit | 3768c74b3a969b62894667e4b79dd50f58a91ecb (patch) | |
tree | 41ce6fc70c69e9ef798169206fd3a599b240ed6c /LICENSES | |
parent | c8fb880910bdb2cf118a8a5d0122090ee07b6ce5 (diff) |
staging: wfx: drop async field from struct hif_cmd
The parameter "async" in wfx_cmd_send() allows to send command without
waiting for the reply. In this case, the mutex hif_cmd.lock is released
asynchronously in the context of the receiver workqueue.
However, "kbuild test robot" complains about this architecture[1] since
it is not able to follow the lock duration of hif_cmd.lock (and indeed,
the state of the driver if the hardware wouldn't reply is not well
defined).
Besides, this feature is not really necessary. It is only used by
hif_shutdown(). This function hijack the 'async' flag to run a command
that won't answer.
So, this patch removes the 'async' flag and introduces a 'no_reply' flag.
Thus, the mutex hif_cmd.lock is only acquired/released from
hif_cmd_send(). Therefore:
- hif_shutdown() does not have to touch the private data of the struct
hif_cmd
- Kbuild test robot should be happy
- the resulting code is simpler
[1] https://lore.kernel.org/driverdev-devel/alpine.DEB.2.21.1910041317381.2992@hadrien/
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200907101521.66082-31-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions