Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1223558 > unrolled thread
| Started by | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| First post | 2015-09-13 09:40 +0200 |
| Last post | 2015-09-21 07:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[char-misc 4.3] mei: hbm: fix error in state check logic Tomas Winkler <tomas.winkler@intel.com> - 2015-09-13 09:40 +0200
Re: [char-misc 4.3] mei: hbm: fix error in state check logic Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-21 07:50 +0200
| From | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| Date | 2015-09-13 09:40 +0200 |
| Subject | [char-misc 4.3] mei: hbm: fix error in state check logic |
| Message-ID | <q8a3f-12B-7@gated-at.bofh.it> |
From: Alexander Usyskin <alexander.usyskin@intel.com>
Use || instead && in state check.
Latter is bogus and leads to following warning:
drivers/misc/mei/hbm.c:1212:46: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op]
Fixes: 073e6274 ("mei: support for dynamic clients")
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/misc/mei/hbm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index 8eec887c8f70..6d7c188fb65c 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -1209,7 +1209,7 @@ int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)
* after the host receives the enum_resp
* message clients may be added or removed
*/
- if (dev->hbm_state <= MEI_HBM_ENUM_CLIENTS &&
+ if (dev->hbm_state <= MEI_HBM_ENUM_CLIENTS ||
dev->hbm_state >= MEI_HBM_STOPPED) {
dev_err(dev->dev, "hbm: add client: state mismatch, [%d, %d]\n",
dev->dev_state, dev->hbm_state);
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-09-21 07:50 +0200 |
| Message-ID | <qb29c-5YD-17@gated-at.bofh.it> |
| In reply to | #1223558 |
On Sun, Sep 13, 2015 at 10:29:26AM +0300, Tomas Winkler wrote:
> From: Alexander Usyskin <alexander.usyskin@intel.com>
>
> Use || instead && in state check.
> Latter is bogus and leads to following warning:
>
> drivers/misc/mei/hbm.c:1212:46: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op]
>
> Fixes: 073e6274 ("mei: support for dynamic clients")
This isn't a commit id in Linus's tree anywhere, where did you get that
number from? Please fix it and use a valid one.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web