Hi Fabio,

FYI, there are new compile warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git gadget
head:   df2167b3770a6ed33eb567d390b1a24a7efddcd9
commit: df2167b3770a6ed33eb567d390b1a24a7efddcd9 [13/13] usb: convert 
drivers/usb/* to use module_platform_driver_probe()
config: make ARCH=x86_64 allmodconfig

All warnings:

drivers/usb/gadget/m66592-udc.c:1756:1: warning: data definition has no type or 
storage class [enabled by default]
drivers/usb/gadget/m66592-udc.c:1756:1: warning: type defaults to 'int' in 
declaration of 'module_platform_driver_probe' [-Wimplicit-int]
drivers/usb/gadget/m66592-udc.c:1756:1: warning: parameter names (without 
types) in function declaration [enabled by default]
drivers/usb/gadget/m66592-udc.c:1598:19: warning: 'm66592_probe' defined but 
not used [-Wunused-function]
drivers/usb/gadget/m66592-udc.c:1748:31: warning: 'm66592_driver' defined but 
not used [-Wunused-variable]
--
drivers/usb/gadget/r8a66597-udc.c:2035:1: warning: data definition has no type 
or storage class [enabled by default]
drivers/usb/gadget/r8a66597-udc.c:2035:1: warning: type defaults to 'int' in 
declaration of 'module_platform_driver_probe' [-Wimplicit-int]
drivers/usb/gadget/r8a66597-udc.c:2035:1: warning: parameter names (without 
types) in function declaration [enabled by default]
drivers/usb/gadget/r8a66597-udc.c:1869:19: warning: 'r8a66597_probe' defined 
but not used [-Wunused-function]
drivers/usb/gadget/r8a66597-udc.c:2028:31: warning: 'r8a66597_driver' defined 
but not used [-Wunused-variable]
--
drivers/usb/otg/gpio_vbus.c:412:1: warning: data definition has no type or 
storage class [enabled by default]
drivers/usb/otg/gpio_vbus.c:412:1: warning: type defaults to 'int' in 
declaration of 'module_platform_driver_probe' [-Wimplicit-int]
drivers/usb/otg/gpio_vbus.c:412:1: warning: parameter names (without types) in 
function declaration [enabled by default]
drivers/usb/otg/gpio_vbus.c:239:19: warning: 'gpio_vbus_probe' defined but not 
used [-Wunused-function]
drivers/usb/otg/gpio_vbus.c:401:31: warning: 'gpio_vbus_driver' defined but not 
used [-Wunused-variable]

vim +1756 drivers/usb/gadget/m66592-udc.c

4cf2503c Yoshihiro Shimoda         2007-05-10  1592  }
4cf2503c Yoshihiro Shimoda         2007-05-10  1593  
598f22e1 Yoshihiro Shimoda         2007-07-17  1594  static void 
nop_completion(struct usb_ep *ep, struct usb_request *r)
598f22e1 Yoshihiro Shimoda         2007-07-17  1595  {
598f22e1 Yoshihiro Shimoda         2007-07-17  1596  }
598f22e1 Yoshihiro Shimoda         2007-07-17  1597  
4cf2503c Yoshihiro Shimoda         2007-05-10 @1598  static int __init 
m66592_probe(struct platform_device *pdev)
4cf2503c Yoshihiro Shimoda         2007-05-10  1599  {
2c59b0b7 Magnus Damm               2009-07-22  1600     struct resource *res, 
*ires;
4cf2503c Yoshihiro Shimoda         2007-05-10  1601     void __iomem *reg = 
NULL;
4cf2503c Yoshihiro Shimoda         2007-05-10  1602     struct m66592 *m66592 = 
NULL;
af5be79a Magnus Damm               2008-10-31  1603     char clk_name[8];
4cf2503c Yoshihiro Shimoda         2007-05-10  1604     int ret = 0;
4cf2503c Yoshihiro Shimoda         2007-05-10  1605     int i;
4cf2503c Yoshihiro Shimoda         2007-05-10  1606  
0a2e5b9b Magnus Damm               2008-11-13  1607     res = 
platform_get_resource(pdev, IORESOURCE_MEM, 0);
4cf2503c Yoshihiro Shimoda         2007-05-10  1608     if (!res) {
4cf2503c Yoshihiro Shimoda         2007-05-10  1609             ret = -ENODEV;
0a2e5b9b Magnus Damm               2008-11-13  1610             
pr_err("platform_get_resource error.\n");
4cf2503c Yoshihiro Shimoda         2007-05-10  1611             goto clean_up;
4cf2503c Yoshihiro Shimoda         2007-05-10  1612     }
4cf2503c Yoshihiro Shimoda         2007-05-10  1613  
2c59b0b7 Magnus Damm               2009-07-22  1614     ires = 
platform_get_resource(pdev, IORESOURCE_IRQ, 0);
2c59b0b7 Magnus Damm               2009-07-22  1615     if (!ires) {
4cf2503c Yoshihiro Shimoda         2007-05-10  1616             ret = -ENODEV;
2c59b0b7 Magnus Damm               2009-07-22  1617             
dev_err(&pdev->dev,
2c59b0b7 Magnus Damm               2009-07-22  1618                     
"platform_get_resource IORESOURCE_IRQ error.\n");
4cf2503c Yoshihiro Shimoda         2007-05-10  1619             goto clean_up;
4cf2503c Yoshihiro Shimoda         2007-05-10  1620     }
4cf2503c Yoshihiro Shimoda         2007-05-10  1621  
0a2e5b9b Magnus Damm               2008-11-13  1622     reg = 
ioremap(res->start, resource_size(res));
4cf2503c Yoshihiro Shimoda         2007-05-10  1623     if (reg == NULL) {
4cf2503c Yoshihiro Shimoda         2007-05-10  1624             ret = -ENOMEM;
00274921 David Brownell            2007-11-19  1625             pr_err("ioremap 
error.\n");
4cf2503c Yoshihiro Shimoda         2007-05-10  1626             goto clean_up;
4cf2503c Yoshihiro Shimoda         2007-05-10  1627     }
4cf2503c Yoshihiro Shimoda         2007-05-10  1628  
2c59b0b7 Magnus Damm               2009-07-22  1629     if 
(pdev->dev.platform_data == NULL) {
2c59b0b7 Magnus Damm               2009-07-22  1630             
dev_err(&pdev->dev, "no platform data\n");
2c59b0b7 Magnus Damm               2009-07-22  1631             ret = -ENODEV;
2c59b0b7 Magnus Damm               2009-07-22  1632             goto clean_up;
2c59b0b7 Magnus Damm               2009-07-22  1633     }
2c59b0b7 Magnus Damm               2009-07-22  1634  
4cf2503c Yoshihiro Shimoda         2007-05-10  1635     /* initialize ucd */
4cf2503c Yoshihiro Shimoda         2007-05-10  1636     m66592 = 
kzalloc(sizeof(struct m66592), GFP_KERNEL);
4cf2503c Yoshihiro Shimoda         2007-05-10  1637     if (m66592 == NULL) {
7c81aafa Julia Lawall              2010-08-11  1638             ret = -ENOMEM;
00274921 David Brownell            2007-11-19  1639             pr_err("kzalloc 
error\n");
4cf2503c Yoshihiro Shimoda         2007-05-10  1640             goto clean_up;
4cf2503c Yoshihiro Shimoda         2007-05-10  1641     }
4cf2503c Yoshihiro Shimoda         2007-05-10  1642  
2c59b0b7 Magnus Damm               2009-07-22  1643     m66592->pdata = 
pdev->dev.platform_data;
2c59b0b7 Magnus Damm               2009-07-22  1644     m66592->irq_trigger = 
ires->flags & IRQF_TRIGGER_MASK;
2c59b0b7 Magnus Damm               2009-07-22  1645  
4cf2503c Yoshihiro Shimoda         2007-05-10  1646     
spin_lock_init(&m66592->lock);
4cf2503c Yoshihiro Shimoda         2007-05-10  1647     
dev_set_drvdata(&pdev->dev, m66592);
4cf2503c Yoshihiro Shimoda         2007-05-10  1648  
4cf2503c Yoshihiro Shimoda         2007-05-10  1649     m66592->gadget.ops = 
&m66592_gadget_ops;
4cf2503c Yoshihiro Shimoda         2007-05-10  1650     
device_initialize(&m66592->gadget.dev);
836e4b14 Paul Mundt                2008-07-29  1651     
dev_set_name(&m66592->gadget.dev, "gadget");
d327ab5b Michal Nazarewicz         2011-11-19  1652     
m66592->gadget.max_speed = USB_SPEED_HIGH;
4cf2503c Yoshihiro Shimoda         2007-05-10  1653     
m66592->gadget.dev.parent = &pdev->dev;
4cf2503c Yoshihiro Shimoda         2007-05-10  1654     
m66592->gadget.dev.dma_mask = pdev->dev.dma_mask;
4cf2503c Yoshihiro Shimoda         2007-05-10  1655     
m66592->gadget.dev.release = pdev->dev.release;
4cf2503c Yoshihiro Shimoda         2007-05-10  1656     m66592->gadget.name = 
udc_name;
4cf2503c Yoshihiro Shimoda         2007-05-10  1657  
4cf2503c Yoshihiro Shimoda         2007-05-10  1658     
init_timer(&m66592->timer);
4cf2503c Yoshihiro Shimoda         2007-05-10  1659     m66592->timer.function 
= m66592_timer;
4cf2503c Yoshihiro Shimoda         2007-05-10  1660     m66592->timer.data = 
(unsigned long)m66592;
4cf2503c Yoshihiro Shimoda         2007-05-10  1661     m66592->reg = reg;
4cf2503c Yoshihiro Shimoda         2007-05-10  1662  
b5dd18d8 Yong Zhang                2011-09-07  1663     ret = 
request_irq(ires->start, m66592_irq, IRQF_SHARED,
598f22e1 Yoshihiro Shimoda         2007-07-17  1664                     
udc_name, m66592);
4cf2503c Yoshihiro Shimoda         2007-05-10  1665     if (ret < 0) {
00274921 David Brownell            2007-11-19  1666             
pr_err("request_irq error (%d)\n", ret);
4cf2503c Yoshihiro Shimoda         2007-05-10  1667             goto clean_up;
4cf2503c Yoshihiro Shimoda         2007-05-10  1668     }
4cf2503c Yoshihiro Shimoda         2007-05-10  1669  
2c59b0b7 Magnus Damm               2009-07-22  1670     if 
(m66592->pdata->on_chip) {
2c59b0b7 Magnus Damm               2009-07-22  1671             
snprintf(clk_name, sizeof(clk_name), "usbf%d", pdev->id);
2c59b0b7 Magnus Damm               2009-07-22  1672             m66592->clk = 
clk_get(&pdev->dev, clk_name);
2c59b0b7 Magnus Damm               2009-07-22  1673             if 
(IS_ERR(m66592->clk)) {
2c59b0b7 Magnus Damm               2009-07-22  1674                     
dev_err(&pdev->dev, "cannot get clock \"%s\"\n",
2c59b0b7 Magnus Damm               2009-07-22  1675                             
clk_name);
2c59b0b7 Magnus Damm               2009-07-22  1676                     ret = 
PTR_ERR(m66592->clk);
2c59b0b7 Magnus Damm               2009-07-22  1677                     goto 
clean_up2;
2c59b0b7 Magnus Damm               2009-07-22  1678             }
2c59b0b7 Magnus Damm               2009-07-22  1679             
clk_enable(m66592->clk);
af5be79a Magnus Damm               2008-10-31  1680     }
f12a86a0 Viresh Kumar              2012-07-30  1681  
4cf2503c Yoshihiro Shimoda         2007-05-10  1682     
INIT_LIST_HEAD(&m66592->gadget.ep_list);
4cf2503c Yoshihiro Shimoda         2007-05-10  1683     m66592->gadget.ep0 = 
&m66592->ep[0].ep;
4cf2503c Yoshihiro Shimoda         2007-05-10  1684     
INIT_LIST_HEAD(&m66592->gadget.ep0->ep_list);
4cf2503c Yoshihiro Shimoda         2007-05-10  1685     for (i = 0; i < 
M66592_MAX_NUM_PIPE; i++) {
4cf2503c Yoshihiro Shimoda         2007-05-10  1686             struct 
m66592_ep *ep = &m66592->ep[i];
4cf2503c Yoshihiro Shimoda         2007-05-10  1687  
4cf2503c Yoshihiro Shimoda         2007-05-10  1688             if (i != 0) {
4cf2503c Yoshihiro Shimoda         2007-05-10  1689                     
INIT_LIST_HEAD(&m66592->ep[i].ep.ep_list);
4cf2503c Yoshihiro Shimoda         2007-05-10  1690                     
list_add_tail(&m66592->ep[i].ep.ep_list,
598f22e1 Yoshihiro Shimoda         2007-07-17  1691                             
        &m66592->gadget.ep_list);
4cf2503c Yoshihiro Shimoda         2007-05-10  1692             }
4cf2503c Yoshihiro Shimoda         2007-05-10  1693             ep->m66592 = 
m66592;
4cf2503c Yoshihiro Shimoda         2007-05-10  1694             
INIT_LIST_HEAD(&ep->queue);
4cf2503c Yoshihiro Shimoda         2007-05-10  1695             ep->ep.name = 
m66592_ep_name[i];
4cf2503c Yoshihiro Shimoda         2007-05-10  1696             ep->ep.ops = 
&m66592_ep_ops;
4cf2503c Yoshihiro Shimoda         2007-05-10  1697             
ep->ep.maxpacket = 512;
4cf2503c Yoshihiro Shimoda         2007-05-10  1698     }
4cf2503c Yoshihiro Shimoda         2007-05-10  1699     
m66592->ep[0].ep.maxpacket = 64;
4cf2503c Yoshihiro Shimoda         2007-05-10  1700     m66592->ep[0].pipenum = 
0;
4cf2503c Yoshihiro Shimoda         2007-05-10  1701     m66592->ep[0].fifoaddr 
= M66592_CFIFO;
4cf2503c Yoshihiro Shimoda         2007-05-10  1702     m66592->ep[0].fifosel = 
M66592_CFIFOSEL;
4cf2503c Yoshihiro Shimoda         2007-05-10  1703     m66592->ep[0].fifoctr = 
M66592_CFIFOCTR;
4cf2503c Yoshihiro Shimoda         2007-05-10  1704     m66592->ep[0].fifotrn = 
0;
4cf2503c Yoshihiro Shimoda         2007-05-10  1705     m66592->ep[0].pipectr = 
get_pipectr_addr(0);
4cf2503c Yoshihiro Shimoda         2007-05-10  1706     m66592->pipenum2ep[0] = 
&m66592->ep[0];
4cf2503c Yoshihiro Shimoda         2007-05-10  1707     m66592->epaddr2ep[0] = 
&m66592->ep[0];
4cf2503c Yoshihiro Shimoda         2007-05-10  1708  
4cf2503c Yoshihiro Shimoda         2007-05-10  1709     the_controller = m66592;
4cf2503c Yoshihiro Shimoda         2007-05-10  1710  
4cf2503c Yoshihiro Shimoda         2007-05-10  1711     m66592->ep0_req = 
m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL);
4cf2503c Yoshihiro Shimoda         2007-05-10  1712     if (m66592->ep0_req == 
NULL)
af5be79a Magnus Damm               2008-10-31  1713             goto clean_up3;
598f22e1 Yoshihiro Shimoda         2007-07-17  1714     
m66592->ep0_req->complete = nop_completion;
4cf2503c Yoshihiro Shimoda         2007-05-10  1715  
4cf2503c Yoshihiro Shimoda         2007-05-10  1716     init_controller(m66592);
4cf2503c Yoshihiro Shimoda         2007-05-10  1717  
0f91349b Sebastian Andrzej Siewior 2011-06-28  1718     ret = 
usb_add_gadget_udc(&pdev->dev, &m66592->gadget);
0f91349b Sebastian Andrzej Siewior 2011-06-28  1719     if (ret)
0f91349b Sebastian Andrzej Siewior 2011-06-28  1720             goto 
err_add_udc;
0f91349b Sebastian Andrzej Siewior 2011-06-28  1721  
598f22e1 Yoshihiro Shimoda         2007-07-17  1722     dev_info(&pdev->dev, 
"version %s\n", DRIVER_VERSION);
4cf2503c Yoshihiro Shimoda         2007-05-10  1723     return 0;
4cf2503c Yoshihiro Shimoda         2007-05-10  1724  
0f91349b Sebastian Andrzej Siewior 2011-06-28  1725  err_add_udc:
0f91349b Sebastian Andrzej Siewior 2011-06-28  1726     
m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
0f91349b Sebastian Andrzej Siewior 2011-06-28  1727  
af5be79a Magnus Damm               2008-10-31  1728  clean_up3:
2c59b0b7 Magnus Damm               2009-07-22  1729     if 
(m66592->pdata->on_chip) {
2c59b0b7 Magnus Damm               2009-07-22  1730             
clk_disable(m66592->clk);
2c59b0b7 Magnus Damm               2009-07-22  1731             
clk_put(m66592->clk);
2c59b0b7 Magnus Damm               2009-07-22  1732     }
598f22e1 Yoshihiro Shimoda         2007-07-17  1733  clean_up2:
2c59b0b7 Magnus Damm               2009-07-22  1734     free_irq(ires->start, 
m66592);
4cf2503c Yoshihiro Shimoda         2007-05-10  1735  clean_up:
4cf2503c Yoshihiro Shimoda         2007-05-10  1736     if (m66592) {
4cf2503c Yoshihiro Shimoda         2007-05-10  1737             if 
(m66592->ep0_req)
4cf2503c Yoshihiro Shimoda         2007-05-10  1738                     
m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
4cf2503c Yoshihiro Shimoda         2007-05-10  1739             kfree(m66592);
4cf2503c Yoshihiro Shimoda         2007-05-10  1740     }
4cf2503c Yoshihiro Shimoda         2007-05-10  1741     if (reg)
4cf2503c Yoshihiro Shimoda         2007-05-10  1742             iounmap(reg);
4cf2503c Yoshihiro Shimoda         2007-05-10  1743  
4cf2503c Yoshihiro Shimoda         2007-05-10  1744     return ret;
4cf2503c Yoshihiro Shimoda         2007-05-10  1745  }
4cf2503c Yoshihiro Shimoda         2007-05-10  1746  
4cf2503c Yoshihiro Shimoda         2007-05-10  1747  
/*-------------------------------------------------------------------------*/
4cf2503c Yoshihiro Shimoda         2007-05-10 @1748  static struct 
platform_driver m66592_driver = {
598f22e1 Yoshihiro Shimoda         2007-07-17  1749     .remove =       
__exit_p(m66592_remove),
4cf2503c Yoshihiro Shimoda         2007-05-10  1750     .driver         = {
4cf2503c Yoshihiro Shimoda         2007-05-10  1751             .name = (char 
*) udc_name,
f34c32f1 Kay Sievers               2008-04-10  1752             .owner  = 
THIS_MODULE,
4cf2503c Yoshihiro Shimoda         2007-05-10  1753     },
4cf2503c Yoshihiro Shimoda         2007-05-10  1754  };
4cf2503c Yoshihiro Shimoda         2007-05-10  1755  
df2167b3 Fabio Porcedda            2013-01-09 @1756  
module_platform_driver_probe(m66592_driver, m66592_probe);

---
0-DAY kernel build testing backend         Open Source Technology Center
Fengguang Wu, Yuanhan Liu                              Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to