[driver-core:debugfs_cleanup 102/109] net/6lowpan/debugfs.c:182:2: error: 'root' undeclared; did you mean 'ror8'?

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup
head:   ead253d78760f569593267b87592175cc66b0f99
commit: a1e3d1d072efed7a835376d1b17c21ae9021b9a7 [102/109] 6lowpan: fix changelog
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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 a1e3d1d072efed7a835376d1b17c21ae9021b9a7
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=m68k 

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

   net/6lowpan/debugfs.c: In function 'lowpan_dev_debugfs_ctx_init':
>> net/6lowpan/debugfs.c:182:2: error: 'root' undeclared (first use in this function); did you mean 'ror8'?
     root = debugfs_create_dir(buf, ctx);
     ^~~~
     ror8
   net/6lowpan/debugfs.c:182:2: note: each undeclared identifier is reported only once for each function it appears in
>> net/6lowpan/debugfs.c:195:1: warning: no return statement in function returning non-void [-Wreturn-type]
    }
    ^
   net/6lowpan/debugfs.c: In function 'lowpan_dev_debugfs_802154_init':
>> net/6lowpan/debugfs.c:240:10: warning: 'return' with a value, in function returning void
      return 0;
             ^
   net/6lowpan/debugfs.c:234:13: note: declared here
    static void lowpan_dev_debugfs_802154_init(const struct net_device *dev,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/6lowpan/debugfs.c: At top level:
>> net/6lowpan/debugfs.c:249:5: error: conflicting types for 'lowpan_dev_debugfs_init'
    int lowpan_dev_debugfs_init(struct net_device *dev)
        ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from net/6lowpan/debugfs.c:17:0:
   net/6lowpan/6lowpan_i.h:21:6: note: previous declaration of 'lowpan_dev_debugfs_init' was here
    void lowpan_dev_debugfs_init(struct net_device *dev);
         ^~~~~~~~~~~~~~~~~~~~~~~
   net/6lowpan/debugfs.c: In function 'lowpan_dev_debugfs_init':
>> net/6lowpan/debugfs.c:267:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +182 net/6lowpan/debugfs.c

5609c185 Alexander Aring    2016-02-22  171  
5609c185 Alexander Aring    2016-02-22  172  static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
5609c185 Alexander Aring    2016-02-22  173  				       struct dentry *ctx, u8 id)
5609c185 Alexander Aring    2016-02-22  174  {
2e4d60cb Alexander Aring    2016-04-11  175  	struct lowpan_dev *ldev = lowpan_dev(dev);
5609c185 Alexander Aring    2016-02-22  176  	char buf[32];
5609c185 Alexander Aring    2016-02-22  177  
5609c185 Alexander Aring    2016-02-22  178  	WARN_ON_ONCE(id > LOWPAN_IPHC_CTX_TABLE_SIZE);
5609c185 Alexander Aring    2016-02-22  179  
5609c185 Alexander Aring    2016-02-22  180  	sprintf(buf, "%d", id);
5609c185 Alexander Aring    2016-02-22  181  
5609c185 Alexander Aring    2016-02-22 @182  	root = debugfs_create_dir(buf, ctx);
5609c185 Alexander Aring    2016-02-22  183  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  184  	debugfs_create_file("active", 0644, root, &ldev->ctx.table[id],
5609c185 Alexander Aring    2016-02-22  185  			    &lowpan_ctx_flag_active_fops);
5609c185 Alexander Aring    2016-02-22  186  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  187  	debugfs_create_file("compression", 0644, root, &ldev->ctx.table[id],
5609c185 Alexander Aring    2016-02-22  188  			    &lowpan_ctx_flag_c_fops);
5609c185 Alexander Aring    2016-02-22  189  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  190  	debugfs_create_file("prefix", 0644, root, &ldev->ctx.table[id],
5609c185 Alexander Aring    2016-02-22  191  			    &lowpan_ctx_pfx_fops);
5609c185 Alexander Aring    2016-02-22  192  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  193  	debugfs_create_file("prefix_len", 0644, root, &ldev->ctx.table[id],
5609c185 Alexander Aring    2016-02-22  194  			    &lowpan_ctx_plen_fops);
5609c185 Alexander Aring    2016-02-22 @195  }
5609c185 Alexander Aring    2016-02-22  196  
5609c185 Alexander Aring    2016-02-22  197  static int lowpan_context_show(struct seq_file *file, void *offset)
5609c185 Alexander Aring    2016-02-22  198  {
5609c185 Alexander Aring    2016-02-22  199  	struct lowpan_iphc_ctx_table *t = file->private;
5609c185 Alexander Aring    2016-02-22  200  	int i;
5609c185 Alexander Aring    2016-02-22  201  
5609c185 Alexander Aring    2016-02-22  202  	seq_printf(file, "%3s|%-43s|%c\n", "cid", "prefix", 'C');
5609c185 Alexander Aring    2016-02-22  203  	seq_puts(file, "-------------------------------------------------\n");
5609c185 Alexander Aring    2016-02-22  204  
5609c185 Alexander Aring    2016-02-22  205  	spin_lock_bh(&t->lock);
5609c185 Alexander Aring    2016-02-22  206  	for (i = 0; i < LOWPAN_IPHC_CTX_TABLE_SIZE; i++) {
5609c185 Alexander Aring    2016-02-22  207  		if (!lowpan_iphc_ctx_is_active(&t->table[i]))
5609c185 Alexander Aring    2016-02-22  208  			continue;
5609c185 Alexander Aring    2016-02-22  209  
5609c185 Alexander Aring    2016-02-22  210  		seq_printf(file, "%3d|%39pI6c/%-3d|%d\n", t->table[i].id,
5609c185 Alexander Aring    2016-02-22  211  			   &t->table[i].pfx, t->table[i].plen,
5609c185 Alexander Aring    2016-02-22  212  			   lowpan_iphc_ctx_is_compression(&t->table[i]));
5609c185 Alexander Aring    2016-02-22  213  	}
5609c185 Alexander Aring    2016-02-22  214  	spin_unlock_bh(&t->lock);
5609c185 Alexander Aring    2016-02-22  215  
5609c185 Alexander Aring    2016-02-22  216  	return 0;
5609c185 Alexander Aring    2016-02-22  217  }
f79ba430 Yangtao Li         2018-12-15  218  DEFINE_SHOW_ATTRIBUTE(lowpan_context);
5609c185 Alexander Aring    2016-02-22  219  
cfce9465 Alexander Aring    2016-06-15  220  static int lowpan_short_addr_get(void *data, u64 *val)
cfce9465 Alexander Aring    2016-06-15  221  {
cfce9465 Alexander Aring    2016-06-15  222  	struct wpan_dev *wdev = data;
cfce9465 Alexander Aring    2016-06-15  223  
cfce9465 Alexander Aring    2016-06-15  224  	rtnl_lock();
cfce9465 Alexander Aring    2016-06-15  225  	*val = le16_to_cpu(wdev->short_addr);
cfce9465 Alexander Aring    2016-06-15  226  	rtnl_unlock();
cfce9465 Alexander Aring    2016-06-15  227  
cfce9465 Alexander Aring    2016-06-15  228  	return 0;
cfce9465 Alexander Aring    2016-06-15  229  }
cfce9465 Alexander Aring    2016-06-15  230  
cfce9465 Alexander Aring    2016-06-15  231  DEFINE_SIMPLE_ATTRIBUTE(lowpan_short_addr_fops, lowpan_short_addr_get,
cfce9465 Alexander Aring    2016-06-15  232  			NULL, "0x%04llx\n");
cfce9465 Alexander Aring    2016-06-15  233  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  234  static void lowpan_dev_debugfs_802154_init(const struct net_device *dev,
cfce9465 Alexander Aring    2016-06-15  235  					  struct lowpan_dev *ldev)
cfce9465 Alexander Aring    2016-06-15  236  {
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  237  	struct dentry *root;
cfce9465 Alexander Aring    2016-06-15  238  
cfce9465 Alexander Aring    2016-06-15  239  	if (!lowpan_is_ll(dev, LOWPAN_LLTYPE_IEEE802154))
cfce9465 Alexander Aring    2016-06-15 @240  		return 0;
cfce9465 Alexander Aring    2016-06-15  241  
cfce9465 Alexander Aring    2016-06-15  242  	root = debugfs_create_dir("ieee802154", ldev->iface_debugfs);
cfce9465 Alexander Aring    2016-06-15  243  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  244  	debugfs_create_file("short_addr", 0444, root,
cfce9465 Alexander Aring    2016-06-15  245  			    lowpan_802154_dev(dev)->wdev->ieee802154_ptr,
cfce9465 Alexander Aring    2016-06-15  246  			    &lowpan_short_addr_fops);
cfce9465 Alexander Aring    2016-06-15  247  }
cfce9465 Alexander Aring    2016-06-15  248  
b1815fd9 Alexander Aring    2015-12-09 @249  int lowpan_dev_debugfs_init(struct net_device *dev)
b1815fd9 Alexander Aring    2015-12-09  250  {
2e4d60cb Alexander Aring    2016-04-11  251  	struct lowpan_dev *ldev = lowpan_dev(dev);
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  252  	struct dentry *contexts;
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  253  	int i;
b1815fd9 Alexander Aring    2015-12-09  254  
b1815fd9 Alexander Aring    2015-12-09  255  	/* creating the root */
2e4d60cb Alexander Aring    2016-04-11  256  	ldev->iface_debugfs = debugfs_create_dir(dev->name, lowpan_debugfs);
b1815fd9 Alexander Aring    2015-12-09  257  
2e4d60cb Alexander Aring    2016-04-11  258  	contexts = debugfs_create_dir("contexts", ldev->iface_debugfs);
5609c185 Alexander Aring    2016-02-22  259  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  260  	debugfs_create_file("show", 0644, contexts, &lowpan_dev(dev)->ctx,
5609c185 Alexander Aring    2016-02-22  261  			    &lowpan_context_fops);
cfce9465 Alexander Aring    2016-06-15  262  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  263  	for (i = 0; i < LOWPAN_IPHC_CTX_TABLE_SIZE; i++)
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  264  		lowpan_dev_debugfs_ctx_init(dev, contexts, i);
b1815fd9 Alexander Aring    2015-12-09  265  
a1e3d1d0 Greg Kroah-Hartman 2019-01-04  266  	lowpan_dev_debugfs_802154_init(dev, ldev);
b1815fd9 Alexander Aring    2015-12-09 @267  }
b1815fd9 Alexander Aring    2015-12-09  268  

:::::: The code at line 182 was first introduced by commit
:::::: 5609c185f24dffca5f6a9c127106869da150be03 6lowpan: iphc: add support for stateful compression

:::::: TO: Alexander Aring <aar@xxxxxxxxxxxxxx>
:::::: CC: Marcel Holtmann <marcel@xxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux