Message ID | 20231207-tps6598x_update-v2-3-f3cfcde6d890@wolfvision.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8671523dys; Thu, 14 Dec 2023 08:29:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8bJ8XPy9NYfu3oDa/YDW5Qku9nbqjfOdsOorC50cr0/ai5UpvKmsgJNT3eSUvXlQOQTVx X-Received: by 2002:a92:b70d:0:b0:35f:7b5c:1049 with SMTP id k13-20020a92b70d000000b0035f7b5c1049mr1655376ili.121.1702571375752; Thu, 14 Dec 2023 08:29:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702571375; cv=pass; d=google.com; s=arc-20160816; b=Jpao5iBt/eQkdAQsfHvVh3amO1RRYjdazjj2tp77vHaJB0Ql0ky4o07a3ZdQy3XJ3H O0qrUze7ji0931l6l9QQ3+KXMgKTeQT8Kt8DPdDDVgXRfBFKYNTRlnpYhLIxHyuNWdG6 OjPnGfqUffeYsX9aB/dOTylElZWGO63sEEfeDrzmkh0AMir7UPMeapFYWh5AwvoQLO87 4HOKT8vqtNNwZQQkU1jJKugNPK7zMLM22eGjHtz4nOI+B6+N/sYupzcbFGM2GBmdTB6s QI2DvHym8AczWdiTjkE+iEGtF8D1Nh39U0clVZ479v4zemTdp7BLy5bHVRWCSC7oHDVL tswA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:cc:to:in-reply-to:references :message-id:content-transfer-encoding:subject:date:from :dkim-signature; bh=9Nbp7KXbUxxTU41IvOZEP4Y+wSOIC/dVuJsy2ah9s2E=; fh=skg4aWcIne/NkBvGBSxiPFt6u1LkY77F5jj9Umi9ZmE=; b=cy9Rza1k0c/N/DhdoRf2tKMl7t/Zn0XDpNpz3zEM7Uq0uhDaZOwzVtAZ/l+wppwBns 3f4gUil4ye3anwsaqsE72V56FeIhXM1hPdDyxRW2gQcD5BPLSFdO8K8M5+SJ5Js53vf0 bN//cgAacuwRzzPs6ty7FNO+6H0F5xfHRdatjOivB53K+/61oBqX+CVr9+V71TjGzEXe JWR259T7KPVAsRkbdG3BA8wRjgPLj+Bnya1GrYAcP7JAKgsx272NDLRZeqiFAPcOlR7j PrcGckNlroZhJqyJ3IT6pNN2YXDSZBvGj8qAos5XwdDlpTImhMyiPzAgcOk2Lb6cRPUR Gx0Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=JnHWoiou; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v29-20020a63481d000000b005bde6fae09asi11117851pga.135.2023.12.14.08.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 08:29:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=JnHWoiou; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8745080DF257; Thu, 14 Dec 2023 08:29:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443521AbjLNQ3Y (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Thu, 14 Dec 2023 11:29:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443458AbjLNQ3Q (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Dec 2023 11:29:16 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2082.outbound.protection.outlook.com [40.107.8.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A238711B; Thu, 14 Dec 2023 08:29:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IBxfwrf2kSaIMs1tDY5FPf7vKoF+hStGGxJKfSJuQ+jfvS9DrzRYoiI1Ejsv6lzcT0r50WxTZ7BNGvEDLTSIXPj7fGZgxHnmSQSfnRi5LLonz0neZwnEWr4xe2ZnTf3fFDrOnWab1BTs5+1xtqAxzrbXaecmzKZS9RCcV91WO3TzRhJG1KrgCAUEcFKpBWTsmixvKB9kW9ynQpJRHFkGtAKmjCv+MKIm6yHKabsoAgiDGRJr0HgTwwxbTZjTYp0biBruI1QgVeULGRn5xjn75ak1Nr8zg9bHExcnorR8QXnrayvnKuNpdKl+fE9xSGTyxX4z19O4Y9FHenCVk89ZXQ== 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=9Nbp7KXbUxxTU41IvOZEP4Y+wSOIC/dVuJsy2ah9s2E=; b=mh55u7loVLpSV3fwpXguWeANLhyTQqh4kEmBq4/D1hC2gPEQGYXkwJm2Wq17ccFOTeChE5xWz6OpU5EN+BVbuMsCAoKyDWtlmiZiGadDCriP1nt61MGP1Pl0W/FzjOK8gE7nhZe667270HGA9/dKEs6DwGidD/QpJabXeN46NyRltawUrv7mliPJidJUV3iv9I6Ymaa29dbut3jb99TmDvm+vjQSYrJIBmbGRcUrHDSl/8QZILHIqsNiqfXcal36CSd5kWGkfs8u5mljRzl3OjESmFBe18pfRVaJ7rygIfB0r3Yh2W0GwgW8Ffkq5oqd6Kl3p5e+78JYbrwNbW5uPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9Nbp7KXbUxxTU41IvOZEP4Y+wSOIC/dVuJsy2ah9s2E=; b=JnHWoiou5Mz1J3nn7mkUlKYX4JzWE2NFfbZtSxUBExTeJq34cjwtDj9EH85FnNv9ezPzEZsuc3WPiLF2175Ndm2us7ZNOSNi2XxVyhSdW7lLNRzEQRGEESMYjpSX9hGGOs6ErgMyWllpsQvU7l6DDGGFEHVm4D9ehY4fL5FzfmU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB8302.eurprd08.prod.outlook.com (2603:10a6:10:40e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Thu, 14 Dec 2023 16:29:16 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6b40:1e6f:7c94:71dc]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6b40:1e6f:7c94:71dc%4]) with mapi id 15.20.7091.028; Thu, 14 Dec 2023 16:29:16 +0000 From: Javier Carrasco <javier.carrasco@wolfvision.net> Date: Thu, 14 Dec 2023 17:29:11 +0100 Subject: [PATCH v2 3/4] usb: typec: tipd: declare in_data in as const in exec_cmd functions Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231207-tps6598x_update-v2-3-f3cfcde6d890@wolfvision.net> References: <20231207-tps6598x_update-v2-0-f3cfcde6d890@wolfvision.net> In-Reply-To: <20231207-tps6598x_update-v2-0-f3cfcde6d890@wolfvision.net> To: Heikki Krogerus <heikki.krogerus@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco <javier.carrasco@wolfvision.net> X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1702571354; l=1739; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=G8jD1YMhqm/GwQuFi+8ybk99Xtsx5Enpb51VaGZhocc=; b=ks125/rMHj9MP/oDOQ4RVolGqp+bBk2Gkt+jrvOZVYLyCbSkJHD7Gb3/E0eKr0pn0JiU7q74K v/jlWNtyGo+AR8PYew9gYCxv+K9zuJwMguB2WJ0bHhHoI1TgCZKEQQE X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: VI1P191CA0011.EURP191.PROD.OUTLOOK.COM (2603:10a6:800:1ba::19) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB8302:EE_ X-MS-Office365-Filtering-Correlation-Id: d396dd6f-1995-445e-708a-08dbfcc1d0e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YOkrW8J1in8njbgWfVLXutUWGWql1LPL4gF7a7fcDGDUWOYvuz0Sfjwm2sKG6GwqNQzp98WAbFZ0rT5xr+8uBtc8eGwzKgWBGdYDazhjFJXj4AOaTRS3okZ7V5O4EerYy1t/Vmk96Ef4SE+OrED9W5rjtsZofXXVriYAmjPhoRy+QDeNA+mgkqZEYVFnbVqPoAejc3qrNJ8H6fBg5fRatf9XAunLD2iaGNTjgqbeVDbPHpAei7WcaJIiKlkCnVsjcjMlpEfTFvPhrKi9Mx2RMjk3T00B2Y83DvUyi0g0DuXobTLMrkT0s3KvFooPxBYciscjTHQAJGMR1lLugnK/msLYKI4fJhENJPYin9KGQEDZgSmgGc9o1anoUuOltJq5lntgYHCc1Zf9D3Ax/cmWR0T/O+x//cgX2L9f6iiRFzna7+1qbkBnkrsk1J3mXpFZusi7+N63n4ma72WrJ1kqsetvt+ztl4kzeWYT6ZDjpxqscozIg0S64qfWNJYMNnkefvrgJ/747hPbyHNT3pgG2hTRmQiwjgIEVxK0GSxVvMLKrTezGqR5QZ7/gjWEzhEVwRgf82Q6IDP+UcZmt3fUOsw9uhVJ+16S9aS6XjcZNNVkC6vCzpxdZTMGZE6Ev2UF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(396003)(39850400004)(376002)(366004)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(52116002)(107886003)(2616005)(26005)(6666004)(6512007)(6506007)(66556008)(83380400001)(44832011)(2906002)(5660300002)(41300700001)(6486002)(478600001)(66946007)(8936002)(4326008)(66476007)(316002)(110136005)(8676002)(38350700005)(86362001)(38100700002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?RNjJTsxJR+POr/6/0ME+0vNGBUU+?= =?utf-8?q?qrJlnYsFX3ieM3r6Q7CTtB11eSLdzEWskPK7QFePtzk3O0GXb5XoU7XOIF04PXA7U?= =?utf-8?q?36qPIA2muPbpFxfhYqwl8N18wR/T8aJOBm/PqO6+vZn+z7Z2qIO3KICuBx6yZ0464?= =?utf-8?q?KQcyOkne4YIbFftbdxbYWfBZ9k+L2KZprDb/+VU8ZMnR8hB4YbwKXb8ZF7+G97vnf?= =?utf-8?q?ZThlnRGOChYP0hAgK/M9A6uVkz6ok6NnkjR7bQFAbh2X6KbYW4ooXmIOGSIRlaosR?= =?utf-8?q?aaGkbPRsEOZxmyVxO2nH39kTj9zyYD+TMxPyoFESWBHDHRPd9AUaJ3H6i9zyPtUj8?= =?utf-8?q?ns4JPTgZbSO2gQldCaZI3XlsyNXK3Cce7SWCNsYgwXQGSHLFDtxYSs92De1Abljoj?= =?utf-8?q?5K6fdSWKu/4+YqgtGWqL+YHnxy3xZBa4EFXZNFNoHRBbxY7j6ZNcLCB5t26if0JfE?= =?utf-8?q?6szsOQFFzkltCZPXZ1lExkc56wt69MpLwbzePdXPte7y/b5JX+jZGR8f0XYWoWlPr?= =?utf-8?q?MClm+pq16+W4LOlBO5LMZl7aUWNs7lFeDx+mR5Wb/zA4bpvJiClRx6p6dPLc9fUs+?= =?utf-8?q?ULRk4YwqRnRYX6fWpnHfsLyu4GDOq5pnc+kSFSyFvBX6wI8UVxnSE6LnqiIvCB/rV?= =?utf-8?q?nkm7gw9/CzIVqdpjsPFPpH/YwLTBrXx659kTWRlI5tu/GqFZYd5XxM22imfi7wBMD?= =?utf-8?q?qgYD4lkK3M4lgXV0irMpJiRMat1a6zm6V4HdW4/fTCzhoSDHmbrPROuWl3ywP5ow/?= =?utf-8?q?te8qkneCLYXTwghahIZ70KCOE2KoXxlJfldyzqVwBAeJlvIUjoISsMJew+1AnruVP?= =?utf-8?q?MuqTj8YaT7tVmU+htM4oT2L/UZ0VWVvsm69D7IhlfBBTQyEL/DCe3CoBaPYQGOrux?= =?utf-8?q?Qqc76stPuLxrzbXpJ2oxPb6QWtpJbceFL1mQPav1NM0N6Swmfl+BEjXpz3GoYjKpy?= =?utf-8?q?aHmQ3avrgP5Uz2J6E+1KM7LrhPYv8roMmG6XYMY5RFNHkZAJLRg7hwFgryINrK8Il?= =?utf-8?q?w6Ya7gVZnNClfJtqBknHHLxLM0pabaruG1htZnvTdHnUr6vuHfmpu7vJ998/ScCa+?= =?utf-8?q?zxgvpjT1SH8DelD+FxgEsVRaOksiGRuZpcVc5pbRstwJcIgeDU3wzdn6QwLnOVg7M?= =?utf-8?q?8V6Pwfs4g6ut0usOfwv+FCZpy7hD0AnGIaIs4Zjkel7SpHwV++nY+dCVp09p4hhPm?= =?utf-8?q?MQe1/C5GpNaNSQWRj8bvpDSn2FzsjaYaKns5GS4z/G6V2MHb7ZJx8H9qrR6DnVPvL?= =?utf-8?q?MTiDz99vmF70VgOvF31RKf2wmBwaDjwldm47ZZxkfe8v21XD0wLHB2Df56RipeSO9?= =?utf-8?q?WoVK0+FCGQ36cNVFTnvt17EpeEOcpW4AC+XBn/OzSOmgAMiBlrF+BVTXzGc47j0g1?= =?utf-8?q?sYr6JNo7iSZjZCDRqrSuweEi2htMnANlO7PSn54KK6CMJCuz4QGAVnRNgWF6a47HN?= =?utf-8?q?z3SOWhUp0k/zQ3JfizXcmwS/R4Us+RUs4L6aBqfZD/lbmUGw9naTRA6vZXLxoips0?= =?utf-8?q?wFADzcizdZKh1NapRXMPcY9KEtazBLshhjeJpHXGrjIXEHCZPAGasBo=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: d396dd6f-1995-445e-708a-08dbfcc1d0e3 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 16:29:16.7878 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8gAqaoFCD69lPL89BonTnrsUDM8zLav8QsjB347qJzPG9N8iqnnyZfbF4u+A5y3wW1I9EOMrxufWmj/0QdYF+UwJW6x5Rr5d8yErbvi6dcc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8302 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Dec 2023 08:29:34 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785275483167152315 X-GMAIL-MSGID: 1785275483167152315 |
Series |
usb: typec: tipd: add patch update support for tps6598x
|
|
Commit Message
Javier Carrasco
Dec. 14, 2023, 4:29 p.m. UTC
The input data passed to execute commands with tps6598x_exec_cmd()
is not supposed to be modified by the function. Moreover, this data is
passed to tps6598x_exec_cmd_tmo() and finally to tps6598x_block_write(),
which expects a const pointer.
The current implementation does not produce any bugs, but it discards
const qualifiers from the pointers passed as arguments. This leads to
compile issues if 'discarded-qualifiers' is active and a const pointer
is passed to the function, which is the case if data from a firmware
structure is passed to execute update commands. Adding the const
modifier to in_data prevents such issues and provides code consistency.
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
drivers/usb/typec/tipd/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Thu, Dec 14, 2023 at 05:29:11PM +0100, Javier Carrasco wrote: > The input data passed to execute commands with tps6598x_exec_cmd() > is not supposed to be modified by the function. Moreover, this data is > passed to tps6598x_exec_cmd_tmo() and finally to tps6598x_block_write(), > which expects a const pointer. > > The current implementation does not produce any bugs, but it discards > const qualifiers from the pointers passed as arguments. This leads to > compile issues if 'discarded-qualifiers' is active and a const pointer > is passed to the function, which is the case if data from a firmware > structure is passed to execute update commands. Adding the const > modifier to in_data prevents such issues and provides code consistency. > > Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > --- > drivers/usb/typec/tipd/core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c > index 83e5eeecdf5c..7f4bbc0629b0 100644 > --- a/drivers/usb/typec/tipd/core.c > +++ b/drivers/usb/typec/tipd/core.c > @@ -330,7 +330,7 @@ static void tps6598x_disconnect(struct tps6598x *tps, u32 status) > } > > static int tps6598x_exec_cmd_tmo(struct tps6598x *tps, const char *cmd, > - size_t in_len, u8 *in_data, > + size_t in_len, const u8 *in_data, > size_t out_len, u8 *out_data, > u32 cmd_timeout_ms, u32 res_delay_ms) > { > @@ -396,7 +396,7 @@ static int tps6598x_exec_cmd_tmo(struct tps6598x *tps, const char *cmd, > } > > static int tps6598x_exec_cmd(struct tps6598x *tps, const char *cmd, > - size_t in_len, u8 *in_data, > + size_t in_len, const u8 *in_data, > size_t out_len, u8 *out_data) > { > return tps6598x_exec_cmd_tmo(tps, cmd, in_len, in_data, > > -- > 2.39.2
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 83e5eeecdf5c..7f4bbc0629b0 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -330,7 +330,7 @@ static void tps6598x_disconnect(struct tps6598x *tps, u32 status) } static int tps6598x_exec_cmd_tmo(struct tps6598x *tps, const char *cmd, - size_t in_len, u8 *in_data, + size_t in_len, const u8 *in_data, size_t out_len, u8 *out_data, u32 cmd_timeout_ms, u32 res_delay_ms) { @@ -396,7 +396,7 @@ static int tps6598x_exec_cmd_tmo(struct tps6598x *tps, const char *cmd, } static int tps6598x_exec_cmd(struct tps6598x *tps, const char *cmd, - size_t in_len, u8 *in_data, + size_t in_len, const u8 *in_data, size_t out_len, u8 *out_data) { return tps6598x_exec_cmd_tmo(tps, cmd, in_len, in_data,