Author: bz
Date: Fri Aug 29 09:37:18 2014
New Revision: 270799
URL: http://svnweb.freebsd.org/changeset/base/270799

Log:
  First try on fixing some more compile errors without actually testing:
  - use proper __FreeBSD_version check and more importantly check for __am64__
    to be defined.  Whether the FreeBSD(_version) checks are needed is a
    different question.
  - cast uint64_t to uintmax_t and use %jx for printing.
  
  Note: there are more values that could be printed in that status function
        but leave that for the future;  printf doesn't seem to be the right
        way to do it anyway.
  Note: there is more breakage related to i40e_allocate_dma*() having
        conflicting declarations, so more fixes to come.
  
  PR:           193112
  MFC after:    3 days
  X-MFC with:   r270755

Modified:
  head/sys/dev/ixl/if_ixl.c

Modified: head/sys/dev/ixl/if_ixl.c
==============================================================================
--- head/sys/dev/ixl/if_ixl.c   Fri Aug 29 09:29:10 2014        (r270798)
+++ head/sys/dev/ixl/if_ixl.c   Fri Aug 29 09:37:18 2014        (r270799)
@@ -3983,11 +3983,11 @@ ixl_print_debug_info(struct ixl_pf *pf)
        u32                     reg;    
 
 
-       printf("Queue irqs = %lx\n", que->irqs);
-       printf("AdminQ irqs = %lx\n", pf->admin_irq);
+       printf("Queue irqs = %jx\n", (uintmax_t)que->irqs);
+       printf("AdminQ irqs = %jx\n", (uintmax_t)pf->admin_irq);
        printf("RX next check = %x\n", rxr->next_check);
-       printf("RX not ready = %lx\n", rxr->not_done);
-       printf("RX packets = %lx\n", rxr->rx_packets);
+       printf("RX not ready = %jx\n", (uintmax_t)rxr->not_done);
+       printf("RX packets = %jx\n", (uintmax_t)rxr->rx_packets);
        printf("TX desc avail = %x\n", txr->avail);
 
        reg = rd32(hw, I40E_GLV_GORCL(0xc));
@@ -4128,7 +4128,7 @@ ixl_stat_update48(struct i40e_hw *hw, u3
 {
        u64 new_data;
 
-#if __FreeBSD__ >= 10 && __amd64__
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 1000000) && 
defined(__amd64__)
        new_data = rd64(hw, loreg);
 #else
        /*
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to