10669 qede: NULL pointer errors

Review Request #1642 — Created April 2, 2019 and submitted

tsoome
illumos-gate
10669
a0ce33c...
general
../../common/io/qede/qede_main.c: In function 'qede_alloc_intrs':
../../common/io/qede/qede_main.c:1120:43: error: comparison between pointer and integer [-Werror]
   if (intr_ctx->intr_vect_info_array_size == NULL) {
                                           ^~
cc1: all warnings being treated as errors

Note: there are more issues.


  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
andy_js
  1. Ship It!
  2. 
      
wiedi
  1. 
      
  2. usr/src/uts/common/io/qede/qede_main.c (Diff revision 1)
     
     

    shouldn't that test against intr_ctx->intr_vect_info?

    Or maybe do the test for intr_ctx->intr_vect_info_array_size == 0 before the kmem_zalloc()?

    The man page says "kmem_alloc(0, flag) always returns NULL, but if KM_SLEEP is set, this behavior is considered to be deprecated" so I'm not sure what the preferred fix would be.

    1. Yes, this line should be:

              if (intr_ctx->intr_vect_info == NULL) {
      
    2. Actually this is something totally not needed. kmem alloc with KM_SLEEP will not return NULL, so we do not need the post-allocation checks. And we will apply patch from akhoje@marvell.com here.

  3. 
      
tsoome
andy_js
  1. Ship It!
  2. 
      
wiedi
  1. Ship It!
  2. 
      
domag02
  1. Can you do some "trailing space" and "space-tab issues" cleanup, please?
    Otherwise LGTM.
    1. qede is in exclusion list and actively maintained by vendor - so we better skip that.

    2. Ok.
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...