public inbox for gfs2@lists.linux.dev
 help / color / mirror / Atom feed
* [gfs2:alloc 57/77] fs/gfs2/bmap.c:1176:23: error: too many arguments to function 'gfs2_iomap_write_alloc'
@ 2023-11-08  6:21 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-08  6:21 UTC (permalink / raw)
  To: Andreas Gruenbacher; +Cc: oe-kbuild-all, gfs2

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git alloc
head:   04e5d5785cde5d9320a6352e7cc01cfdb394d042
commit: 2e721b03a8a2877ac116affe082d0f9a18964e99 [57/77] gfs2: Add gfs2_iomap_write_alloc helper
config: microblaze-randconfig-r122-20231107 (https://download.01.org/0day-ci/archive/20231108/202311081452.oh0jMQkN-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231108/202311081452.oh0jMQkN-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311081452.oh0jMQkN-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   fs/gfs2/bmap.c: In function 'gfs2_iomap_begin':
>> fs/gfs2/bmap.c:1176:58: warning: passing argument 3 of 'gfs2_iomap_write_alloc' makes pointer from integer without a cast [-Wint-conversion]
    1176 |                 ret = gfs2_iomap_write_alloc(inode, pos, length,
         |                                                          ^~~~~~
         |                                                          |
         |                                                          loff_t {aka long long int}
   fs/gfs2/bmap.c:1011:54: note: expected 'struct iomap *' but argument is of type 'loff_t' {aka 'long long int'}
    1011 |                        unsigned flags, struct iomap *iomap,
         |                                        ~~~~~~~~~~~~~~^~~~~
   fs/gfs2/bmap.c:1177:46: warning: passing argument 4 of 'gfs2_iomap_write_alloc' makes pointer from integer without a cast [-Wint-conversion]
    1177 |                                              flags, iomap, &mp);
         |                                              ^~~~~
         |                                              |
         |                                              unsigned int
   fs/gfs2/bmap.c:1012:41: note: expected 'struct metapath *' but argument is of type 'unsigned int'
    1012 |                        struct metapath *mp)
         |                        ~~~~~~~~~~~~~~~~~^~
>> fs/gfs2/bmap.c:1176:23: error: too many arguments to function 'gfs2_iomap_write_alloc'
    1176 |                 ret = gfs2_iomap_write_alloc(inode, pos, length,
         |                       ^~~~~~~~~~~~~~~~~~~~~~
   fs/gfs2/bmap.c:1010:1: note: declared here
    1010 | gfs2_iomap_write_alloc(struct inode *inode,
         | ^~~~~~~~~~~~~~~~~~~~~~


vim +/gfs2_iomap_write_alloc +1176 fs/gfs2/bmap.c

  1133	
  1134	static int gfs2_iomap_begin(struct inode *inode, loff_t pos, loff_t length,
  1135				    unsigned flags, struct iomap *iomap,
  1136				    struct iomap *srcmap)
  1137	{
  1138		struct gfs2_inode *ip = GFS2_I(inode);
  1139		struct metapath mp;
  1140		int ret;
  1141	
  1142		if (gfs2_is_jdata(ip))
  1143			iomap->flags |= IOMAP_F_BUFFER_HEAD;
  1144	
  1145		trace_gfs2_iomap_start(ip, pos, length, flags);
  1146		ret = init_metapath(&mp, inode);
  1147		if (ret)
  1148			goto out_unlock;
  1149		ret = __gfs2_iomap_get(inode, pos, length, flags, iomap, &mp);
  1150		if (ret)
  1151			goto out_unlock;
  1152	
  1153		switch(flags & (IOMAP_WRITE | IOMAP_ZERO)) {
  1154		case IOMAP_WRITE:
  1155			if (flags & IOMAP_DIRECT) {
  1156				/*
  1157				 * Silently fall back to buffered I/O for stuffed files
  1158				 * or if we've got a hole (see gfs2_file_direct_write).
  1159				 */
  1160				if (iomap->type != IOMAP_MAPPED)
  1161					ret = -ENOTBLK;
  1162				goto out_unlock;
  1163			}
  1164			break;
  1165		case IOMAP_ZERO:
  1166			if (iomap->type == IOMAP_HOLE)
  1167				goto out_unlock;
  1168			break;
  1169		default:
  1170			goto out_unlock;
  1171		}
  1172	
  1173		if ((gfs2_is_stuffed(ip) &&
  1174		     pos + length > gfs2_max_stuffed_size(ip)) ||
  1175		    iomap->type == IOMAP_HOLE) {
> 1176			ret = gfs2_iomap_write_alloc(inode, pos, length,
  1177						     flags, iomap, &mp);
  1178			if (ret)
  1179				goto out_unlock;
  1180		}
  1181	
  1182		if (gfs2_is_stuffed(ip) || gfs2_is_jdata(ip))
  1183			iomap->folio_ops = &gfs2_iomap_folio_ops;
  1184	
  1185	out_unlock:
  1186		release_metapath(&mp);
  1187		trace_gfs2_iomap_end(ip, iomap, ret);
  1188		return ret;
  1189	}
  1190	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-08  6:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-08  6:21 [gfs2:alloc 57/77] fs/gfs2/bmap.c:1176:23: error: too many arguments to function 'gfs2_iomap_write_alloc' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox