From patchwork Thu Jan 13 08:54:57 2022 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: 532422 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D982C433FE for ; Thu, 13 Jan 2022 08:55:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbiAMIzz (ORCPT ); Thu, 13 Jan 2022 03:55:55 -0500 Received: from mail-co1nam11on2086.outbound.protection.outlook.com ([40.107.220.86]:28322 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231376AbiAMIzr (ORCPT ); Thu, 13 Jan 2022 03:55:47 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ijvrbe/bQykgFLuodwqhIKJ6HmT8fk7G7HnGex3uZ9ESqEA/5bcZzdXdOoKa3BgP8JPtiVDv5vmEoHmZgA/QPdis4UtRk50hybRLSqSz8JdVjKW8OcGoKSMbQ4qP8xFOLtOSNDL5qnbIuAgicybRUt4R+0GX81ShIwT5lPmAqVGlGlM1q0zObNJ/5Y/rIrAcZQln2F95ofd+Dgl8UVjn9sny/zppq8s/au+tl7SokbW13fUL59ragbABrMdLvKKp2f5EprDxk/MTJxrd7UvMM8rAwFCCU4LioWO8husqaOI2gKrb5KFSLcNs7Ylswjrw8TX102Y1dz1C7ei3L8licQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cvZl16TELr7l4/hx5wQeeZi+e9QX3BFwwPMgJvqTK7I=; b=OPEj3U/tm/A9fUozY+Fi5LTyHjzOQcZ/DbbmY8BmAUvVYJjrpVzloMojGQ0FHdu+LzEB2yqM7CwZPBlH1nKh/VfZzYbXbb2ok+jg44+dqfDtThm0/LS3OsjWXEMqco27XPva8raMYXly9fWqVZi4n/ry1UJNVjttWmvjddYfMre7m6L64X6rWJbioOdW3HsBdAhNqRVQfuX2gqcV/hQKdZ5CaniZAvsuozVtIm98sH/IaVjr5dxs+jsYjsG+l4+AIYLMPZeVd7F5NFkExJyNx9DJb7iwtxMguyCyC0kSDe6mZu1487053qktfe/7Lyy2grVz/c7T5mkxZo3gaDwSQQ== 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=cvZl16TELr7l4/hx5wQeeZi+e9QX3BFwwPMgJvqTK7I=; b=TuTbAr0mvPkzkpTVU3HJKgxeNjV5xzyqTGmjppJYT74YsbWkMCz6DVfZ/3bfN2/dVZcOtWCIKegTkREXavmD2tg1DpJSJmKTbaohl+lzFGRqntLrsR23hM3D9ZlhTa20cnfVqXB/EYPz7zoyXphksScZXWIMUXlaj2q3JIPirp0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:55:46 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:55:46 +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 04/31] staging: wfx: fix comment correctness Date: Thu, 13 Jan 2022 09:54:57 +0100 Message-Id: <20220113085524.1110708-5-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 669b5183-06d1-467a-f444-08d9d6727ce2 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1pf/6arT+s+eNFYl5bK530mEnN6Cft7qQWG3nUTamDWoEcD8vhrovxc0MvUs/0c4ObXCpBiecxYJzMTI1l/vyZj0SLWI3p8gNYNH7NGmjy3NaUjfJ9UyRkfxRBrO8zZR5ZoR55lyf9XmLENxJkLSet89i47mJNMTFAOArFBBjqm8mMe/YH5fouzevWAXHFHNwcYM+qEAqzRWOW6Uh/RMARxQtmlr4ZhEbTEomBJV+RW8oREFs9OXcccdTgoQzO/5M/0cYRrnX9GejEfcifsKN0H7KN7eh1+SzH3LL9dxK4X5NzRHaDfoKgvVuPgutNK/042yzUZMRo3KCZUj88DSewSOSSotYZFCleQhk6V5nBGcFerhCLswk4FHchaXGF68coYx70mxUfmvR5TZExCktoaY9fOyQzv6FvGd223Uk4LCq9ViX7ib1B2zyvlx0SybzMGhDo6SsJLuZoPfanUYtOjL2VejHSgp/ZLUzQNZkIrSvL4vbdqTirc2MovigrWHxtD+25sCoRJ17IdPpXRaRgZSEPm61dm7M0tlgvbD7f2wB3zBpayDpaP2tuYkw9S0oz1DY0d8MK8bOVQBWBaHBYPNM3GZA/r85UxuGdKX3JkImpUIea1IoU246bLg3shWSZe9GMSIcl/iFNmvFk4CPQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(4326008)(8936002)(6512007)(6666004)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(66574015)(8676002)(6486002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BwVlAECCSo5xYHMbA9y9xINPIeBz?= =?utf-8?q?Yh/QxhjreIjc6l/2vHI3WPOMT5NCDQPAbT2kq+wsNKr5uSfA5PmiNpt+dAqiJwzJK?= =?utf-8?q?lai1lnUfYuHJK9DHxUVQvFb08iqOrVseC9gbU6oqJ65zLjQtN+R3kfRW6CrMrzqpf?= =?utf-8?q?gDXUl5eB+bki7kK5tc10kqwYD83BGQuQVs6cfQApxI0nSk8YBGJ2MQzMm0WfQ6htB?= =?utf-8?q?C2T5GipiDpSTS7IQWRF0oMmzvMg1WIFIAhRGIoBREdKTl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IpdqaLF5djly/b2V485s64a15Rh?= =?utf-8?q?wfuALM6Ni6RUkanra+JYn6y+/OiyYSHvN6cJQsGftjKWF6a7zC+5C516D7L7yeE2/?= =?utf-8?q?5UaMPYdnRqKwURk4uw31bl1NSGwv7HGL8t6ORkXAR5Ip8IKF+cVlV0KWhSrVOxeWL?= =?utf-8?q?trezRMuCgZKoaRnodk3/IoX+F1gaRgXyaFs955GsjL/j7rkXcLUBIjKZrWGk+wwSI?= =?utf-8?q?aBmESEmmgvmaujiL60xgdhdkQXD5vwurnSX98XNj9VlhHF8YMOL2kN7XoAsERcznv?= =?utf-8?q?Rzif2yhRiSP3ZAaZBpdGwkk3JTWMOjPqXJNwTcZJllEklDY/TUmpVQtH51udw2rOC?= =?utf-8?q?Dy1+exus1lH8HW1n0qrSODkJLc+jtOUJ8w2AKFA1TNXK0JnwlS43JFlEXteKdGKSV?= =?utf-8?q?nuolBBo/YVgh+jtnT2ykqHz5EvHR5DtIHinqNTaHtcUolpWljzIL4oLs+ePobJvVe?= =?utf-8?q?AMVWRC/XlcT/SxKcQc3HlFi/2jM5z8QauHP5JVFSXol8mIK0FUNCdI=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 669b5183-06d1-467a-f444-08d9d6727ce2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:55:46.1843 (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: shKO/srK8sUwrPO1b/pYdtesqHF61Jj6mN/sF88OmuDmBIeBf16XGOvkSgVJ0Nb2wlgWS4kt31WKjxEju6TPow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Using DMA with stack allocated buffers is not supported, whatever the value of CONFIG_VMAP_STACK. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hwio.c | 12 ------------ drivers/staging/wfx/hwio.h | 4 ++++ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index 30eb888830d2..393bcb1e2f4e 100644 --- a/drivers/staging/wfx/hwio.c +++ b/drivers/staging/wfx/hwio.c @@ -14,18 +14,6 @@ #include "bus.h" #include "traces.h" -/* - * Internal helpers. - * - * About CONFIG_VMAP_STACK: - * When CONFIG_VMAP_STACK is enabled, it is not possible to run DMA on stack - * allocated data. Functions below that work with registers (aka functions - * ending with "32") automatically reallocate buffers with kmalloc. However, - * functions that work with arbitrary length buffers let's caller to handle - * memory location. In doubt, enable CONFIG_DEBUG_SG to detect badly located - * buffer. - */ - static int read32(struct wfx_dev *wdev, int reg, u32 *val) { int ret; diff --git a/drivers/staging/wfx/hwio.h b/drivers/staging/wfx/hwio.h index ff09575dd1af..d34baae47017 100644 --- a/drivers/staging/wfx/hwio.h +++ b/drivers/staging/wfx/hwio.h @@ -12,6 +12,10 @@ struct wfx_dev; +/* Caution: in the functions below, 'buf' will used with a DMA. So, it must be + * kmalloc'd (do not use stack allocated buffers). In doubt, enable + * CONFIG_DEBUG_SG to detect badly located buffer. + */ int wfx_data_read(struct wfx_dev *wdev, void *buf, size_t buf_len); int wfx_data_write(struct wfx_dev *wdev, const void *buf, size_t buf_len);