Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 11:49:05 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300847 - head/sys/dev/sfxge/common
Message-ID:  <201605271149.u4RBn50X045482@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Fri May 27 11:49:05 2016
New Revision: 300847
URL: https://svnweb.freebsd.org/changeset/base/300847

Log:
  sfxge(4): cope with always true unsigned comparison with 0 to make lint happier
  
  Found by lint on illumos.
  
  Submitted by:   Garrett D'Amore <garrett at damore.org>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      1 week

Modified:
  head/sys/dev/sfxge/common/ef10_rx.c

Modified: head/sys/dev/sfxge/common/ef10_rx.c
==============================================================================
--- head/sys/dev/sfxge/common/ef10_rx.c	Fri May 27 11:48:25 2016	(r300846)
+++ head/sys/dev/sfxge/common/ef10_rx.c	Fri May 27 11:49:05 2016	(r300847)
@@ -50,14 +50,15 @@ efx_mcdi_init_rxq(
 {
 	efx_mcdi_req_t req;
 	uint8_t payload[
-	    MAX(MC_CMD_INIT_RXQ_IN_LEN(EFX_RXQ_NBUFS(EFX_RXQ_MAXNDESCS)),
-		MC_CMD_INIT_RXQ_OUT_LEN)];
+	    MC_CMD_INIT_RXQ_IN_LEN(EFX_RXQ_NBUFS(EFX_RXQ_MAXNDESCS))];
 	int npages = EFX_RXQ_NBUFS(size);
 	int i;
 	efx_qword_t *dma_addr;
 	uint64_t addr;
 	efx_rc_t rc;
 
+	/* If this changes, then the payload size might need to change. */
+	EFSYS_ASSERT3U(MC_CMD_INIT_RXQ_OUT_LEN, ==, 0);
 	EFSYS_ASSERT3U(size, <=, EFX_RXQ_MAXNDESCS);
 
 	(void) memset(payload, 0, sizeof (payload));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605271149.u4RBn50X045482>