From patchwork Thu Apr 30 01:32:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rylan Dmello X-Patchwork-Id: 220264 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED 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 1CF34C83004 for ; Thu, 30 Apr 2020 01:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED81D20787 for ; Thu, 30 Apr 2020 01:32:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rylan.coffee header.i=@rylan.coffee header.b="myWsFO+w"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="sxDoiZxj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726669AbgD3BcS (ORCPT ); Wed, 29 Apr 2020 21:32:18 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52573 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbgD3BcR (ORCPT ); Wed, 29 Apr 2020 21:32:17 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3BC845C00A0; Wed, 29 Apr 2020 21:32:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 29 Apr 2020 21:32:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rylan.coffee; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=xz3mRUUiSRTWNRhEtbEIScUIML6 Spu5Ed03IWtKwZRY=; b=myWsFO+wg0rdCf7su944CazFOf2uERYU/WAtJ2Kmo3f Jo/qM4yFz1QWvUk8tvl5jYxkBFBiJbnQQxgefxDePVGHvo00EuyHBQlEaaVVqxKS Uqpj7cfW0G29vutCupxjspEvVlkcdRmVgYecw3AfHUUUBKvdKmmDqvE0Ijzhte3c j6Z6z5EqxeE9/wZyip4KAT/AFyWtghTcDNjF3dsNDB/FfdvQ9UQUmvOhHUJZuRUV sU3/y6BE4Nl24XzRwHTI+fOQYC5+gtvFHzUGRWWauKl1dn0T5XlNlzz4EfjKGjHA n5t/KSr3ZS3TzhEmVhEIBar99roiTIjdect6WoHB9Yw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=xz3mRU UiSRTWNRhEtbEIScUIML6Spu5Ed03IWtKwZRY=; b=sxDoiZxjB5Q+QW0lWdM3Cz 6cqQnguc5yxaAqdg8R3JGyCeVq+/YjjpFcIm06QL5jo9IJURTOIfwe4l0UWaGamB f1cEPR/USI6XEvVsFus9PnwHe8ekNICptu8GrF54ZvUmZj8wnief846wY2EEXqHD GFkMEwNPZNz8rw0YA+5Ejy1NXBMialQ+Rh7Cx/Gf9YJKXX6ul8sLfdVBKeKC0MWL YBewX8KlG1kmYvmp85hlxJ7ybMdgp12T6A6gcOhC/0ddYNx697CmdL81+ROu0bKb VNN/2UczrG1I9x4uwy3aaQkpMKV/OuI2Uf5uk4oinHxsyJOUsWOCxSMF68bsAIkQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieeggdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtjeenucfhrhhomheptfihlhgrnhcu ffhmvghllhhouceomhgrihhlsehrhihlrghnrdgtohhffhgvvgeqnecuggftrfgrthhtvg hrnhepjeffvefffeevgfdtteegudffieduveeuhfettddvueehveethfffgeetfeeghfeu necukfhppedutdekrdegledrudehkedrkeegnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrihhlsehrhihlrghnrdgtohhffhgvvg X-ME-Proxy: Received: from athena (pool-108-49-158-84.bstnma.fios.verizon.net [108.49.158.84]) by mail.messagingengine.com (Postfix) with ESMTPA id CA3DD3280068; Wed, 29 Apr 2020 21:32:15 -0400 (EDT) Date: Wed, 29 Apr 2020 21:32:15 -0400 From: Rylan Dmello To: Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Greg Kroah-Hartman , netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Joe Perches Subject: [PATCH v2 1/7] staging: qlge: Fix indentation in ql_set_mac_addr_reg Message-ID: <299f2cb3b7d4efa30b44d4d1defbcd5f54bd7eaf.1588209862.git.mail@rylan.coffee> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Based on Joe Perches' feedback, fix the indentation throughout ql_set_mac_addr_reg. This helps fix several "line over 80 characters" warnings along with the original "multiple line dereference" warning. Fix checkpatch.pl warnings: WARNING: Avoid multiple line dereference - prefer 'qdev->func' WARNING: line over 80 characters Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 167 +++++++++++++++---------------- 1 file changed, 78 insertions(+), 89 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index d7e4dfafc1a3..29610618c7c0 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -329,100 +329,89 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type, int status = 0; switch (type) { - case MAC_ADDR_TYPE_MULTI_MAC: - { - u32 upper = (addr[0] << 8) | addr[1]; - u32 lower = (addr[2] << 24) | (addr[3] << 16) | - (addr[4] << 8) | (addr[5]); + case MAC_ADDR_TYPE_MULTI_MAC: { + u32 upper = (addr[0] << 8) | addr[1]; + u32 lower = (addr[2] << 24) | (addr[3] << 16) | (addr[4] << 8) | + (addr[5]); - status = - ql_wait_reg_rdy(qdev, - MAC_ADDR_IDX, MAC_ADDR_MW, 0); - if (status) - goto exit; - ql_write32(qdev, MAC_ADDR_IDX, (offset++) | - (index << MAC_ADDR_IDX_SHIFT) | - type | MAC_ADDR_E); - ql_write32(qdev, MAC_ADDR_DATA, lower); - status = - ql_wait_reg_rdy(qdev, - MAC_ADDR_IDX, MAC_ADDR_MW, 0); - if (status) - goto exit; - ql_write32(qdev, MAC_ADDR_IDX, (offset++) | - (index << MAC_ADDR_IDX_SHIFT) | - type | MAC_ADDR_E); + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + ql_write32(qdev, MAC_ADDR_IDX, + (offset++) | (index << MAC_ADDR_IDX_SHIFT) | type | + MAC_ADDR_E); + ql_write32(qdev, MAC_ADDR_DATA, lower); + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + ql_write32(qdev, MAC_ADDR_IDX, + (offset++) | (index << MAC_ADDR_IDX_SHIFT) | type | + MAC_ADDR_E); - ql_write32(qdev, MAC_ADDR_DATA, upper); - status = - ql_wait_reg_rdy(qdev, - MAC_ADDR_IDX, MAC_ADDR_MW, 0); - if (status) - goto exit; - break; - } - case MAC_ADDR_TYPE_CAM_MAC: - { - u32 cam_output; - u32 upper = (addr[0] << 8) | addr[1]; - u32 lower = - (addr[2] << 24) | (addr[3] << 16) | (addr[4] << 8) | + ql_write32(qdev, MAC_ADDR_DATA, upper); + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + break; + } + case MAC_ADDR_TYPE_CAM_MAC: { + u32 cam_output; + u32 upper = (addr[0] << 8) | addr[1]; + u32 lower = (addr[2] << 24) | (addr[3] << 16) | (addr[4] << 8) | (addr[5]); - status = - ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); - if (status) - goto exit; - ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */ + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + ql_write32(qdev, MAC_ADDR_IDX, + (offset++) | /* offset */ (index << MAC_ADDR_IDX_SHIFT) | /* index */ - type); /* type */ - ql_write32(qdev, MAC_ADDR_DATA, lower); - status = - ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); - if (status) - goto exit; - ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */ + type); /* type */ + ql_write32(qdev, MAC_ADDR_DATA, lower); + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + ql_write32(qdev, MAC_ADDR_IDX, + (offset++) | /* offset */ (index << MAC_ADDR_IDX_SHIFT) | /* index */ - type); /* type */ - ql_write32(qdev, MAC_ADDR_DATA, upper); - status = - ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); - if (status) - goto exit; - ql_write32(qdev, MAC_ADDR_IDX, (offset) | /* offset */ - (index << MAC_ADDR_IDX_SHIFT) | /* index */ - type); /* type */ - /* This field should also include the queue id - * and possibly the function id. Right now we hardcode - * the route field to NIC core. - */ - cam_output = (CAM_OUT_ROUTE_NIC | - (qdev-> - func << CAM_OUT_FUNC_SHIFT) | - (0 << CAM_OUT_CQ_ID_SHIFT)); - if (qdev->ndev->features & NETIF_F_HW_VLAN_CTAG_RX) - cam_output |= CAM_OUT_RV; - /* route to NIC core */ - ql_write32(qdev, MAC_ADDR_DATA, cam_output); - break; - } - case MAC_ADDR_TYPE_VLAN: - { - u32 enable_bit = *((u32 *) &addr[0]); - /* For VLAN, the addr actually holds a bit that - * either enables or disables the vlan id we are - * addressing. It's either MAC_ADDR_E on or off. - * That's bit-27 we're talking about. - */ - status = - ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); - if (status) - goto exit; - ql_write32(qdev, MAC_ADDR_IDX, offset | /* offset */ - (index << MAC_ADDR_IDX_SHIFT) | /* index */ - type | /* type */ - enable_bit); /* enable/disable */ - break; - } + type); /* type */ + ql_write32(qdev, MAC_ADDR_DATA, upper); + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + ql_write32(qdev, MAC_ADDR_IDX, + (offset) | /* offset */ + (index << MAC_ADDR_IDX_SHIFT) | /* index */ + type); /* type */ + /* This field should also include the queue id + * and possibly the function id. Right now we hardcode + * the route field to NIC core. + */ + cam_output = (CAM_OUT_ROUTE_NIC | + (qdev->func << CAM_OUT_FUNC_SHIFT) | + (0 << CAM_OUT_CQ_ID_SHIFT)); + if (qdev->ndev->features & NETIF_F_HW_VLAN_CTAG_RX) + cam_output |= CAM_OUT_RV; + /* route to NIC core */ + ql_write32(qdev, MAC_ADDR_DATA, cam_output); + break; + } + case MAC_ADDR_TYPE_VLAN: { + u32 enable_bit = *((u32 *)&addr[0]); + /* For VLAN, the addr actually holds a bit that + * either enables or disables the vlan id we are + * addressing. It's either MAC_ADDR_E on or off. + * That's bit-27 we're talking about. + */ + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + ql_write32(qdev, MAC_ADDR_IDX, + offset | /* offset */ + (index << MAC_ADDR_IDX_SHIFT) | /* index */ + type | /* type */ + enable_bit); /* enable/disable */ + break; + } case MAC_ADDR_TYPE_MULTI_FLTR: default: netif_crit(qdev, ifup, qdev->ndev, From patchwork Thu Apr 30 01:33:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rylan Dmello X-Patchwork-Id: 220263 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED 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 17569C83009 for ; Thu, 30 Apr 2020 01:33:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7E5C208E0 for ; Thu, 30 Apr 2020 01:33:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rylan.coffee header.i=@rylan.coffee header.b="QFuuG32p"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="yXNLZJWC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726777AbgD3Bdd (ORCPT ); Wed, 29 Apr 2020 21:33:33 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44109 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726309AbgD3Bdd (ORCPT ); Wed, 29 Apr 2020 21:33:33 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AC7D45C0076; Wed, 29 Apr 2020 21:33:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 29 Apr 2020 21:33:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rylan.coffee; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=866EUhhl02ATxe+Ni9RioUHWCNy 6rpkgxyOZFwaTNlE=; b=QFuuG32pi1HbQfBaqv1y7Zu3pVeTy2ymCaJZfw5utYe aOJCEl8Ql4Fbe95BN+nU6u3fVcrkZ5RI7mO6Ii0cc0gzN2E3ckO6VJhux6zYNJq3 P8oK8eCcN8qvZ4gzAx4wb40eEuW7rczH8clZwzEgZMAtTzbDedPnmTYiNYwrgta/ oSUEdtW3rnqWmzTolc6uw3vl6Zhxzj0FFoTUJG5onnyZ2UB570iG5JC1Po8uIgYw N8hUYedpupGVzhK5oN4InajRoKY55oCqK3lPAxr26VJoqguLJMN12OD8s7i0HnNJ FiXPocf52brArdwR9dmr0/AydEZuCwHRLsI/8tW6n9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=866EUh hl02ATxe+Ni9RioUHWCNy6rpkgxyOZFwaTNlE=; b=yXNLZJWClVX9FUflynGRK/ VdVrDMijK+s1HCfzLMS/S+X9mpyfAc1ydxetdssEqSmCAUc4hlIP2SX7zEHxLK3N 0VUOrTWSN6VsG4trnSLgg5P4RxaCstRQdZBREeYeuIhr2j8eGj/ccFju3XFqe5ua Z9EfXciXOEtxl8w0qRVWTJMFqjmdGqy6Z82s4qY2cmHRuyTCtyyHQQFr7HUqBq03 Kh4IrcipIyHK5js48i/U/QxlB16A3wW0kCVwmhQC2b2Af60Wrxu1i1ZN95SxRsjI LP64sCIOtJrJg+a4uF4zXeStb9YatRSXiJF4MC/NeS2fjLVSjwI0M47ABUvs9XYw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieeggdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtjeenucfhrhhomheptfihlhgrnhcu ffhmvghllhhouceomhgrihhlsehrhihlrghnrdgtohhffhgvvgeqnecuggftrfgrthhtvg hrnhepjeffvefffeevgfdtteegudffieduveeuhfettddvueehveethfffgeetfeeghfeu necukfhppedutdekrdegledrudehkedrkeegnecuvehluhhsthgvrhfuihiivgepudenuc frrghrrghmpehmrghilhhfrhhomhepmhgrihhlsehrhihlrghnrdgtohhffhgvvg X-ME-Proxy: Received: from athena (pool-108-49-158-84.bstnma.fios.verizon.net [108.49.158.84]) by mail.messagingengine.com (Postfix) with ESMTPA id 6238D3280066; Wed, 29 Apr 2020 21:33:30 -0400 (EDT) Date: Wed, 29 Apr 2020 21:33:29 -0400 From: Rylan Dmello To: Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Greg Kroah-Hartman , netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Joe Perches Subject: [PATCH v2 3/7] staging: qlge: Fix indentation in ql_get_mac_addr_reg Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This has similar indentation style issues as ql_set_mac_addr_reg, so I thought I'd re-indent this too. Fix several checkpatch.pl warnings: WARNING: line over 80 characters Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 76 ++++++++++++++++---------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index f2b4a54fc4c0..844c2c6df38d 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -262,52 +262,50 @@ int ql_get_mac_addr_reg(struct ql_adapter *qdev, u32 type, u16 index, switch (type) { case MAC_ADDR_TYPE_MULTI_MAC: - case MAC_ADDR_TYPE_CAM_MAC: - { - status = - ql_wait_reg_rdy(qdev, - MAC_ADDR_IDX, MAC_ADDR_MW, 0); - if (status) - goto exit; - ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */ + case MAC_ADDR_TYPE_CAM_MAC: { + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + ql_write32(qdev, MAC_ADDR_IDX, + (offset++) | /* offset */ (index << MAC_ADDR_IDX_SHIFT) | /* index */ - MAC_ADDR_ADR | MAC_ADDR_RS | type); /* type */ - status = - ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0); - if (status) - goto exit; - *value++ = ql_read32(qdev, MAC_ADDR_DATA); - status = - ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + MAC_ADDR_ADR | MAC_ADDR_RS | + type); /* type */ + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0); + if (status) + goto exit; + *value++ = ql_read32(qdev, MAC_ADDR_DATA); + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); + if (status) + goto exit; + ql_write32(qdev, MAC_ADDR_IDX, + (offset++) | /* offset */ + (index << MAC_ADDR_IDX_SHIFT) | /* index */ + MAC_ADDR_ADR | MAC_ADDR_RS | + type); /* type */ + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0); + if (status) + goto exit; + *value++ = ql_read32(qdev, MAC_ADDR_DATA); + if (type == MAC_ADDR_TYPE_CAM_MAC) { + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, + MAC_ADDR_MW, 0); if (status) goto exit; - ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */ - (index << MAC_ADDR_IDX_SHIFT) | /* index */ - MAC_ADDR_ADR | MAC_ADDR_RS | type); /* type */ - status = - ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0); + ql_write32(qdev, MAC_ADDR_IDX, + (offset++) | /* offset */ + (index + << MAC_ADDR_IDX_SHIFT) | /* index */ + MAC_ADDR_ADR | + MAC_ADDR_RS | type); /* type */ + status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, + MAC_ADDR_MR, 0); if (status) goto exit; *value++ = ql_read32(qdev, MAC_ADDR_DATA); - if (type == MAC_ADDR_TYPE_CAM_MAC) { - status = - ql_wait_reg_rdy(qdev, - MAC_ADDR_IDX, MAC_ADDR_MW, - 0); - if (status) - goto exit; - ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */ - (index << MAC_ADDR_IDX_SHIFT) | /* index */ - MAC_ADDR_ADR | MAC_ADDR_RS | type); /* type */ - status = - ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, - MAC_ADDR_MR, 0); - if (status) - goto exit; - *value++ = ql_read32(qdev, MAC_ADDR_DATA); - } - break; } + break; + } case MAC_ADDR_TYPE_VLAN: case MAC_ADDR_TYPE_MULTI_FLTR: default: From patchwork Thu Apr 30 01:34:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rylan Dmello X-Patchwork-Id: 220262 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED 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 2CE18C83006 for ; Thu, 30 Apr 2020 01:34:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C52820787 for ; Thu, 30 Apr 2020 01:34:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rylan.coffee header.i=@rylan.coffee header.b="CKLv1oQ6"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SNFr3fxp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726577AbgD3Be2 (ORCPT ); Wed, 29 Apr 2020 21:34:28 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34177 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgD3Be2 (ORCPT ); Wed, 29 Apr 2020 21:34:28 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E64F55C0098; Wed, 29 Apr 2020 21:34:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 29 Apr 2020 21:34:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rylan.coffee; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=gdaFA2XkrvEtYXytp2mxXVDgZSI YUFcivrn9R/xM5YM=; b=CKLv1oQ6TUexrFBL4TlN9aP6IUlawlmTojkSNNzT/08 0ao9TU1diTYrFNtJv9EHzY0Yvyw1GZEhwHg+gCy67USLeVmjHfHNbkhYUDKaYPlx b4CinJbh/v7yo1C3Z9zNdjT/dcLBBFeIj0AjDy/sL5SOfXEjBGHUqwmTOpgQJ66z 51YgAHg29Vh5UWkBuo1tF4sE46ENbXRr3JfXZioLxl28W6M8hWYFUx1J2WCOdNDT v6vkRxCOLy3FoRdNBUQAwAsA3n7uKpxBUqCJazuUnyfChPxDThl9AxEF5H03BueC wETHTUqtdnAnbl1DCk6n7obiNtxRTHP2bp1xOGCW2PA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=gdaFA2 XkrvEtYXytp2mxXVDgZSIYUFcivrn9R/xM5YM=; b=SNFr3fxpj8w+zqWE+xpJ0Z G/sNTus4+EJ6w8fTgSiaK4JO26tj7GILPmEl0ZJz9Kz6irZPTpO1pbymz8OB/mks RE2Jk89nxfElFXqQtCuh4zssfpP+8kO/v7p20+ryb5a5pSrci68wTr+rOnprK84u GBekVXMWTFqbb1orG5KIuw71jyVyT0LclOUkyGTpYLE6Q46Gr8INT/ywlVtGuPIy BbPoe+8XYEhXRwNf4W3ui/IaYUoCRMPf1gJVbfcmE+lm0c9IXGVNtvbIGxl8KG3a Xs93gtTb7Jd/LdaXqijaKK5AbEoiC1C09cS0+4Av0yypz/M4+NvsCJN7+GX1NptQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieeggdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtjeenucfhrhhomheptfihlhgrnhcu ffhmvghllhhouceomhgrihhlsehrhihlrghnrdgtohhffhgvvgeqnecuggftrfgrthhtvg hrnhepjeffvefffeevgfdtteegudffieduveeuhfettddvueehveethfffgeetfeeghfeu necukfhppedutdekrdegledrudehkedrkeegnecuvehluhhsthgvrhfuihiivgepfeenuc frrghrrghmpehmrghilhhfrhhomhepmhgrihhlsehrhihlrghnrdgtohhffhgvvg X-ME-Proxy: Received: from athena (pool-108-49-158-84.bstnma.fios.verizon.net [108.49.158.84]) by mail.messagingengine.com (Postfix) with ESMTPA id 82AFC3280066; Wed, 29 Apr 2020 21:34:26 -0400 (EDT) Date: Wed, 29 Apr 2020 21:34:25 -0400 From: Rylan Dmello To: Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Greg Kroah-Hartman , netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Joe Perches Subject: [PATCH v2 5/7] staging: qlge: Remove multi-line dereference from ql_request_irq Message-ID: <517d71f0cbc55e6880c19a9ff16c2c8ab8913251.1588209862.git.mail@rylan.coffee> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix checkpatch.pl warning: WARNING: Avoid multiple line dereference - prefer 'qdev->flags' Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index bb6c198a0130..9aa62d146d97 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -3415,9 +3415,9 @@ static int ql_request_irq(struct ql_adapter *qdev) &qdev->rx_ring[0]); status = request_irq(pdev->irq, qlge_isr, - test_bit(QL_MSI_ENABLED, - &qdev-> - flags) ? 0 : IRQF_SHARED, + test_bit(QL_MSI_ENABLED, &qdev->flags) + ? 0 + : IRQF_SHARED, intr_context->name, &qdev->rx_ring[0]); if (status) goto err_irq; From patchwork Thu Apr 30 01:35:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rylan Dmello X-Patchwork-Id: 220261 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED 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 B4592C83009 for ; Thu, 30 Apr 2020 01:35:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94DA52083B for ; Thu, 30 Apr 2020 01:35:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rylan.coffee header.i=@rylan.coffee header.b="r9gRGvtS"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="4WJhQ8eX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726836AbgD3BfS (ORCPT ); Wed, 29 Apr 2020 21:35:18 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38471 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726337AbgD3BfR (ORCPT ); Wed, 29 Apr 2020 21:35:17 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 52EC15C012E; Wed, 29 Apr 2020 21:35:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 29 Apr 2020 21:35:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rylan.coffee; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=XX5ohvsksBkQGH5jbDa4t+EQwah gIjz54VbrjjxbWJY=; b=r9gRGvtScYbH5in9aalUzwkJr/sKf1BncihRT0mNAHT gaEJ3V12kbplqnc+7COsqikx8Qv0X6Hb+uXMW6LTWbU23tsA9F7yL0LBbjsHVyMy ToewGhdtZop2zlTSBYaQjCRP5k73Q/DhMFpJur5XzAc6enZQTeuhn3ZVxMm/QNw6 bFaBmTpwdK0ToGK4rc7LtSw4Wpwsni7jOhumeAKL7jAkM2n0zItJnqHnThZlvfbU iTScQhVqBoewR+8H72MvcsC76aAxjsjMrnwy5ktVdNSEsOtrVZL8mvJpQ+XBrmuK jR6Qsru3JDh7wwuTBaRTc696q4PoTYg3Iy47ij7Yabw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=XX5ohv sksBkQGH5jbDa4t+EQwahgIjz54VbrjjxbWJY=; b=4WJhQ8eXa13H7Byw6ikUXH D1RpSw38kXM2q26mmlPBLIzDw5h9iT3O5x7rylGnlA5Glcr+86JQWRVYDTjVwQK0 HGM+KWdfD2nfPx8lJfl4JqzD1KRv6AvGOb8VS7o4ZFQ+sMkkkyp9duX/jjmIdLZ8 xTzMQC71FGqnUPNomsK+7nwIbH87yaYh/dUVwBg6l4IusE5aDEVYPHIuPD0RAr3+ oxmBuBXajzJTLUWEtE9+Isj7TBdPyz7gs33EZaL4jdPZCL5TiYeCdYLdnXlGm9el i1K2m6jUkBe1aJ577hlRGr1bLhp1S5kmH44JqR6/rPyUG3hmRAfKnvlMZ111HX+g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieeggdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtjeenucfhrhhomheptfihlhgrnhcu ffhmvghllhhouceomhgrihhlsehrhihlrghnrdgtohhffhgvvgeqnecuggftrfgrthhtvg hrnhepjeffvefffeevgfdtteegudffieduveeuhfettddvueehveethfffgeetfeeghfeu necukfhppedutdekrdegledrudehkedrkeegnecuvehluhhsthgvrhfuihiivgepheenuc frrghrrghmpehmrghilhhfrhhomhepmhgrihhlsehrhihlrghnrdgtohhffhgvvg X-ME-Proxy: Received: from athena (pool-108-49-158-84.bstnma.fios.verizon.net [108.49.158.84]) by mail.messagingengine.com (Postfix) with ESMTPA id E66533065EFE; Wed, 29 Apr 2020 21:35:15 -0400 (EDT) Date: Wed, 29 Apr 2020 21:35:15 -0400 From: Rylan Dmello To: Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Greg Kroah-Hartman , netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Joe Perches Subject: [PATCH v2 7/7] staging: qlge: Fix function argument alignment warning in ql_init_device Message-ID: <12c7c34330b410e4ee8b9b5634f1a50ceb9c3590.1588209862.git.mail@rylan.coffee> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix checkpatch.pl check: CHECK: Alignment should match open parenthesis Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index fa708c722033..93df4f79b21d 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -4433,8 +4433,7 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev, pdev->needs_freset = 1; pci_save_state(pdev); qdev->reg_base = - ioremap(pci_resource_start(pdev, 1), - pci_resource_len(pdev, 1)); + ioremap(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1)); if (!qdev->reg_base) { dev_err(&pdev->dev, "Register mapping failed.\n"); err = -ENOMEM; @@ -4443,8 +4442,7 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev, qdev->doorbell_area_size = pci_resource_len(pdev, 3); qdev->doorbell_area = - ioremap(pci_resource_start(pdev, 3), - pci_resource_len(pdev, 3)); + ioremap(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3)); if (!qdev->doorbell_area) { dev_err(&pdev->dev, "Doorbell register mapping failed.\n"); err = -ENOMEM;