From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: qed: Add support for coalescing config read/update.
Date: Mon, 27 Jun 2016 19:50:58 +0000 [thread overview]
Message-ID: <20160627195058.GA4081@mwanda> (raw)
Hello Sudarsana Reddy Kalluru,
The patch 722003ac40c2: "qed: Add support for coalescing config
read/update." from Jun 21, 2016, leads to the following static
checker warning:
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
2446
2447 /* Coalesce = (timeset << timer-res), timeset is 7bit wide */
2448 if (cdev->rx_coalesce_usecs <= 0x7F)
2449 timer_res = 0;
2450 else if (cdev->rx_coalesce_usecs <= 0xFF)
2451 timer_res = 1;
2452 else
2453 timer_res = 2;
timer_res can't be two because ->rx_coalesce_usecs is a u8.
2454 SET_FIELD(p_sb_entry->params, CAU_SB_ENTRY_TIMER_RES0, timer_res);
2455
2456 if (cdev->tx_coalesce_usecs <= 0x7F)
2457 timer_res = 0;
2458 else if (cdev->tx_coalesce_usecs <= 0xFF)
2459 timer_res = 1;
2460 else
2461 timer_res = 2;
Same.
2462 SET_FIELD(p_sb_entry->params, CAU_SB_ENTRY_TIMER_RES1, timer_res);
2463
2464 SET_FIELD(p_sb_entry->data, CAU_SB_ENTRY_STATE0, cau_state);
2465 SET_FIELD(p_sb_entry->data, CAU_SB_ENTRY_STATE1, cau_state);
2466 }
There are a couple others as well.
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)'
drivers/net/ethernet/qlogic/qed/qed_int.c:2522 qed_int_cau_conf_sb() warn: always true condition '(p_hwfn->cdev->tx_coalesce_usecs <= 255) => (0-255 <= 255)'
regards,
dan carpenter
next reply other threads:[~2016-06-27 19:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-27 19:50 Dan Carpenter [this message]
2016-06-28 4:40 ` qed: Add support for coalescing config read/update Sudarsana Kalluru
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=20160627195058.GA4081@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.