From patchwork Mon Apr 27 13:40:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215805 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 75B9BC54FD0 for ; Mon, 27 Apr 2020 13:43:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F03D206B6 for ; Mon, 27 Apr 2020 13:43:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="lg3SeNf/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727972AbgD0NlH (ORCPT ); Mon, 27 Apr 2020 09:41:07 -0400 Received: from mail-mw2nam12on2055.outbound.protection.outlook.com ([40.107.244.55]:9980 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727944AbgD0NlF (ORCPT ); Mon, 27 Apr 2020 09:41:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=duMt3DXje3M2rE+HihBK8AP9s+XUHe8pIxOdlqxx0HziSfqYleG64RmU52iv7hQ4g8veSipWJ40nm/1vKJnLKX6fuXrgVZeGXqP4b6ta/h6oFx7MoJSF8GiksUiMQ06Kea5FUsvu+yjSRNMU3UJeIJq8KGjMVLqZ8DS9sSlHS+v40xXHMsEObpkDOq2+f6XDidqWq9qu3o/ivGHrEgiBlR+tV+xGGt9qk3Xz4Re6i7GUZiYqZDrbuaJaN9ysaElT3q9YiaZFo2ZvBWk0ZAyO+3EwJMzG3I2RI2Ax295CoX1vOLxWrtAS5ox7uhGL7gBuF6dcUpDVkfh3VPbfKvDeWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wPGhlRhQV8LoVCtdI7RwpboNHZqL6bcToiGsJGCk/yk=; b=SCXq5+mIbLdIMknmOkj8i3Q6L1qo3MYxhaUmSaXvhQ2PjWr8O8jXhrKxVi1ZjhF8kELuKCHALkBbGugH5dbzBg6RolFJ0ZVOB3pLviJYv5Fkmfp12LLqVUA54wtVMYQaqxqhcGLIL8Xm4uAtheWiApJBLDun/mfIyruN/T2BMX5hqMXnGrRbu2Qhs/CTDESOv4gIyzn6ThdNVxsML/d86k+p2vaOq2bVHnmP3bd27Zlzm+gT6Fja7tsKl7WNbUgI20p+tz2WRQ9LdklZYKBhb1uv8r5iZZFG2MQlhIFFQFpYJNa7u4+8GnRljGSsd9276NrI87CrMR1/mYsgelfqMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wPGhlRhQV8LoVCtdI7RwpboNHZqL6bcToiGsJGCk/yk=; b=lg3SeNf/vysYQArUz9jmUmsK0oa4V33rgnJBCrp3QkvEO2Yk7XkcJSlTzPFU3oqZZCRH6sHH+btbUVlzv/CQn0YcOGqAZzWGsp+lxTkFOXmTcj7JZQuWIhu0U/g39GpUtXQilXm354nnjlW9NTCJWHpkrmTJJyvB9FmbggXtWqM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:03 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:41:02 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 02/17] staging: wfx: change the field chip_frozen into a boolean Date: Mon, 27 Apr 2020 15:40:16 +0200 Message-Id: <20200427134031.323403-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:41:00 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 08be903d-4b18-450c-a142-08d7eab0a090 X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4326008)(81156014)(86362001)(8936002)(6486002)(52116002)(6666004)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(66574012)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L53ToBQjJvlKhpNQRoKP+1NhERmTbDHOSxbBT39ZoXgzo8u27hJMdXVPJoaYWXsVRNxiXmIEC/OOqfHB+q7a/zyvUP6Xa2rwID6m6PEwQ6EPzIGpH6wtX+Km0iLJvA0WBqj4SQw65jCobKM/S0L4bwGRQJq53STkBjSEDUf4Ln/zU8D9LtZPs72fdekqZQ78oeTB9zj/4xi7aC4eaP2N7XtdEHtyRGItct69xXATRljo+nW5ZOzFvhNT+HwSDE6PI76u+AbL43SJHiL5ior+gtzwzLBKvxATVczBeGpnsD6Fo6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Exchange-CrossTenant-Network-Message-Id: 08be903d-4b18-450c-a142-08d7eab0a090 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:41:02.7210 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YVQn3ZzTd9FhLgwE+w9KESby9ls8/l2ynWnASRqOnZsvdc8yrKK8quY+F6B5JH4pfYtg+FZ68jkaRjpapM2RPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The field chip_frozen is declared as an integer, but it is only used as a boolean. So, convert it into a boolean. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 2 +- drivers/staging/wfx/hif_tx.c | 2 +- drivers/staging/wfx/queue.c | 2 +- drivers/staging/wfx/wfx.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index b8d570256498..b56138fef0bb 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -316,7 +316,7 @@ static int hif_exception_indication(struct wfx_dev *wdev, dev_err(wdev->dev, "firmware exception\n"); print_hex_dump_bytes("Dump: ", DUMP_PREFIX_NONE, buf, len); - wdev->chip_frozen = 1; + wdev->chip_frozen = true; return -1; } diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 17721cf9e2a3..e8f3c5f9ce7b 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -91,7 +91,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply, if (!ret) { dev_err(wdev->dev, "chip did not answer\n"); wfx_pending_dump_old_frames(wdev, 3000); - wdev->chip_frozen = 1; + wdev->chip_frozen = true; reinit_completion(&wdev->hif_cmd.done); ret = -ETIMEDOUT; } else { diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 2f6f9faf15be..0c799cedd101 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -52,7 +52,7 @@ void wfx_tx_flush(struct wfx_dev *wdev) wdev->hif.tx_buffers_used); wfx_pending_dump_old_frames(wdev, 3000); // FIXME: drop pending frames here - wdev->chip_frozen = 1; + wdev->chip_frozen = true; } mutex_unlock(&wdev->hif_cmd.lock); wfx_tx_unlock(wdev); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 706e95cd1092..77bb6c617546 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -45,7 +45,7 @@ struct wfx_dev { struct hif_ind_startup hw_caps; struct wfx_hif hif; struct sl_context sl; - int chip_frozen; + bool chip_frozen; struct mutex conf_mutex; struct wfx_hif_cmd hif_cmd;