From patchwork Tue Nov 10 03:02:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 11892993 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 47EB1C5517A for ; Tue, 10 Nov 2020 03:03:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C8BD2067B for ; Tue, 10 Nov 2020 03:03:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731316AbgKJDDY (ORCPT ); Mon, 9 Nov 2020 22:03:24 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44914 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729452AbgKJDDK (ORCPT ); Mon, 9 Nov 2020 22:03:10 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kcJw3-006D8X-Un; Tue, 10 Nov 2020 04:03:07 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , Nicolas Pitre , Andrew Lunn Subject: [PATCH v3 net-next 1/7] drivers: net: smc91x: Fix set but unused W=1 warning Date: Tue, 10 Nov 2020 04:02:42 +0100 Message-Id: <20201110030248.1480413-2-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201110030248.1480413-1-andrew@lunn.ch> References: <20201110030248.1480413-1-andrew@lunn.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org drivers/net/ethernet/smsc/smc91x.c:706:51: warning: variable ‘pkt_len’ set but not used [-Wunused-but-set-variable] 706 | unsigned int saved_packet, packet_no, tx_status, pkt_len; The read of the packet length in the descriptor probably needs to be kept in order to keep the hardware happy. So tell the compiler we don't expect to use the value by using the __always_unused attribute. Signed-off-by: Andrew Lunn --- drivers/net/ethernet/smsc/smc91x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index f6b73afd1879..c8dabeaab4fc 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -703,7 +703,8 @@ static void smc_tx(struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); void __iomem *ioaddr = lp->base; - unsigned int saved_packet, packet_no, tx_status, pkt_len; + unsigned int saved_packet, packet_no, tx_status; + unsigned int pkt_len __always_unused; DBG(3, dev, "%s\n", __func__); From patchwork Tue Nov 10 03:02:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 11892991 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 6AE15C2D0A3 for ; Tue, 10 Nov 2020 03:03:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F0622067B for ; Tue, 10 Nov 2020 03:03:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730460AbgKJDDK (ORCPT ); Mon, 9 Nov 2020 22:03:10 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44906 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729243AbgKJDDK (ORCPT ); Mon, 9 Nov 2020 22:03:10 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kcJw3-006D8a-W1; Tue, 10 Nov 2020 04:03:07 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , Nicolas Pitre , Andrew Lunn Subject: [PATCH v3 net-next 2/7] drivers: net: smc91x: Fix missing kerneldoc reported by W=1 Date: Tue, 10 Nov 2020 04:02:43 +0100 Message-Id: <20201110030248.1480413-3-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201110030248.1480413-1-andrew@lunn.ch> References: <20201110030248.1480413-1-andrew@lunn.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'dev' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'desc' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'name' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'index' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'value' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'nsdelay' not described in 'try_toggle_control_gpio' Document these parameters. Signed-off-by: Andrew Lunn --- drivers/net/ethernet/smsc/smc91x.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index c8dabeaab4fc..742a1f7a838c 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -2192,6 +2192,12 @@ MODULE_DEVICE_TABLE(of, smc91x_match); /** * of_try_set_control_gpio - configure a gpio if it exists + * @dev: net device + * @desc: where to store the GPIO descriptor, if it exists + * @name: name of the GPIO in DT + * @index: index of the GPIO in DT + * @value: set the GPIO to this value + * @nsdelay: delay before setting the GPIO */ static int try_toggle_control_gpio(struct device *dev, struct gpio_desc **desc, From patchwork Tue Nov 10 03:02:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 11892979 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 AB18CC5517A for ; Tue, 10 Nov 2020 03:03:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59BE32067B for ; Tue, 10 Nov 2020 03:03:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731265AbgKJDDS (ORCPT ); Mon, 9 Nov 2020 22:03:18 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44924 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729243AbgKJDDL (ORCPT ); Mon, 9 Nov 2020 22:03:11 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kcJw4-006D8d-0n; Tue, 10 Nov 2020 04:03:08 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , Nicolas Pitre , Andrew Lunn Subject: [PATCH v3 net-next 3/7] drivers: net: smc911x: Work around set but unused status Date: Tue, 10 Nov 2020 04:02:44 +0100 Message-Id: <20201110030248.1480413-4-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201110030248.1480413-1-andrew@lunn.ch> References: <20201110030248.1480413-1-andrew@lunn.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_interrupt’: drivers/net/ethernet/smsc/smc911x.c:976:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 976 | int status; A comment indicates the status needs to be read from the PHY, otherwise bad things happen. But due to the macro magic, it is hard to perform the read without assigning it to a variable. So add _always_unused attribute to status to tell the compiler we don't expect to use the value. Signed-off-by: Andrew Lunn --- drivers/net/ethernet/smsc/smc911x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 01069dfaf75c..8f748a0c057e 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c @@ -879,7 +879,7 @@ static void smc911x_phy_configure(struct work_struct *work) int phyaddr = lp->mii.phy_id; int my_phy_caps; /* My PHY capabilities */ int my_ad_caps; /* My Advertised capabilities */ - int status; + int status __always_unused; unsigned long flags; DBG(SMC_DEBUG_FUNC, dev, "--> %s()\n", __func__); @@ -973,7 +973,7 @@ static void smc911x_phy_interrupt(struct net_device *dev) { struct smc911x_local *lp = netdev_priv(dev); int phyaddr = lp->mii.phy_id; - int status; + int status __always_unused; DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__); From patchwork Tue Nov 10 03:02:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 11892983 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 714D9C388F7 for ; Tue, 10 Nov 2020 03:03:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B6992067B for ; Tue, 10 Nov 2020 03:03:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731002AbgKJDDN (ORCPT ); Mon, 9 Nov 2020 22:03:13 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44918 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729648AbgKJDDL (ORCPT ); Mon, 9 Nov 2020 22:03:11 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kcJw4-006D8g-1s; Tue, 10 Nov 2020 04:03:08 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , Nicolas Pitre , Andrew Lunn Subject: [PATCH v3 net-next 4/7] drivers: net: smc911x: Fix set but unused status because of DBG macro Date: Tue, 10 Nov 2020 04:02:45 +0100 Message-Id: <20201110030248.1480413-5-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201110030248.1480413-1-andrew@lunn.ch> References: <20201110030248.1480413-1-andrew@lunn.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_timeout’: drivers/net/ethernet/smsc/smc911x.c:1251:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 1251 | int status, mask; The status is read in order to print it via the DBG macro. However, due to the way DBG is disabled, the compiler never sees it being used. Change the DBG macro to actually make use of the passed parameters, and the leave the optimiser to remove the unwanted code inside the while (0). Signed-off-by: Andrew Lunn --- drivers/net/ethernet/smsc/smc911x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 8f748a0c057e..6978050496ac 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c @@ -102,7 +102,10 @@ MODULE_ALIAS("platform:smc911x"); #define PRINTK(dev, args...) netdev_info(dev, args) #else -#define DBG(n, dev, args...) do { } while (0) +#define DBG(n, dev, args...) \ + while (0) { \ + netdev_dbg(dev, args); \ + } #define PRINTK(dev, args...) netdev_dbg(dev, args) #endif From patchwork Tue Nov 10 03:02:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 11892981 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 0296CC2D0A3 for ; Tue, 10 Nov 2020 03:03:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FF1B20870 for ; Tue, 10 Nov 2020 03:03:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730730AbgKJDDK (ORCPT ); Mon, 9 Nov 2020 22:03:10 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44904 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728607AbgKJDDK (ORCPT ); Mon, 9 Nov 2020 22:03:10 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kcJw4-006D8j-2v; Tue, 10 Nov 2020 04:03:08 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , Nicolas Pitre , Andrew Lunn Subject: [PATCH v3 net-next 5/7] drivers: net: smc911x: Fix passing wrong number of parameters to DBG() macro Date: Tue, 10 Nov 2020 04:02:46 +0100 Message-Id: <20201110030248.1480413-6-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201110030248.1480413-1-andrew@lunn.ch> References: <20201110030248.1480413-1-andrew@lunn.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Now that the compiler always sees the parameters passed to the DBG() macro, it gives an error message about wrong parameters. The comment says it all: /* ndev is not valid yet, so avoid passing it in. */ DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__); You cannot not just pass a parameter! The DBG does not seem to have any real value, to just remove it. Signed-off-by: Andrew Lunn --- drivers/net/ethernet/smsc/smc911x.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 6978050496ac..ac1a764364fb 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c @@ -2047,8 +2047,6 @@ static int smc911x_drv_probe(struct platform_device *pdev) void __iomem *addr; int ret; - /* ndev is not valid yet, so avoid passing it in. */ - DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { ret = -ENODEV; From patchwork Tue Nov 10 03:02:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 11892989 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 28484C2D0A3 for ; Tue, 10 Nov 2020 03:03:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA1A32067B for ; Tue, 10 Nov 2020 03:03:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731194AbgKJDDR (ORCPT ); Mon, 9 Nov 2020 22:03:17 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44932 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730911AbgKJDDM (ORCPT ); Mon, 9 Nov 2020 22:03:12 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kcJw4-006D8m-3z; Tue, 10 Nov 2020 04:03:08 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , Nicolas Pitre , Andrew Lunn Subject: [PATCH v3 net-next 6/7] drivers: net: smc911x: Fix cast from pointer to integer of different size Date: Tue, 10 Nov 2020 04:02:47 +0100 Message-Id: <20201110030248.1480413-7-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201110030248.1480413-1-andrew@lunn.ch> References: <20201110030248.1480413-1-andrew@lunn.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_hardware_send_pkt’: drivers/net/ethernet/smsc/smc911x.c:471:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 471 | cmdA = (((u32)skb->data & 0x3) << 16) | When built on 64bit targets, the skb->data pointer cannot be cast to a u32 in a meaningful way. Use uintptr_t instead. Suggested-by: Nicolas Pitre Signed-off-by: Andrew Lunn --- drivers/net/ethernet/smsc/smc911x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index ac1a764364fb..22cdbf12c823 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c @@ -465,9 +465,9 @@ static void smc911x_hardware_send_pkt(struct net_device *dev) TX_CMD_A_INT_FIRST_SEG_ | TX_CMD_A_INT_LAST_SEG_ | skb->len; #else - buf = (char*)((u32)skb->data & ~0x3); - len = (skb->len + 3 + ((u32)skb->data & 3)) & ~0x3; - cmdA = (((u32)skb->data & 0x3) << 16) | + buf = (char *)((uintptr_t)skb->data & ~0x3); + len = (skb->len + 3 + ((uintptr_t)skb->data & 3)) & ~0x3; + cmdA = (((uintptr_t)skb->data & 0x3) << 16) | TX_CMD_A_INT_FIRST_SEG_ | TX_CMD_A_INT_LAST_SEG_ | skb->len; #endif From patchwork Tue Nov 10 03:02:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 11892985 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 144DEC388F7 for ; Tue, 10 Nov 2020 03:03:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD6A82067B for ; Tue, 10 Nov 2020 03:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731115AbgKJDDQ (ORCPT ); Mon, 9 Nov 2020 22:03:16 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44938 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729451AbgKJDDM (ORCPT ); Mon, 9 Nov 2020 22:03:12 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kcJw4-006D8p-51; Tue, 10 Nov 2020 04:03:08 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , Nicolas Pitre , Andrew Lunn Subject: [PATCH v3 net-next 7/7] drivers: net: smsc: Add COMPILE_TEST support Date: Tue, 10 Nov 2020 04:02:48 +0100 Message-Id: <20201110030248.1480413-8-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201110030248.1480413-1-andrew@lunn.ch> References: <20201110030248.1480413-1-andrew@lunn.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Improve the build testing of these SMSC drivers by enabling them when COMPILE_TEST is selected. Signed-off-by: Andrew Lunn --- drivers/net/ethernet/smsc/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig index b77e427e6729..c52a38df0e0d 100644 --- a/drivers/net/ethernet/smsc/Kconfig +++ b/drivers/net/ethernet/smsc/Kconfig @@ -8,7 +8,7 @@ config NET_VENDOR_SMSC default y depends on ARM || ARM64 || ATARI_ETHERNAT || COLDFIRE || \ ISA || MAC || MIPS || NIOS2 || PCI || \ - PCMCIA || SUPERH || XTENSA || H8300 + PCMCIA || SUPERH || XTENSA || H8300 || COMPILE_TEST help If you have a network (Ethernet) card belonging to this class, say Y. @@ -39,7 +39,7 @@ config SMC91X select MII depends on !OF || GPIOLIB depends on ARM || ARM64 || ATARI_ETHERNAT || COLDFIRE || \ - MIPS || NIOS2 || SUPERH || XTENSA || H8300 + MIPS || NIOS2 || SUPERH || XTENSA || H8300 || COMPILE_TEST help This is a driver for SMC's 91x series of Ethernet chipsets, including the SMC91C94 and the SMC91C111. Say Y if you want it @@ -78,7 +78,7 @@ config SMC911X tristate "SMSC LAN911[5678] support" select CRC32 select MII - depends on (ARM || SUPERH) + depends on (ARM || SUPERH || COMPILE_TEST) help This is a driver for SMSC's LAN911x series of Ethernet chipsets including the new LAN9115, LAN9116, LAN9117, and LAN9118.