From nobody Fri Dec 19 13:25:54 2025 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9680D22A7E4 for ; Sat, 6 Dec 2025 14:54:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765032855; cv=none; b=YT2pg5jfN/ZuggoolY0uFyxoAy5jw0oDm3mb6zdfU0YMwYqfF/83FP6/ix9AJStx0Qlp1p0pd/Z69eZ2TeOc9U/MS2Y2YF3ZKqjMWcZcBcWnrLgOgO3qTj9Hqy+BDZjZWeVlNrkHzkuUaoF5eEFjc7dJT2pswP8TQgh0fGfqi/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765032855; c=relaxed/simple; bh=5D7VXlAUJDO1wgXYpuCdEwFMeC40y8y4aj8DR6xaffA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=t4MutMV3vPQLda4G9cQ5364Txvkd0BiU2SbzYw+F2vUl6a8qofGu0UVXMVfsJRl8gzQ+f+uA/Pkf4kzCbaeW43jC+wRsm7FEFokZZ2sN+ysL09e22GdTAvIAuAN0DWJ4DL/st8BgqyxBqmFDOnvfLypv1OGX1rg97USGeCdpqK0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XGCQJ4Da; arc=none smtp.client-ip=209.85.216.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XGCQJ4Da" Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-3438d4ae152so2851969a91.1 for ; Sat, 06 Dec 2025 06:54:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765032853; x=1765637653; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=M7aGuIkb1zLGBw9QlRp9kXJ0T0y3DEkonULODaHEw7M=; b=XGCQJ4DagFn49dh/5CDnYyV7nPd5ClRV4EIOjO2Gif4WzXMqo4rUDWa2udZMctDNMI 4jWbwd+IehzAre+NCprfl4f/0xqGS1VX6Bnl5bqjlQ4zzgJ7Ch8lYqy7nUDi4JxjcYoB 5CyBBypuGfvLmkRHwYql3Kn8K6fHXE1/dI00zLyEyqIkNIHV+NNtQEDMEBNcTEHrMSr4 EYBBHlGh92oXV6EOWckshx0J7fKGm4YC6SumhlTIdb1hcU0sjZrZRhmrobIeWshcBLGB g/RUJHT+FHi5sbJoDM0u/tRfZINk14uWhtDvwx1u6y8OOsw1J4eJv4YtnqQcmxIR0VVO XPGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765032853; x=1765637653; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=M7aGuIkb1zLGBw9QlRp9kXJ0T0y3DEkonULODaHEw7M=; b=wm/WXbygnZyO2wqgupgnSzDzASxYf8ru6YA2AguG/XMpB/nq34RsnkKoSVOqbL95ik OGpH02B0/+NlE++6gPpJSlcVuSiwq43htKZE4IPoWMKIXIfneAPLVewm69E9t+zutTpV 9q5XA2o4+HH47hpvEjf62dJbi4yUAIVCiaCs6K30xCaIhS1HEeGHRJU8wjtzzChyMg+N 7UhmRu/fsfozEu+Qtu4MPJUSwHdop/e/hLNolLTKCFCW9nj9uGDcoIkYRdktbl6iTITB xwV1BPCQXoHO8TKMzoFd+5aqLBt1pj8o/McHA5ntDQXLw/9U/CKvs0dQEZeOpspHA5pP ch2A== X-Forwarded-Encrypted: i=1; AJvYcCVgwXW4BvvgZRULmyhVHCPxq6SU8Kq995L8w9RviBK1qOOL1WkC8jneB8dkoFI5H+opwZrS+66X3qRwei8=@vger.kernel.org X-Gm-Message-State: AOJu0Yw0S3nI2mPcZB+3gB9dAabBhEKdjqhpQ58bbJNm1yGx8d3F9DY9 nKL6EXKpkko2duIPWPYsnhGG/FVJM+U0dMgWTdGxQ8iZBTpPw6e/kLQ6gxD5T1ke X-Gm-Gg: ASbGnctyO0l9mRwPsTCXUWRSMv/M8XWRyjG9uno9QG2CCG3OcCOEZegZPApVCOQJgPH t/qqFfh9G21UsA3uabAk7n6eP0RrBi0Q6yAmPUC+9fSg1IzSMkR7/99fuXklnQbnRHeFjuGN1Mp Q0g3OXSqRusz4AyGXbmueNnjnj0dDidGp3TP1W5ehK6+pddfS+MHQRbrrKsOaQGq6mELMOBm3Tb pkEdHGZr8Bj/jZN6Su+wAwTKeKmu9Aij6ndKXyo/jYI1uBuPGA94A9BuFupgxFnP3l+2uFIpS0Q 1I2nK/9WkCxXPJpPKDf953AOIeNJhFB6OgPn+PKjso0SB+M/O0KLK6aRXcWKr5AArHFmueVogYv Hdjnjsa3SXBoQgW8BvmdEEcnz6b5dOQBg1BRg0ExTD3M7y2nHI2lFsCA8BpakaMruSJtmeyyWWh CnK5YZI5X8LGEYMhHRvlJSuQ== X-Google-Smtp-Source: AGHT+IHSInWWoI45tN4csnvwQ0FOn+OAE79vWC+/AcpAnlfHWXrmR4GqpXKNuXk8B6Rw/MtSM903XA== X-Received: by 2002:a17:90b:3b44:b0:341:8bda:d0ae with SMTP id 98e67ed59e1d1-349a259a061mr2098951a91.20.1765032852851; Sat, 06 Dec 2025 06:54:12 -0800 (PST) Received: from gmail.com ([49.37.171.188]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7e801c6a1fcsm3452695b3a.4.2025.12.06.06.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Dec 2025 06:54:12 -0800 (PST) From: hariconscious@gmail.com To: oder_chiou@realtek.com, lgirdwood@gmail.com, broonie@kernel.org Cc: perex@perex.cz, tiwai@suse.com, khalid@kernel.org, shuah@kernel.org, david.hunter.linux@gmail.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, HariKrishna Sagala Subject: [PATCH RESEND] ASoC: codec: rt274: Use devm_request_threaded_irq to manage IRQ lifetime and fix smatch warning Date: Sat, 6 Dec 2025 20:21:59 +0530 Message-ID: <20251206145158.3623-2-hariconscious@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: HariKrishna Sagala Replace manual "request_threaded_irq()" with the device managed "devm_request_threaded_irq" to manage the IRQ lifetime and also it removes the smatch reported warning. Remove the manual "free_irq()" in the "remove" function as free_irq is tied to device teardown. Signed-off-by: HariKrishna Sagala --- This patch replaces the manual management of IRQ with the device managed IRQ API. Also, it removes the smatch reported warning. sound/soc/codecs/rt274.c:1204 rt274_i2c_probe() warn:=20 'rt274->i2c->irq' from request_threaded_irq() not released on lines: 1204. Removed the "remove" function as IRQ is managed automatically. Runtime testing is requested to see no regressions. Please report any failures or unexpected behaviour, I will support in updating the patch accordingly. Similar warning is present in the codecs rt286 & rt298. If you are ok for updating those, will update them. Thank you. sound/soc/codecs/rt274.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c index 2c055c45111f..d441851dee8c 100644 --- a/sound/soc/codecs/rt274.c +++ b/sound/soc/codecs/rt274.c @@ -1188,7 +1188,7 @@ static int rt274_i2c_probe(struct i2c_client *i2c) regmap_write(rt274->regmap, RT274_UNSOLICITED_MIC, 0x82); =20 if (rt274->i2c->irq) { - ret =3D request_threaded_irq(rt274->i2c->irq, NULL, rt274_irq, + ret =3D devm_request_threaded_irq(&rt274->i2c->dev, rt274->i2c->irq, NUL= L, rt274_irq, IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "rt274", rt274); if (ret !=3D 0) { dev_err(&i2c->dev, @@ -1204,15 +1204,6 @@ static int rt274_i2c_probe(struct i2c_client *i2c) return ret; } =20 -static void rt274_i2c_remove(struct i2c_client *i2c) -{ - struct rt274_priv *rt274 =3D i2c_get_clientdata(i2c); - - if (i2c->irq) - free_irq(i2c->irq, rt274); -} - - static struct i2c_driver rt274_i2c_driver =3D { .driver =3D { .name =3D "rt274", @@ -1222,7 +1213,6 @@ static struct i2c_driver rt274_i2c_driver =3D { #endif }, .probe =3D rt274_i2c_probe, - .remove =3D rt274_i2c_remove, .id_table =3D rt274_i2c_id, }; =20 base-commit: 24172e0d79900908cf5ebf366600616d29c9b417 --=20 2.43.0