* [PATCH 0/5] treewide: fix unused-but-set warnings
@ 2016-06-16 11:38 ` Arnd Bergmann
0 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
Cc: Felipe Balbi, linux-fbdev, Arnd Bergmann, Dave Jones, netdev,
linux-usb, Sudeep Dutt, Ashutosh Dixit, Tomi Valkeinen,
Samuel Chessman, Dept-GELinuxNICDev, linux-arm-kernel
I did some test-builds with W=1 and the -Wunused-but-set-variable
warnings appeared to be all fairly easy to address. In tons of
randconfig builds, I only found five instances.
The warning was originally disabled by Dave Jones when we hit
more instances with gcc-4.6, but apparently most of those have
gotten addressed anyway.
All five patches can be applied independently, and in each case,
the original code is not wrong, but the assignments are also useless,
so I'd consider this warning marginally useful.
I have a few other patch series for W=1 issues, and we can
consider turning those on by default once all the patches are
merged.
Arnd
Arnd Bergmann (5):
net: qlcnic: don't set unused function argument
net: tlan: don't set unused function argument
mic: remove unused function arg
usb: pxa27x_udc: remove unused function argument
fbmon: remove unused function argument
drivers/misc/mic/scif/scif_dma.c | 6 ++----
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 1 -
drivers/net/ethernet/ti/tlan.c | 1 -
drivers/usb/gadget/udc/pxa27x_udc.c | 9 +++------
drivers/video/fbdev/core/fbmon.c | 1 -
5 files changed, 5 insertions(+), 13 deletions(-)
--
2.9.0
Cc: Sudeep Dutt <sudeep.dutt@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: Dept-GELinuxNICDev@qlogic.com
Cc: Samuel Chessman <chessman@tux.org>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-usb@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Cc: Dave Jones <davej@codemonkey.org.uk>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 0/5] treewide: fix unused-but-set warnings
@ 2016-06-16 11:38 ` Arnd Bergmann
0 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
To: linux-arm-kernel
I did some test-builds with W=1 and the -Wunused-but-set-variable
warnings appeared to be all fairly easy to address. In tons of
randconfig builds, I only found five instances.
The warning was originally disabled by Dave Jones when we hit
more instances with gcc-4.6, but apparently most of those have
gotten addressed anyway.
All five patches can be applied independently, and in each case,
the original code is not wrong, but the assignments are also useless,
so I'd consider this warning marginally useful.
I have a few other patch series for W=1 issues, and we can
consider turning those on by default once all the patches are
merged.
Arnd
Arnd Bergmann (5):
net: qlcnic: don't set unused function argument
net: tlan: don't set unused function argument
mic: remove unused function arg
usb: pxa27x_udc: remove unused function argument
fbmon: remove unused function argument
drivers/misc/mic/scif/scif_dma.c | 6 ++----
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 1 -
drivers/net/ethernet/ti/tlan.c | 1 -
drivers/usb/gadget/udc/pxa27x_udc.c | 9 +++------
drivers/video/fbdev/core/fbmon.c | 1 -
5 files changed, 5 insertions(+), 13 deletions(-)
--
2.9.0
Cc: Sudeep Dutt <sudeep.dutt@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: Dept-GELinuxNICDev at qlogic.com
Cc: Samuel Chessman <chessman@tux.org>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: netdev at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-usb at vger.kernel.org
Cc: linux-fbdev at vger.kernel.org
Cc: Dave Jones <davej@codemonkey.org.uk>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/5] net: qlcnic: don't set unused function argument
2016-06-16 11:38 ` Arnd Bergmann
(?)
(?)
@ 2016-06-16 11:38 ` Arnd Bergmann
2016-06-16 13:26 ` Rajesh Borundia
2016-06-17 0:33 ` David Miller
-1 siblings, 2 replies; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
To: Dept-GELinuxNICDev
Cc: Arnd Bergmann, David S. Miller, Rajesh Borundia, netdev,
linux-kernel
We get a warning for qlcnic_83xx_get_mac_address when building with
"make W=1":
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: In function 'qlcnic_83xx_get_mac_address':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:2156:8: error: parameter 'function' set but not used [-Werror=unused-but-set-parameter]
Clearly this is harmless, but there is also no point for setting
the variable, so we can simply remove the assignment.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index f9640d5ce6ba..bdbcd2b088a0 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -2159,7 +2159,6 @@ int qlcnic_83xx_get_mac_address(struct qlcnic_adapter *adapter, u8 *mac,
struct qlcnic_cmd_args cmd;
u32 mac_low, mac_high;
- function = 0;
err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_MAC_ADDRESS);
if (err)
return err;
--
2.9.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* RE: [PATCH 1/5] net: qlcnic: don't set unused function argument
2016-06-16 11:38 ` [PATCH 1/5] net: qlcnic: don't set unused function argument Arnd Bergmann
@ 2016-06-16 13:26 ` Rajesh Borundia
2016-06-17 0:33 ` David Miller
1 sibling, 0 replies; 17+ messages in thread
From: Rajesh Borundia @ 2016-06-16 13:26 UTC (permalink / raw)
To: Arnd Bergmann, Dept-GE Linux NIC Dev; +Cc: David Miller, netdev, linux-kernel
>-----Original Message-----
>From: Arnd Bergmann [mailto:arnd@arndb.de]
>Sent: Thursday, June 16, 2016 5:08 PM
>To: Dept-GE Linux NIC Dev <Dept-GELinuxNICDev@qlogic.com>
>Cc: Arnd Bergmann <arnd@arndb.de>; David Miller
><davem@davemloft.net>; Rajesh Borundia <rajesh.borundia@qlogic.com>;
>netdev <netdev@vger.kernel.org>; linux-kernel <linux-
>kernel@vger.kernel.org>
>Subject: [PATCH 1/5] net: qlcnic: don't set unused function argument
>
>We get a warning for qlcnic_83xx_get_mac_address when building with
>"make W=1":
>
>drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: In function
>'qlcnic_83xx_get_mac_address':
>drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:2156:8: error:
>parameter 'function' set but not used [-Werror=unused-but-set-parameter]
>
>Clearly this is harmless, but there is also no point for setting the variable, so
>we can simply remove the assignment.
>
>Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>---
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
>b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
>index f9640d5ce6ba..bdbcd2b088a0 100644
>--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
>+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
>@@ -2159,7 +2159,6 @@ int qlcnic_83xx_get_mac_address(struct
>qlcnic_adapter *adapter, u8 *mac,
> struct qlcnic_cmd_args cmd;
> u32 mac_low, mac_high;
>
>- function = 0;
> err = qlcnic_alloc_mbx_args(&cmd, adapter,
>QLCNIC_CMD_MAC_ADDRESS);
> if (err)
> return err;
>--
>2.9.0
Acked-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/5] net: qlcnic: don't set unused function argument
2016-06-16 11:38 ` [PATCH 1/5] net: qlcnic: don't set unused function argument Arnd Bergmann
2016-06-16 13:26 ` Rajesh Borundia
@ 2016-06-17 0:33 ` David Miller
1 sibling, 0 replies; 17+ messages in thread
From: David Miller @ 2016-06-17 0:33 UTC (permalink / raw)
To: arnd; +Cc: Dept-GELinuxNICDev, rajesh.borundia, netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Jun 2016 13:38:22 +0200
> We get a warning for qlcnic_83xx_get_mac_address when building with
> "make W=1":
>
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: In function 'qlcnic_83xx_get_mac_address':
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:2156:8: error: parameter 'function' set but not used [-Werror=unused-but-set-parameter]
>
> Clearly this is harmless, but there is also no point for setting
> the variable, so we can simply remove the assignment.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to net-next.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/5] net: tlan: don't set unused function argument
2016-06-16 11:38 ` Arnd Bergmann
` (2 preceding siblings ...)
(?)
@ 2016-06-16 11:38 ` Arnd Bergmann
2016-06-17 0:33 ` David Miller
-1 siblings, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
To: Samuel Chessman; +Cc: Arnd Bergmann, David S. Miller, netdev, linux-kernel
We get a warning for tlan_handle_tx_eoc when building with "make W=1"
drivers/net/ethernet/ti/tlan.c: In function 'tlan_handle_tx_eoc':
drivers/net/ethernet/ti/tlan.c:1647:59: error: parameter 'host_int' set but not used [-Werror=unused-but-set-parameter]
static u32 tlan_handle_tx_eoc(struct net_device *dev, u16 host_int)
This is harmless, but removing the unused assignment lets us avoid
the warning with no downside.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/ti/tlan.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index 561703317312..ece0ea0f6b38 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -1651,7 +1651,6 @@ static u32 tlan_handle_tx_eoc(struct net_device *dev, u16 host_int)
dma_addr_t head_list_phys;
u32 ack = 1;
- host_int = 0;
if (priv->tlan_rev < 0x30) {
TLAN_DBG(TLAN_DEBUG_TX,
"TRANSMIT: handling TX EOC (Head=%d Tail=%d) -- IRQ\n",
--
2.9.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 2/5] net: tlan: don't set unused function argument
2016-06-16 11:38 ` [PATCH 2/5] net: tlan: " Arnd Bergmann
@ 2016-06-17 0:33 ` David Miller
0 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2016-06-17 0:33 UTC (permalink / raw)
To: arnd; +Cc: chessman, netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Jun 2016 13:38:23 +0200
> We get a warning for tlan_handle_tx_eoc when building with "make W=1"
>
> drivers/net/ethernet/ti/tlan.c: In function 'tlan_handle_tx_eoc':
> drivers/net/ethernet/ti/tlan.c:1647:59: error: parameter 'host_int' set but not used [-Werror=unused-but-set-parameter]
> static u32 tlan_handle_tx_eoc(struct net_device *dev, u16 host_int)
>
> This is harmless, but removing the unused assignment lets us avoid
> the warning with no downside.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to net-next.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/5] mic: remove unused function arg
2016-06-16 11:38 ` Arnd Bergmann
` (3 preceding siblings ...)
(?)
@ 2016-06-16 11:38 ` Arnd Bergmann
-1 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
To: Sudeep Dutt, Ashutosh Dixit
Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel
When building with W=1, the __scif_rma_destroy_tcw function
causes a harmless warning about an argument variable that is
modified but not used:
drivers/misc/mic/scif/scif_dma.c: In function ‘__scif_rma_destroy_tcw’:
drivers/misc/mic/scif/scif_dma.c:118:27: error: parameter ‘ep’ set but not used [-Werror=unused-but-set-parameter]
In this case, we can just remove the argument, since all callers
are in the same file.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/misc/mic/scif/scif_dma.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/mic/scif/scif_dma.c b/drivers/misc/mic/scif/scif_dma.c
index cd01a0efda6b..64d5760d069a 100644
--- a/drivers/misc/mic/scif/scif_dma.c
+++ b/drivers/misc/mic/scif/scif_dma.c
@@ -115,7 +115,6 @@ int scif_reserve_dma_chan(struct scif_endpt *ep)
*/
static
void __scif_rma_destroy_tcw(struct scif_mmu_notif *mmn,
- struct scif_endpt *ep,
u64 start, u64 len)
{
struct list_head *item, *tmp;
@@ -128,7 +127,6 @@ void __scif_rma_destroy_tcw(struct scif_mmu_notif *mmn,
list_for_each_safe(item, tmp, &mmn->tc_reg_list) {
window = list_entry(item, struct scif_window, list);
- ep = (struct scif_endpt *)window->ep;
if (!len)
break;
start_va = window->va_for_temp;
@@ -146,7 +144,7 @@ static void scif_rma_destroy_tcw(struct scif_mmu_notif *mmn, u64 start, u64 len)
struct scif_endpt *ep = mmn->ep;
spin_lock(&ep->rma_info.tc_lock);
- __scif_rma_destroy_tcw(mmn, ep, start, len);
+ __scif_rma_destroy_tcw(mmn, start, len);
spin_unlock(&ep->rma_info.tc_lock);
}
@@ -169,7 +167,7 @@ static void __scif_rma_destroy_tcw_ep(struct scif_endpt *ep)
spin_lock(&ep->rma_info.tc_lock);
list_for_each_safe(item, tmp, &ep->rma_info.mmn_list) {
mmn = list_entry(item, struct scif_mmu_notif, list);
- __scif_rma_destroy_tcw(mmn, ep, 0, ULONG_MAX);
+ __scif_rma_destroy_tcw(mmn, 0, ULONG_MAX);
}
spin_unlock(&ep->rma_info.tc_lock);
}
--
2.9.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 4/5] usb: pxa27x_udc: remove unused function argument
2016-06-16 11:38 ` Arnd Bergmann
@ 2016-06-16 11:38 ` Arnd Bergmann
-1 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
To: linux-arm-kernel
We get a warning for this when building with W=1 because the
argument gets assigned to something else but never read:
drivers/usb/gadget/udc/pxa27x_udc.c: In function 'stop_activity':
drivers/usb/gadget/udc/pxa27x_udc.c:1828:74: error: parameter 'driver' set but not used [-Werror=unused-but-set-parameter]
This remove the argument entirely.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 001a3b74a993..ad140aa00132 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -1825,13 +1825,10 @@ fail:
* Disables all udc endpoints (even control endpoint), report disconnect to
* the gadget user.
*/
-static void stop_activity(struct pxa_udc *udc, struct usb_gadget_driver *driver)
+static void stop_activity(struct pxa_udc *udc)
{
int i;
- /* don't disconnect drivers more than once */
- if (udc->gadget.speed == USB_SPEED_UNKNOWN)
- driver = NULL;
udc->gadget.speed = USB_SPEED_UNKNOWN;
for (i = 0; i < NR_USB_ENDPOINTS; i++)
@@ -1848,7 +1845,7 @@ static int pxa27x_udc_stop(struct usb_gadget *g)
{
struct pxa_udc *udc = to_pxa(g);
- stop_activity(udc, NULL);
+ stop_activity(udc);
udc_disable(udc);
udc->driver = NULL;
@@ -2296,7 +2293,7 @@ static void irq_udc_reset(struct pxa_udc *udc)
if ((udccr & UDCCR_UDA) == 0) {
dev_dbg(udc->dev, "USB reset start\n");
- stop_activity(udc, udc->driver);
+ stop_activity(udc);
}
udc->gadget.speed = USB_SPEED_FULL;
memset(&udc->stats, 0, sizeof udc->stats);
--
2.9.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 4/5] usb: pxa27x_udc: remove unused function argument
@ 2016-06-16 11:38 ` Arnd Bergmann
0 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
To: Felipe Balbi
Cc: Arnd Bergmann, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
Greg Kroah-Hartman, linux-arm-kernel, linux-usb, linux-kernel
We get a warning for this when building with W=1 because the
argument gets assigned to something else but never read:
drivers/usb/gadget/udc/pxa27x_udc.c: In function 'stop_activity':
drivers/usb/gadget/udc/pxa27x_udc.c:1828:74: error: parameter 'driver' set but not used [-Werror=unused-but-set-parameter]
This remove the argument entirely.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 001a3b74a993..ad140aa00132 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -1825,13 +1825,10 @@ fail:
* Disables all udc endpoints (even control endpoint), report disconnect to
* the gadget user.
*/
-static void stop_activity(struct pxa_udc *udc, struct usb_gadget_driver *driver)
+static void stop_activity(struct pxa_udc *udc)
{
int i;
- /* don't disconnect drivers more than once */
- if (udc->gadget.speed == USB_SPEED_UNKNOWN)
- driver = NULL;
udc->gadget.speed = USB_SPEED_UNKNOWN;
for (i = 0; i < NR_USB_ENDPOINTS; i++)
@@ -1848,7 +1845,7 @@ static int pxa27x_udc_stop(struct usb_gadget *g)
{
struct pxa_udc *udc = to_pxa(g);
- stop_activity(udc, NULL);
+ stop_activity(udc);
udc_disable(udc);
udc->driver = NULL;
@@ -2296,7 +2293,7 @@ static void irq_udc_reset(struct pxa_udc *udc)
if ((udccr & UDCCR_UDA) == 0) {
dev_dbg(udc->dev, "USB reset start\n");
- stop_activity(udc, udc->driver);
+ stop_activity(udc);
}
udc->gadget.speed = USB_SPEED_FULL;
memset(&udc->stats, 0, sizeof udc->stats);
--
2.9.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 4/5] usb: pxa27x_udc: remove unused function argument
2016-06-16 11:38 ` Arnd Bergmann
@ 2016-06-16 17:56 ` Robert Jarzmik
-1 siblings, 0 replies; 17+ messages in thread
From: Robert Jarzmik @ 2016-06-16 17:56 UTC (permalink / raw)
To: linux-arm-kernel
Arnd Bergmann <arnd@arndb.de> writes:
> We get a warning for this when building with W=1 because the
> argument gets assigned to something else but never read:
>
> drivers/usb/gadget/udc/pxa27x_udc.c: In function 'stop_activity':
> drivers/usb/gadget/udc/pxa27x_udc.c:1828:74: error: parameter 'driver' set but not used [-Werror=unused-but-set-parameter]
>
> This remove the argument entirely.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Hi Arnd,
I wonder if it'd worth adding this ... even if the word "Completes" would be more
correct than "Fixes" :
Fixes: 70189a63d408 ("usb: gadget: pxa27x_udc: convert to udc_start/udc_stop")
Apart form that:
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 4/5] usb: pxa27x_udc: remove unused function argument
@ 2016-06-16 17:56 ` Robert Jarzmik
0 siblings, 0 replies; 17+ messages in thread
From: Robert Jarzmik @ 2016-06-16 17:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Felipe Balbi, Daniel Mack, Haojian Zhuang, Greg Kroah-Hartman,
linux-arm-kernel, linux-usb, linux-kernel
Arnd Bergmann <arnd@arndb.de> writes:
> We get a warning for this when building with W=1 because the
> argument gets assigned to something else but never read:
>
> drivers/usb/gadget/udc/pxa27x_udc.c: In function 'stop_activity':
> drivers/usb/gadget/udc/pxa27x_udc.c:1828:74: error: parameter 'driver' set but not used [-Werror=unused-but-set-parameter]
>
> This remove the argument entirely.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Hi Arnd,
I wonder if it'd worth adding this ... even if the word "Completes" would be more
correct than "Fixes" :
Fixes: 70189a63d408 ("usb: gadget: pxa27x_udc: convert to udc_start/udc_stop")
Apart form that:
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 5/5] fbmon: remove unused function argument
2016-06-16 11:38 ` Arnd Bergmann
@ 2016-06-16 11:38 ` Arnd Bergmann
-1 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Arnd Bergmann, Jean-Christophe Plagniol-Villard, linux-fbdev,
linux-kernel
When building with "make W=1", we get a warning about an
empty stub function that does nothing but reassign its one
of its arguments:
drivers/video/fbdev/core/fbmon.c: In function 'fb_edid_to_monspecs':
drivers/video/fbdev/core/fbmon.c:1497:67: error: parameter 'specs' set but not used [-Werror=unused-but-set-parameter]
We can simply make that function completely empty to avoid
the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/video/fbdev/core/fbmon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 55e39e822b79..eaa6bab21839 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1496,7 +1496,6 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
}
void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
{
- specs = NULL;
}
void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
{
--
2.9.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 5/5] fbmon: remove unused function argument
@ 2016-06-16 11:38 ` Arnd Bergmann
0 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2016-06-16 11:38 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Arnd Bergmann, Jean-Christophe Plagniol-Villard, linux-fbdev,
linux-kernel
When building with "make W=1", we get a warning about an
empty stub function that does nothing but reassign its one
of its arguments:
drivers/video/fbdev/core/fbmon.c: In function 'fb_edid_to_monspecs':
drivers/video/fbdev/core/fbmon.c:1497:67: error: parameter 'specs' set but not used [-Werror=unused-but-set-parameter]
We can simply make that function completely empty to avoid
the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/video/fbdev/core/fbmon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 55e39e822b79..eaa6bab21839 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1496,7 +1496,6 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
}
void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
{
- specs = NULL;
}
void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
{
--
2.9.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 5/5] fbmon: remove unused function argument
2016-06-16 11:38 ` Arnd Bergmann
@ 2016-06-16 12:57 ` Tomi Valkeinen
-1 siblings, 0 replies; 17+ messages in thread
From: Tomi Valkeinen @ 2016-06-16 12:57 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Jean-Christophe Plagniol-Villard, linux-fbdev, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1150 bytes --]
On 16/06/16 14:38, Arnd Bergmann wrote:
> When building with "make W=1", we get a warning about an
> empty stub function that does nothing but reassign its one
> of its arguments:
>
> drivers/video/fbdev/core/fbmon.c: In function 'fb_edid_to_monspecs':
> drivers/video/fbdev/core/fbmon.c:1497:67: error: parameter 'specs' set but not used [-Werror=unused-but-set-parameter]
>
> We can simply make that function completely empty to avoid
> the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/video/fbdev/core/fbmon.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
> index 55e39e822b79..eaa6bab21839 100644
> --- a/drivers/video/fbdev/core/fbmon.c
> +++ b/drivers/video/fbdev/core/fbmon.c
> @@ -1496,7 +1496,6 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
> }
> void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> {
> - specs = NULL;
> }
> void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> {
>
Thanks, queued for 4.8.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 5/5] fbmon: remove unused function argument
@ 2016-06-16 12:57 ` Tomi Valkeinen
0 siblings, 0 replies; 17+ messages in thread
From: Tomi Valkeinen @ 2016-06-16 12:57 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Jean-Christophe Plagniol-Villard, linux-fbdev, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1150 bytes --]
On 16/06/16 14:38, Arnd Bergmann wrote:
> When building with "make W=1", we get a warning about an
> empty stub function that does nothing but reassign its one
> of its arguments:
>
> drivers/video/fbdev/core/fbmon.c: In function 'fb_edid_to_monspecs':
> drivers/video/fbdev/core/fbmon.c:1497:67: error: parameter 'specs' set but not used [-Werror=unused-but-set-parameter]
>
> We can simply make that function completely empty to avoid
> the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/video/fbdev/core/fbmon.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
> index 55e39e822b79..eaa6bab21839 100644
> --- a/drivers/video/fbdev/core/fbmon.c
> +++ b/drivers/video/fbdev/core/fbmon.c
> @@ -1496,7 +1496,6 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
> }
> void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> {
> - specs = NULL;
> }
> void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> {
>
Thanks, queued for 4.8.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread