linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: atmel: atmel-isc: fix i386 build error
@ 2019-06-19  7:24 Eugen.Hristev
  2019-06-19  8:03 ` Sakari Ailus
  2019-06-22  7:44 ` Hans Verkuil
  0 siblings, 2 replies; 3+ messages in thread
From: Eugen.Hristev @ 2019-06-19  7:24 UTC (permalink / raw)
  To: hverkuil, linux-media, linux-arm-kernel, linux-kernel, sakari.ailus
  Cc: Eugen.Hristev

From: Eugen Hristev <eugen.hristev@microchip.com>

ld: drivers/media/platform/atmel/atmel-isc-base.o:(.bss+0x0): multiple definition of `debug'; arch/x86/entry/entry_32.o:(.entry.text+0x21ac): first defined here

Changed module parameters to static.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---

Hello Hans,

Sorry for this, it looks like i386 has a stray weird 'debug' symbol which
causes an error.
I changed the module parameters of the atmel-isc to 'static' but now they
cannot be accessed in the other module files.
Will have to create a get function to be used in the other files if needed
later. Any other way to make a symbol static to current module and not
current file ? It would be useful for other config variables as well.
I was not sure if you want to squash this over the faulty patch or add it
as a separate patch.
If you want me to squash it let me know and I will come up with a squashed
new version.

Thanks,
Eugen

 drivers/media/platform/atmel/atmel-isc-base.c | 4 ++--
 drivers/media/platform/atmel/atmel-isc.h      | 4 ----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c
index eb1f5d4..c1c776b 100644
--- a/drivers/media/platform/atmel/atmel-isc-base.c
+++ b/drivers/media/platform/atmel/atmel-isc-base.c
@@ -35,11 +35,11 @@
 #include "atmel-isc-regs.h"
 #include "atmel-isc.h"
 
-unsigned int debug;
+static unsigned int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "debug level (0-2)");
 
-unsigned int sensor_preferred = 1;
+static unsigned int sensor_preferred = 1;
 module_param(sensor_preferred, uint, 0644);
 MODULE_PARM_DESC(sensor_preferred,
 		 "Sensor is preferred to output the specified format (1-on 0-off), default 1");
diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h
index f5f5932..bfaed2f 100644
--- a/drivers/media/platform/atmel/atmel-isc.h
+++ b/drivers/media/platform/atmel/atmel-isc.h
@@ -230,10 +230,6 @@ struct isc_device {
 
 #define ATMEL_ISC_NAME "atmel-isc"
 
-/* module parameters */
-extern unsigned int debug;
-extern unsigned int sensor_preferred;
-
 extern struct isc_format formats_list[];
 extern const struct isc_format controller_formats[];
 extern const u32 isc_gamma_table[GAMMA_MAX + 1][GAMMA_ENTRIES];
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: atmel: atmel-isc: fix i386 build error
  2019-06-19  7:24 [PATCH] media: atmel: atmel-isc: fix i386 build error Eugen.Hristev
@ 2019-06-19  8:03 ` Sakari Ailus
  2019-06-22  7:44 ` Hans Verkuil
  1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2019-06-19  8:03 UTC (permalink / raw)
  To: Eugen.Hristev; +Cc: hverkuil, linux-media, linux-arm-kernel, linux-kernel

Hi Eugen,

On Wed, Jun 19, 2019 at 07:24:41AM +0000, Eugen.Hristev@microchip.com wrote:
> From: Eugen Hristev <eugen.hristev@microchip.com>
> 
> ld: drivers/media/platform/atmel/atmel-isc-base.o:(.bss+0x0): multiple definition of `debug'; arch/x86/entry/entry_32.o:(.entry.text+0x21ac): first defined here
> 
> Changed module parameters to static.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> ---
> 
> Hello Hans,
> 
> Sorry for this, it looks like i386 has a stray weird 'debug' symbol which
> causes an error.
> I changed the module parameters of the atmel-isc to 'static' but now they
> cannot be accessed in the other module files.
> Will have to create a get function to be used in the other files if needed
> later. Any other way to make a symbol static to current module and not
> current file ? It would be useful for other config variables as well.
> I was not sure if you want to squash this over the faulty patch or add it
> as a separate patch.

Please consider using dev_dbg() instead of a driver specific parameter for
debug.

For the patch:

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: atmel: atmel-isc: fix i386 build error
  2019-06-19  7:24 [PATCH] media: atmel: atmel-isc: fix i386 build error Eugen.Hristev
  2019-06-19  8:03 ` Sakari Ailus
@ 2019-06-22  7:44 ` Hans Verkuil
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2019-06-22  7:44 UTC (permalink / raw)
  To: Eugen.Hristev, linux-media, linux-arm-kernel, linux-kernel, sakari.ailus

On 6/19/19 9:24 AM, Eugen.Hristev@microchip.com wrote:
> From: Eugen Hristev <eugen.hristev@microchip.com>
> 
> ld: drivers/media/platform/atmel/atmel-isc-base.o:(.bss+0x0): multiple definition of `debug'; arch/x86/entry/entry_32.o:(.entry.text+0x21ac): first defined here
> 
> Changed module parameters to static.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> ---
> 
> Hello Hans,
> 
> Sorry for this, it looks like i386 has a stray weird 'debug' symbol which
> causes an error.
> I changed the module parameters of the atmel-isc to 'static' but now they
> cannot be accessed in the other module files.
> Will have to create a get function to be used in the other files if needed
> later. Any other way to make a symbol static to current module and not
> current file ? It would be useful for other config variables as well.
> I was not sure if you want to squash this over the faulty patch or add it
> as a separate patch.
> If you want me to squash it let me know and I will come up with a squashed
> new version.
> 
> Thanks,
> Eugen
> 
>  drivers/media/platform/atmel/atmel-isc-base.c | 4 ++--
>  drivers/media/platform/atmel/atmel-isc.h      | 4 ----
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c
> index eb1f5d4..c1c776b 100644
> --- a/drivers/media/platform/atmel/atmel-isc-base.c
> +++ b/drivers/media/platform/atmel/atmel-isc-base.c
> @@ -35,11 +35,11 @@
>  #include "atmel-isc-regs.h"
>  #include "atmel-isc.h"
>  
> -unsigned int debug;
> +static unsigned int debug;
>  module_param(debug, int, 0644);

You can also use module_param_named, or use dev_dbg as Sakari suggested.

In any case, I've added this patch to my pull request since it's urgent to
fix this issue.

Regards,

	Hans

>  MODULE_PARM_DESC(debug, "debug level (0-2)");
>  
> -unsigned int sensor_preferred = 1;
> +static unsigned int sensor_preferred = 1;
>  module_param(sensor_preferred, uint, 0644);
>  MODULE_PARM_DESC(sensor_preferred,
>  		 "Sensor is preferred to output the specified format (1-on 0-off), default 1");
> diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h
> index f5f5932..bfaed2f 100644
> --- a/drivers/media/platform/atmel/atmel-isc.h
> +++ b/drivers/media/platform/atmel/atmel-isc.h
> @@ -230,10 +230,6 @@ struct isc_device {
>  
>  #define ATMEL_ISC_NAME "atmel-isc"
>  
> -/* module parameters */
> -extern unsigned int debug;
> -extern unsigned int sensor_preferred;
> -
>  extern struct isc_format formats_list[];
>  extern const struct isc_format controller_formats[];
>  extern const u32 isc_gamma_table[GAMMA_MAX + 1][GAMMA_ENTRIES];
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-22  7:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-19  7:24 [PATCH] media: atmel: atmel-isc: fix i386 build error Eugen.Hristev
2019-06-19  8:03 ` Sakari Ailus
2019-06-22  7:44 ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).