Re: [PATCH -next] usb gadget: fix langwell_udc.c build error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, 8 Oct 2011 13:03:28 +0300 Felipe Balbi <balbi@xxxxxx> wrote:
>
> On Fri, Oct 07, 2011 at 01:57:42PM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
> > 
> > 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@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgpBTZBL7ZPOw.pgp
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux