From patchwork Sun Apr 21 09:12:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Winkler, Tomas" X-Patchwork-Id: 10910481 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50EF117E0 for ; Sun, 21 Apr 2019 09:21:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 412F8286A8 for ; Sun, 21 Apr 2019 09:21:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34C002884B; Sun, 21 Apr 2019 09:21:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1832286A8 for ; Sun, 21 Apr 2019 09:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727014AbfDUJV0 (ORCPT ); Sun, 21 Apr 2019 05:21:26 -0400 Received: from mga17.intel.com ([192.55.52.151]:26174 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbfDUJVZ (ORCPT ); Sun, 21 Apr 2019 05:21:25 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2019 02:21:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,377,1549958400"; d="scan'208";a="339373167" Received: from twinkler-lnx.jer.intel.com ([10.12.91.48]) by fmsmga006.fm.intel.com with ESMTP; 21 Apr 2019 02:21:24 -0700 From: Tomas Winkler To: Samuel Ortiz Cc: Lauro Ramos Venancio , Aloisio Almeida Jr , linux-wireless@vger.kernel.org, Tomas Winkler Subject: [PATCH 1/2] nfc/pn544: fix inconsistent indenting Date: Sun, 21 Apr 2019 12:12:35 +0300 Message-Id: <20190421091236.19168-2-tomas.winkler@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190421091236.19168-1-tomas.winkler@intel.com> References: <20190421091236.19168-1-tomas.winkler@intel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Drop redunant space in indentation. Signed-off-by: Tomas Winkler --- drivers/nfc/pn544/pn544.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/pn544/pn544.c b/drivers/nfc/pn544/pn544.c index 70e898e38b16..2aaf521f367c 100644 --- a/drivers/nfc/pn544/pn544.c +++ b/drivers/nfc/pn544/pn544.c @@ -704,9 +704,10 @@ static int pn544_hci_check_presence(struct nfc_hci_dev *hdev, target->nfcid1_len != 10) return -EOPNOTSUPP; - return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, - PN544_RF_READER_CMD_ACTIVATE_NEXT, - target->nfcid1, target->nfcid1_len, NULL); + return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, + PN544_RF_READER_CMD_ACTIVATE_NEXT, + target->nfcid1, target->nfcid1_len, + NULL); } else if (target->supported_protocols & (NFC_PROTO_JEWEL_MASK | NFC_PROTO_FELICA_MASK)) { return -EOPNOTSUPP; From patchwork Sun Apr 21 09:12:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Winkler, Tomas" X-Patchwork-Id: 10910483 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E6B81390 for ; Sun, 21 Apr 2019 09:21:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F3E8286A8 for ; Sun, 21 Apr 2019 09:21:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1349E2884B; Sun, 21 Apr 2019 09:21:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B00C8286A8 for ; Sun, 21 Apr 2019 09:21:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727238AbfDUJV1 (ORCPT ); Sun, 21 Apr 2019 05:21:27 -0400 Received: from mga17.intel.com ([192.55.52.151]:26174 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbfDUJV1 (ORCPT ); Sun, 21 Apr 2019 05:21:27 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2019 02:21:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,377,1549958400"; d="scan'208";a="339373173" Received: from twinkler-lnx.jer.intel.com ([10.12.91.48]) by fmsmga006.fm.intel.com with ESMTP; 21 Apr 2019 02:21:25 -0700 From: Tomas Winkler To: Samuel Ortiz Cc: Lauro Ramos Venancio , Aloisio Almeida Jr , linux-wireless@vger.kernel.org, Tomas Winkler Subject: [PATCH 2/2] nfc/microread: use correct casting in microread_target_discovered() Date: Sun, 21 Apr 2019 12:12:36 +0300 Message-Id: <20190421091236.19168-3-tomas.winkler@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190421091236.19168-1-tomas.winkler@intel.com> References: <20190421091236.19168-1-tomas.winkler@intel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix sparse warnings: drivers/nfc/microread/microread.c:502:26: warning: cast to restricted __be16 drivers/nfc/microread/microread.c:502:26: warning: cast to restricted __be16 drivers/nfc/microread/microread.c:502:26: warning: cast to restricted __be16 drivers/nfc/microread/microread.c:502:26: warning: cast to restricted __be16 drivers/nfc/microread/microread.c:516:26: warning: cast to restricted __be16 drivers/nfc/microread/microread.c:516:26: warning: cast to restricted __be16 drivers/nfc/microread/microread.c:516:26: warning: cast to restricted __be16 drivers/nfc/microread/microread.c:516:26: warning: cast to restricted __be16 drivers/nfc/microread/microread.c:534:25: warning: cast to restricted __le16 Signed-off-by: Tomas Winkler --- drivers/nfc/microread/microread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/microread/microread.c b/drivers/nfc/microread/microread.c index e5d5d2d97409..cc1fc8d2b04d 100644 --- a/drivers/nfc/microread/microread.c +++ b/drivers/nfc/microread/microread.c @@ -499,7 +499,7 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate, targets->supported_protocols = nfc_hci_sak_to_protocol(skb->data[MICROREAD_EMCF_A_SAK]); targets->sens_res = - be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]); + be16_to_cpup((__be16 *)&skb->data[MICROREAD_EMCF_A_ATQA]); targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK]; targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN]; if (targets->nfcid1_len > sizeof(targets->nfcid1)) { @@ -513,7 +513,7 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate, targets->supported_protocols = nfc_hci_sak_to_protocol(skb->data[MICROREAD_EMCF_A3_SAK]); targets->sens_res = - be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]); + be16_to_cpup((__be16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]); targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK]; targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN]; if (targets->nfcid1_len > sizeof(targets->nfcid1)) { @@ -531,7 +531,7 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate, case MICROREAD_GATE_ID_MREAD_NFC_T1: targets->supported_protocols = NFC_PROTO_JEWEL_MASK; targets->sens_res = - le16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_T1_ATQA]); + le16_to_cpup((__le16 *)&skb->data[MICROREAD_EMCF_T1_ATQA]); memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_T1_UID], 4); targets->nfcid1_len = 4; break;