[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208110734.Ink9FfL5-lkp@intel.com>
Date: Thu, 11 Aug 2022 07:45:49 +0800
From: kernel test robot <lkp@...el.com>
To: Bart Van Assche <bvanassche@....org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [bvanassche:scsi-const-host-template 12/88]
drivers/ata/pata_platform.c:221:48: warning: passing argument 7 of
'__pata_platform_probe' discards 'const' qualifier from pointer target type
tree: https://github.com/bvanassche/linux scsi-const-host-template
head: 13249cc58dd0478af230234f124ec75b5331c348
commit: 21962245b3c73a5e7c9b7b3c129a83f5c1c31608 [12/88] ata
config: m68k-randconfig-r035-20220810 (https://download.01.org/0day-ci/archive/20220811/202208110734.Ink9FfL5-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
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
# https://github.com/bvanassche/linux/commit/21962245b3c73a5e7c9b7b3c129a83f5c1c31608
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-const-host-template
git checkout 21962245b3c73a5e7c9b7b3c129a83f5c1c31608
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/ata/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/ata/pata_platform.c: In function 'pata_platform_probe':
>> drivers/ata/pata_platform.c:221:48: warning: passing argument 7 of '__pata_platform_probe' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
221 | pio_mask, &pata_platform_sht, false);
| ^~~~~~~~~~~~~~~~~~
drivers/ata/pata_platform.c:100:54: note: expected 'struct scsi_host_template *' but argument is of type 'const struct scsi_host_template *'
100 | struct scsi_host_template *sht, bool use16bit)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
vim +221 drivers/ata/pata_platform.c
a20c9e820864e18 Paul Mundt 2006-10-27 184
0ec24914675c482 Greg Kroah-Hartman 2012-12-21 185 static int pata_platform_probe(struct platform_device *pdev)
cf03613e9662c28 Anton Vorontsov 2008-01-09 186 {
cf03613e9662c28 Anton Vorontsov 2008-01-09 187 struct resource *io_res;
cf03613e9662c28 Anton Vorontsov 2008-01-09 188 struct resource *ctl_res;
cf03613e9662c28 Anton Vorontsov 2008-01-09 189 struct resource *irq_res;
61b8c345aa8c50c Jingoo Han 2013-07-30 190 struct pata_platform_info *pp_info = dev_get_platdata(&pdev->dev);
cf03613e9662c28 Anton Vorontsov 2008-01-09 191
cf03613e9662c28 Anton Vorontsov 2008-01-09 192 /*
cf03613e9662c28 Anton Vorontsov 2008-01-09 193 * Simple resource validation ..
cf03613e9662c28 Anton Vorontsov 2008-01-09 194 */
cf03613e9662c28 Anton Vorontsov 2008-01-09 195 if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
cf03613e9662c28 Anton Vorontsov 2008-01-09 196 dev_err(&pdev->dev, "invalid number of resources\n");
cf03613e9662c28 Anton Vorontsov 2008-01-09 197 return -EINVAL;
cf03613e9662c28 Anton Vorontsov 2008-01-09 198 }
cf03613e9662c28 Anton Vorontsov 2008-01-09 199
cf03613e9662c28 Anton Vorontsov 2008-01-09 200 /*
cf03613e9662c28 Anton Vorontsov 2008-01-09 201 * Get the I/O base first
cf03613e9662c28 Anton Vorontsov 2008-01-09 202 */
8818a5342cb499b Lad Prabhakar 2022-01-17 203 io_res = platform_get_mem_or_io(pdev, 0);
8818a5342cb499b Lad Prabhakar 2022-01-17 204 if (!io_res)
cf03613e9662c28 Anton Vorontsov 2008-01-09 205 return -EINVAL;
cf03613e9662c28 Anton Vorontsov 2008-01-09 206
cf03613e9662c28 Anton Vorontsov 2008-01-09 207 /*
cf03613e9662c28 Anton Vorontsov 2008-01-09 208 * Then the CTL base
cf03613e9662c28 Anton Vorontsov 2008-01-09 209 */
8818a5342cb499b Lad Prabhakar 2022-01-17 210 ctl_res = platform_get_mem_or_io(pdev, 1);
8818a5342cb499b Lad Prabhakar 2022-01-17 211 if (!ctl_res)
cf03613e9662c28 Anton Vorontsov 2008-01-09 212 return -EINVAL;
cf03613e9662c28 Anton Vorontsov 2008-01-09 213
cf03613e9662c28 Anton Vorontsov 2008-01-09 214 /*
cf03613e9662c28 Anton Vorontsov 2008-01-09 215 * And the IRQ
cf03613e9662c28 Anton Vorontsov 2008-01-09 216 */
cf03613e9662c28 Anton Vorontsov 2008-01-09 217 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
cf03613e9662c28 Anton Vorontsov 2008-01-09 218
cf03613e9662c28 Anton Vorontsov 2008-01-09 219 return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
cf03613e9662c28 Anton Vorontsov 2008-01-09 220 pp_info ? pp_info->ioport_shift : 0,
f3d5e4f18dba18d Alexander Shiyan 2019-01-19 @221 pio_mask, &pata_platform_sht, false);
cf03613e9662c28 Anton Vorontsov 2008-01-09 222 }
cf03613e9662c28 Anton Vorontsov 2008-01-09 223
:::::: The code at line 221 was first introduced by commit
:::::: f3d5e4f18dba18d7c2303dda68b9dbcf5ccc05cd ata: pata_of_platform: Allow to use 16-bit wide data transfer
:::::: TO: Alexander Shiyan <shc_work@...l.ru>
:::::: CC: Jens Axboe <axboe@...nel.dk>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists