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:	Mon, 10 Oct 2011 10:33:57 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	balbi@...com
Cc:	Randy Dunlap <rdunlap@...otime.net>, linux-next@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>, linux-usb@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH -next] usb gadget: fix langwell_udc.c build error

Hi,

On Sat, 8 Oct 2011 13:03:28 +0300 Felipe Balbi <balbi@...com> wrote:
>
> On Fri, Oct 07, 2011 at 01:57:42PM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <rdunlap@...otime.net>
> > 
> > Move function to fix langwell_udc.c build error:
> > 
> > drivers/usb/gadget/langwell_udc.c: In function 'show_langwell_udc':
> > drivers/usb/gadget/langwell_udc.c:1693:3: error: implicit declaration of function 'lpm_device_speed'
> > drivers/usb/gadget/langwell_udc.c: At top level:
> > drivers/usb/gadget/langwell_udc.c:2637:37: error: conflicting types for 'lpm_device_speed'
> > drivers/usb/gadget/langwell_udc.c:1693:20: note: previous implicit declaration of 'lpm_device_speed' was here
> 
> I don't have this compile error on my branch, did something go in
> without me noticing ?
> 
> Can you blame a comit which introduced this ?
> 
> btw, all I have is a warning.

The code in that file is structured like this (in linux-next and the usb
tree):

static ssize_t show_langwell_udc(struct device *_dev,
                struct device_attribute *attr, char *buf)
{
	...
	t = scnprintf(next, size,
                "Device LPM Control Reg:\n"
                "Parallel Transceiver : %d\n"
                "Serial Transceiver : %d\n"
                "Port Speed: %s\n"
                "Port Force Full Speed Connenct: %s\n"
                "PHY Low Power Suspend Clock: %s\n"
                "BmAttributes: %d\n\n",
                LPM_PTS(tmp_reg),
                (tmp_reg & LPM_STS) ? 1 : 0,
                usb_speed_string(lpm_device_speed(tmp_reg)),
                (tmp_reg & LPM_PFSC) ? "Force Full Speed" : "Not Force",
                (tmp_reg & LPM_PHCD) ? "Disabled" : "Enabled",
                LPM_BA(tmp_reg));
	...
}

...

static inline enum usb_device_speed lpm_device_speed(u32 reg)
{
	...
}

So this function is clearly used before it is declared.  What does yours
look like?

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ