Re: [PATCH 03/18] ledtrig-blkdev: Add function placeholders needed by block changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ian,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on linus/master v5.14 next-20210903]
[cannot apply to pavel-linux-leds/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Ian-Pilcher/Introduce-block-device-LED-trigger/20210904-044701
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: arm-randconfig-r032-20210904 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6fe2beba7d2a41964af658c8c59dd172683ef739)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/555c9bcdaa7524206ca62c64730b800037ffa9a0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ian-Pilcher/Introduce-block-device-LED-trigger/20210904-044701
        git checkout 555c9bcdaa7524206ca62c64730b800037ffa9a0
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/power/supply/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/power/supply/ipaq_micro_battery.c:91:12: error: conflicting types for 'get_capacity'
   static int get_capacity(struct power_supply *b)
              ^
   include/linux/genhd.h:253:24: note: previous definition is here
   static inline sector_t get_capacity(struct gendisk *disk)
                          ^
>> drivers/power/supply/ipaq_micro_battery.c:161:30: error: incompatible pointer types passing 'struct power_supply *' to parameter of type 'struct gendisk *' [-Werror,-Wincompatible-pointer-types]
                   val->intval = get_capacity(b);
                                              ^
   include/linux/genhd.h:253:53: note: passing argument to parameter 'disk' here
   static inline sector_t get_capacity(struct gendisk *disk)
                                                       ^
   2 errors generated.


vim +/get_capacity +91 drivers/power/supply/ipaq_micro_battery.c

00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24   90  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  @91  static int get_capacity(struct power_supply *b)
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24   92  {
297d716f6260cc drivers/power/ipaq_micro_battery.c        Krzysztof Kozlowski 2015-03-12   93  	struct micro_battery *mb = dev_get_drvdata(b->dev.parent);
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24   94  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24   95  	switch (mb->flag & 0x07) {
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24   96  	case MICRO_BATT_STATUS_HIGH:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24   97  		return 100;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24   98  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24   99  	case MICRO_BATT_STATUS_LOW:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  100  		return 50;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  101  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  102  	case MICRO_BATT_STATUS_CRITICAL:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  103  		return 5;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  104  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  105  	default:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  106  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  107  	}
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  108  	return 0;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  109  }
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  110  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  111  static int get_status(struct power_supply *b)
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  112  {
297d716f6260cc drivers/power/ipaq_micro_battery.c        Krzysztof Kozlowski 2015-03-12  113  	struct micro_battery *mb = dev_get_drvdata(b->dev.parent);
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  114  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  115  	if (mb->flag == MICRO_BATT_STATUS_UNKNOWN)
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  116  		return POWER_SUPPLY_STATUS_UNKNOWN;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  117  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  118  	if (mb->flag & MICRO_BATT_STATUS_FULL)
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  119  		return POWER_SUPPLY_STATUS_FULL;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  120  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  121  	if ((mb->flag & MICRO_BATT_STATUS_CHARGING) ||
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  122  		(mb->flag & MICRO_BATT_STATUS_CHARGEMAIN))
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  123  		return POWER_SUPPLY_STATUS_CHARGING;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  124  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  125  	return POWER_SUPPLY_STATUS_DISCHARGING;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  126  }
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  127  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  128  static int micro_batt_get_property(struct power_supply *b,
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  129  					enum power_supply_property psp,
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  130  					union power_supply_propval *val)
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  131  {
297d716f6260cc drivers/power/ipaq_micro_battery.c        Krzysztof Kozlowski 2015-03-12  132  	struct micro_battery *mb = dev_get_drvdata(b->dev.parent);
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  133  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  134  	switch (psp) {
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  135  	case POWER_SUPPLY_PROP_TECHNOLOGY:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  136  		switch (mb->chemistry) {
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  137  		case MICRO_BATT_CHEM_NICD:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  138  			val->intval = POWER_SUPPLY_TECHNOLOGY_NiCd;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  139  			break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  140  		case MICRO_BATT_CHEM_NIMH:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  141  			val->intval = POWER_SUPPLY_TECHNOLOGY_NiMH;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  142  			break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  143  		case MICRO_BATT_CHEM_LION:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  144  			val->intval = POWER_SUPPLY_TECHNOLOGY_LION;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  145  			break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  146  		case MICRO_BATT_CHEM_LIPOLY:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  147  			val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  148  			break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  149  		default:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  150  			val->intval = POWER_SUPPLY_TECHNOLOGY_UNKNOWN;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  151  			break;
3d32a8437c0510 drivers/power/supply/ipaq_micro_battery.c Chen Zhou           2020-01-15  152  		}
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  153  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  154  	case POWER_SUPPLY_PROP_STATUS:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  155  		val->intval = get_status(b);
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  156  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  157  	case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  158  		val->intval = 4700000;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  159  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  160  	case POWER_SUPPLY_PROP_CAPACITY:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24 @161  		val->intval = get_capacity(b);
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  162  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  163  	case POWER_SUPPLY_PROP_TEMP:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  164  		val->intval = mb->temperature;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  165  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  166  	case POWER_SUPPLY_PROP_VOLTAGE_NOW:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  167  		val->intval = mb->voltage;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  168  		break;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  169  	default:
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  170  		return -EINVAL;
3d32a8437c0510 drivers/power/supply/ipaq_micro_battery.c Chen Zhou           2020-01-15  171  	}
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  172  
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  173  	return 0;
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  174  }
00a588f9d27fc6 drivers/power/ipaq_micro_battery.c        Dmitry Artamonow    2014-07-24  175  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux