[vfs:work.net-ioctl 2/5] net//ipv4/ipconfig.c:366:13: error: too few arguments to function 'devinet_ioctl'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.net-ioctl
head:   7f733d3e90de599fe50f426d47468fd4cfee4c74
commit: af438d7e4ddad2f076964a4adc0f1bad897f1b20 [2/5] devinet_ioctl(): take copyin/copyout to caller
config: x86_64-randconfig-x018-201728 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout af438d7e4ddad2f076964a4adc0f1bad897f1b20
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

   In file included from include/linux/socket.h:6:0,
                    from include/uapi/linux/in.h:23,
                    from include/linux/in.h:23,
                    from net//ipv4/ipconfig.c:39:
   net//ipv4/ipconfig.c: In function 'ic_setup_if':
>> include/uapi/linux/sockios.h:41:21: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion]
    #define SIOCSIFADDR 0x8916  /* set PA address  */
                        ^
>> net//ipv4/ipconfig.c:366:27: note: in expansion of macro 'SIOCSIFADDR'
     if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) {
                              ^~~~~~~~~~~
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
>> net//ipv4/ipconfig.c:366:40: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion]
     if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) {
                                           ^
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
>> net//ipv4/ipconfig.c:366:13: error: too few arguments to function 'devinet_ioctl'
     if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) {
                ^~~~~~~~~~~~~
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: declared here
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   In file included from include/linux/socket.h:6:0,
                    from include/uapi/linux/in.h:23,
                    from include/linux/in.h:23,
                    from net//ipv4/ipconfig.c:39:
   include/uapi/linux/sockios.h:47:24: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion]
    #define SIOCSIFNETMASK 0x891c  /* set network PA mask  */
                           ^
>> net//ipv4/ipconfig.c:372:27: note: in expansion of macro 'SIOCSIFNETMASK'
     if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) {
                              ^~~~~~~~~~~~~~
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net//ipv4/ipconfig.c:372:43: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion]
     if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) {
                                              ^
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net//ipv4/ipconfig.c:372:13: error: too few arguments to function 'devinet_ioctl'
     if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) {
                ^~~~~~~~~~~~~
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: declared here
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   In file included from include/linux/socket.h:6:0,
                    from include/uapi/linux/in.h:23,
                    from include/linux/in.h:23,
                    from net//ipv4/ipconfig.c:39:
   include/uapi/linux/sockios.h:45:24: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion]
    #define SIOCSIFBRDADDR 0x891a  /* set broadcast PA address */
                           ^
>> net//ipv4/ipconfig.c:378:27: note: in expansion of macro 'SIOCSIFBRDADDR'
     if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) {
                              ^~~~~~~~~~~~~~
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net//ipv4/ipconfig.c:378:43: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion]
     if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) {
                                              ^
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net//ipv4/ipconfig.c:378:13: error: too few arguments to function 'devinet_ioctl'
     if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) {
                ^~~~~~~~~~~~~
   In file included from net//ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: declared here
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
--
   In file included from include/linux/socket.h:6:0,
                    from include/uapi/linux/in.h:23,
                    from include/linux/in.h:23,
                    from net/ipv4/ipconfig.c:39:
   net/ipv4/ipconfig.c: In function 'ic_setup_if':
>> include/uapi/linux/sockios.h:41:21: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion]
    #define SIOCSIFADDR 0x8916  /* set PA address  */
                        ^
   net/ipv4/ipconfig.c:366:27: note: in expansion of macro 'SIOCSIFADDR'
     if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) {
                              ^~~~~~~~~~~
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net/ipv4/ipconfig.c:366:40: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion]
     if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) {
                                           ^
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net/ipv4/ipconfig.c:366:13: error: too few arguments to function 'devinet_ioctl'
     if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) {
                ^~~~~~~~~~~~~
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: declared here
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   In file included from include/linux/socket.h:6:0,
                    from include/uapi/linux/in.h:23,
                    from include/linux/in.h:23,
                    from net/ipv4/ipconfig.c:39:
   include/uapi/linux/sockios.h:47:24: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion]
    #define SIOCSIFNETMASK 0x891c  /* set network PA mask  */
                           ^
   net/ipv4/ipconfig.c:372:27: note: in expansion of macro 'SIOCSIFNETMASK'
     if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) {
                              ^~~~~~~~~~~~~~
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net/ipv4/ipconfig.c:372:43: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion]
     if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) {
                                              ^
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net/ipv4/ipconfig.c:372:13: error: too few arguments to function 'devinet_ioctl'
     if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) {
                ^~~~~~~~~~~~~
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: declared here
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   In file included from include/linux/socket.h:6:0,
                    from include/uapi/linux/in.h:23,
                    from include/linux/in.h:23,
                    from net/ipv4/ipconfig.c:39:
   include/uapi/linux/sockios.h:45:24: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion]
    #define SIOCSIFBRDADDR 0x891a  /* set broadcast PA address */
                           ^
   net/ipv4/ipconfig.c:378:27: note: in expansion of macro 'SIOCSIFBRDADDR'
     if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) {
                              ^~~~~~~~~~~~~~
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net/ipv4/ipconfig.c:378:43: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion]
     if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) {
                                              ^
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *'
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~
   net/ipv4/ipconfig.c:378:13: error: too few arguments to function 'devinet_ioctl'
     if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) {
                ^~~~~~~~~~~~~
   In file included from net/ipv4/ipconfig.c:42:0:
   include/linux/inetdevice.h:166:5: note: declared here
    int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
        ^~~~~~~~~~~~~

vim +/devinet_ioctl +366 net//ipv4/ipconfig.c

   360		struct sockaddr_in *sin = (void *) &ir.ifr_ifru.ifru_addr;
   361		int err;
   362	
   363		memset(&ir, 0, sizeof(ir));
   364		strcpy(ir.ifr_ifrn.ifrn_name, ic_dev->dev->name);
   365		set_sockaddr(sin, ic_myaddr, 0);
 > 366		if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) {
   367			pr_err("IP-Config: Unable to set interface address (%d)\n",
   368			       err);
   369			return -1;
   370		}
   371		set_sockaddr(sin, ic_netmask, 0);
 > 372		if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) {
   373			pr_err("IP-Config: Unable to set interface netmask (%d)\n",
   374			       err);
   375			return -1;
   376		}
   377		set_sockaddr(sin, ic_myaddr | ~ic_netmask, 0);
 > 378		if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) {
   379			pr_err("IP-Config: Unable to set interface broadcast address (%d)\n",
   380			       err);
   381			return -1;

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux