From patchwork Wed Aug 27 07:26:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 4786511 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 46D2FC0338 for ; Wed, 27 Aug 2014 07:26:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 715262015E for ; Wed, 27 Aug 2014 07:26:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0242B20127 for ; Wed, 27 Aug 2014 07:26:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753032AbaH0H0a (ORCPT ); Wed, 27 Aug 2014 03:26:30 -0400 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:39106 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbaH0H0a (ORCPT ); Wed, 27 Aug 2014 03:26:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1409124390; x=1440660390; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=8opQAYYT9uvsJQ9HiScnOpHNdLpnvAOf5kdIyWTpYPM=; b=C3UcLjEcNGDmEVsxX/+gG1ov4y5uXmIZaBFHxGX/UyruhWXuwM5Wy21a NqhPyPpF73PaBD8kMg2m9Cg0SXJD8ix6M8eigsW96c1tsuDTqaul3uAX1 FE/6ASDIzigeKT6oC0eu0EGIFHxIOkrKQdwsP+tBTelhgzU/ymII9c04d 4=; X-IronPort-AV: E=McAfee;i="5600,1067,7542"; a="72976066" Received: from ironmsg04-r.qualcomm.com ([172.30.46.18]) by sabertooth01.qualcomm.com with ESMTP; 27 Aug 2014 00:26:29 -0700 X-IronPort-AV: E=Sophos;i="5.04,409,1406617200"; d="scan'208";a="792758234" Received: from nasanexhc11.na.qualcomm.com ([172.30.39.6]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 27 Aug 2014 00:26:29 -0700 Received: from nasanexhc05.na.qualcomm.com (172.30.48.2) by nasanexhc11.na.qualcomm.com (172.30.39.6) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 27 Aug 2014 00:26:28 -0700 Received: from potku.adurom.net.qca.qualcomm.com (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.2) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 27 Aug 2014 00:26:28 -0700 From: Kalle Valo To: Michal Kazior CC: , Subject: Re: [PATCH v2 3/3] ath10k: make target endianess more explicit References: <1408961963-3682-1-git-send-email-michal.kazior@tieto.com> <1408961963-3682-4-git-send-email-michal.kazior@tieto.com> Date: Wed, 27 Aug 2014 10:26:24 +0300 In-Reply-To: <1408961963-3682-4-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Mon, 25 Aug 2014 12:19:23 +0200") Message-ID: <878umaxujj.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [172.30.48.1] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Michal Kazior writes: > Some copy engine structures are target specific > and are uploaded to the device during > init/configuration. > > This also cleans up a bit diag_mem_read/write > implicit byteswap mess leaving only > diag_access_read/write with an implicit endianess > byteswap. > > Signed-off-by: Michal Kazior [...] > static int ath10k_pci_diag_read32(struct ath10k *ar, u32 address, u32 *value) > { > - return ath10k_pci_diag_read_mem(ar, address, value, sizeof(u32)); > + __le32 val = 0; > + int ret; > + > + ret = ath10k_pci_diag_read_mem(ar, address, &val, sizeof(__le32)); > + *value = __le32_to_cpu(val); > + > + return ret; > } For consistency, I folded a patch below. Is that ok? https://github.com/kvalo/ath/commit/1850a415873cb34a6f84b699dfb9a283df3252ec --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -620,7 +620,7 @@ static int ath10k_pci_diag_read32(struct ath10k *ar, u32 address, u32 *value) __le32 val = 0; int ret; - ret = ath10k_pci_diag_read_mem(ar, address, &val, sizeof(__le32)); + ret = ath10k_pci_diag_read_mem(ar, address, &val, sizeof(val)); *value = __le32_to_cpu(val); return ret;