Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1293840 > unrolled thread

[PATCH] serial: atmel: header file for MODULE_DEVICE_TABLE

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2015-12-17 13:30 +0100
Last post2015-12-17 16:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] serial: atmel: header file for MODULE_DEVICE_TABLE Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-17 13:30 +0100
    Re: [PATCH] serial: atmel: header file for MODULE_DEVICE_TABLE Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-12-17 16:10 +0100

#1293840 — [PATCH] serial: atmel: header file for MODULE_DEVICE_TABLE

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-17 13:30 +0100
Subject[PATCH] serial: atmel: header file for MODULE_DEVICE_TABLE
Message-ID<qGFR1-7NE-31@gated-at.bofh.it>
mips allmodconfig fails with the error:

drivers/tty/serial/atmel_serial.c:192:1: warning: data definition has no type or storage class
 MODULE_DEVICE_TABLE(of, atmel_serial_dt_ids);
 ^
drivers/tty/serial/atmel_serial.c:192:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
drivers/tty/serial/atmel_serial.c:192:1: warning: parameter names (without types) in function declaration

commit c39dfebc7798 has made the driver non-modular and removed the
header file and it is now compiled as a builtin driver. But since
CONFIG_OF is defined for mips so we need the definition of
MODULE_DEVICE_TABLE to compile successfully.

Fixes: c39dfebc7798 ("drivers/tty/serial: make serial/atmel_serial.c explicitly non-modular")
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---

build log with next-20151217 is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/97388463

Log contains another error with gpio, patch for that has been separately
submitted.

 drivers/tty/serial/atmel_serial.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 50e785a..e9a2fa4 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -47,6 +47,7 @@
 #include <linux/err.h>
 #include <linux/irq.h>
 #include <linux/suspend.h>
+#include <linux/module.h>
 
 #include <asm/io.h>
 #include <asm/ioctls.h>
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1293967

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2015-12-17 16:10 +0100
Message-ID<qGIlQ-154-17@gated-at.bofh.it>
In reply to#1293840
[[PATCH] serial: atmel: header file for MODULE_DEVICE_TABLE] On 17/12/2015 (Thu 17:55) Sudip Mukherjee wrote:

> mips allmodconfig fails with the error:
> 
> drivers/tty/serial/atmel_serial.c:192:1: warning: data definition has no type or storage class
>  MODULE_DEVICE_TABLE(of, atmel_serial_dt_ids);
>  ^

Yes, unfortunately I noticed the same thing when redoing my mips
build coverage.

> drivers/tty/serial/atmel_serial.c:192:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
> drivers/tty/serial/atmel_serial.c:192:1: warning: parameter names (without types) in function declaration
> 
> commit c39dfebc7798 has made the driver non-modular and removed the
> header file and it is now compiled as a builtin driver. But since
> CONFIG_OF is defined for mips so we need the definition of
> MODULE_DEVICE_TABLE to compile successfully.

No, this isn't the right fix.  We just delete the offending line.
I'll send the proper patch in a minute, once I add a reported by
line to it.

Paul.
--

> 
> Fixes: c39dfebc7798 ("drivers/tty/serial: make serial/atmel_serial.c explicitly non-modular")
> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> 
> build log with next-20151217 is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/97388463
> 
> Log contains another error with gpio, patch for that has been separately
> submitted.
> 
>  drivers/tty/serial/atmel_serial.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 50e785a..e9a2fa4 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -47,6 +47,7 @@
>  #include <linux/err.h>
>  #include <linux/irq.h>
>  #include <linux/suspend.h>
> +#include <linux/module.h>
>  
>  #include <asm/io.h>
>  #include <asm/ioctls.h>
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web