[omap:droid4-pending-v5.4 16/30] include/linux/serdev-gsm.h:29:2: error: unknown type name 'atomic_t'

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

 



Hi Tony,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git droid4-pending-v5.4
head:   0b0c3fd4db2f1f17f0f53d76f8897c91cb93afe0
commit: 2d0f14db2d1621061c1cbc73bf22009577902f4c [16/30] tty: n_gsm: Add support for serdev drivers
config: x86_64-randconfig-h001-20191114 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 2d0f14db2d1621061c1cbc73bf22009577902f4c
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from <command-line>:0:0:
>> include/linux/serdev-gsm.h:29:2: error: unknown type name 'atomic_t'
     atomic_t asleep;
     ^~~~~~~~
>> include/linux/serdev-gsm.h:37:40: error: unknown type name 'u8'
     int (*output)(struct gsm_serdev *gsd, u8 *data, int len);
                                           ^~
   include/linux/serdev-gsm.h:39:14: error: unknown type name 'u8'
           const u8 *buf, int len);
                 ^~
>> include/linux/serdev-gsm.h:52:7: error: unknown type name 'size_t'
          size_t len);
          ^~~~~~
   include/linux/serdev-gsm.h:53:1: warning: no semicolon at end of struct or union
    };
    ^
   include/linux/serdev-gsm.h:60:51: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration
    static inline void *gsm_serdev_get_drvdata(struct device *dev)
                                                      ^~~~~~
   include/linux/serdev-gsm.h: In function 'gsm_serdev_get_drvdata':
>> include/linux/serdev-gsm.h:62:33: error: implicit declaration of function 'to_serdev_device' [-Werror=implicit-function-declaration]
     struct serdev_device *serdev = to_serdev_device(dev);
                                    ^~~~~~~~~~~~~~~~
   include/linux/serdev-gsm.h:62:33: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
>> include/linux/serdev-gsm.h:63:27: error: implicit declaration of function 'serdev_device_get_drvdata'; did you mean 'gsm_serdev_get_drvdata'? [-Werror=implicit-function-declaration]
     struct gsm_serdev *gsd = serdev_device_get_drvdata(serdev);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~
                              gsm_serdev_get_drvdata
   include/linux/serdev-gsm.h:63:27: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
>> include/linux/serdev-gsm.h:68:9: error: 'NULL' undeclared (first use in this function)
     return NULL;
            ^~~~
   include/linux/serdev-gsm.h:68:9: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/serdev-gsm.h: At top level:
   include/linux/serdev-gsm.h:71:50: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration
    static inline void gsm_serdev_set_drvdata(struct device *dev, void *drvdata)
                                                     ^~~~~~
   include/linux/serdev-gsm.h: In function 'gsm_serdev_set_drvdata':
   include/linux/serdev-gsm.h:73:33: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct serdev_device *serdev = to_serdev_device(dev);
                                    ^~~~~~~~~~~~~~~~
   include/linux/serdev-gsm.h:74:27: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct gsm_serdev *gsd = serdev_device_get_drvdata(serdev);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/serdev-gsm.h: In function 'gsm_serdev_set_config':
>> include/linux/serdev-gsm.h:106:10: error: 'ENODEV' undeclared (first use in this function)
     return -ENODEV;
             ^~~~~~
   include/linux/serdev-gsm.h: In function 'gsm_serdev_register_dlci':
   include/linux/serdev-gsm.h:121:10: error: 'ENODEV' undeclared (first use in this function)
     return -ENODEV;
             ^~~~~~
   include/linux/serdev-gsm.h: At top level:
   include/linux/serdev-gsm.h:146:14: error: unknown type name 'u8'
           const u8 *buf, int len)
                 ^~
   include/linux/serdev-gsm.h: In function 'gsm_serdev_write':
   include/linux/serdev-gsm.h:151:10: error: 'ENODEV' undeclared (first use in this function)
     return -ENODEV;
             ^~~~~~
   cc1: some warnings being treated as errors

vim +/atomic_t +29 include/linux/serdev-gsm.h

     8	
     9	/**
    10	 * struct gsm_serdev - serdev-gsm instance
    11	 * @serdev:		serdev instance
    12	 * @gsm:		ts 27.010 n_gsm instance
    13	 * @asleep:		device is in idle state
    14	 * @drvdata:		serdev-gsm consumer driver data
    15	 * @get_config:		get ts 27.010 config
    16	 * @set_config:		set ts 27.010 config
    17	 * @register_dlci:	register ts 27.010 channel
    18	 * @unregister_dlci:	unregister ts 27.010 channel
    19	 * @output:		read data from ts 27.010 channel
    20	 * @write:		write data to a ts 27.010 channel
    21	 * @kick:		indicate more data is ready
    22	 *
    23	 * Currently only serdev and output must be initialized, the rest are
    24	 * are initialized by gsm_serdev_register_dlci().
    25	 */
    26	struct gsm_serdev {
    27		struct serdev_device *serdev;
    28		struct gsm_mux *gsm;
  > 29		atomic_t asleep;
    30		void *drvdata;
    31		int (*get_config)(struct gsm_serdev *gsd, struct gsm_config *c);
    32		int (*set_config)(struct gsm_serdev *gsd, struct gsm_config *c);
    33		int (*register_dlci)(struct gsm_serdev *gsd,
    34				     struct gsm_serdev_dlci *ops);
    35		void (*unregister_dlci)(struct gsm_serdev *gsd,
    36					struct gsm_serdev_dlci *ops);
  > 37		int (*output)(struct gsm_serdev *gsd, u8 *data, int len);
    38		int (*write)(struct gsm_serdev *gsd, struct gsm_serdev_dlci *ops,
    39			     const u8 *buf, int len);
    40		void (*kick)(struct gsm_serdev *gsd);
    41	};
    42	
    43	/**
    44	 * struct gsm_serdev_dlci - serdev-gsm ts 27.010 channel data
    45	 * @line:		ts 27.010 channel, control channel 0 is not available
    46	 * @receive_buf:	function to handle data received for the channel
    47	 */
    48	struct gsm_serdev_dlci {
    49		int line;
    50		int (*receive_buf)(struct gsm_serdev_dlci *ops,
    51				   const unsigned char *buf,
  > 52				   size_t len);
  > 53	};
    54	
    55	#ifdef CONFIG_SERIAL_DEV_BUS
    56	
    57	int gsm_serdev_register_device(struct gsm_serdev *gsd);
    58	void gsm_serdev_unregister_device(struct gsm_serdev *gsd);
    59	
  > 60	static inline void *gsm_serdev_get_drvdata(struct device *dev)
    61	{
  > 62		struct serdev_device *serdev = to_serdev_device(dev);
  > 63		struct gsm_serdev *gsd = serdev_device_get_drvdata(serdev);
    64	
    65		if (gsd)
    66			return gsd->drvdata;
    67	
  > 68		return NULL;
    69	}
    70	
    71	static inline void gsm_serdev_set_drvdata(struct device *dev, void *drvdata)
    72	{
  > 73		struct serdev_device *serdev = to_serdev_device(dev);
    74		struct gsm_serdev *gsd = serdev_device_get_drvdata(serdev);
    75	
    76		if (gsd)
    77			gsd->drvdata = drvdata;
    78	}
    79	
    80	/**
    81	 * gsm_serdev_get_config - read ts 27.010 config
    82	 * @gsd:	serdev-gsm instance
    83	 * @c:		ts 27.010 config data
    84	 *
    85	 * See gsm_copy_config_values() for more information.
    86	 */
    87	static inline
    88	int gsm_serdev_get_config(struct gsm_serdev *gsd, struct gsm_config *c)
    89	{
    90		return gsd->get_config(gsd, c);
    91	}
    92	
    93	/**
    94	 * gsm_serdev_set_config - set ts 27.010 config
    95	 * @gsd:	serdev-gsm instance
    96	 * @c:		ts 27.010 config data
    97	 *
    98	 * See gsm_config() for more information.
    99	 */
   100	static inline
   101	int gsm_serdev_set_config(struct gsm_serdev *gsd, struct gsm_config *c)
   102	{
   103		if (gsd && gsd->set_config)
   104			return gsd->set_config(gsd, c);
   105	
 > 106		return -ENODEV;
   107	}
   108	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx 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