[omap:droid4-pending-mdm-v4.20 15/21] drivers/mfd/motorola-mdm.c:89:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git droid4-pending-mdm-v4.20
head:   ab13333f2ab58d5710f1a05d82630440265b6129
commit: 0c1bc81ba976bcd480d6e3c3009a28589f8427c0 [15/21] mfd: motmdm: Add Motorola TS 27.010 serdev driver for devices like droid4
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.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 0c1bc81ba976bcd480d6e3c3009a28589f8427c0
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   In file included from drivers/mfd/motorola-mdm.c:24:
   include/linux/serdev-gsm.h: In function 'gsm_serdev_unregister_dlci':
   include/linux/serdev-gsm.h:194:9: warning: 'return' with a value, in function returning void
     return -ENODEV;
            ^
   include/linux/serdev-gsm.h:191:6: note: declared here
    void gsm_serdev_unregister_dlci(struct gsm_serdev *gsd,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/motorola-mdm.c: In function 'motmdm_runtime_suspend':
   drivers/mfd/motorola-mdm.c:89:25: error: implicit declaration of function 'gsm_serdev_get_drvdata'; did you mean 'dev_get_drvdata'? [-Werror=implicit-function-declaration]
     struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
                            ^~~~~~~~~~~~~~~~~~~~~~
                            dev_get_drvdata
>> drivers/mfd/motorola-mdm.c:89:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/mfd/motorola-mdm.c: In function 'motmdm_runtime_resume':
   drivers/mfd/motorola-mdm.c:107:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
                            ^~~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/motorola-mdm.c: In function 'motmdm_init_phy':
   drivers/mfd/motorola-mdm.c:138:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
                            ^~~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/motorola-mdm.c: In function 'motmdm_dlci_write':
>> drivers/mfd/motorola-mdm.c:411:8: warning: assignment to 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     ddata = gsm_serdev_get_drvdata(dev);
           ^
   drivers/mfd/motorola-mdm.c: In function 'motmdm_register_dlci':
   drivers/mfd/motorola-mdm.c:466:8: warning: assignment to 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     ddata = gsm_serdev_get_drvdata(dev);
           ^
   drivers/mfd/motorola-mdm.c: In function 'motmdm_unregister_dlci':
   drivers/mfd/motorola-mdm.c:513:8: warning: assignment to 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     ddata = gsm_serdev_get_drvdata(dev);
           ^
   drivers/mfd/motorola-mdm.c: In function 'motmdm_cdev_init':
   drivers/mfd/motorola-mdm.c:797:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
                            ^~~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/motorola-mdm.c: In function 'motmdm_cdev_cleanup':
   drivers/mfd/motorola-mdm.c:850:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
                            ^~~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/motorola-mdm.c: In function 'motmdm_check_revision':
   drivers/mfd/motorola-mdm.c:865:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
                            ^~~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/motorola-mdm.c: In function 'motmdm_set_config':
   drivers/mfd/motorola-mdm.c:922:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
                            ^~~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/motorola-mdm.c:927:8: error: implicit declaration of function 'gsm_serdev_get_config'; did you mean 'motmdm_set_config'? [-Werror=implicit-function-declaration]
     err = gsm_serdev_get_config(gsd, &c);
           ^~~~~~~~~~~~~~~~~~~~~
           motmdm_set_config
   drivers/mfd/motorola-mdm.c:941:8: error: implicit declaration of function 'gsm_serdev_set_config'; did you mean 'motmdm_set_config'? [-Werror=implicit-function-declaration]
     err = gsm_serdev_set_config(gsd, &c);
           ^~~~~~~~~~~~~~~~~~~~~
           motmdm_set_config
   drivers/mfd/motorola-mdm.c: In function 'motmdm_probe':
   drivers/mfd/motorola-mdm.c:1019:2: error: implicit declaration of function 'gsm_serdev_set_drvdata'; did you mean 'dev_set_drvdata'? [-Werror=implicit-function-declaration]
     gsm_serdev_set_drvdata(dev, ddata);
     ^~~~~~~~~~~~~~~~~~~~~~
     dev_set_drvdata
   drivers/mfd/motorola-mdm.c: In function 'motmdm_remove':
   drivers/mfd/motorola-mdm.c:1110:25: warning: initialization of 'struct motmdm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
                            ^~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +89 drivers/mfd/motorola-mdm.c

    86	
    87	static int motmdm_runtime_suspend(struct device *dev)
    88	{
  > 89		struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
    90		int err;
    91	
    92		if (IS_ERR_OR_NULL(ddata->phy))
    93			return 0;
    94	
    95		err = phy_pm_runtime_put(ddata->phy);
    96		if (err < 0)
    97			dev_warn(dev, "%s: phy_pm_runtime_put: %i\n",
    98				 __func__, err);
    99	
   100		atomic_set(&ddata->gsd.asleep, 1);
   101	
   102		return 0;
   103	}
   104	
   105	static int motmdm_runtime_resume(struct device *dev)
   106	{
 > 107		struct motmdm *ddata = gsm_serdev_get_drvdata(dev);
   108		int err;
   109	
   110		if (IS_ERR_OR_NULL(ddata->phy))
   111			return 0;
   112	
   113		err = phy_pm_runtime_get_sync(ddata->phy);
   114		if (err < 0)
   115			dev_warn(dev, "%s: phy_pm_runtime_get: %i\n",
   116				 __func__, err);
   117	
   118		atomic_set(&ddata->gsd.asleep, 0);
   119		gsm_serdev_data_kick(&ddata->gsd);
   120	
   121		return 0;
   122	}
   123	

---
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 Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux