lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Oct 2011 14:38:09 +0200
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	Sven Schnelle <svens@...ckframe.org>,
	Grant Likely <grant.likely@...retlab.ca>,
	devicetree-discuss@...ts.ozlabs.org,
	Rob Herring <robherring2@...il.com>,
	Greg Kroah-Hartman <gregkh@...e.de>
CC:	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty/serial: atmel_serial: fix compilation

On 10/28/2011 01:33 PM, Sven Schnelle :
> If CONFIG_OF is disabled, compilation fails with:
> 
> drivers/tty/serial/atmel_serial.c: In function 'atmel_serial_probe':
> drivers/tty/serial/atmel_serial.c:1788: error: implicit declaration of function 'of_alias_get_id'
> 
> Fix this by adding the proper CONFIG_OF checks.

Yes, but I would like to avoid this and I have made a patch to address
this issue. I have sent it to the device tree guys yesterday:
"[PATCH] dt: add empty of_alias_get_id() for non-dt builds"

Maybe we can wait a little and see if it reaches Linus' tree on time. If
it is not, I will make sure that such a fix make it to mainline.

Best regards,

> Signed-off-by: Sven Schnelle <svens@...ckframe.org>
> ---
>  drivers/tty/serial/atmel_serial.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 4a0f86f..de338dd 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -1777,16 +1777,20 @@ static int atmel_serial_resume(struct platform_device *pdev)
>  static int __devinit atmel_serial_probe(struct platform_device *pdev)
>  {
>  	struct atmel_uart_port *port;
> +#ifdef CONFIG_OF
>  	struct device_node *np = pdev->dev.of_node;
> +#endif
>  	struct atmel_uart_data *pdata = pdev->dev.platform_data;
>  	void *data;
>  	int ret = -ENODEV;
>  
>  	BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
>  
> +#ifdef CONFIG_OF
>  	if (np)
>  		ret = of_alias_get_id(np, "serial");
>  	else
> +#endif
>  		if (pdata)
>  			ret = pdata->num;
>  


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ