Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp21005ybm; Mon, 20 May 2019 11:07:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9xu9L1UDmIffsZZ+JzpWOwH1097CaA881WV+Xt9tFyCBXp7IKk2/b8DZljhLjP8w3OAtk X-Received: by 2002:a63:1820:: with SMTP id y32mr75598050pgl.287.1558375645552; Mon, 20 May 2019 11:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558375645; cv=none; d=google.com; s=arc-20160816; b=of5SkiHHkSVRiu1pos1TYV2PoCeGy28uyYRHFwivGKGMh59l2rjw5xu9Rwq88pYLQV Vb5iVzrtaXc2YcP6A7bRF1qx0pLx7UtbBnOM5OYTdDmj2x+yPVtMkemiq9ccXPaE/Vq0 c6bYrkUJtXtHlY0wUfo+EaXW5CWa0GhPHnkkvBAbSYPQKheNglEWoZ9giyIv9gm+cO4W oq0KI/6x9e9gQAbOONHlThQ/llaIRUIMjhT6nJHm0DMmr9DbwDlscZmgpxYLsWSfWy6u yznZ8Yn0WGem+83iyX3QQbGRZIGqOohLPNr2jLRJ5kHyFHijaAeQmztNQt9sazG/4oN8 CfZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qLnbwDX9nYp0llQixdztrdIhtIxceeBj4sRkANMpAsM=; b=Nrs/J2sBaecz1bXKmEdZwJThbbr8kh8Ik7l657DPDjKGHxWMB3vahCoqoNm1PjLngZ qRnIdyz1jlNAUmLHRV7yEO+5frm+Sg4DartNCdKAmuTC3DDhuA4tEOtpPMB1jZdbPQyv z01+F7afmLz1Pm4A29YAkJVuCST+MGQdZISCSBXBmqVwVPIwcdxrDoJ8MrWUSpOFhG1R nKEY1DsoxiLDDQU9USASAk8f9UBR+yzja0vN6GnrTzUagBZyoqstLcLdi8TiuvCySAB/ dYEgencRRorL/UKBEdnyHVM00QxXijmwXXzitJu05EyJzzFHwmz9nH0Ge5/NIJFzenj2 2s7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GjImSPDJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si17030394pgv.128.2019.05.20.11.07.09; Mon, 20 May 2019 11:07:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GjImSPDJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390707AbfETNyu (ORCPT + 99 others); Mon, 20 May 2019 09:54:50 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:40417 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730740AbfETNyC (ORCPT ); Mon, 20 May 2019 09:54:02 -0400 Received: by mail-io1-f65.google.com with SMTP id s20so11071975ioj.7 for ; Mon, 20 May 2019 06:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qLnbwDX9nYp0llQixdztrdIhtIxceeBj4sRkANMpAsM=; b=GjImSPDJy8ShaSr+Kmu8fSik802cD/opDqpkNym+Rodro2w5D8/smsz5ZmejQAI+3y rsMqynEsw+xD73XJE5d+sP0np/oEVRcnrXkMM30Bicl9+VFtXV9SuzefGaTp0w4dWx2d gi5l9+EIC4mBj33w5DZLCU64lejWFarf0dO7qDS6jpd6go9WsencnubQbU03VtsuVQGB Wi/mc7Rfz9MNa5VQGnlpXL+mSKXz08kZGb2y304tqMZ88wLNA/kRxIWRufMs4aVFw1eg THnozwMZuhU1xKj5vFnIDhkCPEcKJuuwv5I1KzcdIDa2FRbX69m2+OO9aXrAu/pemwyP obCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qLnbwDX9nYp0llQixdztrdIhtIxceeBj4sRkANMpAsM=; b=SzFT8i3JjuS6r2X0Otnx1TTz0bIgDBnVQ8IeJCMnU5G8LDqYA0Exn6U+GoxviDyG6r IemGW8J+8YeIKegHp/t18803PrkvL74cYkt75INTramWs2pCb1kRBL3DLrkbcrC5MjgE RAFeda9t+dypwGuqHUDhNrpo5EW2aTzL8pKcR941UPWAAz2t85FRAQqzE3J7uACG6Rt3 zMEExBzx5UDlKzlBnxrRs6fLSkcCpW3tp4GnjyufOh04neLxUwEuyp+R22BbcucL8wHy RmxgfQFx1qAzP0nLFDs55i9uJ7e5dGulxq9JdC/KXU0Qov8RTxg6quRY6mB254J+Ey6p z6RQ== X-Gm-Message-State: APjAAAVWD7eyS5jZw8uYM+GSwamaU2/xsvKGXy2LTx1Ig2Zn/P65yeQq Sc3sdqjlQHEYYVtMlsh6BSGA9A== X-Received: by 2002:a6b:f305:: with SMTP id m5mr40986039ioh.271.1558360441814; Mon, 20 May 2019 06:54:01 -0700 (PDT) Received: from localhost.localdomain (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.gmail.com with ESMTPSA id n17sm6581185ioa.0.2019.05.20.06.54.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 06:54:01 -0700 (PDT) From: Alex Elder To: arnd@arndb.de, subashab@codeaurora.org, david.brown@linaro.org, agross@kernel.org, davem@davemloft.net Cc: bjorn.andersson@linaro.org, ilias.apalodimas@linaro.org, cpratapa@codeaurora.org, syadagir@codeaurora.org, evgreen@chromium.org, benchan@google.com, ejcaruso@google.com, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/8] net: qualcomm: rmnet: fix struct rmnet_map_header Date: Mon, 20 May 2019 08:53:47 -0500 Message-Id: <20190520135354.18628-2-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190520135354.18628-1-elder@linaro.org> References: <20190520135354.18628-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The C bit-fields in the first byte of the rmnet_map_header structure are defined in the wrong order. The first byte should be formatted this way: +------- reserved_bit | +----- cd_bit | | v v +-----------+-+-+ | pad_len |R|C| +-----------+-+-+ 7 6 5 4 3 2 1 0 <-- bit position But the C bit-fields that define the first byte are defined this way: u8 pad_len:6; u8 reserved_bit:1; u8 cd_bit:1; And although this isn't portable, I can state that when I build it the result puts the bit-fields in the wrong location (e.g., the cd_bit is in bit position 7, when it should be position 0). Fix this by reordering the definitions of these struct members. Upcoming patches will reimplement these definitions portably. Signed-off-by: Alex Elder --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h index 884f1f52dcc2..b1ae9499c0b2 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h @@ -40,9 +40,9 @@ enum rmnet_map_commands { }; struct rmnet_map_header { - u8 pad_len:6; - u8 reserved_bit:1; u8 cd_bit:1; + u8 reserved_bit:1; + u8 pad_len:6; u8 mux_id; __be16 pkt_len; } __aligned(1); -- 2.20.1