From patchwork Mon Oct 26 21:29:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 298580 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C99BC388F9 for ; Mon, 26 Oct 2020 21:30:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7E8421655 for ; Mon, 26 Oct 2020 21:30:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747850; bh=LD/9TNQnrUu8vBtBBBr6HN9mRHCkAG1JzcNRgZIuFss=; h=From:To:Cc:Subject:Date:List-ID:From; b=Ip/zU7qrExTVNwDY/OE897qUI39UyJvuY4R+zxwr3LPJM5bS3YGFVo1tbtWg+JSXj NY/A5c5qVXBJYrDnO+w+jZCi26EHwzYcKb8JkVEz+TX3ar+oaCBamm7bMFnb04xRWT gxsFtISiItwHAvJXsvKoAeOLxO9dMfjxflKOzw70= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387677AbgJZVas (ORCPT ); Mon, 26 Oct 2020 17:30:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:43456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387588AbgJZVas (ORCPT ); Mon, 26 Oct 2020 17:30:48 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89612207F7; Mon, 26 Oct 2020 21:30:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747847; bh=LD/9TNQnrUu8vBtBBBr6HN9mRHCkAG1JzcNRgZIuFss=; h=From:To:Cc:Subject:Date:From; b=AmkM87HXTYOCoxtZ3kxeyJonodGVFniSH62c6M7OzRrU8+N82YsLKy8GQfhknXMoQ EJnJwtPL4O1f/bRdbnzjiV0cWYFs0IMExwD8Ol6AXLexHL/iCKvzbDwCHurw4P/4Q8 nPs6vEnKFjZKCaNEVqvangcN+b2T5/Z5fkzvwvjI= From: Arnd Bergmann To: Chas Williams <3chas3@gmail.com> Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , "David S. Miller" , linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH net-next 01/11] atm: horizon: shut up clang null pointer arithmetic warning Date: Mon, 26 Oct 2020 22:29:48 +0100 Message-Id: <20201026213040.3889546-1-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann Building a "W=1" kernel with clang produces a warning about suspicous pointer arithmetic: drivers/atm/horizon.c:1844:52: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] for (mem = (HDW *) memmap; mem < (HDW *) (memmap + 1); ++mem) The way that the addresses are handled is very obscure, and rewriting it to be more conventional seems fairly pointless, given that this driver probably has no users. Shut up this warning by adding a cast to uintptr_t. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Arnd Bergmann --- drivers/atm/horizon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 4f2951cbe69c..cd368786b216 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c @@ -1841,7 +1841,7 @@ static int hrz_init(hrz_dev *dev) printk (" clearing memory"); - for (mem = (HDW *) memmap; mem < (HDW *) (memmap + 1); ++mem) + for (mem = (HDW *) memmap; mem < (HDW *) ((uintptr_t)memmap + 1); ++mem) wr_mem (dev, mem, 0); printk (" tx channels"); From patchwork Mon Oct 26 21:29:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 288092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FC85C388F9 for ; Mon, 26 Oct 2020 21:31:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2707F2084C for ; Mon, 26 Oct 2020 21:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747879; bh=p5uj4RGvyoKHE87/45mHPImVbf4as4DA9p8vyIS1yT0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=EVTwIwV8mdinL9PrGYxxOIjH+ypxgNRtmIRCJWMt2EdfBIQH1+uI8m8McBe/pflpa SY7yG4JbEfRF+0/gpiCdirvnUiQv+bP0ZdWdAbYAIccr4oLU0PXKtXINpH/+k0qMWi rRIowdyAr1JvecWoaL2+kaGDjt7kJI6WDYu30dD0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387955AbgJZVbQ (ORCPT ); Mon, 26 Oct 2020 17:31:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:43726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387801AbgJZVbQ (ORCPT ); Mon, 26 Oct 2020 17:31:16 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C81C207F7; Mon, 26 Oct 2020 21:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747875; bh=p5uj4RGvyoKHE87/45mHPImVbf4as4DA9p8vyIS1yT0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2krs2xxVmoA1jSTDR/S6RMZKD+bJI25pQuu/lG1B6B2VCUe1Wh/veJH/cFKoXjhXu d4SUonCybAW8BJ0F7i31jUsyf6N5H9dlHWOlHJt9OjRdk3igsW8ynXzyibt6XjEr11 LRg9H1N3q6/NRY/31oXgANuLJaYw1uJxAny5vvUc= From: Arnd Bergmann To: Jouni Malinen , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Cong Wang , Taehee Yoo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 02/11] net: hostap: fix function cast warning Date: Mon, 26 Oct 2020 22:29:49 +0100 Message-Id: <20201026213040.3889546-2-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc -Wextra complains about the function type cast: drivers/net/wireless/intersil/hostap/hostap_hw.c:3173:48: warning: cast between incompatible function types from ‘void (*)(struct tasklet_struct *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type] Avoid this by just using the regular tasklet_setup() function instead of the incorrect homegrown version. Fixes: 7433c9690318 ("intersil: convert tasklets to use new tasklet_setup() API") Signed-off-by: Arnd Bergmann --- .../net/wireless/intersil/hostap/hostap_hw.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c b/drivers/net/wireless/intersil/hostap/hostap_hw.c index 22cfb6452644..9a19046217df 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_hw.c +++ b/drivers/net/wireless/intersil/hostap/hostap_hw.c @@ -3169,22 +3169,15 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx, /* Initialize tasklets for handling hardware IRQ related operations * outside hw IRQ handler */ -#define HOSTAP_TASKLET_INIT(q, f, d) \ -do { memset((q), 0, sizeof(*(q))); (q)->func = (void(*)(unsigned long))(f); } \ -while (0) - HOSTAP_TASKLET_INIT(&local->bap_tasklet, hostap_bap_tasklet, - (unsigned long) local); - - HOSTAP_TASKLET_INIT(&local->info_tasklet, hostap_info_tasklet, - (unsigned long) local); + tasklet_setup(&local->bap_tasklet, hostap_bap_tasklet); + tasklet_setup(&local->info_tasklet, hostap_info_tasklet); hostap_info_init(local); - HOSTAP_TASKLET_INIT(&local->rx_tasklet, - hostap_rx_tasklet, (unsigned long) local); + tasklet_setup(&local->rx_tasklet, hostap_rx_tasklet); skb_queue_head_init(&local->rx_list); - HOSTAP_TASKLET_INIT(&local->sta_tx_exc_tasklet, - hostap_sta_tx_exc_tasklet, (unsigned long) local); + tasklet_setup(&local->sta_tx_exc_tasklet, + hostap_sta_tx_exc_tasklet); skb_queue_head_init(&local->sta_tx_exc_list); INIT_LIST_HEAD(&local->cmd_queue); From patchwork Mon Oct 26 21:29:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 298579 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7D65C388F9 for ; Mon, 26 Oct 2020 21:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 909192084C for ; Mon, 26 Oct 2020 21:32:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747941; bh=d6pPfEEbX5k/KDYCx6kqlaHhLndASZeYrNepQsjxTcc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OTX4qs0IAvHZPDI7SemF9VikeBBYN611+n/OLI/VhT0rtOPm0T7JUDWbK9Zae6Ii9 4IIglXaRLo/u4Ki/NPl+snXUEIMf+7q4BhjjorpSZiEqVT/ZgRsGsfVOIxpcepYodi nLaufMAone2L2Jahg9PnuUv0pnnRtFpGu+pELAms= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388414AbgJZVcT (ORCPT ); Mon, 26 Oct 2020 17:32:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:44088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388283AbgJZVcT (ORCPT ); Mon, 26 Oct 2020 17:32:19 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C3D520829; Mon, 26 Oct 2020 21:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747938; bh=d6pPfEEbX5k/KDYCx6kqlaHhLndASZeYrNepQsjxTcc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eDcrZbBEXvP4JfDpeCvOwiqU3bVDQW3cnF0+E9aLr+odeTZbpAxXgrZh4wIJndFEP tNy+SVhHz+fU1E2lrzNAtmHbOju6xeWyI4Yx8iZPZOU88uyeHtS+xexVS0/P3Y6Llj Q8nLlyRaC1P4gSGvVCNbWav1EiviHhmTD/48PAvk= From: Arnd Bergmann To: Inaky Perez-Gonzalez , linux-wimax@intel.com, "David S. Miller" , Jakub Kicinski , Johannes Berg Cc: Arnd Bergmann , Johannes Berg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 04/11] wimax: fix duplicate initializer warning Date: Mon, 26 Oct 2020 22:29:51 +0100 Message-Id: <20201026213040.3889546-4-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc -Wextra points out multiple fields that use the same index '1' in the wimax_gnl_policy definition: net/wimax/stack.c:393:29: warning: initialized field overwritten [-Woverride-init] net/wimax/stack.c:397:28: warning: initialized field overwritten [-Woverride-init] net/wimax/stack.c:398:26: warning: initialized field overwritten [-Woverride-init] This seems to work since all four use the same NLA_U32 value, but it still appears to be wrong. In addition, there is no intializer for WIMAX_GNL_MSG_PIPE_NAME, which uses the same index '2' as WIMAX_GNL_RFKILL_STATE. Johannes already changed this twice to improve it, but I don't think there is a good solution, so try to work around it by using a numeric index and adding comments. Cc: Johannes Berg Fixes: 3b0f31f2b8c9 ("genetlink: make policy common to family") Fixes: b61a5eea5904 ("wimax: use genl_register_family_with_ops()") Signed-off-by: Arnd Bergmann Acked-by: Johannes Berg --- net/wimax/stack.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/net/wimax/stack.c b/net/wimax/stack.c index b6dd9d956ed8..3a62af3f80bf 100644 --- a/net/wimax/stack.c +++ b/net/wimax/stack.c @@ -388,17 +388,24 @@ void wimax_dev_init(struct wimax_dev *wimax_dev) } EXPORT_SYMBOL_GPL(wimax_dev_init); +/* + * There are multiple enums reusing the same values, adding + * others is only possible if they use a compatible policy. + */ static const struct nla_policy wimax_gnl_policy[WIMAX_GNL_ATTR_MAX + 1] = { - [WIMAX_GNL_RESET_IFIDX] = { .type = NLA_U32, }, - [WIMAX_GNL_RFKILL_IFIDX] = { .type = NLA_U32, }, - [WIMAX_GNL_RFKILL_STATE] = { - .type = NLA_U32 /* enum wimax_rf_state */ - }, - [WIMAX_GNL_STGET_IFIDX] = { .type = NLA_U32, }, - [WIMAX_GNL_MSG_IFIDX] = { .type = NLA_U32, }, - [WIMAX_GNL_MSG_DATA] = { - .type = NLA_UNSPEC, /* libnl doesn't grok BINARY yet */ - }, + /* + * WIMAX_GNL_RESET_IFIDX, WIMAX_GNL_RFKILL_IFIDX, + * WIMAX_GNL_STGET_IFIDX, WIMAX_GNL_MSG_IFIDX + */ + [1] = { .type = NLA_U32, }, + /* + * WIMAX_GNL_RFKILL_STATE, WIMAX_GNL_MSG_PIPE_NAME + */ + [2] = { .type = NLA_U32, }, /* enum wimax_rf_state */ + /* + * WIMAX_GNL_MSG_DATA + */ + [3] = { .type = NLA_UNSPEC, }, /* libnl doesn't grok BINARY yet */ }; static const struct genl_small_ops wimax_gnl_ops[] = { From patchwork Mon Oct 26 21:29:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 288091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76C58C2D0A3 for ; Mon, 26 Oct 2020 21:32:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D43221655 for ; Mon, 26 Oct 2020 21:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747959; bh=AYFF8wOTE/l1Y0U8+xS1E8od0GtWTnJ/ot3/H3wuly4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ak7k39yU0qWZKFrY0QH/la2ehD1qRcIHITMqk787kDUnQLBxiWG60ChTFuE3LNgSJ jMLn2s7HA9jsdbz01nZYJLwmYgn2Le5IAqLvYHVMyllpdbg5VhVlm3XNyBPcg0Jdwp +FTNwtRFrZY35vOuDCeUxfO6mW/fs3wmFokcMc2A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388746AbgJZVch (ORCPT ); Mon, 26 Oct 2020 17:32:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:44232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388551AbgJZVcg (ORCPT ); Mon, 26 Oct 2020 17:32:36 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28C88207C4; Mon, 26 Oct 2020 21:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747956; bh=AYFF8wOTE/l1Y0U8+xS1E8od0GtWTnJ/ot3/H3wuly4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ur+XPMXlCWlMQZkQUXLiw5jwkWdNam2110mP+AJKo0ok08Joxkr8bwHgn0SaKEKPj VU3lnCzrHaAdi5MJdjLmqB+LL5tYL0cE3DVbBiIdG7puRQTeOKTzYhd4tQAaB62Wvk NnRNfFP04m2fzb5EWt0dT85M/v2NWETQdfw3QjXQ= From: Arnd Bergmann To: Inaky Perez-Gonzalez , linux-wimax@intel.com, "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Wang Hai , "Gustavo A. R. Silva" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 05/11] wimax/i2400m/control: fix enum warning Date: Mon, 26 Oct 2020 22:29:52 +0100 Message-Id: <20201026213040.3889546-5-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc -Wextra warns about mixing two enum types: drivers/net/wimax/i2400m/control.c: In function 'i2400m_get_device_info': drivers/net/wimax/i2400m/control.c:960:10: warning: implicit conversion from 'enum ' to 'enum i2400m_tlv' [-Wenum-conversion] Merge the anonymous enum into the global one that has all the other values. It's not clear why they were originally kept separate, but this appears to be the logical place for it. Fixes: 3a35a1d0bdf7 ("i2400m: various functions for device management") Signed-off-by: Arnd Bergmann --- drivers/net/wimax/i2400m/control.c | 7 ------- include/uapi/linux/wimax/i2400m.h | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c index 8df98757d901..180d5f417bdc 100644 --- a/drivers/net/wimax/i2400m/control.c +++ b/drivers/net/wimax/i2400m/control.c @@ -903,13 +903,6 @@ int i2400m_cmd_enter_powersave(struct i2400m *i2400m) EXPORT_SYMBOL_GPL(i2400m_cmd_enter_powersave); -/* - * Definitions for getting device information - */ -enum { - I2400M_TLV_DETAILED_DEVICE_INFO = 140 -}; - /** * i2400m_get_device_info - Query the device for detailed device information * diff --git a/include/uapi/linux/wimax/i2400m.h b/include/uapi/linux/wimax/i2400m.h index fd198bc24a3c..595ab3511d45 100644 --- a/include/uapi/linux/wimax/i2400m.h +++ b/include/uapi/linux/wimax/i2400m.h @@ -409,6 +409,7 @@ enum i2400m_ms { */ enum i2400m_tlv { I2400M_TLV_L4_MESSAGE_VERSIONS = 129, + I2400M_TLV_DETAILED_DEVICE_INFO = 140, I2400M_TLV_SYSTEM_STATE = 141, I2400M_TLV_MEDIA_STATUS = 161, I2400M_TLV_RF_OPERATION = 162, From patchwork Mon Oct 26 21:29:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 298578 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D03CCC5517A for ; Mon, 26 Oct 2020 21:32:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 890CF207F7 for ; Mon, 26 Oct 2020 21:32:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747977; bh=yVYNLI3DtlxDmgXTWeQa/76LJpPjymNorZdbCU0DinI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WulGjF+yeAbSRyxNIbIiJ2RHyoYLxmDwN0FzUOUqwZFQFyBHyW9dviodlv3X0+v+m U7SiMqRJqm9rx1wPHb949Y5gc3Pf5LiVjK2O8CUiA5mSX0X7J34GDnNA9Y6O31+AQR LtKyHCh+zqFwgUEZJW2+mK+1uVoJ7f+w6kP7E5lA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389237AbgJZVcz (ORCPT ); Mon, 26 Oct 2020 17:32:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:44426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389156AbgJZVcz (ORCPT ); Mon, 26 Oct 2020 17:32:55 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7525D207C4; Mon, 26 Oct 2020 21:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603747974; bh=yVYNLI3DtlxDmgXTWeQa/76LJpPjymNorZdbCU0DinI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AejcWWyxqZ4+Yz8CtkMLb8YuuKW2ctt9ScZmq9DuLh+/3OOdZDD+t5spmq1UdGX3R ad3jpQk+1vBpcNUj5UDDVGxKdOd8SjyftYUVR0ZIYHJlkAHfdYp+Zq8rghuMGzOzWF QppVEqO+zbek1qSteYiq+OdvFR3FV7fuEKsLkDHA= From: Arnd Bergmann To: Ping-Ke Shih , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Larry Finger , Saurav Girepunje , "Gustavo A. R. Silva" , Zheng Bin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 06/11] rtlwifi: fix -Wpointer-sign warning Date: Mon, 26 Oct 2020 22:29:53 +0100 Message-Id: <20201026213040.3889546-6-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann There are thousands of warnings in a W=2 build from just one file: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c:3788:15: warning: pointer targets in initialization of 'u8 *' {aka 'unsigned char *'} from 'char *' differ in signedness [-Wpointer-sign] Change the types to consistently use 'const char *' for the strings. Signed-off-by: Arnd Bergmann Acked-by: Ping-Ke Shih --- .../wireless/realtek/rtlwifi/rtl8821ae/phy.c | 81 ++++++++++--------- .../realtek/rtlwifi/rtl8821ae/table.c | 4 +- .../realtek/rtlwifi/rtl8821ae/table.h | 4 +- 3 files changed, 45 insertions(+), 44 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c index f41a7643b9c4..119e0f799826 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c @@ -1581,7 +1581,7 @@ static void _rtl8821ae_phy_txpower_by_rate_configuration(struct ieee80211_hw *hw } /* string is in decimal */ -static bool _rtl8812ae_get_integer_from_string(char *str, u8 *pint) +static bool _rtl8812ae_get_integer_from_string(const char *str, u8 *pint) { u16 i = 0; *pint = 0; @@ -1599,7 +1599,7 @@ static bool _rtl8812ae_get_integer_from_string(char *str, u8 *pint) return true; } -static bool _rtl8812ae_eq_n_byte(u8 *str1, u8 *str2, u32 num) +static bool _rtl8812ae_eq_n_byte(const char *str1, const char *str2, u32 num) { if (num == 0) return false; @@ -1637,10 +1637,11 @@ static s8 _rtl8812ae_phy_get_chnl_idx_of_txpwr_lmt(struct ieee80211_hw *hw, return channel_index; } -static void _rtl8812ae_phy_set_txpower_limit(struct ieee80211_hw *hw, u8 *pregulation, - u8 *pband, u8 *pbandwidth, - u8 *prate_section, u8 *prf_path, - u8 *pchannel, u8 *ppower_limit) +static void _rtl8812ae_phy_set_txpower_limit(struct ieee80211_hw *hw, + const char *pregulation, + const char *pband, const char *pbandwidth, + const char *prate_section, const char *prf_path, + const char *pchannel, const char *ppower_limit) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &rtlpriv->phy; @@ -1648,8 +1649,8 @@ static void _rtl8812ae_phy_set_txpower_limit(struct ieee80211_hw *hw, u8 *pregul u8 channel_index; s8 power_limit = 0, prev_power_limit, ret; - if (!_rtl8812ae_get_integer_from_string((char *)pchannel, &channel) || - !_rtl8812ae_get_integer_from_string((char *)ppower_limit, + if (!_rtl8812ae_get_integer_from_string(pchannel, &channel) || + !_rtl8812ae_get_integer_from_string(ppower_limit, &power_limit)) { rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, "Illegal index of pwr_lmt table [chnl %d][val %d]\n", @@ -1659,42 +1660,42 @@ static void _rtl8812ae_phy_set_txpower_limit(struct ieee80211_hw *hw, u8 *pregul power_limit = power_limit > MAX_POWER_INDEX ? MAX_POWER_INDEX : power_limit; - if (_rtl8812ae_eq_n_byte(pregulation, (u8 *)("FCC"), 3)) + if (_rtl8812ae_eq_n_byte(pregulation, "FCC", 3)) regulation = 0; - else if (_rtl8812ae_eq_n_byte(pregulation, (u8 *)("MKK"), 3)) + else if (_rtl8812ae_eq_n_byte(pregulation, "MKK", 3)) regulation = 1; - else if (_rtl8812ae_eq_n_byte(pregulation, (u8 *)("ETSI"), 4)) + else if (_rtl8812ae_eq_n_byte(pregulation, "ETSI", 4)) regulation = 2; - else if (_rtl8812ae_eq_n_byte(pregulation, (u8 *)("WW13"), 4)) + else if (_rtl8812ae_eq_n_byte(pregulation, "WW13", 4)) regulation = 3; - if (_rtl8812ae_eq_n_byte(prate_section, (u8 *)("CCK"), 3)) + if (_rtl8812ae_eq_n_byte(prate_section, "CCK", 3)) rate_section = 0; - else if (_rtl8812ae_eq_n_byte(prate_section, (u8 *)("OFDM"), 4)) + else if (_rtl8812ae_eq_n_byte(prate_section, "OFDM", 4)) rate_section = 1; - else if (_rtl8812ae_eq_n_byte(prate_section, (u8 *)("HT"), 2) && - _rtl8812ae_eq_n_byte(prf_path, (u8 *)("1T"), 2)) + else if (_rtl8812ae_eq_n_byte(prate_section, "HT", 2) && + _rtl8812ae_eq_n_byte(prf_path, "1T", 2)) rate_section = 2; - else if (_rtl8812ae_eq_n_byte(prate_section, (u8 *)("HT"), 2) && - _rtl8812ae_eq_n_byte(prf_path, (u8 *)("2T"), 2)) + else if (_rtl8812ae_eq_n_byte(prate_section, "HT", 2) && + _rtl8812ae_eq_n_byte(prf_path, "2T", 2)) rate_section = 3; - else if (_rtl8812ae_eq_n_byte(prate_section, (u8 *)("VHT"), 3) && - _rtl8812ae_eq_n_byte(prf_path, (u8 *)("1T"), 2)) + else if (_rtl8812ae_eq_n_byte(prate_section, "VHT", 3) && + _rtl8812ae_eq_n_byte(prf_path, "1T", 2)) rate_section = 4; - else if (_rtl8812ae_eq_n_byte(prate_section, (u8 *)("VHT"), 3) && - _rtl8812ae_eq_n_byte(prf_path, (u8 *)("2T"), 2)) + else if (_rtl8812ae_eq_n_byte(prate_section, "VHT", 3) && + _rtl8812ae_eq_n_byte(prf_path, "2T", 2)) rate_section = 5; - if (_rtl8812ae_eq_n_byte(pbandwidth, (u8 *)("20M"), 3)) + if (_rtl8812ae_eq_n_byte(pbandwidth, "20M", 3)) bandwidth = 0; - else if (_rtl8812ae_eq_n_byte(pbandwidth, (u8 *)("40M"), 3)) + else if (_rtl8812ae_eq_n_byte(pbandwidth, "40M", 3)) bandwidth = 1; - else if (_rtl8812ae_eq_n_byte(pbandwidth, (u8 *)("80M"), 3)) + else if (_rtl8812ae_eq_n_byte(pbandwidth, "80M", 3)) bandwidth = 2; - else if (_rtl8812ae_eq_n_byte(pbandwidth, (u8 *)("160M"), 4)) + else if (_rtl8812ae_eq_n_byte(pbandwidth, "160M", 4)) bandwidth = 3; - if (_rtl8812ae_eq_n_byte(pband, (u8 *)("2.4G"), 4)) { + if (_rtl8812ae_eq_n_byte(pband, "2.4G", 4)) { ret = _rtl8812ae_phy_get_chnl_idx_of_txpwr_lmt(hw, BAND_ON_2_4G, channel); @@ -1718,7 +1719,7 @@ static void _rtl8812ae_phy_set_txpower_limit(struct ieee80211_hw *hw, u8 *pregul regulation, bandwidth, rate_section, channel_index, rtlphy->txpwr_limit_2_4g[regulation][bandwidth] [rate_section][channel_index][RF90_PATH_A]); - } else if (_rtl8812ae_eq_n_byte(pband, (u8 *)("5G"), 2)) { + } else if (_rtl8812ae_eq_n_byte(pband, "5G", 2)) { ret = _rtl8812ae_phy_get_chnl_idx_of_txpwr_lmt(hw, BAND_ON_5G, channel); @@ -1749,10 +1750,10 @@ static void _rtl8812ae_phy_set_txpower_limit(struct ieee80211_hw *hw, u8 *pregul } static void _rtl8812ae_phy_config_bb_txpwr_lmt(struct ieee80211_hw *hw, - u8 *regulation, u8 *band, - u8 *bandwidth, u8 *rate_section, - u8 *rf_path, u8 *channel, - u8 *power_limit) + const char *regulation, const char *band, + const char *bandwidth, const char *rate_section, + const char *rf_path, const char *channel, + const char *power_limit) { _rtl8812ae_phy_set_txpower_limit(hw, regulation, band, bandwidth, rate_section, rf_path, channel, @@ -1765,7 +1766,7 @@ static void _rtl8821ae_phy_read_and_config_txpwr_lmt(struct ieee80211_hw *hw) struct rtl_hal *rtlhal = rtl_hal(rtlpriv); u32 i = 0; u32 array_len; - u8 **array; + const char **array; if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) { array_len = RTL8812AE_TXPWR_LMT_ARRAY_LEN; @@ -1778,13 +1779,13 @@ static void _rtl8821ae_phy_read_and_config_txpwr_lmt(struct ieee80211_hw *hw) rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, "\n"); for (i = 0; i < array_len; i += 7) { - u8 *regulation = array[i]; - u8 *band = array[i+1]; - u8 *bandwidth = array[i+2]; - u8 *rate = array[i+3]; - u8 *rf_path = array[i+4]; - u8 *chnl = array[i+5]; - u8 *val = array[i+6]; + const char *regulation = array[i]; + const char *band = array[i+1]; + const char *bandwidth = array[i+2]; + const char *rate = array[i+3]; + const char *rf_path = array[i+4]; + const char *chnl = array[i+5]; + const char *val = array[i+6]; _rtl8812ae_phy_config_bb_txpwr_lmt(hw, regulation, band, bandwidth, rate, rf_path, diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c index 85093b3e5373..27c8a5d96520 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c @@ -2654,7 +2654,7 @@ u32 RTL8821AE_AGC_TAB_1TARRAYLEN = ARRAY_SIZE(RTL8821AE_AGC_TAB_ARRAY); * TXPWR_LMT.TXT ******************************************************************************/ -u8 *RTL8812AE_TXPWR_LMT[] = { +const char *RTL8812AE_TXPWR_LMT[] = { "FCC", "2.4G", "20M", "CCK", "1T", "01", "36", "ETSI", "2.4G", "20M", "CCK", "1T", "01", "32", "MKK", "2.4G", "20M", "CCK", "1T", "01", "32", @@ -3223,7 +3223,7 @@ u8 *RTL8812AE_TXPWR_LMT[] = { u32 RTL8812AE_TXPWR_LMT_ARRAY_LEN = ARRAY_SIZE(RTL8812AE_TXPWR_LMT); -u8 *RTL8821AE_TXPWR_LMT[] = { +const char *RTL8821AE_TXPWR_LMT[] = { "FCC", "2.4G", "20M", "CCK", "1T", "01", "32", "ETSI", "2.4G", "20M", "CCK", "1T", "01", "32", "MKK", "2.4G", "20M", "CCK", "1T", "01", "32", diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.h b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.h index 540159c25078..76c62b7c0fb2 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.h +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.h @@ -28,7 +28,7 @@ extern u32 RTL8821AE_AGC_TAB_ARRAY[]; extern u32 RTL8812AE_AGC_TAB_1TARRAYLEN; extern u32 RTL8812AE_AGC_TAB_ARRAY[]; extern u32 RTL8812AE_TXPWR_LMT_ARRAY_LEN; -extern u8 *RTL8812AE_TXPWR_LMT[]; +extern const char *RTL8812AE_TXPWR_LMT[]; extern u32 RTL8821AE_TXPWR_LMT_ARRAY_LEN; -extern u8 *RTL8821AE_TXPWR_LMT[]; +extern const char *RTL8821AE_TXPWR_LMT[]; #endif From patchwork Mon Oct 26 21:29:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 288090 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 833DDC388F9 for ; Mon, 26 Oct 2020 21:33:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3EE9A207F7 for ; Mon, 26 Oct 2020 21:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748005; bh=4I92PPLIQB5XcQu2mSRXjGUg9oeT73D13rPFwKftJFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fyvuJ3S323nIQL3ADodZFSICW0nsa0+D9uBEJMMW5UfU8UE6VxNhbmzpyS26tK9CY uhLiIa2Ywl7qIs8iN/XywyeiSy00wI00x/I+AFmk8CWgl/v9Y4UY1eKicehNTII8Eh m7SXObucUNB8I4Jl+Nur9mFG5D16br4KgGRCTPq8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389304AbgJZVdX (ORCPT ); Mon, 26 Oct 2020 17:33:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:44590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389257AbgJZVdW (ORCPT ); Mon, 26 Oct 2020 17:33:22 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6EBA207C4; Mon, 26 Oct 2020 21:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748002; bh=4I92PPLIQB5XcQu2mSRXjGUg9oeT73D13rPFwKftJFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=03uQ+/v4na+HGwRf8uaX5Fv+YAd5PjCzc11Z/c6GODb+rB9P6PSxox8433dTIjtHH z1D1tAghB+GRPv20lDvGXWc2xbhLrcuEAKj/wEmPMOnXZLicebU4vULQzKklovfeFW aER73e5aFxJ5fIoRqqDuwVZ0z2MzDsTE4zDwHtiQ= From: Arnd Bergmann To: Yan-Hsuan Chuang , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Ping-Ke Shih , Chris Chiu , Zong-Zhe Yang , Tzu-En Huang , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH net-next 07/11] rtw88: remove extraneous 'const' qualifier Date: Mon, 26 Oct 2020 22:29:54 +0100 Message-Id: <20201026213040.3889546-7-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann clang -Wextra warns about functions returning a 'const' integer: drivers/net/wireless/realtek/rtw88/rtw8822b.c:90:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers] static const u8 rtw8822b_get_swing_index(struct rtw_dev *rtwdev) Remove the extra qualifier here. Fixes: c97ee3e0bea2 ("rtw88: add power tracking support") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor --- drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c index 22d0dd640ac9..b420eb914879 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c @@ -87,7 +87,7 @@ static const u32 rtw8822b_txscale_tbl[RTW_TXSCALE_SIZE] = { 0x2d3, 0x2fe, 0x32b, 0x35c, 0x38e, 0x3c4, 0x3fe }; -static const u8 rtw8822b_get_swing_index(struct rtw_dev *rtwdev) +static u8 rtw8822b_get_swing_index(struct rtw_dev *rtwdev) { u8 i = 0; u32 swing, table_value; From patchwork Mon Oct 26 21:29:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 298577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7859CC2D0A3 for ; Mon, 26 Oct 2020 21:33:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2952F207F7 for ; Mon, 26 Oct 2020 21:33:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748016; bh=zsdFRK78KKmwrwcAyPUjk92vDNhs3wUrIe6GE9ax80s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dn0pAzkQwtSC2t+BXhkxhOaoUcJHHICti+/WTKeqXJhXvzfPer4tY3n3op+7o8AXl Zu93aIuwSHVBL94/8gjuds49puNlo/l6JSj2pKRsCVelIDKdPCHIk2cf004NZ3ToVf Fky/CFKVMtsoOxUqzvkrG6xPDiw6ml2YcyEYlI7o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389354AbgJZVdd (ORCPT ); Mon, 26 Oct 2020 17:33:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:44724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389315AbgJZVdd (ORCPT ); Mon, 26 Oct 2020 17:33:33 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E43B4207C4; Mon, 26 Oct 2020 21:33:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748013; bh=zsdFRK78KKmwrwcAyPUjk92vDNhs3wUrIe6GE9ax80s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YWK1ZZkcBliOfExdtIIuqKluve8nkz/DPJXW4xzjRoChOLErpR8rQH6rxJ5PJVIuG vSH5mn0VSEhGh6+K3j3ST/BKuIWLUSgPSmmvncubE96aJsXIXHOD9lpvHo+xHJZtmB bTwhjriX3fGW5g+GeS5U45FB1GknPc/RLR2epKyo= From: Arnd Bergmann To: QCA ath9k Development , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 08/11] ath9k: work around false-positive gcc warning Date: Mon, 26 Oct 2020 22:29:55 +0100 Message-Id: <20201026213040.3889546-8-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc-10 shows a false-positive warning with CONFIG_KASAN: drivers/net/wireless/ath/ath9k/dynack.c: In function 'ath_dynack_sample_tx_ts': include/linux/etherdevice.h:290:14: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=] 290 | *(u32 *)dst = *(const u32 *)src; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ Until gcc is fixed, work around this by using memcpy() in place of ether_addr_copy(). Hopefully gcc-11 will not have this problem. Link: https://godbolt.org/z/sab1MK Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97490 Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ath/ath9k/dynack.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/dynack.c b/drivers/net/wireless/ath/ath9k/dynack.c index fbeb4a739d32..e4eb96b26ca4 100644 --- a/drivers/net/wireless/ath/ath9k/dynack.c +++ b/drivers/net/wireless/ath/ath9k/dynack.c @@ -247,8 +247,14 @@ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb, ridx = ts->ts_rateindex; da->st_rbf.ts[da->st_rbf.t_rb].tstamp = ts->ts_tstamp; +#if defined(CONFIG_KASAN) && (CONFIG_GCC_VERSION >= 100000) && (CONFIG_GCC_VERSION < 110000) + /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97490 */ + memcpy(da->st_rbf.addr[da->st_rbf.t_rb].h_dest, hdr->addr1, ETH_ALEN); + memcpy(da->st_rbf.addr[da->st_rbf.t_rb].h_src, hdr->addr2, ETH_ALEN); +#else ether_addr_copy(da->st_rbf.addr[da->st_rbf.t_rb].h_dest, hdr->addr1); ether_addr_copy(da->st_rbf.addr[da->st_rbf.t_rb].h_src, hdr->addr2); +#endif if (!(info->status.rates[ridx].flags & IEEE80211_TX_RC_MCS)) { const struct ieee80211_rate *rate; From patchwork Mon Oct 26 21:29:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 288089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB4F8C2D0A3 for ; Mon, 26 Oct 2020 21:33:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95E23207F7 for ; Mon, 26 Oct 2020 21:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748039; bh=w8ZLzd4kKpLW6ezVVkkijju1OhfgRyCDIckcDfFDoQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BQHne6kuHgPuCbBGWXVYJSbyj6IGbCKNrY8PGkIFANgqvb9UGMGKIa3v932BDTl8W hmbE1+woQpLskxdXUjAnBaOpjTJrvuW65zvggAl/ZgEwfmJdg1bbLfhqnIWmINxl7H PC/HU1xD/YMZeiAXrvNC5G/8maEA2UTLQjEyAFdA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389424AbgJZVd6 (ORCPT ); Mon, 26 Oct 2020 17:33:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:44886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387677AbgJZVd5 (ORCPT ); Mon, 26 Oct 2020 17:33:57 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E8687207C4; Mon, 26 Oct 2020 21:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748036; bh=w8ZLzd4kKpLW6ezVVkkijju1OhfgRyCDIckcDfFDoQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R7lUOX1UZJ8gPL5gL76lDFAc5yeT2Uwhj670BvzUZt4nfhBB+cCTxdRj+uAwaYGzB BnunQzEQ0IOFK/vB2NqpCd8T6sX1G7G918VzhhJuBgL40MggizRj1BFGncfOIBXBmH P5qh+cEHLhrVPkq6H6dNBV4KRIt1718WyA9MaClk= From: Arnd Bergmann To: Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Raja Mani , Suraj Sumangala , Jouni Malinen , Vasanthakumar Thiagarajan , Vivek Natarajan , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 09/11] ath6kl: fix enum-conversion warning Date: Mon, 26 Oct 2020 22:29:56 +0100 Message-Id: <20201026213040.3889546-9-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc -Wextra points out a type mismatch drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_cmd_send': drivers/net/wireless/ath/ath6kl/wmi.c:1825:19: warning: implicit conversion from 'enum ' to 'enum wmi_data_hdr_data_type' [-Wenum-conversion] 1825 | false, false, 0, NULL, if_idx); | ^~~~~ As far as I can tell, the numeric value is current here, so just use the correct enum literal instead of 'false'. Fixes: bdcd81707973 ("Add ath6kl cleaned up driver") Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ath/ath6kl/wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index dbc47702a268..b137e7f34397 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -1821,8 +1821,8 @@ int ath6kl_wmi_cmd_send(struct wmi *wmi, u8 if_idx, struct sk_buff *skb, /* Only for OPT_TX_CMD, use BE endpoint. */ if (cmd_id == WMI_OPT_TX_FRAME_CMDID) { - ret = ath6kl_wmi_data_hdr_add(wmi, skb, OPT_MSGTYPE, - false, false, 0, NULL, if_idx); + ret = ath6kl_wmi_data_hdr_add(wmi, skb, OPT_MSGTYPE, false, + WMI_DATA_HDR_DATA_TYPE_802_3, 0, NULL, if_idx); if (ret) { dev_kfree_skb(skb); return ret; From patchwork Mon Oct 26 21:29:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 298576 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A4AEC2D0A3 for ; Mon, 26 Oct 2020 21:34:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D7F0320829 for ; Mon, 26 Oct 2020 21:34:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748056; bh=xqB3X08bN2svUASvlYu38zyWDmiDAAvYC7985pJeF4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jZ0aIlPb6GwqgwJxMyDEaeBIrFeWW7s5GnOyQh1KJqhuP9O/DrXwepsJ4C9TR+Zt/ wfJSedIrIKShGUOMDo0aLvKBOzxrUT4AZqoadBQUJm7QrwvqGZVjPLwwMrzl+KvdTT 17aQyWmT030qNqN7GVCX3691V1Jgr52e67Ss1OAg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389485AbgJZVeP (ORCPT ); Mon, 26 Oct 2020 17:34:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:45022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733242AbgJZVeO (ORCPT ); Mon, 26 Oct 2020 17:34:14 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1DFD3207C4; Mon, 26 Oct 2020 21:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748054; bh=xqB3X08bN2svUASvlYu38zyWDmiDAAvYC7985pJeF4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kYovXbsBze1BmDe27+xif23hvxMIpGhp9aPbxWLlDRr4FYNP1Ant6CcdBwSQlkAlF XWgpTqfxbKNoCySSINjmmqcD7Jve0DekqlN6cxHgiDfRrbLkTgTjv23VTNfD2VnQN/ LPCfPlu2NNPYKO44FVt+sg5vW9fVs1V1l1gGDTQQ= From: Arnd Bergmann To: Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , YueHaibing , "Gustavo A. R. Silva" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 10/11] ch_ktls: fix enum-conversion warning Date: Mon, 26 Oct 2020 22:29:57 +0100 Message-Id: <20201026213040.3889546-10-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc points out an incorrect enum assignment: drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c: In function 'chcr_ktls_cpl_set_tcb_rpl': drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:684:22: warning: implicit conversion from 'enum ' to 'enum ch_ktls_open_state' [-Wenum-conversion] This appears harmless, and should apparently use 'CH_KTLS_OPEN_SUCCESS' instead of 'false', with the same value '0'. Fixes: efca3878a5fb ("ch_ktls: Issue if connection offload fails") Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn --- drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c index 5195f692f14d..83787f62577d 100644 --- a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c @@ -681,7 +681,7 @@ static int chcr_ktls_cpl_set_tcb_rpl(struct adapter *adap, unsigned char *input) kvfree(tx_info); return 0; } - tx_info->open_state = false; + tx_info->open_state = CH_KTLS_OPEN_SUCCESS; spin_unlock(&tx_info->lock); complete(&tx_info->completion); From patchwork Mon Oct 26 21:29:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 288088 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD1D6C388F9 for ; Mon, 26 Oct 2020 21:34:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82553216FD for ; Mon, 26 Oct 2020 21:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748068; bh=nxOKKlKqMU4NDYkRtekhmwGMQw4/QJdTu+0OdBe0WDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cMjlIqWeHFfSoovs61NiKTQbBwu7h4UaQOhGkUXQwNbSub2HseCc7Sq+3HXAsOGyQ DcJjxhJ5iM2DKYE+X3Te8A564CF52C6Utjf8Q9q5qLVnvZneT6280edo0lqVwwOZYC 49uzhTP7KCauYel4x3IZYqzoqHJdecUDTE3qgMFI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389518AbgJZVe0 (ORCPT ); Mon, 26 Oct 2020 17:34:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:45104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389407AbgJZVeZ (ORCPT ); Mon, 26 Oct 2020 17:34:25 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ABA92207C4; Mon, 26 Oct 2020 21:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748065; bh=nxOKKlKqMU4NDYkRtekhmwGMQw4/QJdTu+0OdBe0WDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GxqbmCRIF+lLlTKSGb59T+3H/HmmR5SxAgB4Zivqnprwxke/yqr6jU5OpwPiPTpyE AVjYwd32xXkfHh3tLYnKMcvGEDQ8yVnoxKNQL041KXg1Zk51BpD0cJaUQ1RDr143Vu t3BIaPRSPSg/BvFGHAYwnJ5MABs99c9msl/xBrag= From: Arnd Bergmann To: "David S. Miller" , Jakub Kicinski , Yuval Shaia , Leon Romanovsky Cc: Arnd Bergmann , Xin Long , Alexander Aring , Ying Xue , Sven Eckelmann , Fernando Gont , Cong Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 11/11] ipv6: fix type mismatch warning Date: Mon, 26 Oct 2020 22:29:58 +0100 Message-Id: <20201026213040.3889546-11-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann Building with 'make W=2' shows a warning for every time this header gets included because of a pointer type mismatch: net/addrconf.h:163:32: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] addrconf_addr_eui48_base(eui, dev->dev_addr); Change the type to unsigned according to the input argument. Fixes: 4d6f28591fe4 ("{net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function") Signed-off-by: Arnd Bergmann --- include/net/addrconf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 18f783dcd55f..074ce761e482 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -127,7 +127,8 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, u32 addr_flags, bool sllao, bool tokenized, __u32 valid_lft, u32 prefered_lft); -static inline void addrconf_addr_eui48_base(u8 *eui, const char *const addr) +static inline void addrconf_addr_eui48_base(u8 *eui, + const unsigned char *const addr) { memcpy(eui, addr, 3); eui[3] = 0xFF; @@ -135,7 +136,7 @@ static inline void addrconf_addr_eui48_base(u8 *eui, const char *const addr) memcpy(eui + 5, addr + 3, 3); } -static inline void addrconf_addr_eui48(u8 *eui, const char *const addr) +static inline void addrconf_addr_eui48(u8 *eui, const unsigned char *const addr) { addrconf_addr_eui48_base(eui, addr); eui[0] ^= 2;