tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
master
head:   b187191577629b5358acf4e234809ee8d441ceb4
commit: b187191577629b5358acf4e234809ee8d441ceb4 [375/375] cxgb4: Add thermal 
zone support
config: parisc-allmodconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout b187191577629b5358acf4e234809ee8d441ceb4
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=parisc 

All errors (new ones prefixed by >>):

   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c: In function 
'cxgb4_thermal_get_trip_type':
>> drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c:48:11: error: 'struct 
>> adapter' has no member named 'ch_thermal'
     if (!adap->ch_thermal.trip_temp)
              ^~
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c:51:14: error: 'struct 
adapter' has no member named 'ch_thermal'
     *type = adap->ch_thermal.trip_type;
                 ^~
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c: In function 
'cxgb4_thermal_get_trip_temp':
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c:60:11: error: 'struct 
adapter' has no member named 'ch_thermal'
     if (!adap->ch_thermal.trip_temp)
              ^~
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c:63:14: error: 'struct 
adapter' has no member named 'ch_thermal'
     *temp = adap->ch_thermal.trip_temp;
                 ^~
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c: In function 
'cxgb4_thermal_init':
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c:75:39: error: 'struct 
adapter' has no member named 'ch_thermal'
     struct ch_thermal *ch_thermal = &adap->ch_thermal;
                                          ^~
>> drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c:92:13: error: 
>> dereferencing pointer to incomplete type 'struct ch_thermal'
      ch_thermal->trip_temp = val * 1000;
                ^~
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c: In function 
'cxgb4_thermal_remove':
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c:111:10: error: 'struct 
adapter' has no member named 'ch_thermal'
     if (adap->ch_thermal.tzdev)
             ^~
   drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c:112:38: error: 'struct 
adapter' has no member named 'ch_thermal'
      thermal_zone_device_unregister(adap->ch_thermal.tzdev);
                                         ^~

vim +48 drivers/net//ethernet/chelsio/cxgb4/cxgb4_thermal.c

    42  
    43  static int cxgb4_thermal_get_trip_type(struct thermal_zone_device 
*tzdev,
    44                                         int trip, enum thermal_trip_type 
*type)
    45  {
    46          struct adapter *adap = tzdev->devdata;
    47  
  > 48          if (!adap->ch_thermal.trip_temp)
    49                  return -EINVAL;
    50  
    51          *type = adap->ch_thermal.trip_type;
    52          return 0;
    53  }
    54  
    55  static int cxgb4_thermal_get_trip_temp(struct thermal_zone_device 
*tzdev,
    56                                         int trip, int *temp)
    57  {
    58          struct adapter *adap = tzdev->devdata;
    59  
    60          if (!adap->ch_thermal.trip_temp)
    61                  return -EINVAL;
    62  
  > 63          *temp = adap->ch_thermal.trip_temp;
    64          return 0;
    65  }
    66  
    67  static struct thermal_zone_device_ops cxgb4_thermal_ops = {
    68          .get_temp = cxgb4_thermal_get_temp,
    69          .get_trip_type = cxgb4_thermal_get_trip_type,
    70          .get_trip_temp = cxgb4_thermal_get_trip_temp,
    71  };
    72  
    73  int cxgb4_thermal_init(struct adapter *adap)
    74  {
    75          struct ch_thermal *ch_thermal = &adap->ch_thermal;
    76          int num_trip = CXGB4_NUM_TRIPS;
    77          u32 param, val;
    78          int ret;
    79  
    80          /* on older firmwares we may not get the trip temperature,
    81           * set the num of trips to 0.
    82           */
    83          param = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) |
    84                   FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DEV_DIAG) |
    85                   FW_PARAMS_PARAM_Y_V(FW_PARAM_DEV_DIAG_MAXTMPTHRESH));
    86  
    87          ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1,
    88                                &param, &val);
    89          if (ret < 0) {
    90                  num_trip = 0; /* could not get trip temperature */
    91          } else {
  > 92                  ch_thermal->trip_temp = val * 1000;
    93                  ch_thermal->trip_type = THERMAL_TRIP_CRITICAL;
    94          }
    95  
    96          ch_thermal->tzdev = thermal_zone_device_register("cxgb4", 
num_trip,
    97                                                           0, adap,
    98                                                           
&cxgb4_thermal_ops,
    99                                                           NULL, 0, 0);
   100          if (IS_ERR(ch_thermal->tzdev)) {
   101                  ret = PTR_ERR(ch_thermal->tzdev);
   102                  dev_err(adap->pdev_dev, "Failed to register thermal 
zone\n");
   103                  ch_thermal->tzdev = NULL;
   104                  return ret;
   105          }
   106          return 0;
   107  }
   108  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to