From: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <Yuval.Mintz@qlogic.com>,
<sudarsana.kalluru@qlogic.com>
Subject: [PATCH net-next 1/2] qed: Fix static checker warnings.
Date: Tue, 28 Jun 2016 02:10:58 -0400 [thread overview]
Message-ID: <1467094259-16061-2-git-send-email-sudarsana.kalluru@qlogic.com> (raw)
In-Reply-To: <1467094259-16061-1-git-send-email-sudarsana.kalluru@qlogic.com>
Static checker warnings:
drivers/net/ethernet/qlogic/qed/qed_int.c:2450 qed_init_cau_sb_entry()
warn: always true condition '(cdev->rx_coalesce_usecs <= 255) =>
(0-255 <= 255)'
drivers/net/ethernet/qlogic/qed/qed_int.c:2511 qed_int_cau_conf_sb()
warn: always true condition '(p_hwfn->cdev->rx_coalesce_usecs <= 255)
=> (0-255 <= 255)'
..
The data types for rx/tx_coalesce_usecs should be u16.
Fixes: commit 722003ac40c2 ("qed: Add support for coalescing config read/update.")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
---
drivers/net/ethernet/qlogic/qed/qed.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed.h b/drivers/net/ethernet/qlogic/qed/qed.h
index 9a63df1..35e5377 100644
--- a/drivers/net/ethernet/qlogic/qed/qed.h
+++ b/drivers/net/ethernet/qlogic/qed/qed.h
@@ -489,8 +489,8 @@ struct qed_dev {
u32 int_mode;
enum qed_coalescing_mode int_coalescing_mode;
- u8 rx_coalesce_usecs;
- u8 tx_coalesce_usecs;
+ u16 rx_coalesce_usecs;
+ u16 tx_coalesce_usecs;
/* Start Bar offset of first hwfn */
void __iomem *regview;
--
1.8.3.1
next prev parent reply other threads:[~2016-06-28 6:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 6:10 [PATCH net-next 0/2] qed*: Fix the static checker warnings Sudarsana Reddy Kalluru
2016-06-28 6:10 ` Sudarsana Reddy Kalluru [this message]
2016-06-28 6:10 ` [PATCH net-next 2/2] qede: " Sudarsana Reddy Kalluru
2016-06-29 11:59 ` [PATCH net-next 0/2] qed*: " David Miller
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=1467094259-16061-2-git-send-email-sudarsana.kalluru@qlogic.com \
--to=sudarsana.kalluru@qlogic.com \
--cc=Yuval.Mintz@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).