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:	Sun, 26 Jun 2011 14:11:17 +0200
From:	Sebastian Heß <shess@...sware.de>
To:	Constantine Shulyupin <const@...elinux.com>
Cc:	linux-kernel@...r.kernel.org, linux-embedded@...r.kernel.org,
	davinci-linux-open-source@...ux.davincidsp.com, nsekhar@...com,
	khilman@...com
Subject: Re: [PATCH] Enable USB on TI DM365

On Friday 24 June 2011 20:51:31 Constantine Shulyupin wrote:

Hi,
 
> -void davinci_setup_usb(unsigned mA, unsigned potpgt_ms);
> +int davinci_setup_usb(unsigned mA, unsigned potpgt_ms);
> 
>  #endif	/* ifndef __ASM_ARCH_USB_H */
> diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
> index 23d2b6d..8b12206 100644
> --- a/arch/arm/mach-davinci/usb.c
> +++ b/arch/arm/mach-davinci/usb.c
> @@ -4,19 +4,22 @@
>  #include <linux/init.h>
>  #include <linux/platform_device.h>
>  #include <linux/dma-mapping.h>
> -
>  #include <linux/usb/musb.h>
> 
>  #include <mach/common.h>
>  #include <mach/irqs.h>
>  #include <mach/cputype.h>
>  #include <mach/usb.h>
> +#include <mach/mux.h>
> +#include <linux/gpio.h>
> 
>  #define DAVINCI_USB_OTG_BASE	0x01c64000
> 
>  #define DA8XX_USB0_BASE 	0x01e00000
>  #define DA8XX_USB1_BASE 	0x01e25000
> 
> +static int retval;
> +
Why do you add this as a global static var? As no locking is involved here 
this may cause problems as soon as we see SMP systems using this controller. 
Please put the variable into the functions needing it.

Best regards

Sebastian
-- 
Hessware - Open Source Solutions
--
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