When CONFIG_ACPI is unset (arm allyesconfig), status is unused.
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:383:14: warning:
unused variable 'status' [-Wunused-variable]
acpi_status status;
^
drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c:440:14: warning:
unused variable 'status' [-Wunused-variable]
acpi_status status;
^
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:697:14: warning: unused
variable 'status' [-Wunused-variable]
acpi_status status;
^
Move the declaration into the CONFIG_ACPI block so that there are no
compiler warnings.
Fixes: 570d785ba46b ("drivers: net: xgene: Remove acpi_has_method() calls")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
static int xgene_enet_reset(struct xgene_enet_pdata *pdata)
{
struct device *dev = &pdata->pdev->dev;
- acpi_status status;
if (!xgene_ring_mgr_init(pdata))
return -ENODEV;
udelay(5);
} else {
#ifdef CONFIG_ACPI
+ acpi_status status;
+
status = acpi_evaluate_object(ACPI_HANDLE(&pdata->pdev->dev),
"_RST", NULL, NULL);
if (ACPI_FAILURE(status)) {
static int xgene_enet_reset(struct xgene_enet_pdata *p)
{
struct device *dev = &p->pdev->dev;
- acpi_status status;
if (!xgene_ring_mgr_init(p))
return -ENODEV;
}
} else {
#ifdef CONFIG_ACPI
+ acpi_status status;
+
status = acpi_evaluate_object(ACPI_HANDLE(&p->pdev->dev),
"_RST", NULL, NULL);
if (ACPI_FAILURE(status)) {
static int xgene_enet_reset(struct xgene_enet_pdata *pdata)
{
struct device *dev = &pdata->pdev->dev;
- acpi_status status;
if (!xgene_ring_mgr_init(pdata))
return -ENODEV;
udelay(5);
} else {
#ifdef CONFIG_ACPI
+ acpi_status status;
+
status = acpi_evaluate_object(ACPI_HANDLE(&pdata->pdev->dev),
"_RST", NULL, NULL);
if (ACPI_FAILURE(status)) {