Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/898076/?format=api
{ "id": 898076, "url": "http://patchwork.ozlabs.org/api/patches/898076/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1523644117-5126-1-git-send-email-cathy.zhou@oracle.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1523644117-5126-1-git-send-email-cathy.zhou@oracle.com>", "list_archive_url": null, "date": "2018-04-13T18:28:37", "name": "[next-queue,1/1] ixgbe: cleanup sparse warnings", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "81cc8689c6c4188f3d3beea196d37dc3f74ab84a", "submitter": { "id": 73644, "url": "http://patchwork.ozlabs.org/api/people/73644/?format=api", "name": null, "email": "cathy.zhou@oracle.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1523644117-5126-1-git-send-email-cathy.zhou@oracle.com/mbox/", "series": [ { "id": 38854, "url": "http://patchwork.ozlabs.org/api/series/38854/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=38854", "date": "2018-04-13T18:28:37", "name": "[next-queue,1/1] ixgbe: cleanup sparse warnings", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/38854/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/898076/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/898076/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=oracle.com", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=oracle.com header.i=@oracle.com\n\theader.b=\"mpZxzrcj\"; dkim-atps=neutral" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 40N5rm57BYz9rvt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 14 Apr 2018 04:28:56 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1B86E8182D;\n\tFri, 13 Apr 2018 18:28:55 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id DxqnNJRIwtJn; Fri, 13 Apr 2018 18:28:53 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id F12C381D45;\n\tFri, 13 Apr 2018 18:28:52 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 4B2BE1C1F91\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 13 Apr 2018 18:28:51 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 46D5481818\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 13 Apr 2018 18:28:51 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id faB91EPL+o4H for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 13 Apr 2018 18:28:49 +0000 (UTC)", "from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id CCB9288E08\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 13 Apr 2018 18:28:49 +0000 (UTC)", "from pps.filterd (aserp2130.oracle.com [127.0.0.1])\n\tby aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id\n\tw3DIQi08015978; Fri, 13 Apr 2018 18:28:47 GMT", "from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])\n\tby aserp2130.oracle.com with ESMTP id 2h6kgttfje-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Fri, 13 Apr 2018 18:28:47 +0000", "from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])\n\tby aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id\n\tw3DISlhs027358\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Fri, 13 Apr 2018 18:28:47 GMT", "from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11])\n\tby aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id\n\tw3DISkhP022466; Fri, 13 Apr 2018 18:28:46 GMT", "from yunzhou.us.oracle.com.com (/10.159.141.174)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Fri, 13 Apr 2018 11:28:46 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;\n\th=from : to : cc :\n\tsubject : date : message-id; s=corp-2017-10-26;\n\tbh=vkWFkIHH/Is8ciebf1hfaXxqeSjHIpZbVj7ha0fSE8Y=;\n\tb=mpZxzrcj2myamZ5gz/uY7RydXYbqWXVi6+zHtRb0eOqXA9ecJXbVLTX4Bm0ETJygsy/N\n\tbdjvn49XMiinJlhvMh0n29yPXgF+zYpiuzCv3UV4kU5+9/ZlQaeKUMApyklJ6F/mTZGw\n\twoRqJTjKaAS6By3F1s/8yeGgnGjsd62KYN/2VTBrD4kPavfi2yX5xEJlYlgLTdHnsCL/\n\tyiqrqVke8A/kvLjnAE+tH3gX1N7JbuyfxZaYiT0N60gYfVzTshf54bKA8SJIRPMEdkgt\n\tnSxnFM8oLBSISvYGM86xECUR4OoQQ073nmJZ8lEgMKxPB2TGnaQKbWR+yr2Rmhy3ILh3\n\t7A== ", "From": "cathy.zhou@oracle.com", "To": "jeffrey.t.kirsher@intel.com, intel-wired-lan@lists.osuosl.org", "Date": "Fri, 13 Apr 2018 11:28:37 -0700", "Message-Id": "<1523644117-5126-1-git-send-email-cathy.zhou@oracle.com>", "X-Mailer": "git-send-email 1.7.1", "X-Proofpoint-Virus-Version": "vendor=nai engine=5900 definitions=8862\n\tsignatures=668698", "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0 suspectscore=0\n\tmalwarescore=0\n\tphishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999\n\tadultscore=0 classifier=spam adjust=0 reason=mlx scancount=1\n\tengine=8.0.1-1711220000 definitions=main-1804130170", "Subject": "[Intel-wired-lan] [next-queue PATCH 1/1] ixgbe: cleanup sparse\n\twarnings", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "netdev@vger.kernel.org", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Cathy Zhou <cathy.zhou@oracle.COM>\n\nSparse complains valid conversions between restricted types, force\nattribute is used to avoid those warnings.\n\nSigned-off-by: Cathy Zhou <cathy.zhou@oracle.COM>\nReviewed-by: Shannon Nelson <shannon.nelson@oracle.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 13 ++++++-----\n drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 2 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 25 +++++++++++++--------\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 29 +++++++++++++++----------\n drivers/net/ethernet/intel/ixgbe/ixgbe_model.h | 16 +++++++-------\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 9 ++++----\n 7 files changed, 55 insertions(+), 41 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\nindex 66a74f4651e8..898b47b1a854 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\n@@ -1462,7 +1462,8 @@ void ixgbe_atr_compute_perfect_hash_82599(union ixgbe_atr_input *input,\n {\n \n \tu32 hi_hash_dword, lo_hash_dword, flow_vm_vlan;\n-\tu32 bucket_hash = 0, hi_dword = 0;\n+\tu32 bucket_hash = 0;\n+\t__be32 hi_dword = 0;\n \tint i;\n \n \t/* Apply masks to input data */\n@@ -1501,7 +1502,7 @@ void ixgbe_atr_compute_perfect_hash_82599(union ixgbe_atr_input *input,\n \t * Limit hash to 13 bits since max bucket count is 8K.\n \t * Store result at the end of the input stream.\n \t */\n-\tinput->formatted.bkt_hash = bucket_hash & 0x1FFF;\n+\tinput->formatted.bkt_hash = (__force __be16)(bucket_hash & 0x1FFF);\n }\n \n /**\n@@ -1610,7 +1611,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,\n \t\treturn IXGBE_ERR_CONFIG;\n \t}\n \n-\tswitch (input_mask->formatted.flex_bytes & 0xFFFF) {\n+\tswitch ((__force u16)input_mask->formatted.flex_bytes & 0xFFFF) {\n \tcase 0x0000:\n \t\t/* Mask Flex Bytes */\n \t\tfdirm |= IXGBE_FDIRM_FLEX;\n@@ -1680,13 +1681,13 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,\n \tIXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, fdirport);\n \n \t/* record vlan (little-endian) and flex_bytes(big-endian) */\n-\tfdirvlan = IXGBE_STORE_AS_BE16(input->formatted.flex_bytes);\n+\tfdirvlan = IXGBE_STORE_AS_BE16((__force u16)input->formatted.flex_bytes);\n \tfdirvlan <<= IXGBE_FDIRVLAN_FLEX_SHIFT;\n \tfdirvlan |= ntohs(input->formatted.vlan_id);\n \tIXGBE_WRITE_REG(hw, IXGBE_FDIRVLAN, fdirvlan);\n \n \t/* configure FDIRHASH register */\n-\tfdirhash = input->formatted.bkt_hash;\n+\tfdirhash = (__force u32)input->formatted.bkt_hash;\n \tfdirhash |= soft_id << IXGBE_FDIRHASH_SIG_SW_INDEX_SHIFT;\n \tIXGBE_WRITE_REG(hw, IXGBE_FDIRHASH, fdirhash);\n \n@@ -1724,7 +1725,7 @@ s32 ixgbe_fdir_erase_perfect_filter_82599(struct ixgbe_hw *hw,\n \ts32 err;\n \n \t/* configure FDIRHASH register */\n-\tfdirhash = input->formatted.bkt_hash;\n+\tfdirhash = (__force u32)input->formatted.bkt_hash;\n \tfdirhash |= soft_id << IXGBE_FDIRHASH_SIG_SW_INDEX_SHIFT;\n \tIXGBE_WRITE_REG(hw, IXGBE_FDIRHASH, fdirhash);\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\nindex 633be93f3dbb..7db2722366c2 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n@@ -3652,7 +3652,7 @@ s32 ixgbe_hic_unlocked(struct ixgbe_hw *hw, u32 *buffer, u32 length,\n \t */\n \tfor (i = 0; i < dword_len; i++)\n \t\tIXGBE_WRITE_REG_ARRAY(hw, IXGBE_FLEX_MNG,\n-\t\t\t\t i, cpu_to_le32(buffer[i]));\n+\t\t\t\t i, (__force u32)cpu_to_le32(buffer[i]));\n \n \t/* Setting this bit tells the ARC that a new command is pending. */\n \tIXGBE_WRITE_REG(hw, IXGBE_HICR, hicr | IXGBE_HICR_C);\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c\nindex 7a09a40e4472..4e4c5eeda50d 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c\n@@ -465,7 +465,7 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,\n \tcase cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_FCPRSP):\n \t\tdma_unmap_sg(&adapter->pdev->dev, ddp->sgl,\n \t\t\t ddp->sgc, DMA_FROM_DEVICE);\n-\t\tddp->err = ddp_err;\n+\t\tddp->err = (__force u32)ddp_err;\n \t\tddp->sgl = NULL;\n \t\tddp->sgc = 0;\n \t\t/* fall through */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\nindex 68af127987bc..33e8c588ff51 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\n@@ -43,8 +43,9 @@ static void ixgbe_ipsec_set_tx_sa(struct ixgbe_hw *hw, u16 idx,\n \tint i;\n \n \tfor (i = 0; i < 4; i++)\n-\t\tIXGBE_WRITE_REG(hw, IXGBE_IPSTXKEY(i), cpu_to_be32(key[3 - i]));\n-\tIXGBE_WRITE_REG(hw, IXGBE_IPSTXSALT, cpu_to_be32(salt));\n+\t\tIXGBE_WRITE_REG(hw, IXGBE_IPSTXKEY(i),\n+\t\t\t\t(__force u32)cpu_to_be32(key[3 - i]));\n+\tIXGBE_WRITE_REG(hw, IXGBE_IPSTXSALT, (__force u32)cpu_to_be32(salt));\n \tIXGBE_WRITE_FLUSH(hw);\n \n \treg = IXGBE_READ_REG(hw, IXGBE_IPSTXIDX);\n@@ -93,7 +94,8 @@ static void ixgbe_ipsec_set_rx_sa(struct ixgbe_hw *hw, u16 idx, __be32 spi,\n \tint i;\n \n \t/* store the SPI (in bigendian) and IPidx */\n-\tIXGBE_WRITE_REG(hw, IXGBE_IPSRXSPI, cpu_to_le32(spi));\n+\tIXGBE_WRITE_REG(hw, IXGBE_IPSRXSPI,\n+\t\t\t(__force u32)cpu_to_le32((__force u32)spi));\n \tIXGBE_WRITE_REG(hw, IXGBE_IPSRXIPIDX, ip_idx);\n \tIXGBE_WRITE_FLUSH(hw);\n \n@@ -101,8 +103,9 @@ static void ixgbe_ipsec_set_rx_sa(struct ixgbe_hw *hw, u16 idx, __be32 spi,\n \n \t/* store the key, salt, and mode */\n \tfor (i = 0; i < 4; i++)\n-\t\tIXGBE_WRITE_REG(hw, IXGBE_IPSRXKEY(i), cpu_to_be32(key[3 - i]));\n-\tIXGBE_WRITE_REG(hw, IXGBE_IPSRXSALT, cpu_to_be32(salt));\n+\t\tIXGBE_WRITE_REG(hw, IXGBE_IPSRXKEY(i),\n+\t\t\t\t(__force u32)cpu_to_be32(key[3 - i]));\n+\tIXGBE_WRITE_REG(hw, IXGBE_IPSRXSALT, (__force u32)cpu_to_be32(salt));\n \tIXGBE_WRITE_REG(hw, IXGBE_IPSRXMOD, mode);\n \tIXGBE_WRITE_FLUSH(hw);\n \n@@ -121,7 +124,8 @@ static void ixgbe_ipsec_set_rx_ip(struct ixgbe_hw *hw, u16 idx, __be32 addr[])\n \n \t/* store the ip address */\n \tfor (i = 0; i < 4; i++)\n-\t\tIXGBE_WRITE_REG(hw, IXGBE_IPSRXIPADDR(i), cpu_to_le32(addr[i]));\n+\t\tIXGBE_WRITE_REG(hw, IXGBE_IPSRXIPADDR(i),\n+\t\t\t\t(__force u32)cpu_to_le32((__force u32)addr[i]));\n \tIXGBE_WRITE_FLUSH(hw);\n \n \tixgbe_ipsec_set_rx_item(hw, idx, ips_rx_ip_tbl);\n@@ -391,7 +395,8 @@ static struct xfrm_state *ixgbe_ipsec_find_rx_state(struct ixgbe_ipsec *ipsec,\n \tstruct xfrm_state *ret = NULL;\n \n \trcu_read_lock();\n-\thash_for_each_possible_rcu(ipsec->rx_sa_list, rsa, hlist, spi)\n+\thash_for_each_possible_rcu(ipsec->rx_sa_list, rsa, hlist,\n+\t\t\t\t (__force u32)spi) {\n \t\tif (spi == rsa->xs->id.spi &&\n \t\t ((ip4 && *daddr == rsa->xs->id.daddr.a4) ||\n \t\t (!ip4 && !memcmp(daddr, &rsa->xs->id.daddr.a6,\n@@ -401,6 +406,7 @@ static struct xfrm_state *ixgbe_ipsec_find_rx_state(struct ixgbe_ipsec *ipsec,\n \t\t\txfrm_state_hold(ret);\n \t\t\tbreak;\n \t\t}\n+\t}\n \trcu_read_unlock();\n \treturn ret;\n }\n@@ -593,7 +599,7 @@ static int ixgbe_ipsec_add_sa(struct xfrm_state *xs)\n \n \t\t/* hash the new entry for faster search in Rx path */\n \t\thash_add_rcu(ipsec->rx_sa_list, &ipsec->rx_tbl[sa_idx].hlist,\n-\t\t\t rsa.xs->id.spi);\n+\t\t\t (__force u64)rsa.xs->id.spi);\n \t} else {\n \t\tstruct tx_sa tsa;\n \n@@ -677,7 +683,8 @@ static void ixgbe_ipsec_del_sa(struct xfrm_state *xs)\n \t\t\tif (!ipsec->ip_tbl[ipi].ref_cnt) {\n \t\t\t\tmemset(&ipsec->ip_tbl[ipi], 0,\n \t\t\t\t sizeof(struct rx_ip_sa));\n-\t\t\t\tixgbe_ipsec_set_rx_ip(hw, ipi, zerobuf);\n+\t\t\t\tixgbe_ipsec_set_rx_ip(hw, ipi,\n+\t\t\t\t\t\t (__force __be32 *)zerobuf);\n \t\t\t}\n \t\t}\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex afadba99f7b8..ef40b226edfc 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -752,8 +752,8 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)\n \t\t\t\t\tring_desc = \"\";\n \t\t\t\tpr_info(\"T [0x%03X] %016llX %016llX %016llX %08X %p %016llX %p%s\",\n \t\t\t\t\ti,\n-\t\t\t\t\tle64_to_cpu(u0->a),\n-\t\t\t\t\tle64_to_cpu(u0->b),\n+\t\t\t\t\tle64_to_cpu((__force __le64)u0->a),\n+\t\t\t\t\tle64_to_cpu((__force __le64)u0->b),\n \t\t\t\t\t(u64)dma_unmap_addr(tx_buffer, dma),\n \t\t\t\t\tdma_unmap_len(tx_buffer, len),\n \t\t\t\t\ttx_buffer->next_to_watch,\n@@ -864,15 +864,15 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)\n \t\t\t\t/* Descriptor Done */\n \t\t\t\tpr_info(\"RWB[0x%03X] %016llX %016llX ---------------- %p%s\\n\",\n \t\t\t\t\ti,\n-\t\t\t\t\tle64_to_cpu(u0->a),\n-\t\t\t\t\tle64_to_cpu(u0->b),\n+\t\t\t\t\tle64_to_cpu((__force __le64)u0->a),\n+\t\t\t\t\tle64_to_cpu((__force __le64)u0->b),\n \t\t\t\t\trx_buffer_info->skb,\n \t\t\t\t\tring_desc);\n \t\t\t} else {\n \t\t\t\tpr_info(\"R [0x%03X] %016llX %016llX %016llX %p%s\\n\",\n \t\t\t\t\ti,\n-\t\t\t\t\tle64_to_cpu(u0->a),\n-\t\t\t\t\tle64_to_cpu(u0->b),\n+\t\t\t\t\tle64_to_cpu((__force __le64)u0->a),\n+\t\t\t\t\tle64_to_cpu((__force __le64)u0->b),\n \t\t\t\t\t(u64)rx_buffer_info->dma,\n \t\t\t\t\trx_buffer_info->skb,\n \t\t\t\t\tring_desc);\n@@ -7801,7 +7801,7 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,\n \n \t/* remove payload length from inner checksum */\n \tpaylen = skb->len - l4_offset;\n-\tcsum_replace_by_diff(&l4.tcp->check, htonl(paylen));\n+\tcsum_replace_by_diff(&l4.tcp->check, (__force __wsum)htonl(paylen));\n \n \t/* update gso size and bytecount with header size */\n \tfirst->gso_segs = skb_shinfo(skb)->gso_segs;\n@@ -9109,7 +9109,8 @@ static int ixgbe_clsu32_build_input(struct ixgbe_fdir_filter *input,\n \n \t\tfor (j = 0; field_ptr[j].val; j++) {\n \t\t\tif (field_ptr[j].off == off) {\n-\t\t\t\tfield_ptr[j].val(input, mask, val, m);\n+\t\t\t\tfield_ptr[j].val(input, mask, (__force u32)val,\n+\t\t\t\t\t\t (__force u32)m);\n \t\t\t\tinput->filter.formatted.flow_type |=\n \t\t\t\t\tfield_ptr[j].type;\n \t\t\t\tfound_entry = true;\n@@ -9118,8 +9119,10 @@ static int ixgbe_clsu32_build_input(struct ixgbe_fdir_filter *input,\n \t\t}\n \t\tif (nexthdr) {\n \t\t\tif (nexthdr->off == cls->knode.sel->keys[i].off &&\n-\t\t\t nexthdr->val == cls->knode.sel->keys[i].val &&\n-\t\t\t nexthdr->mask == cls->knode.sel->keys[i].mask)\n+\t\t\t nexthdr->val ==\n+\t\t\t (__force u32)cls->knode.sel->keys[i].val &&\n+\t\t\t nexthdr->mask ==\n+\t\t\t (__force u32)cls->knode.sel->keys[i].mask)\n \t\t\t\tfound_jump_field = true;\n \t\t\telse\n \t\t\t\tcontinue;\n@@ -9223,7 +9226,8 @@ static int ixgbe_configure_clsu32(struct ixgbe_adapter *adapter,\n \t\tfor (i = 0; nexthdr[i].jump; i++) {\n \t\t\tif (nexthdr[i].o != cls->knode.sel->offoff ||\n \t\t\t nexthdr[i].s != cls->knode.sel->offshift ||\n-\t\t\t nexthdr[i].m != cls->knode.sel->offmask)\n+\t\t\t nexthdr[i].m !=\n+\t\t\t (__force u32)cls->knode.sel->offmask)\n \t\t\t\treturn err;\n \n \t\t\tjump = kzalloc(sizeof(*jump), GFP_KERNEL);\n@@ -9970,7 +9974,8 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)\n \t\t}\n \t} else {\n \t\tfor (i = 0; i < adapter->num_rx_queues; i++)\n-\t\t\txchg(&adapter->rx_ring[i]->xdp_prog, adapter->xdp_prog);\n+\t\t\t(void)xchg(&adapter->rx_ring[i]->xdp_prog,\n+\t\t\t adapter->xdp_prog);\n \t}\n \n \tif (old_prog)\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_model.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_model.h\nindex 72446644f9fa..57de21a299ea 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_model.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_model.h\n@@ -53,8 +53,8 @@ static inline int ixgbe_mat_prgm_sip(struct ixgbe_fdir_filter *input,\n \t\t\t\t union ixgbe_atr_input *mask,\n \t\t\t\t u32 val, u32 m)\n {\n-\tinput->filter.formatted.src_ip[0] = val;\n-\tmask->formatted.src_ip[0] = m;\n+\tinput->filter.formatted.src_ip[0] = (__force __be32)val;\n+\tmask->formatted.src_ip[0] = (__force __be32)m;\n \treturn 0;\n }\n \n@@ -62,8 +62,8 @@ static inline int ixgbe_mat_prgm_dip(struct ixgbe_fdir_filter *input,\n \t\t\t\t union ixgbe_atr_input *mask,\n \t\t\t\t u32 val, u32 m)\n {\n-\tinput->filter.formatted.dst_ip[0] = val;\n-\tmask->formatted.dst_ip[0] = m;\n+\tinput->filter.formatted.dst_ip[0] = (__force __be32)val;\n+\tmask->formatted.dst_ip[0] = (__force __be32)m;\n \treturn 0;\n }\n \n@@ -79,10 +79,10 @@ static inline int ixgbe_mat_prgm_ports(struct ixgbe_fdir_filter *input,\n \t\t\t\t union ixgbe_atr_input *mask,\n \t\t\t\t u32 val, u32 m)\n {\n-\tinput->filter.formatted.src_port = val & 0xffff;\n-\tmask->formatted.src_port = m & 0xffff;\n-\tinput->filter.formatted.dst_port = val >> 16;\n-\tmask->formatted.dst_port = m >> 16;\n+\tinput->filter.formatted.src_port = (__force __be16)(val & 0xffff);\n+\tmask->formatted.src_port = (__force __be16)(m & 0xffff);\n+\tinput->filter.formatted.dst_port = (__force __be16)(val >> 16);\n+\tmask->formatted.dst_port = (__force __be16)(m >> 16);\n \n \treturn 0;\n };\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex 3123267dfba9..336f3218177a 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -898,8 +898,9 @@ static s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw,\n \t\tbuffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM;\n \n \t\t/* convert offset from words to bytes */\n-\t\tbuffer.address = cpu_to_be32((offset + current_word) * 2);\n-\t\tbuffer.length = cpu_to_be16(words_to_read * 2);\n+\t\tbuffer.address = (__force u32)cpu_to_be32((offset +\n+\t\t\t\t\t\t\t current_word) * 2);\n+\t\tbuffer.length = (__force u16)cpu_to_be16(words_to_read * 2);\n \t\tbuffer.pad2 = 0;\n \t\tbuffer.pad3 = 0;\n \n@@ -1109,9 +1110,9 @@ static s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)\n \tbuffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM;\n \n \t/* convert offset from words to bytes */\n-\tbuffer.address = cpu_to_be32(offset * 2);\n+\tbuffer.address = (__force u32)cpu_to_be32(offset * 2);\n \t/* one word */\n-\tbuffer.length = cpu_to_be16(sizeof(u16));\n+\tbuffer.length = (__force u16)cpu_to_be16(sizeof(u16));\n \n \tstatus = hw->mac.ops.acquire_swfw_sync(hw, mask);\n \tif (status)\n", "prefixes": [ "next-queue", "1/1" ] }