From nobody Tue Aug 25 14:34:35 2026 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (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 D96113DA5AB; Fri, 14 Aug 2026 02:57:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676242; cv=none; b=aC9W1I+5OrlFzC0TRxi52Ok/qKSLOdENkYRzEtGNw6DDbbA0nDQLz7Pe8bw5Apw3S7fKYg5bzYE3eHA3ftS2nL+Nuo9kpzSRxrqe9nlPgqDztRBSlIeEXgIpFuFIgiep/T8YOpjtapKtYxLs/5hJi6/Oq6/pRze40YrHD+XxEMA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676242; c=relaxed/simple; bh=C9yTzpEYGtImS3AkRGNg0Vf99cSsZhRIwU5XWvRM8Cc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MFULsj6YmmxdFZLX9DucYiV8uEukaWDULKZVYA1w1pqgRsvgWUluHA8gb0XfUMLXK/k/TaIizupxNyZLoi2Dnn6qlWw5lFZSxeVevSgHikxipPpvfXw4+5u03tsyo35n9TTPghIC5lnmm6c3VE0Ped6F4WxahUeeb4XIwdlM1No= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b=tI/K9dTk; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b="tI/K9dTk" X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 67E2vDMO1894003, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim; t=1786676233; bh=14a69RfFYx7F6p0X2iS8xmTtP/E/XE2lTGCkOProcuA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=tI/K9dTkSmZAEOymQW7ztEWIqtG4RhPz8Ce7Vyo7Q5LAXn1uJJXaaeLrUU9vam/Tq VIYjioL8OmtbBX3XbKEUzDTgWBhusA/pJIQW3kQv9yAk+T8yiSoetEIfJudVFnELTi eJ74xkhuXxhnrMLr3bLTHb6SHLGQ/rGGjjunTFWVS2hI+Jc1ejJCF/expxYOTxHfg/ IxBzbMcObvWOuUZMjoCEfg1RgdK94q0k+q/uffqHu01ITmy+Qjwe7V+se3R2GnJpIo weWDRZ9CzsvtvCix4+9rC3KMjEqev4IWXjIy0TfksxHX/nNSZKJ9D4TmwpdaTeEf46 LvZL90t0UTLiA== Received: from mail.realtek.com (rtkexhmbs04.realtek.com.tw[10.21.1.54]) by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 67E2vDMO1894003 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Aug 2026 10:57:13 +0800 Received: from RTKEXHMBS04.realtek.com.tw (10.21.1.54) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Fri, 14 Aug 2026 10:57:02 +0800 Received: from cn1dhc-k02 (172.21.252.101) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server id 15.2.2562.43 via Frontend Transport; Fri, 14 Aug 2026 10:57:02 +0800 From: Yu-Chun Lin To: , CC: , , , , , , , Subject: [PATCH v2 1/5] gpio: rtd1625: Minor coding style cleanups Date: Fri, 14 Aug 2026 10:56:53 +0800 Message-ID: <20260814025657.1400452-2-eleanor.lin@realtek.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260814025657.1400452-1-eleanor.lin@realtek.com> References: <20260814025657.1400452-1-eleanor.lin@realtek.com> 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" Address a few coding style issues: - Drop redundant initialization. - Remove an unnecessary blank line in rtd1625_gpio_setup_irq(). - And move the comment closer to the related code for better context. Link: https://lore.kernel.org/lkml/anUcSPcJjJkLh0Z-@ashevche-desk.local/ Suggested-by: Andy Shevchenko Signed-off-by: Yu-Chun Lin --- drivers/gpio/gpio-rtd1625.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-rtd1625.c b/drivers/gpio/gpio-rtd1625.c index 483e44cf5abc..910004c423df 100644 --- a/drivers/gpio/gpio-rtd1625.c +++ b/drivers/gpio/gpio-rtd1625.c @@ -107,10 +107,10 @@ static int rtd1625_reg_mask_xlate(struct gpio_regmap = *gpio, enum gpio_regmap_ope unsigned int base, unsigned int offset, unsigned int *reg, unsigned int *mask) { - /* Each GPIO has its own dedicated 32-bit register */ struct rtd1625_gpio *data =3D gpio_regmap_get_drvdata(gpio); - int val =3D 0, ret =3D 0; + /* Each GPIO has its own dedicated 32-bit register */ *reg =3D base + offset * 4; + int val, ret; =20 switch (op) { case GPIO_REGMAP_SET_OP: @@ -486,7 +486,6 @@ static int rtd1625_gpio_setup_irq(struct platform_devic= e *pdev, struct rtd1625_g return irq; =20 num_irqs =3D (data->info->irq_type_support & IRQ_TYPE_LEVEL_MASK) ? 3 : 2; - for (unsigned int i =3D 0; i < num_irqs; i++) { irq =3D platform_get_irq(pdev, i); if (irq < 0) --=20 2.43.0 From nobody Tue Aug 25 14:34:35 2026 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (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 146A93DA7F8; Fri, 14 Aug 2026 02:57:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676246; cv=none; b=VHHisVNMMzD3iycsvAdEwEcXwnyDUnpPvgXR0jcVOYF+aYElPxGBq6IAwc+APdozoHM+2fFZtSm/8/2kyWGWnyEcqd3ju7wqDCDPtbJUje8OOV65YQqZ7ho7bG1RP8VGQ7t9zeJCkOVxkLuqAM2ShF7ta0bkz1XmKoIc0V5X+28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676246; c=relaxed/simple; bh=dgzu/IExoAxy2S5o/3+xKb06CS6MmUr/pF7gKPvptGE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UMy7kza/FPBqH2m9hZMIA0fYr91+V4Ouw9pb4LKyuJiNz3IATS1s4RmmYuE4icrXX0i/L2Va48XXno/TTuu/ISLuhOCGH5VUQsCZk01nKjtGPE9vnqgvyQH2lqgutXCXbQREvg2QLkJvrwHglXwZBAqu8EVpa2AKLJg+AS/A58Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b=RoABg03T; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b="RoABg03T" X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 67E2vHbK5894016, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim; t=1786676237; bh=ixiAV63sHm/+ayZS6AdE9M1dxthGhJ5p4KAKuCYQb5I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=RoABg03Tf9xrnxWGAtulJQ6P84zX9i2GCGj0kxYnYTOWGV5cqbR1ufZpD6n6u4n6K xLNBs+B97ga2zz04WL/JEtbjlYx1d2jrIssfA+FTfa+gY6KuBb7KjzTmOO2DSxwLsx uhbUFkTkIhJizm/9+pZs3pludQWDRM+kCRQVtX5m3EbwJl0SJuhQQ2z03p2DpDSR2y KXDyt+Dt3LdET8nZdiPmMMrYmYi/HPM1VU9SQ8M/8Tj+dNqrDlPRy67OGrh1UYD6ZC WXxqMUCHcQwKmf7bURtHC5lPghTB3OMjxUY78xOAJaGstx9Ir/tIpRubYZsB/Zwhmm EOj8q4461bCEw== Received: from mail.realtek.com (rtkexhmbs04.realtek.com.tw[10.21.1.54]) by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 67E2vHbK5894016 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Aug 2026 10:57:17 +0800 Received: from RTKEXHMBS04.realtek.com.tw (10.21.1.54) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Fri, 14 Aug 2026 10:57:13 +0800 Received: from cn1dhc-k02 (172.21.252.101) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server id 15.2.2562.43 via Frontend Transport; Fri, 14 Aug 2026 10:57:13 +0800 From: Yu-Chun Lin To: , CC: , , , , , , , Subject: [PATCH v2 2/5] gpio: rtd1625: Fix variable type for regmap_read() Date: Fri, 14 Aug 2026 10:56:54 +0800 Message-ID: <20260814025657.1400452-3-eleanor.lin@realtek.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260814025657.1400452-1-eleanor.lin@realtek.com> References: <20260814025657.1400452-1-eleanor.lin@realtek.com> 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" Change the type of 'val' from int to unsigned int. This properly matches the expected parameter type of regmap_read(). Signed-off-by: Yu-Chun Lin Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-rtd1625.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-rtd1625.c b/drivers/gpio/gpio-rtd1625.c index 910004c423df..0308d7a052e7 100644 --- a/drivers/gpio/gpio-rtd1625.c +++ b/drivers/gpio/gpio-rtd1625.c @@ -110,7 +110,8 @@ static int rtd1625_reg_mask_xlate(struct gpio_regmap *g= pio, enum gpio_regmap_ope struct rtd1625_gpio *data =3D gpio_regmap_get_drvdata(gpio); /* Each GPIO has its own dedicated 32-bit register */ *reg =3D base + offset * 4; - int val, ret; + unsigned int val; + int ret; =20 switch (op) { case GPIO_REGMAP_SET_OP: --=20 2.43.0 From nobody Tue Aug 25 14:34:35 2026 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (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 647A53D6CB0; Fri, 14 Aug 2026 02:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676247; cv=none; b=cdMltMbkNiDhmxG0QhlUQNVFOfvm5e673UJIiLbXNdQ0IcxwHLngp2yJrE6Md2aTzGqJtyhpkqS2qilAuuixjAxsKBdOk+xHbMprmYKDkonHoBo3glmPOj31P71Vm2lnrWuENRxIIluXTBORlQt+EfAQFaeOCsC0zQTVqRCwPvM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676247; c=relaxed/simple; bh=ULNzr8JZlag34ZCsVzUaWubbGqzU3RXU0kZshlrnSX0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OaHUTbynLL4l5O+9YG7xwSoVtK/7H/FLeB8J6YwOMJNAozuPXZ5FbqufYWhyCdMnKotX5hGHJ6lKvRn9t+Bs39IPYPlnrhjWVXjv/au9zywVEFoS+dTMM2uGr9XkaLRPCgXJGHxKLmEUcgSi8bYISK74+3MnDrhbeaaNAZG6q5g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b=lN48c4fI; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b="lN48c4fI" X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 67E2vHbL5894016, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim; t=1786676238; bh=yF0/PB2aOoKNY+HsbfBVT1fSxjTp55eJLHc/DoTgsn8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=lN48c4fI3VyldwGtVLja2vdd5LMFkaR+MKpZSfcxp1hvlHahDiJguCGkeUfd40KKy zkeq3dDV+OzjnH7VWyqSI8+R9YbV3GU6FfZH1wX7XdJ3JgLbZlr2ZyfiKk6Ql1k4SG BXqdDWPO43s/vwiCChOyI1ELava69E38lF9MI5F1zXFNVOk45AIi7PqCqGXxlB8Sgr XLpAQYonI3uC5IgMdEpNkgibSNbrx0sfj5XA0XPu0EgcfHAsjzE85mFLiUbEb/AoOX 7WEObikdATM7fuA4WnLKzXE9E9eFMJ+tDuGqmDCMX7LebExvnXGIptFDoPRXp82mGs T7rZIiumCob6A== Received: from mail.realtek.com (rtkexhmbs04.realtek.com.tw[10.21.1.54]) by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 67E2vHbL5894016 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Aug 2026 10:57:17 +0800 Received: from RTKEXHMBS04.realtek.com.tw (10.21.1.54) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Fri, 14 Aug 2026 10:57:14 +0800 Received: from cn1dhc-k02 (172.21.252.101) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server id 15.2.2562.43 via Frontend Transport; Fri, 14 Aug 2026 10:57:14 +0800 From: Yu-Chun Lin To: , CC: , , , , , , , Subject: [PATCH v2 3/5] gpio: rtd1625: Narrow variable scope in loops Date: Fri, 14 Aug 2026 10:56:55 +0800 Message-ID: <20260814025657.1400452-4-eleanor.lin@realtek.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260814025657.1400452-1-eleanor.lin@realtek.com> References: <20260814025657.1400452-1-eleanor.lin@realtek.com> 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" Declare 'i' inside the for-loop header and 'hwirq' within the inner block where it's used to reduce variable visibility. Link: https://lore.kernel.org/lkml/anUcSPcJjJkLh0Z-@ashevche-desk.local/ Suggested-by: Andy Shevchenko Signed-off-by: Yu-Chun Lin --- drivers/gpio/gpio-rtd1625.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-rtd1625.c b/drivers/gpio/gpio-rtd1625.c index 0308d7a052e7..8f584287c2e6 100644 --- a/drivers/gpio/gpio-rtd1625.c +++ b/drivers/gpio/gpio-rtd1625.c @@ -224,8 +224,7 @@ static void rtd1625_gpio_irq_handle(struct irq_desc *de= sc) struct irq_chip *chip =3D irq_desc_get_chip(desc); unsigned int irq =3D irq_desc_get_irq(desc); struct irq_domain *domain =3D data->domain; - unsigned int reg_offset, i, j, val; - irq_hw_number_t hwirq; + unsigned int reg_offset, j, val; unsigned long status; u32 irq_type; int ret; @@ -241,7 +240,7 @@ static void rtd1625_gpio_irq_handle(struct irq_desc *de= sc) =20 chained_irq_enter(chip, desc); =20 - for (i =3D 0; i < data->info->num_gpios; i +=3D 32) { + for (unsigned int i =3D 0; i < data->info->num_gpios; i +=3D 32) { reg_offset =3D get_reg_offset(data, i); ret =3D regmap_read(data->regmap, reg_offset, &val); if (ret) { @@ -267,7 +266,8 @@ static void rtd1625_gpio_irq_handle(struct irq_desc *de= sc) } =20 for_each_set_bit(j, &status, 32) { - hwirq =3D i + j; + irq_hw_number_t hwirq =3D i + j; + irq_type =3D irq_get_trigger_type(irq_find_mapping(domain, hwirq)); =20 /* --=20 2.43.0 From nobody Tue Aug 25 14:34:35 2026 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (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 55DE03DAAAB; Fri, 14 Aug 2026 02:57:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676252; cv=none; b=gkbOJt5Ou1U/T1Jkuu1+i6PCD7vwhDCtBbHEGWPlQzc+4IOHq6SHWZpDS060HPQU0axJ0lh1rrgL7SDbLnC1vZ/3vbY+nZDetaEp3kIbgD34Sv4DcnrwpxZWBB7MgXpt9uL8Tp6D9qd/R3TjJhPG6Y9NyEt4ldPVzQ60z8AC5bU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676252; c=relaxed/simple; bh=HSV8PgiQ1oKefcviRTiL6fgd7yyBflzimdKTFo+bGXE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Y2MNmiKlc9uwo3iC082s8X9BklZzTq4d3k+jOYP+EMVHBh4m/4dBaTOu29271eccu8XJhM+PVHNctTMSSEWE99/V50YOhLlPbWeXD1dyANPPrcEVe661k7c9tgAdW6mf8nsqLuq7b2DKnlWb4VpnLR5Tom6rAC3Jcrs6X7hGIGI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b=k87EcII8; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b="k87EcII8" X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 67E2vJhbD894031, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim; t=1786676239; bh=M3miBEUEUEjdxMx5Dpx2RjbMtTyPGclgWQlhbEgIsP8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=k87EcII8NQNUX/9HkF0YizQ7NOd6nkLf8vHIeBpgSUBGuOh+jftvueqG1yKCrLKoO xM8Z3MtFCIhxJTGt9GVSUOEAE3mB+zMt7t/Aw6+SBhbPOznew5IjHmfU8PyPk92TV3 nWQ5qqkqMqis6ZDdb89ydc9qaibdBK5Ly8gyd6bnX9c9fWUrxgbAf0z4+LUAiO7/7e ccpHtrrNe3j+JsO9tJ8nc3yvlpLiJbTuiPKdbs9N6hv7J9KeNAJhigJlVkLe5Aw3Qm F0l/lHcsMXHcUabiJX/EVkV581S6THmUc3nR1tgiV95sH5Tw8NC5nHaM7nW+F7Rx7q 5Ppedoz0rAjGA== Received: from mail.realtek.com (rtkexhmbs04.realtek.com.tw[10.21.1.54]) by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 67E2vJhbD894031 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Aug 2026 10:57:19 +0800 Received: from RTKEXHMBS04.realtek.com.tw (10.21.1.54) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Fri, 14 Aug 2026 10:57:18 +0800 Received: from cn1dhc-k02 (172.21.252.101) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server id 15.2.2562.43 via Frontend Transport; Fri, 14 Aug 2026 10:57:18 +0800 From: Yu-Chun Lin To: , CC: , , , , , , , Subject: [PATCH v2 4/5] gpio: rtd1625: Replace pr_err_ratelimited() with dev_err_ratelimited() Date: Fri, 14 Aug 2026 10:56:56 +0800 Message-ID: <20260814025657.1400452-5-eleanor.lin@realtek.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260814025657.1400452-1-eleanor.lin@realtek.com> References: <20260814025657.1400452-1-eleanor.lin@realtek.com> 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" Using dev_* logging macros is preferred over pr_* in device drivers as it provides proper device context in the kernel log output. Link: https://lore.kernel.org/lkml/anUcSPcJjJkLh0Z-@ashevche-desk.local/ Suggested-by: Andy Shevchenko Signed-off-by: Yu-Chun Lin Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-rtd1625.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-rtd1625.c b/drivers/gpio/gpio-rtd1625.c index 8f584287c2e6..613462614210 100644 --- a/drivers/gpio/gpio-rtd1625.c +++ b/drivers/gpio/gpio-rtd1625.c @@ -221,6 +221,7 @@ static void rtd1625_gpio_irq_handle(struct irq_desc *de= sc) { unsigned int (*get_reg_offset)(struct rtd1625_gpio *gpio, unsigned int of= fset); struct rtd1625_gpio *data =3D irq_desc_get_handler_data(desc); + struct device *dev =3D regmap_get_device(data->regmap); struct irq_chip *chip =3D irq_desc_get_chip(desc); unsigned int irq =3D irq_desc_get_irq(desc); struct irq_domain *domain =3D data->domain; @@ -244,7 +245,8 @@ static void rtd1625_gpio_irq_handle(struct irq_desc *de= sc) reg_offset =3D get_reg_offset(data, i); ret =3D regmap_read(data->regmap, reg_offset, &val); if (ret) { - pr_err_ratelimited("Failed to read IRQ status for GPIO %u: %d\n", i, re= t); + dev_err_ratelimited(dev, "Failed to read IRQ status for GPIO %u: %d\n", + i, ret); continue; } =20 @@ -261,8 +263,9 @@ static void rtd1625_gpio_irq_handle(struct irq_desc *de= sc) if (irq !=3D data->irqs[RTD1625_IRQ_LEVEL]) { ret =3D regmap_write(data->regmap, reg_offset, status); if (ret) - pr_err_ratelimited("Failed to clear edge IRQ for GPIO %u: %d\n", - i, ret); + dev_err_ratelimited(dev, + "Failed to clear edge IRQ for GPIO %u: %d\n", + i, ret); } =20 for_each_set_bit(j, &status, 32) { --=20 2.43.0 From nobody Tue Aug 25 14:34:35 2026 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (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 C5F063D9DB1; Fri, 14 Aug 2026 02:57:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676252; cv=none; b=Bnb0Vs4ngLUBzUhwtNkQMeEkxT0gAzm/vCU7G/wNW/gIf0ZF3N9bTehR2lSbKLBchjGJXu8U0e7SSmUVqRH3ZceaNihZP3cVClFuEnLXhlgkwP7/7LyaOGSSZClGRSnodL6uLP84sgdy9ebovrg8eaGEBfB5WBBEaoAH6LNNBIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786676252; c=relaxed/simple; bh=2LmGUBF6DsBukv50eyGBMl2A7rD+bwayqx+1CXekkaU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pqG/OfQB4Gqihyu05WnK164sBiq5mhIpOryiWZ+FwmEthoYobkRukOjXcek0rL+QYI2DeF8jgOpFvUgijnNl8+vYdDgQhuv+qPAxwQFXZlrqEG/TAg+Ei2+HM8jl08AURUoSeX7PQExqVM/Rf4ZO9dSC6FUoODldMwhUxPKVytE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b=vlBb3xmE; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.b="vlBb3xmE" X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 67E2vJTV1894033, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim; t=1786676239; bh=tmzRykcW8tTFBDvtr+C1r5+YlVjapwgyMDFcz7Kdwsk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=vlBb3xmEvyqU6pkUBnmbpAAFLLr7vAGkaFpI6pnfWjGg334EXBhhqwr8et1FCdlfq sNJ74ynNHg3+x9/p8t1Hydn/zXK+KmANqwWNAWBHCltO1q/8jQC3Z4mg2GSNBG/Bwa Ctsji80dg94UDPSpUZRCMBUHX4bdBF9O+fAK4Z+z4l08DtDWUaq+njZnwccK3BdrS5 mZIty2fDUOEf6np6Cl2gXEjGl0QZobQptx2C/CSfMka6VX8Dwa9tAFW2ZEK899B3O7 r0Wna0KSgQW9Uh5QGk0i/wkNXxd/L1mtB4ag0NIaD7JBGGoNn8XWjcLLLgrqFODWwP DYCTtb+NMEskw== Received: from mail.realtek.com (rtkexhmbs04.realtek.com.tw[10.21.1.54]) by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 67E2vJTV1894033 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Aug 2026 10:57:19 +0800 Received: from RTKEXHMBS04.realtek.com.tw (10.21.1.54) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Fri, 14 Aug 2026 10:57:19 +0800 Received: from cn1dhc-k02 (172.21.252.101) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server id 15.2.2562.43 via Frontend Transport; Fri, 14 Aug 2026 10:57:19 +0800 From: Yu-Chun Lin To: , CC: , , , , , , , Subject: [PATCH v2 5/5] gpio: rtd1625: Use IRQ_TYPE_DEFAULT macro Date: Fri, 14 Aug 2026 10:56:57 +0800 Message-ID: <20260814025657.1400452-6-eleanor.lin@realtek.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260814025657.1400452-1-eleanor.lin@realtek.com> References: <20260814025657.1400452-1-eleanor.lin@realtek.com> 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" Use the standard IRQ_TYPE_DEFAULT macro instead of explicitly listing all supported edge and level IRQ type flags. Link: https://lore.kernel.org/lkml/anUcSPcJjJkLh0Z-@ashevche-desk.local/ Suggested-by: Andy Shevchenko Signed-off-by: Yu-Chun Lin Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-rtd1625.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-rtd1625.c b/drivers/gpio/gpio-rtd1625.c index 613462614210..bebd1b8ede48 100644 --- a/drivers/gpio/gpio-rtd1625.c +++ b/drivers/gpio/gpio-rtd1625.c @@ -615,8 +615,7 @@ static const struct rtd1625_gpio_info rtd1625_iso_gpio_= info =3D { =20 static const struct rtd1625_gpio_info rtd1625_isom_gpio_info =3D { .num_gpios =3D 4, - .irq_type_support =3D IRQ_TYPE_EDGE_BOTH | IRQ_TYPE_LEVEL_LOW | - IRQ_TYPE_LEVEL_HIGH, + .irq_type_support =3D IRQ_TYPE_DEFAULT, .base_offset =3D 0x20, .gpa_offset =3D 0x00, .gpda_offset =3D 0x04, --=20 2.43.0