From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=148.163.150.75 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796218054; b=3nQ5fFbKg80ivK46EwKrp/NyyQo2xx5p+blNP2QBMUHE+lCxJnlTUG2mtzFBIXpm7jp5 zXJMS/5W+1BdoNHM3jIhs+S/JjftJBSaxZDjeoJWjupYEbrea1QCz2DSdyvDvXEqrOXNm fefr+OqOPXpTTFDoJWrWTMarwAsbcpwrUVGk9F5zsqlKi0yOd19EKX8I+f9sbcaZserTi o0+G6JWIyncHrDMrKHDfIUdnR19EvXWbOEewmg/6Z07qebvfseHXNERE7B03Dt1ZPNFT8 SLBV+6Oim4hIPoxKKsT5nABysPpnqckCZQiFBjRQ3O4Jg/gz5S2BQyiFY0qk9AMWGig== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796218054; h=DMARC-Filter:Received:DKIM-Signature:Received:DKIM-Signature: Received:Received:X-MS-Exchange-Authentication-Results:Received-SPF: Received:Received:Received:Received:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:CC:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-Exchange-RoutingPolicyChecked: X-OriginatorOrg:X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped: X-Proofpoint-Spam-Info:X-Authority-Analysis:X-Proofpoint-GUID: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-ORIG-GUID: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=h5d+Tasu1vYlTH/VeXo2d7sW05GRnQft40i/jL/iw0w=; b=s89p93iCxexSI+v6GTHz24Ruc0FGzvYLfKlpGD+wuWH3Bq/yJp80kk+qt4TQFvdhArb8 ISD1veCc0tVLmZJ8B/EVZBdtueytyqB4phlhBmDoErPoNYOrJK0sOx5TLOKA4fTNeiX4r 9MFRwQAnoluQUZ0RQNZh18bYy9HvFv6zVCvnwKUNVchoAFSXgAFbvtoP3cgBFrgHwtxAj eBtpimHuUMnHp9yK52YSWpsGEmXWQWve1Hn1jILHvwZ6+yh5iQkrYAcBz99Rxef3cnqIq shHXPuYWZ0qQ4b8AsZ1qWEW6KDgorz1ilCVIyXbiJBhrXwhqPSfvXNoSQJFNbq7PMgQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=proofpoint-05-2026 header.b=Prmq2EDH; dkim=pass header.d=ticloud.onmicrosoft.com header.i=@ticloud.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-ticloud-onmicrosoft-com header.b=mKUXMD60; arc=pass header.oldest-pass=0 smtp.remote-ip=148.163.150.75 Received: from mx0a-0002e601.pphosted.com (mx0a-0002e601.pphosted.com [148.163.150.75]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98F18606A322 for ; Wed, 2 Dec 2026 13:27:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 98F18606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=proofpoint-05-2026 header.b=Prmq2EDH; dkim=pass (1024-bit key) header.d=ticloud.onmicrosoft.com header.i=@ticloud.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-ticloud-onmicrosoft-com header.b=mKUXMD60 Received: from pps.filterd (m0384305.ppops.net [127.0.0.1]) by m0384305.ppops.net (8.18.1.11/8.18.1.11) with ESMTP id 6B2AdVU01947782; Wed, 2 Dec 2026 07:27:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= proofpoint-05-2026; bh=h5d+Tasu1vYlTH/VeXo2d7sW05GRnQft40i/jL/iw 0w=; b=Prmq2EDHOIaB7wIFmZeNqkTZH1x7YASASvFxdbx2XLXzHCxsDQVcUQj94 5f8amRUhhhJGDDOUYdKp+HyjCFCFLpnwsrmKzviIHHWctwj0GECmYEHKVJjBupWu kb2xg93knpDxruqrRTbtDVSejLjjwoeVvSm9LN/Dj7vDU7YzhRijef0xGOaQTh2h uqmBkXaczJrV67IEtwDqrH2/MnLAJZQXeRGel+ZSi3i7ZAMjUj9OC4tG2IKIVH5H aSFUbVlEtmldVF3MFRa5aAZe4THQIKh1c9l568aZK38Q109Oc8z6dZ7/odz9WEwN LvUNEerqbjpsB5syRRZFx2h7mX6MQ== Received: from ph7pr06cu001.outbound.protection.outlook.com (mail-westus3azon11010026.outbound.protection.outlook.com [52.101.201.26]) by m0384305.ppops.net (PPS) with ESMTPS id 4jac6gajkc-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 02 Dec 2026 07:27:17 -0600 (CST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HersHs/w+AVOo/FBw+kIcnfS9QolrOCtLTuMFFIMbb3DlnggIgMDin+XXJkTx7TUyP7uRjNUPxZkd/PAtxhOL4sp2LB6/C8LMvYF1LY/9JnW9mjsqndOd2MXpBjIlaXUYXwdj4xHnPOODWHaK2Kxk4g9QRezcXyrjQOo5AJKr80q52XVDZyoM1ukplfDFOdhWgU3bv59qD0wE2RvVtsekOueuWy1m5WbiqPB7URRCEheiG9+lwm1AYK7KihVNxGrY4I+dwYWslbGtg3lyBJ0/ab/pew2RvAVvAj7ek9gd4X9AjeE8LXZd+54znysoH9lKMQyBDxzBNCQcdrBbZ5zbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=h5d+Tasu1vYlTH/VeXo2d7sW05GRnQft40i/jL/iw0w=; b=oqg6GV91+GqFUuWeDivsIvhijWJDux53m+pWUYQv8Pvx6PlxLtpchISx4/ic1I73Pt1IUcQeM5fBoXGSrwW22tsHMYo/2CbSgYImeaBEiT50h/+IyOToaT+GhjU4SHMAfFDpCUrGjCdTyjnTf9OyOYukTC+buusa6BImpkZLr3Byri6+pipDCcHsPQ5nDScOcw/h3+Bqeo2RVvKYwAVF33iZwwt9KCYRi4YSDDlbWEB6MSTFYydS9yx2F6Hf6YOmhJgKPpctBnsCANY0LRuUs/9UJWm6tQxV/JrAPtKpiRgcoTj4fiY67KDJi0vQEZs7xrfuF3ETOCeuUxosId03Cw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.194) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ticloud.onmicrosoft.com; s=selector1-ticloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h5d+Tasu1vYlTH/VeXo2d7sW05GRnQft40i/jL/iw0w=; b=mKUXMD6071+8Dh/kHSC1vRJ+9Npbs1/beJ72YrbQ26J6I+FVH9cUM91gqVZtWxYgj2MNDP20KWr1NH6qCn8LDCl+TCyGQIhjbh6z9DuehTyHZN448/PgOlZXgEzvq9L768zSpUl9S90TKcUkoDg9saWf1LKM+YtXzgSZZQTwCC0= Received: from BN9P223CA0028.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::33) by DS4PR10MB781286.namprd10.prod.outlook.com (2603:10b6:8:506::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.11; Wed, 2 Dec 2026 13:27:15 +0000 Received: from BN7PEPF000000A2.namprd04.prod.outlook.com (2603:10b6:408:10b:cafe::af) by BN9P223CA0028.outlook.office365.com (2603:10b6:408:10b::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.11 via Frontend Transport; Wed, 2 Dec 2026 13:27:14 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 198.47.21.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.194; helo=flwvzet200.ext.ti.com; pr=C Received: from flwvzet200.ext.ti.com (198.47.21.194) by BN7PEPF000000A2.mail.protection.outlook.com (10.167.248.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Wed, 2 Dec 2026 13:27:12 +0000 Received: from DFLE213.ent.ti.com (10.64.6.71) by flwvzet200.ext.ti.com (10.248.192.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Wed, 2 Dec 2026 07:26:35 -0600 Received: from DFLE200.ent.ti.com (10.64.6.58) by DFLE213.ent.ti.com (10.64.6.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Wed, 2 Dec 2026 07:26:34 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE200.ent.ti.com (10.64.6.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45 via Frontend Transport; Wed, 2 Dec 2026 07:26:34 -0600 Received: from [10.24.50.209] (uda0490799.dhcp.ti.com [10.24.50.209]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 6B2DQVbU529903; Wed, 2 Dec 2026 07:26:32 -0600 Message-ID: <589b512c-e2a3-479a-8f8a-079809feb7fd@ti.com> Date: Wed, 2 Dec 2026 18:56:30 +0530 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 09/22] firmware: ti_sci: Fetch info struct from handle inside ti_sci_do_xfer() To: Beleswar Padhi , , , , , , CC: , , Praneeth Bajjuri References: <20261029181147.266771-1-b-padhi@ti.com> <20261029181147.266771-10-b-padhi@ti.com> Content-Language: en-US From: Sebin Francis In-Reply-To: <20261029181147.266771-10-b-padhi@ti.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN7PEPF000000A2:EE_|DS4PR10MB781286:EE_ X-MS-Office365-Filtering-Correlation-Id: f9429fda-ec7f-4c4e-740d-08df5077f94c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|36860700016|1800799024|23010399003|4143699003|6133799003|261009223027099003|13003099007|18002099003|22082099003|56012099006|10067099003|261021123027099003|261022105027099003|261021121427099003|261102123227099003|261028144727099003|261026121527099003|261026140227099003; X-Microsoft-Antispam-Message-Info: eC0nAjQsvaNwDQvCYvWXAX7t9FHbYlQ43OYrrwoeLekfDsIJtBvMR1JsgXFn0RQs9rivA+8I7RIGM83mJsrFK1mO36xCZHvJmDdvVa/Ajve/z8urCBHc1ruT/BoYVF497tcm1Iz27+D5o9LC/xwysTOAFEJc8Vhg4nVyfY9TfiD5JBAhjIBcw+yxW4RkuawbBtt0MV9+s2GCxl2F+kVlX2opc4nqxTfb8FOjw61jbUxmq9byFaDJiGRQAfmOr7Gp6U7P3aD8MR4SbPK+lv3lyE/zjGZAz6x2BOEunaGoIgK1H47XhCubM6XhBNuzhY2psm5xvvzY2SB+E9d3sQ9O6PQk7CDOyDWWWgA/IkpJeuRaJYsXO52Qmz7EDm3LFWrz8cWTVwX+UCG5D57DUPb8YNQlxwFYdtVM+F2NZxDmJHWK7PVGTUHvD9BtrRZpyoLmgh2dQh83p76rfz1KS+vBDGx2QsX9hf6wfkifCpJTQJJLYUNp9HTCao7tKSi4s4AusRyHJZsBWLdQHRhxJNFQwUzI1VEFlwDjFkWqSWvI1T4GNcYCXJZUw/tjCRNS53wbmUB+PAsnSIkL5OdT/VtLMQpd1k9+y/yhsBI953YJuoKApSCfVLImDT+22lV90rs8infxWn3RoRWoT1+YzbqbrTKCGa26NAL6dbzR4f4ZK3c= X-Forefront-Antispam-Report: CIP:198.47.21.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet200.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(376014)(82310400026)(36860700016)(1800799024)(23010399003)(4143699003)(6133799003)(261009223027099003)(13003099007)(18002099003)(22082099003)(56012099006)(10067099003)(261021123027099003)(261022105027099003)(261021121427099003)(261102123227099003)(261028144727099003)(261026121527099003)(261026140227099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: L8gtYoT543NZHQQdr2+stEBnFDSuokUJaFR05dLAxnG+3C/0fFcYedXCEUsy/EZp5M5PwIirSNPm5n2HXD1S4HvwNBBxcrm3WODUFSuZ0xT0ByPiOlU4Or/FLuBuhsjCWMTa3u6rpnkQRvP6SvWEQsv0CzmVaR3wkJktEBZEIMLbzk9N09Mvw6c50MSX2fCpypRPWOxt/+7JOqJ6Ol42lz4V25xioj0hfj/8QLPV+VXGpKVmr5x17XxF/iN5oP0pI4p5ENk5kHughoNDyPiRtv7QQH1dDePVCjgfnFsui6bWrNRnV+5FEZckxnaJlkGXiRE4NMxhVcVqrD7G6AsMb4M7DxFwR1a7Rv67tWcpGx/gUEHr7kQXu1HXKHbDswxTiuy8batLhYaskOkIU9ZywBHtcNNAU+EdavUG/CjUURnFHrpCIk88bXhSC8/ipEIT X-Exchange-RoutingPolicyChecked: Ypgnz+merYcX3qn6zbp7Tpo1e2v82mboV4DLGKjQHRwlTzlygD/OITHW13fDmXxVy6Us+EQFgf5vRh1+i8iIvXI2I/7lZMAtR7Sc3cAvm9P0XQd9dRp1VeM6mHs4JbhQ/9OSb8CSHZO6V17y067+9pT/EnCr4qD1G8zroqM7klcePq/QLUwI0MiYflv8WodT+tYnhHPuZktMVnztCege0b0eYxJMISP4rqr3zZuTdsfpxtiKg/fA/Uw3p2HDM9pE71ieEy+0UPn1VsGSgXEt8ORFrs5tBER9WwQyw8QAljCX7RTrCx5nEhvrfZil9bsrosuAz7bampT8wEwzYFRtQw== X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2026 13:27:12.2650 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9429fda-ec7f-4c4e-740d-08df5077f94c X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.194];Helo=[flwvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BN7PEPF000000A2.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS4PR10MB781286 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDA1MyBTYWx0ZWRfXzDHLAjZpsTKZ zqFNuiGl7WIBd9lUXhHR2j+qnwTQ1gtpB+ek027tj2JtaVXmgkFvYhmZ0ANT5a38zT0+P3jSSiA moKTcGvmJeGewjoma9PCxspC+tYD4Q0= X-Authority-Analysis: v=2.4 cv=OvzaWC/t c=1 sm=1 tr=0 ts=6b101cb5 cx=c_pps a=gGJMzdQzTGqo7mlPwwqfqg==:117 a=iwqwCZQqcuTv3JOpYdM7/Q==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=AlMIdn_sM9wA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Z8NIEmU8O1QQgoT56wFK:22 a=taLDd7a_hP9WKsMzeGRc:22 a=VwQbUJbxAAAA:8 a=sozttTNsAAAA:8 a=5tDJ0hyG6dzvPxzLl7IA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-GUID: dbN06YJo0rzQVjrGmyNQLMe05QF8fVjy X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDA1MyBTYWx0ZWRfX93xzPVr9g5L3 tbnz4Re7nkGio6clTKhhTkIET22ba6mGS4s1YECTJ+Jssb69LnLsFr4P2dhcP5qLDqPuv65GYbH c7mDrWpM5m1u+OpsTMya+eSchraMZdOnlBZhM0wlDoYgb0MlCVMzN3ap9zSZUd+mShriDn7eATE reFTp/AWKqJMEGcQpnytuKQ047Nv605YYnTUSeDZ87rn+KDaswi1/a/lFy9DIVw0nkTPU3mSp58 ECacq1B66uev02HVMnuuSkNyTx+3DKFUnXc00QYQng3htTEyScfr+fil4U03dbfDlwgryA94udc Ibee9RlIj146SkSf2reU51UfPZUNZRKMaHqFnX9/uDNjfDPpfI1kzVpOw7YUaiiBLg9AUZcjPBc /wZ/DGtlpyGKzMcCS0ISJfRb+5PuLTL34AwpdzhhRdipIZCbFsdHsq46MQN2obErQ1efW7PMzYv x03mimAcoNymuA3J8vA== X-Proofpoint-ORIG-GUID: dbN06YJo0rzQVjrGmyNQLMe05QF8fVjy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-02_02,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020053 Hi Beleswar, On 29/10/26 23:41, Beleswar Padhi wrote: > From: Andrew Davis > > As the only use for the handle is to fetch the info struct, which is only > used by the ti_sci_do_xfer() function, move the info struct retrieval > into that function. This also allows us to move the handle validity check > inside also, saving us from needing to do this at each message function. > > Signed-off-by: Andrew Davis > Co-developed-by: Beleswar Padhi > Signed-off-by: Beleswar Padhi > --- > v3: Changelog: > 1. None to this patch. > > Link to v2: > https://lore.kernel.org/all/20260930160607.2674980-10-b-padhi@ti.com/ > > v2: Changelog: > 1. None to this patch. > > Link to v1: > https://lore.kernel.org/all/20260929201746.4078803-10-b-padhi@ti.com/ > > drivers/firmware/ti_sci.c | 306 ++++++++------------------------------ > 1 file changed, 60 insertions(+), 246 deletions(-) > > diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c > index 6d0ecb77d731e..dbe192142bf17 100644 > --- a/drivers/firmware/ti_sci.c > +++ b/drivers/firmware/ti_sci.c > @@ -435,7 +435,7 @@ static inline bool ti_sci_is_response_ack(void *r) > > /** > * ti_sci_do_xfer() - Do one transfer > - * @info: Pointer to SCI entity information > + * @handle: Pointer to TI SCI handle > * @msg_type: Message type > * @msg_flags: Flag to set for the message > * @tx_message: transmit message storage location > @@ -443,23 +443,26 @@ static inline bool ti_sci_is_response_ack(void *r) > * @rx_message: receive message storage location > * @rx_message_size: receive message size > * > - * Return: -ETIMEDOUT in case of no response, or > + * Return: -EINVAL if @handle is NULL, or > + * PTR_ERR(@handle) if @handle is an error pointer, or > + * -ETIMEDOUT in case of no response, or > * -ENODEV in case of a NACK response, or > * corresponding error if xfer allocation fails, or > * corresponding error if transmit fails, or > * return 0, if all goes well. > */ > -static inline int ti_sci_do_xfer(struct ti_sci_info *info, > +static inline int ti_sci_do_xfer(const struct ti_sci_handle *handle, > u16 msg_type, u32 msg_flags, > void *tx_message, size_t tx_message_size, > void *rx_message, size_t rx_message_size) > { > + struct ti_sci_info *info; > struct ti_sci_xfer *xfer; > bool response_expected = !!(msg_flags & (TI_SCI_FLAG_REQ_ACK_ON_PROCESSED | > TI_SCI_FLAG_REQ_ACK_ON_RECEIVED)); > int ret; > int timeout; > - struct device *dev = info->dev; > + struct device *dev; > bool done_state = true; > void *caller; > > @@ -470,6 +473,14 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *info, > */ > caller = (void *)_RET_IP_; > > + if (IS_ERR(handle)) > + return PTR_ERR(handle); > + if (!handle) > + return -EINVAL; > + > + info = handle_to_ti_sci_info(handle); > + dev = info->dev; > + > xfer = ti_sci_get_one_xfer(info, msg_type, msg_flags, > tx_message, tx_message_size, > rx_message, rx_message_size, caller); > @@ -551,7 +562,7 @@ static int ti_sci_cmd_get_revision(struct ti_sci_info *info) > struct ti_sci_msg_resp_version resp; > int ret; > > - ret = ti_sci_do_xfer(info, TI_SCI_MSG_VERSION, > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_VERSION, > TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > &req, sizeof(req), > &resp, sizeof(resp)); > @@ -579,22 +590,14 @@ static int ti_sci_cmd_get_revision(struct ti_sci_info *info) > static int ti_sci_set_device_state(const struct ti_sci_handle *handle, > u32 id, u32 flags, u8 state) > { > - struct ti_sci_info *info; > struct ti_sci_msg_req_set_device_state req; > struct ti_sci_msg_hdr resp; > int ret = 0; > > - if (IS_ERR(handle)) > - return PTR_ERR(handle); > - if (!handle) > - return -EINVAL; > - > - info = handle_to_ti_sci_info(handle); > - Minor As we are removing the if checkes, there is a simple if that can be removed in most of the functions, but if this is kept for consistency, then we can keep it ``` if (ret) return ret; return 0; ``` Sebin ---