From: Julia Lawall <julia.lawall@inria.fr>
To: Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Wojciech Ziemba <wojciech.ziemba@intel.com>
Cc: qat-linux@intel.com, Denis Efremov <efremov@linux.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
kbuild-all@lists.01.org
Subject: [PATCH] crypto: qat - fix excluded_middle.cocci warnings
Date: Fri, 13 Nov 2020 18:14:00 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2011131811110.2840@hadrien> (raw)
From: kernel test robot <lkp@intel.com>
Condition !A || A && B is equivalent to !A || B.
Generated by: scripts/coccinelle/misc/excluded_middle.cocci
Fixes: b76f0ea01312 ("coccinelle: misc: add excluded_middle.cocci script")
CC: Denis Efremov <efremov@linux.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 585e5b17b92dead8a3aca4e3c9876fbca5f7e0ba
commit: b76f0ea013125358d1b4ca147a6f9b6883dd2493 coccinelle: misc: add excluded_middle.cocci script
:::::: branch date: 14 hours ago
:::::: commit date: 8 weeks ago
Please take the patch only if it's a positive warning. Thanks!
adf_dev_mgr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/crypto/qat/qat_common/adf_dev_mgr.c
+++ b/drivers/crypto/qat/qat_common/adf_dev_mgr.c
@@ -152,7 +152,7 @@ int adf_devmgr_add_dev(struct adf_accel_
atomic_set(&accel_dev->ref_count, 0);
/* PF on host or VF on guest */
- if (!accel_dev->is_vf || (accel_dev->is_vf && !pf)) {
+ if (!accel_dev->is_vf || !pf) {
struct vf_id_map *map;
list_for_each(itr, &accel_table) {
@@ -248,7 +248,7 @@ void adf_devmgr_rm_dev(struct adf_accel_
struct adf_accel_dev *pf)
{
mutex_lock(&table_lock);
- if (!accel_dev->is_vf || (accel_dev->is_vf && !pf)) {
+ if (!accel_dev->is_vf || !pf) {
id_map[accel_dev->accel_id] = 0;
num_devices--;
} else if (accel_dev->is_vf && pf) {
next reply other threads:[~2020-11-13 17:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 17:14 Julia Lawall [this message]
2020-11-19 19:58 ` [PATCH] crypto: qat - fix excluded_middle.cocci warnings Giovanni Cabiddu
2020-11-19 22:25 ` [PATCH RESEND] " Giovanni Cabiddu
2020-11-27 6:26 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2011131811110.2840@hadrien \
--to=julia.lawall@inria.fr \
--cc=efremov@linux.com \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@lists.01.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qat-linux@intel.com \
--cc=wojciech.ziemba@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).