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: sh-allmodconfig (attached as .config) compiler: sh4-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 0c1bc81ba976bcd480d6e3c3009a28589f8427c0 # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=sh All error/warnings (new ones prefixed by >>): In file included from drivers/mfd/motorola-mdm.c:24:0: 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 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 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 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 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 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 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 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 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 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 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 makes pointer from integer without a cast [-Wint-conversion] struct motmdm *ddata = gsm_serdev_get_drvdata(dev); ^~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/motorola-mdm.c: At top level: >> drivers/mfd/motorola-mdm.c:1132:11: error: initializer element is not constant .name = motmdm_driver_name, ^~~~~~~~~~~~~~~~~~ drivers/mfd/motorola-mdm.c:1132:11: note: (near initialization for 'motmdm_driver.driver.name') cc1: some warnings being treated as errors vim +89 drivers/mfd/motorola-mdm.c > 24 #include <linux/serdev-gsm.h> 25 26 #include <linux/mfd/core.h> 27 #include <linux/mfd/motorola-mdm.h> 28 #include <linux/phy/phy.h> 29 30 #include <uapi/linux/gsmmux.h> 31 32 #define MOTMDM_C_N2 3 /* TS27.010 default value */ 33 #define MOTMDM_DLCI_MIN 1 34 #define MOTMDM_DLCI_MAX 12 35 #define MOTMDM_DLCI_MASK 0x1ffe /* MOTMDM_DLCI1 to 12 */ 36 #define MOTMDM_ID_LEN 5 /* U + unsigned short */ 37 #define MOTMDM_CMD_LEN(x) (MOTMDM_ID_LEN + (x) + 1) 38 #define MOTMDM_WRITE_BUF_SIZE 1024 39 40 struct motmdm_cfg { 41 unsigned long cdevmask; 42 unsigned int aggressive_pm:1; 43 int modem_dlci; 44 int codec_dlci; 45 }; 46 47 struct motmdm { 48 struct device *dev; 49 struct phy *phy; 50 struct gsm_serdev gsd; 51 const struct motmdm_cfg *cfg; 52 struct class *class; 53 struct list_head dlcis; 54 struct list_head cdevs; 55 dev_t dev_id; 56 u16 cmdid; 57 }; 58 59 struct motmdm_response { 60 struct list_head node; 61 u16 id; 62 const unsigned char *cmd; 63 size_t cmdlen; 64 size_t reslen; 65 unsigned char *buf; 66 size_t len; 67 }; 68 69 struct motmdm_cdev { 70 struct motmdm *ddata; 71 struct list_head node; 72 struct motmdm_dlci *dlci; 73 struct device *dev; 74 struct cdev cdev; 75 struct rw_semaphore rwsem; 76 unsigned int count; 77 unsigned int disconnected:1; 78 struct mutex read_mutex; /* char dev write lock */ 79 struct mutex write_mutex; /* char dev read lock */ 80 char *write_buf; 81 size_t write_buf_sz; 82 size_t write_offset; 83 }; 84 85 static const char * const motmdm_driver_name = "motmdm"; 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