* re: qed: Add support for coalescing config read/update.
@ 2016-06-27 19:50 Dan Carpenter
2016-06-28 4:40 ` Sudarsana Kalluru
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-06-27 19:50 UTC (permalink / raw)
To: kernel-janitors
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: qed: Add support for coalescing config read/update.
2016-06-27 19:50 qed: Add support for coalescing config read/update Dan Carpenter
@ 2016-06-28 4:40 ` Sudarsana Kalluru
0 siblings, 0 replies; 2+ messages in thread
From: Sudarsana Kalluru @ 2016-06-28 4:40 UTC (permalink / raw)
To: kernel-janitors
Hi Dan carpenter,
Thanks for your mail. Will submit the fix.
Thanks,
Sudarsana
-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
Sent: 28 June 2016 01:21
To: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>; Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: kernel-janitors@vger.kernel.org
Subject: re: qed: Add support for coalescing config read/update.
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-28 4:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-27 19:50 qed: Add support for coalescing config read/update Dan Carpenter
2016-06-28 4:40 ` Sudarsana Kalluru
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.