linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fireware: Remove always true condition
@ 2019-06-20  9:40 Ding Xiang
  0 siblings, 0 replies; only message in thread
From: Ding Xiang @ 2019-06-20  9:40 UTC (permalink / raw)
  To: stefanr; +Cc: linux1394-devel, linux-kernel

The range of max_hops is 0~15 and gap_count_table size is 16,
so the condition is always true, just remove it.

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
---
 drivers/firewire/core-card.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
index 54be881..3489d00 100644
--- a/drivers/firewire/core-card.c
+++ b/drivers/firewire/core-card.c
@@ -462,8 +462,7 @@ static void bm_work(struct work_struct *work)
 	 * Pick a gap count from 1394a table E-1.  The table doesn't cover
 	 * the typically much larger 1394b beta repeater delays though.
 	 */
-	if (!card->beta_repeaters_present &&
-	    root_node->max_hops < ARRAY_SIZE(gap_count_table))
+	if (!card->beta_repeaters_present)
 		gap_count = gap_count_table[root_node->max_hops];
 	else
 		gap_count = 63;
-- 
1.9.1




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-20  9:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-20  9:40 [PATCH] fireware: Remove always true condition Ding Xiang

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).