From patchwork Wed Jul 24 15:45:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13741127 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 282CBC3DA63 for ; Wed, 24 Jul 2024 15:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6bp/tQqlBOp7EXkQkdMksXeso+Qnl4xw3VX1tOEdRxU=; b=TnwvyIxxpI2rlY/+FeJpLzPOgT kHMjDAHmRLWZ96UI2p+RVqDptAMX7SJHwtmbHnBvUGpeFjSGO5H6oeHPF2n2T2GdlLT0bAq7LCOge uRvng3MnSGHSHGUzm0abq52KSFtiaOhyi+gL4mnRl8DyjPXAIIzDbEh69dAYJDyndh/02W8mA3wBd oewoYl4KjBsI+g06zdc7ORz+RNGQMKRyu0exb7vSrhziJK4nEL/eGLmccBvXMdN8rFu6NUYD7cDLv dBRGP4XY8mrfR0UQSPmeGPZ6jUZyklvxDHmZpPumnaOpsHfIa0Fk6ud8eUgViggOJE0DbUefU5ByM rSxG0jow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWeCG-0000000Fp0n-3bYp; Wed, 24 Jul 2024 15:46:32 +0000 Received: from mail-am7eur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260e::601] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWeCD-0000000Foyc-3uaO for linux-i3c@lists.infradead.org; Wed, 24 Jul 2024 15:46:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BE3/41bCQMojSs2o5XfAeVyC3ky0SQbfnvgkVSsZWfFhHJmj9qZLb55Sv3STgHHKERVLafAzhmt82q6AIW8euhFGRokN45VQR7KqE0zxdlXwU2WLbOMV5yxigzkQnUtfVwwLu1W0vPPiL/gu9wO9nK+aXACwV+3Y6PtZqU5kD2GHYmKASps/mb18NsK327YTVsIMJpxu5YUEQWc9ucq0LJCu1yXS0KJknGpz3xwGVtNuw/G2ipBEN2jD06newICeqMNf7vYtdaqByNbdTkQDJAudhyY0xkLPk8H4e87lpwxaCIj5BjIekb08WZMgTER2xX8GM7W+8Hqf4jZRc5cftg== 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=PZHzogEyoKA0FrCgQ8jcF7EjjYfhLpLTAtbn8jWUYd0=; b=OlyQ/+7T93lo0ecrPGaYKB/IdR5kO7VG1S30vy8g9mOjjX24jZAP5N1/3nJTRi400xWJRGu+XlyXQ0QDtkqiob52z4Rj4kvwyRYM9Jt2j9sUCDu4AWSKm8Ftv0vxG0vkQOEsqFUD2eKP24iAC2hlUaXh2DWHWuUiG2LqCLKak3oVQaODvMZdZGkujrNW9mtEksCzmmRlA59YgS6wb/lup/2yiijE2f6eo9zlZmNnj1fgpf5Hor7FgM65AnUL95mfGkVVsdsxUCjuRSMekXaDHhYUc7THglAtuFZpLzWwk19FQSal+qkeCcglp9mOhD3esKEHc3DwuoNxOdsue8jgcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PZHzogEyoKA0FrCgQ8jcF7EjjYfhLpLTAtbn8jWUYd0=; b=nP0cI2DglCsZMvDyldJ+TfBzlVyfz2Y+XpiORwfQrzy7pPgeBXDKhFJ7GR5t+0LMe1dHASWEjyrxcpuBtw655OlR9Oz514WGj7hTmTYiy8Yab49WKQVS/kRRlqggOZ4Oz0LkQDbd/+4mWesfnOra1hFuKc65hoV/kNwen18T+aaGEzal2q2F9VrDZy0XkXYeiGnJN2F9AFdB+Tr6U2asurwAPOA+hvvKoiqUqCnhopzWlYS6NZbDcayq5NbSSP3N0vvSO8A7EmHD77PBOZKVi0V6fqsoTAPKD1Jy7DH3m4W+xqHfKqkD/oFFvSS+vut6/6yDCzcusobtAWqobSPqJg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS8PR04MB8963.eurprd04.prod.outlook.com (2603:10a6:20b:42e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Wed, 24 Jul 2024 15:46:21 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%5]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 15:46:21 +0000 From: Frank Li Date: Wed, 24 Jul 2024 11:45:50 -0400 Subject: [PATCH 5/7] i3c: master: Fix miss free init_dyn_addr at i3c_master_put_i3c_addrs() Message-Id: <20240724-i3c_fix-v1-5-bfa500b023d6@nxp.com> References: <20240724-i3c_fix-v1-0-bfa500b023d6@nxp.com> In-Reply-To: <20240724-i3c_fix-v1-0-bfa500b023d6@nxp.com> To: Alexandre Belloni , Boris Brezillon , Parshuram Thombare , Greg Kroah-Hartman , Boris Brezillon , Arnd Bergmann , Miquel Raynal , Conor Culhane Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, Frank Li , stable@kernel.org X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1721835962; l=1049; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=EgTA/bzPVGwsyEemXX3hWkQUEBTDZOU6gFrO4erNl9A=; b=0UuauI2+/BTetwObzpVZ+YmX7TCq/xYlCGHfHnPIu8OVeBh3FhdtPHT242b84hOpHYMFpmh+i vLeIEA3LZIlB+2HaUC9OWqBX7RUYV7fAywjzPdEUccBjPD9eqJIG6oW X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR17CA0008.namprd17.prod.outlook.com (2603:10b6:a03:1b8::21) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS8PR04MB8963:EE_ X-MS-Office365-Filtering-Correlation-Id: cb70048c-8e9e-49ec-dd28-08dcabf7c3e7 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info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9y5dvpCq/LWyV5jxf2w8wKx1iaKDZzE44AL?= =?utf-8?q?aujJYKDFwA1hsaSTUFAKsWqIyRQnuLjo374virMT/m0sWAcapbenWYiNnJS1h1xBH?= =?utf-8?q?xFJ9paL9kqmlCOHzANiCzN0bXS78DBTa79F09CosrzYhbjaqshhltop6F0NkszXmv?= =?utf-8?q?dTuonvGuXPOU4NIkGW6C2E5QRVCWMtqGBU1iCkcaTIisaBC+3mHsS/4uqa7JRXUAl?= =?utf-8?q?Jwme2wbrnL9i7PvmrKq0mWPFvtgDD+ugnZU/RIWM8JgdIpHnO/nbXGZBmFjJhO2+3?= =?utf-8?q?NSm0Jl9FfH2Ir5vGYi8labAOA9dLgkXMMHWN5d9EhFtN9/sellCPPJRc95TmjcTvE?= =?utf-8?q?4muz9XcPUJGKQQQmAVIQz0mL1QZSF8t18Vz+T+ta00RgcW0ty0AxSSt0gH7R6/1I8?= =?utf-8?q?GTrF9IV0D9WZJ8AijlZux6I21s/fKM01rqC6/UxqNCiP7Pk4fttB6WEUQDwpTwM9X?= =?utf-8?q?++FlQjkyiYB59qAwuVlAOWVKhTE5ObpvYw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?NWcmQCot/BP4NZzLygHvgOoKR6+u?= =?utf-8?q?+IexaP//VnBr/zco1HFDg15rowsy82MS3Q6AtGIu8uAxLpabI5v4bGDWdfYDhRuSC?= =?utf-8?q?oPXxWbfq/SyBhMM7u7QJFjaM7awoJ2aoU0DAoLPtkZ0pCf2kP42bwm8Mnes23BA1A?= =?utf-8?q?Yrg3emIlE9c0hK6DKNzZyWUf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d8hcVDqjdMxbhZKLDgCyrH0O+RFcNrKAB5ENR4D8Zb/3WTQyHz5ziVWuJTTw?= =?utf-8?q?4WIGq87aeqxooZqFyeVW3+eCFdBDpYzOOQ2ASrLToTELm6Zxnd2BF0DhdFarEb8Jz?= =?utf-8?q?eUaRJQWbt3vJSYJU19tVwcDmf+4nfDaq1nDzKkVA7wgUnHn2Fm+0VA5JMRjZcNffT?= =?utf-8?q?fVoEBSdSSqZ+M/OkBVU+EhHDI22hf4qMtsozy6VSVw8sOiIqqzYZjBqppuh9sueJi?= =?utf-8?q?F3Fz6zHLpmeGOkOxQIHRT4vNi3RbvWxLWa7PRno7sf3MBedmBdDfU39qsbfC9Uchl?= =?utf-8?q?HY6Rpawqab+QRHBIZnIfAuNp/rBWyhzVYCgm0GvTpbux+c7aG4KTz8KmJ4lfAQSA5?= =?utf-8?q?Cfgm3riSZP1VijPqeHecJu5dbiD5P14mBLQ+e+fgQ23C3omsiYzCXFumafgQBc6oF?= =?utf-8?q?eYHAVBiF0tWctS8l5Et2IskH8opBtGxRYrDnWCPRqtjau/9znsWSq+OU5c6R56hho?= =?utf-8?q?0JdNRnAqa7Yl?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb70048c-8e9e-49ec-dd28-08dcabf7c3e7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 15:46:21.2572 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ufVv8VsajwIux79ul1PIpFHgNT70+KtFipUDY5L7KXp09hR4etcxqFI+OMBVGBu65+8ghUA1KDfhqTmOIDaCZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8963 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240724_084630_007377_FDB832EA X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org if (dev->boardinfo && dev->boardinfo->init_dyn_addr) ^^^ here check "init_dyn_addr" i3c_bus_set_addr_slot_status(&master->bus, dev->info.dyn_addr, ...) ^^^^ free "dyn_addr" Fix typo "dyn_addr" by replacing it with "init_dyn_addr". Cc: stable@kernel.org Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") Signed-off-by: Frank Li --- drivers/i3c/master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index c8eaeada54781..65642e5afdcfb 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1442,7 +1442,7 @@ static void i3c_master_put_i3c_addrs(struct i3c_dev_desc *dev) I3C_ADDR_SLOT_FREE); if (dev->boardinfo && dev->boardinfo->init_dyn_addr) - i3c_bus_set_addr_slot_status(&master->bus, dev->info.dyn_addr, + i3c_bus_set_addr_slot_status(&master->bus, dev->boardinfo->init_dyn_addr, I3C_ADDR_SLOT_FREE); }