All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [omap:droid4-pending-v5.4 16/26] include/linux/serdev-gsm.h:29:2: error: unknown type name 'atomic_t'
Date: Wed, 30 Oct 2019 11:29:14 +0800	[thread overview]
Message-ID: <201910301113.EBit6IOu%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 9478 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git droid4-pending-v5.4
head:   3efaedc5ef6cde5bfde516b6db455b306b5ce5b7
commit: 2d0f14db2d1621061c1cbc73bf22009577902f4c [16/26] tty: n_gsm: Add support for serdev drivers
config: i386-randconfig-d002-201943 (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=i386 

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

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: In function 'gsm_serdev_register_device':
>> include/linux/serdev-gsm.h:172:10: error: 'ENODEV' undeclared (first use in this function)
     return -ENODEV;
             ^~~~~~
   include/linux/serdev-gsm.h:172:10: 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:180: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:182:9: error: 'NULL' undeclared (first use in this function)
     return NULL;
            ^~~~
   include/linux/serdev-gsm.h: At top level:
   include/linux/serdev-gsm.h:186:36: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration
    void gsm_serdev_set_drvdata(struct device *dev, void *drvdata)
                                       ^~~~~~
   include/linux/serdev-gsm.h: In function 'gsm_serdev_get_config':
   include/linux/serdev-gsm.h:193:10: error: 'ENODEV' undeclared (first use in this function)
     return -ENODEV;
             ^~~~~~
   include/linux/serdev-gsm.h: In function 'gsm_serdev_set_config':
   include/linux/serdev-gsm.h:199: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:206:10: error: 'ENODEV' undeclared (first use in this function)
     return -ENODEV;
             ^~~~~~
   include/linux/serdev-gsm.h: At top level:
   include/linux/serdev-gsm.h:217: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:219:10: error: 'ENODEV' undeclared (first use in this function)
     return -ENODEV;
             ^~~~~~

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	
   109	/**
   110	 * gsm_serdev_register_dlci - register a ts 27.010 channel
   111	 * @gsd:	serdev-gsm instance
   112	 * @ops:	channel ops
   113	 */
   114	static inline
   115	int gsm_serdev_register_dlci(struct gsm_serdev *gsd,
   116				     struct gsm_serdev_dlci *ops)
   117	{
   118		if (gsd && gsd->register_dlci)
   119			return gsd->register_dlci(gsd, ops);
   120	
   121		return -ENODEV;
   122	}
   123	
   124	/**
   125	 * gsm_serdev_unregister_dlci - unregister a ts 27.010 channel
   126	 * @gsd:	serdev-gsm instance
   127	 * @ops:	channel ops
   128	 */
   129	static inline
   130	void gsm_serdev_unregister_dlci(struct gsm_serdev *gsd,
   131					struct gsm_serdev_dlci *ops)
   132	{
   133		if (gsd && gsd->unregister_dlci)
   134			gsd->unregister_dlci(gsd, ops);
   135	}
   136	
   137	/**
   138	 * gsm_serdev_write - write data to a ts 27.010 channel
   139	 * @gsd:	serdev-gsm instance
   140	 * @ops:	channel ops
   141	 * @buf:	write buffer
   142	 * @len:	buffer length
   143	 */
   144	static inline
   145	int gsm_serdev_write(struct gsm_serdev *gsd, struct gsm_serdev_dlci *ops,
   146			     const u8 *buf, int len)
   147	{
   148		if (gsd && gsd->write)
   149			return gsd->write(gsd, ops, buf, len);
   150	
   151		return -ENODEV;
   152	}
   153	
   154	/**
   155	 * gsm_serdev_data_kick - indicate more data can be trasmitted
   156	 * @gsd:	serdev-gsm instance
   157	 *
   158	 * See gsm_data_kick() for more information.
   159	 */
   160	static inline
   161	void gsm_serdev_data_kick(struct gsm_serdev *gsd)
   162	{
   163		if (gsd && gsd->kick)
   164			gsd->kick(gsd);
   165	}
   166	
   167	#else	/* CONFIG_SERIAL_DEV_BUS */
   168	
   169	static inline
   170	int gsm_serdev_register_device(struct gsm_serdev *gsd)
   171	{
 > 172		return -ENODEV;
   173	}
   174	
   175	static inline
   176	void gsm_serdev_unregister_device(struct gsm_serdev *gsd)
   177	{
   178	}
   179	
   180	static inline void *gsm_serdev_get_drvdata(struct device *dev)
   181	{
 > 182		return NULL;
   183	}
   184	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26881 bytes --]

                 reply	other threads:[~2019-10-30  3:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910301113.EBit6IOu%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.