From patchwork Thu Jun 23 14:57:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9195407 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5EE8D6075F for ; Thu, 23 Jun 2016 14:57:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5074B2843A for ; Thu, 23 Jun 2016 14:57:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 454C42845B; Thu, 23 Jun 2016 14:57:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0C212843A for ; Thu, 23 Jun 2016 14:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751394AbcFWO5u (ORCPT ); Thu, 23 Jun 2016 10:57:50 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33930 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751054AbcFWO5m (ORCPT ); Thu, 23 Jun 2016 10:57:42 -0400 Received: by mail-wm0-f68.google.com with SMTP id 187so11673655wmz.1 for ; Thu, 23 Jun 2016 07:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G1hur0zYlktCYX5fOIt+9CYf/rP5mSM4/qz3eN6PlqQ=; b=x/2btph9yHYcINEn/U8VgSnjXJc0BeBhcXs9gcbPwtvBze8ka1cktwFfcUH/OfMd2u Xd+/lqojoJnYeRybcXqt0NrguwEucegU9LSbqKYwOyttP0/DdxtyWzmVXRqjD3N8R4px M28mV/sxPiIIMkY6wqR0eT8vAl2p4N2KsbHL611Oohp2N5JWAcaX0qelI7uvB2Jpj0zD vs7HqNFNlk+UR178mt6Xi6H/E/orHdH4CPWj5iV9nWBKxrIFaydNLjmgSaK1JwedwYai 4ckuQ9cBrs9WsAKfPftJgxUVNaWtyfu1kJ2PQRn5QYMOmPVkC+qWfuKe9rijufLPYtDN C+mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G1hur0zYlktCYX5fOIt+9CYf/rP5mSM4/qz3eN6PlqQ=; b=ZP7PrOUCAJUL3bFh7+AttVaVkIY+MToCTh4YQvQyXYaFrrBlzrTusimaHRG4fFCBtj 6SqLFFvBChpZfcV11Divr3Hsr7GaIU32V8P6tfJClzXhAWGz3QtIGF+zg9SLNh3oniez FMC4pE2mV6G4iZfvkaIuTizUOkhnNUgvZYqvo4zgcystbm3fgY3tpCH9vKK9KRkM+ccY ufd7ATCuyUH8+cMyV6blgiiGliZek1BxkkhBisqdtpd3LgAb3jHcyie+yJRGMTBlCKYj G5BNEvgGKN7nMCXfvKAZbndRiuhZO8hhyHnystFSYUJfkrmaWWn103Dh8diMQp8f/iaH qEZQ== X-Gm-Message-State: ALyK8tJphMgJYqXMZ0mAJ608l42scTpCfAF2mO/xXusRn5i78/hDhdusgUzuaP/VtIK/YA== X-Received: by 10.28.72.132 with SMTP id v126mr13759586wma.8.1466693861422; Thu, 23 Jun 2016 07:57:41 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3CD1B0478F6703992958538.dip0.t-ipconnect.de. [2003:dc:d3cd:1b04:78f6:7039:9295:8538]) by smtp.googlemail.com with ESMTPSA id yr4sm535503wjc.18.2016.06.23.07.57.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 07:57:40 -0700 (PDT) From: Martin Blumenstingl To: ath9k-devel@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org Cc: nbd@nbd.name, Martin Blumenstingl Subject: [PATCH 4/6] ath9k: remove return value from ath9k_hw_init_macaddr Date: Thu, 23 Jun 2016 16:57:12 +0200 Message-Id: <20160623145714.20576-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160623145714.20576-1-martin.blumenstingl@googlemail.com> References: <20160623145714.20576-1-martin.blumenstingl@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ath9k_hw_init_macaddr unconditionally returns 0 in all cases, making the return value unnecessary. Signed-off-by: Martin Blumenstingl Reviewed-by: Julian Calaby --- drivers/net/wireless/ath/ath9k/hw.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 4dd3aca..fa59117 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -471,7 +471,7 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah) ah->tx_trig_level = (AR_FTRIG_512B >> AR_FTRIG_S); } -static int ath9k_hw_init_macaddr(struct ath_hw *ah) +static void ath9k_hw_init_macaddr(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); int i; @@ -480,7 +480,7 @@ static int ath9k_hw_init_macaddr(struct ath_hw *ah) /* MAC address may already be loaded via ath9k_platform_data */ if (is_valid_ether_addr(common->macaddr)) - return 0; + return; for (i = 0; i < 3; i++) { eeval = ah->eep_ops->get_eeprom(ah, EEP_MAC[i]); @@ -489,7 +489,7 @@ static int ath9k_hw_init_macaddr(struct ath_hw *ah) } if (is_valid_ether_addr(common->macaddr)) - return 0; + return; ath_err(common, "eeprom contains invalid mac address: %pM\n", common->macaddr); @@ -498,7 +498,7 @@ static int ath9k_hw_init_macaddr(struct ath_hw *ah) ath_err(common, "random mac address will be used: %pM\n", common->macaddr); - return 0; + return; } static int ath9k_hw_post_init(struct ath_hw *ah) @@ -637,12 +637,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) if (r) return r; - r = ath9k_hw_init_macaddr(ah); - if (r) { - ath_err(common, "Failed to initialize MAC address\n"); - return r; - } - + ath9k_hw_init_macaddr(ah); ath9k_hw_init_hang_checks(ah); common->state = ATH_HW_INITIALIZED;