From nobody Sat Feb 7 18:33:38 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4954731D379 for ; Mon, 29 Dec 2025 14:23:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018239; cv=none; b=kV3A76CPnRW2Q9ZMj14EYnALmSiqXGDlO4RT8Luz9FrcQFwFIdd1w1ot/Icq4WP5fE5JQJfp6/EuZTNNtlkUb6ttdDfWjlF4I1qenYFwf6eIFp8JIyULNp0OVHc07k9RV5pmB1TLC6MoFmPA5xPMO9QygcVrR3piFjFUG9K6ebU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018239; c=relaxed/simple; bh=EAFW2gZaTHS5eyzW1JYSLjiq7dLD2WjFxmvfBwBSPMk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Og0em3e8YpoAQJJqzfLfC8QZcnGU3QQ998hYFsPNhkmEmu5iRXbYCVRY8HSB2VxVQz8lExpbU4b/PZ+zZKdvTG7svj5ss6KcwMwjFdySo5CG/e/PrO/HR70G1oOwys+Y/Zh4EfpQNnvMC11J1OQwH2Bs6AGw8oSme4iTLivS/uI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NoJyoXPy; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NoJyoXPy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767018237; x=1798554237; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EAFW2gZaTHS5eyzW1JYSLjiq7dLD2WjFxmvfBwBSPMk=; b=NoJyoXPyb1yNjX6OVel9LrOmXx5xE0G0Hj8pkyBiY/WPXOuMHpFFBS+0 dc+tHYkwVSmUSpwTQFtIMm/zVDocmYzntlCg2/ErujyB7FaCNROLMX8UC GYnhvYTe7GG24WUh6jWDnWW6gMfu54cSa08IMowVoo49frcqgA4PvBn/9 aXEeRfS4wbt6E7sT7N6Tu5RGLHHGNc77/mWHKC0X26Tfnv2ZhVtMLHIpF v4+/OtlOVik1L5/iiBbq9vCStkdCgFu+vAxKvEX+4wCjHOuJnRTDO2ubQ 35PcSxcwV/v3eL8ZnhXsydLmMICZny+Jy9MNnwObgCFNTIpSv5HvoyHYY w==; X-CSE-ConnectionGUID: AtFrbV9AQ2aqP9qJBxxRGQ== X-CSE-MsgGUID: IMA/+SKwRQehvNAlVQ29rg== X-IronPort-AV: E=McAfee;i="6800,10657,11656"; a="79742751" X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="79742751" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2025 06:23:53 -0800 X-CSE-ConnectionGUID: dD8g8tKTRE+lrbveAOSmIg== X-CSE-MsgGUID: qBA/W0/iR+Wy7UiX83W30A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="205829429" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa004.fm.intel.com with ESMTP; 29 Dec 2025 06:23:52 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 1E41693; Mon, 29 Dec 2025 15:23:51 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven Subject: [PATCH v1 1/7] auxdisplay: arm-charlcd: convert to use device managed APIs Date: Mon, 29 Dec 2025 14:52:34 +0100 Message-ID: <20251229142349.1251843-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.com> References: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.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" The current probe function of the driver is implemented by using plain old APIs. As Geert noted, one of the error paths has a mistake that may lead to a wrong call. Instead of targeting that particular issue, convert the driver to use device managed APIs altogether. It's not needed per se (driver can never be removed once loaded), but it simplifies coding and error handling. Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/r/CAMuHMdVquNEoxRQkcBEH0nC+CDuib6o0H6m3CBk3= ZN2267LpQw@mail.gmail.com Signed-off-by: Andy Shevchenko --- drivers/auxdisplay/arm-charlcd.c | 49 ++++++-------------------------- 1 file changed, 9 insertions(+), 40 deletions(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-char= lcd.c index 4e22882f57c9..0dab69938352 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include =20 @@ -56,8 +55,6 @@ /** * struct charlcd - Private data structure * @dev: a pointer back to containing device - * @phybase: the offset to the controller in physical memory - * @physize: the size of the physical page * @virtbase: the offset to the controller in virtual memory * @irq: reserved interrupt number * @complete: completion structure for the last LCD command @@ -65,8 +62,6 @@ */ struct charlcd { struct device *dev; - u32 phybase; - u32 physize; void __iomem *virtbase; int irq; struct completion complete; @@ -266,44 +261,27 @@ static void charlcd_init_work(struct work_struct *wor= k) =20 static int __init charlcd_probe(struct platform_device *pdev) { + struct device *dev =3D &pdev->dev; int ret; struct charlcd *lcd; struct resource *res; =20 - lcd =3D kzalloc(sizeof(*lcd), GFP_KERNEL); + lcd =3D devm_kzalloc(dev, sizeof(*lcd), GFP_KERNEL); if (!lcd) return -ENOMEM; =20 lcd->dev =3D &pdev->dev; =20 - res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - ret =3D -ENOENT; - goto out_no_resource; - } - lcd->phybase =3D res->start; - lcd->physize =3D resource_size(res); - - if (request_mem_region(lcd->phybase, lcd->physize, - DRIVERNAME) =3D=3D NULL) { - ret =3D -EBUSY; - goto out_no_memregion; - } - - lcd->virtbase =3D ioremap(lcd->phybase, lcd->physize); - if (!lcd->virtbase) { - ret =3D -ENOMEM; - goto out_no_memregion; - } + lcd->virtbase =3D devm_platform_get_and_ioremap_resource(pdev, 0, &res); + if (IS_ERR(lcd->virtbase)) + return PTR_ERR(lcd->virtbase); =20 lcd->irq =3D platform_get_irq(pdev, 0); /* If no IRQ is supplied, we'll survive without it */ if (lcd->irq >=3D 0) { - if (request_irq(lcd->irq, charlcd_interrupt, 0, - DRIVERNAME, lcd)) { - ret =3D -EIO; - goto out_no_irq; - } + ret =3D devm_request_irq(dev, lcd->irq, charlcd_interrupt, 0, DRIVERNAME= , lcd); + if (ret) + return ret; } =20 platform_set_drvdata(pdev, lcd); @@ -315,18 +293,9 @@ static int __init charlcd_probe(struct platform_device= *pdev) INIT_DELAYED_WORK(&lcd->init_work, charlcd_init_work); schedule_delayed_work(&lcd->init_work, 0); =20 - dev_info(&pdev->dev, "initialized ARM character LCD at %08x\n", - lcd->phybase); + dev_info(dev, "initialized ARM character LCD at %pa\n", &res->start); =20 return 0; - -out_no_irq: - iounmap(lcd->virtbase); -out_no_memregion: - release_mem_region(lcd->phybase, lcd->physize); -out_no_resource: - kfree(lcd); - return ret; } =20 static int charlcd_suspend(struct device *dev) --=20 2.50.1 From nobody Sat Feb 7 18:33:38 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 840BA31D389 for ; Mon, 29 Dec 2025 14:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018237; cv=none; b=U5eabvRK/oIzpI785F7V913+VaK2Z7ZpTuvJ3AKVtSo7cXbIUJq6cS69gGrxexxcVZ9yFmy+YSFRQtqmc118/OAz8uzGv3It7Fpwk9PZC9Wd/tjBINPJIJogf8fCVLUozAuhdxEpB0v+54qaolYJt3Fvhj+8sjKZUd+kPilVQeE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018237; c=relaxed/simple; bh=NByZm2HjUpPUOGZXlmxJxramo23+eJ5mExeWOFYnQOI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b4tKzE3iup+1cREs+R/fUClfw1ZcqIealYU63qG8SnSdGEB1q0N3BXS2uL90/DarywYiKzsLY6lJieVm38SRYSptQOGBoHsOxNig4itfCb9k0Q253Kq/7vf/RZhKCJJmr+lwU4CT785eLgIV0lZJeLG47dFspFE6QyVt4N6YFdM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FeDeTDie; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FeDeTDie" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767018235; x=1798554235; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NByZm2HjUpPUOGZXlmxJxramo23+eJ5mExeWOFYnQOI=; b=FeDeTDiehMIPFO+CqQX32j0Mv2yMRFoXposJaIqMXf7IdqMXZ1MIHujq UnoG60C+ABzgJIHf0HHoQbnrP5hMt5lgGVmgmQr2ssazN/SoO07tA92ja ir2xF2e4q0wMRlhmY5af+OElDo+KsCxJUi8X8PsvKadgtP28tvc8GIuYM qJcwAJy4vfJnYq2M+0D7FXnv99/8I31HnDXTH7bT1dFGcoAuUvP/rV0u4 vVthFChuP6jgqFqkSDSaQo9QLr37wBXhwsEIaxV8aLjaceEijDXuSvxXf L6SpwjY72N7OHhuDeU/oTloie/KhSTjxB+nuXnaiJUPzjh20f5bPj7OHa A==; X-CSE-ConnectionGUID: 3tCBU12GQ/ieqPNuQHn4HA== X-CSE-MsgGUID: SKre01zUR8iDuV5aBrr+hQ== X-IronPort-AV: E=McAfee;i="6800,10657,11656"; a="79742746" X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="79742746" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2025 06:23:53 -0800 X-CSE-ConnectionGUID: yyaNy8yQSgqflfmG53mASQ== X-CSE-MsgGUID: FCbCKzdbRCGR/EvDT19cZA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="201200688" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa008.fm.intel.com with ESMTP; 29 Dec 2025 06:23:52 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 2268198; Mon, 29 Dec 2025 15:23:51 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven Subject: [PATCH v1 2/7] auxdisplay: arm-charlcd: Remove unneeded info message Date: Mon, 29 Dec 2025 14:52:35 +0100 Message-ID: <20251229142349.1251843-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.com> References: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.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" When probe succeeds we have other means to check if it was successful, no need to pollute kernel log with the practically duplicated info. Signed-off-by: Andy Shevchenko --- drivers/auxdisplay/arm-charlcd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-char= lcd.c index 0dab69938352..eeabbca7923d 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -264,7 +264,6 @@ static int __init charlcd_probe(struct platform_device = *pdev) struct device *dev =3D &pdev->dev; int ret; struct charlcd *lcd; - struct resource *res; =20 lcd =3D devm_kzalloc(dev, sizeof(*lcd), GFP_KERNEL); if (!lcd) @@ -272,7 +271,7 @@ static int __init charlcd_probe(struct platform_device = *pdev) =20 lcd->dev =3D &pdev->dev; =20 - lcd->virtbase =3D devm_platform_get_and_ioremap_resource(pdev, 0, &res); + lcd->virtbase =3D devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(lcd->virtbase)) return PTR_ERR(lcd->virtbase); =20 @@ -293,8 +292,6 @@ static int __init charlcd_probe(struct platform_device = *pdev) INIT_DELAYED_WORK(&lcd->init_work, charlcd_init_work); schedule_delayed_work(&lcd->init_work, 0); =20 - dev_info(dev, "initialized ARM character LCD at %pa\n", &res->start); - return 0; } =20 --=20 2.50.1 From nobody Sat Feb 7 18:33:38 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC04C31E0EB for ; Mon, 29 Dec 2025 14:23:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018238; cv=none; b=KKwoLedW1ObUVhW6TItpruxbhBd/gIXjpEXZSD72XG2ln0ZyOt8dxSD1m/64e6b3nCsBVtqv0/jfdL/G2bsuYmPXBg0D2LEoBwrgLXXY3F6Uy1ozq9IG8y+meVJhDax65oX44sglcrv1iTAc7JOiW9+KEH9wOLG+5lkWIU5Jdao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018238; c=relaxed/simple; bh=Yo88/OcrZY3Tbkyhe/Kvz9GE8OeJIs7lepgOe5QpYFg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EmHUPawGNkA0jxs29GbsNsuGy0e4ems2qccvVXvl46sHRWd5HZ/5E89L3vQi3/fbBaSTSIR14/MWSW7pzwkYXVFy/jvQTNgbLSOCuaW/+8savr3JCa47GmeqKMQMFd5F8tjtdTVPHbroXH/HaVWusHlQB5pDbTLue7VzqfW0ePA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Brv09BvX; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Brv09BvX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767018237; x=1798554237; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Yo88/OcrZY3Tbkyhe/Kvz9GE8OeJIs7lepgOe5QpYFg=; b=Brv09BvX4iM4glzYKNob0zJTdJb/YwCYql4u4fllv4midwBEUikP1HMK WtX8MBA8rA920wLk2NWRQ9Aj4dAsPfmZjlkNn/zKMwcFbt63psGx8ewhu fRPHE+amSTFJhllZAy+bSg3Py40TfIUCVYDi/sSETv0FLLLovcMoivxNu 8VB2b70xQFa6XXe5+hd29Ls4htZv4DgTWZqNDdp4YfBrR2+xIzk/+3eya wzrVz1Nhcm5JUPhx7hXwdG6AugCc9isEywZof+iLYa+8Vgx3iHV3Lmtit DyLGNB+c4ePRxVN0Q1QJLX8Vhe8ozmsBWKURF3SHVHOOCz6MWpQiuAz46 Q==; X-CSE-ConnectionGUID: Jyh8MI59TvipyQ+kVA3BHA== X-CSE-MsgGUID: RR60RPQ4T6q/Tu5L+8L0iA== X-IronPort-AV: E=McAfee;i="6800,10657,11656"; a="79742749" X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="79742749" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2025 06:23:53 -0800 X-CSE-ConnectionGUID: viiA1cBcRFKlz0QTcOoBUg== X-CSE-MsgGUID: ddW2x9ATTuyN+O+aIvDKpw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="205829430" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa004.fm.intel.com with ESMTP; 29 Dec 2025 06:23:52 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 268DF99; Mon, 29 Dec 2025 15:23:51 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven Subject: [PATCH v1 3/7] auxdisplay: arm-charlcd: drop of_match_ptr() Date: Mon, 29 Dec 2025 14:52:36 +0100 Message-ID: <20251229142349.1251843-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.com> References: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.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" The general recommendation is to not use of_match_ptr(). Drop it. Signed-off-by: Andy Shevchenko --- drivers/auxdisplay/arm-charlcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-char= lcd.c index eeabbca7923d..6a83eacb458c 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -9,8 +9,8 @@ */ #include #include +#include #include -#include #include #include #include @@ -328,7 +328,7 @@ static struct platform_driver charlcd_driver =3D { .name =3D DRIVERNAME, .pm =3D &charlcd_pm_ops, .suppress_bind_attrs =3D true, - .of_match_table =3D of_match_ptr(charlcd_match), + .of_match_table =3D charlcd_match, }, }; builtin_platform_driver_probe(charlcd_driver, charlcd_probe); --=20 2.50.1 From nobody Sat Feb 7 18:33:38 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B853F31BC94 for ; Mon, 29 Dec 2025 14:23:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018235; cv=none; b=dZiKVu94J020uxLxz6FeuR0lzGex8I2BBOthx4uN+I8IUdNiTywu5MnA88vRbs+EsVMVcrhMzDgB/ihqYUmZZSqgpUGub9Pil7owHjOYc27gNb/W3voo/gJcOcuJKLknnu0QVpBzyc89894eVAwtkpnLsZlS+O8Eni3Oup+O0nE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018235; c=relaxed/simple; bh=CUhCEqNb64HNWunM0DQRzrD9q/wRiP/pJ2l0W1WnCuw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GIUu8FVU679pKwnST1LMwZU6cJcCAlz4Y3po2O1nBcjUpNvgn2liSKdncgXJ3OrtN/qH4DEVd7oPoTgc4qEPBp54KuoPv2CWizxBIsf2FmeV+dHxQC8Uiuo9RNaUlD2rBTCkzyCPhDIe0zlYmH6k5Bp+LaWsRC28C3xWjrg+8MA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bjJj5raG; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bjJj5raG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767018234; x=1798554234; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CUhCEqNb64HNWunM0DQRzrD9q/wRiP/pJ2l0W1WnCuw=; b=bjJj5raGs6udxr99b+w4fxLTDl4RmNunEwAKylgSj6bzqEvcSikGSGPM w+Rgyh7nkGq1Nr7TFgsgOyB89gKe9P3S6FiMOvQiZGuFAdWT5JuxDStDz oIUlcY2MnIk2NT79Ja+xP6y1klI7jL3KOP8CLEx9TDYOJM5N7QlwH2Pur 8kZokxagEadGHNb/PBrlyys+MOC0S4Nz6h620V7wrds4lLvZE+IMq4+F2 H34fjratiOkt1AeOZE4BWMqE1IIYp2IlFfUY8RW0A0VLa97bLv0od5t3F +fTOZ3IhhcXTeQ93X3506rCMSozKXPky3waNk+rsElHqaiskO8Xv5zeZR g==; X-CSE-ConnectionGUID: man6rDLlTmSNobvXSMSJJA== X-CSE-MsgGUID: RcqmIsMHRXiyLz+VAhFF5w== X-IronPort-AV: E=McAfee;i="6800,10657,11656"; a="79742742" X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="79742742" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2025 06:23:53 -0800 X-CSE-ConnectionGUID: ZvpEBOSNQQGlG62VOoolaw== X-CSE-MsgGUID: LXZPC/fARKa/4aavi2hyEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="205829426" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa004.fm.intel.com with ESMTP; 29 Dec 2025 06:23:52 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 2ADEA9B; Mon, 29 Dec 2025 15:23:51 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven Subject: [PATCH v1 4/7] auxdisplay: arm-charlcd: Don't use "proxy" headers Date: Mon, 29 Dec 2025 14:52:37 +0100 Message-ID: <20251229142349.1251843-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.com> References: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.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" Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko --- drivers/auxdisplay/arm-charlcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-char= lcd.c index 6a83eacb458c..ac8604d3b9a0 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -7,13 +7,17 @@ * * Author: Linus Walleij */ +#include +#include +#include +#include #include #include +#include #include #include -#include -#include -#include +#include +#include #include #include =20 --=20 2.50.1 From nobody Sat Feb 7 18:33:38 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CF8131ED6A for ; Mon, 29 Dec 2025 14:23:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018239; cv=none; b=FHMPa4jNFtQUt4C3SH4m8Pyp4Zx2Xk/azajZ0MmzDgrykPJcvWAXsEU09RUKad98dCI/Rln/ZQsFS5aL+7ukq0PShbqA+6Gz2hRBZLPYyqP7IJ2c1MQZHZ9VHCVC89/tJcUeCXBLWuYWFgOcBVYow3F4BRST4EV16rmVV/nHYWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018239; c=relaxed/simple; bh=spJDMR17QFW8kntrjyC1i6W+K4rh7nA8A9T9ETf0VKY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D1if7PDqouLKRR6v6LnPHv5PwxybB9KeQEsTMA+YgwLDdvBSjBQVpqwhSligZd+orsNK1QL7uxqTAMKS9suXbssWx5nVr3n+eiwa7V4HZprGdpJORmJ/0W+wqTQUOO6af5iiSxBhA5tAh+/IC1IUixSqmFEs5cEe6y4RbBXY+EE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZAceJvVE; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZAceJvVE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767018237; x=1798554237; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=spJDMR17QFW8kntrjyC1i6W+K4rh7nA8A9T9ETf0VKY=; b=ZAceJvVErRwFRvuWTbIO4APo2qcHYEKDBkvO5eOl4OeU9XRSbZi6Cyyq R+hrg61TjY9ob5ojoYIG8PxeWCA04XlTmEENm+69ugHC3i/isOQkXM0BK HFodnhUPfLMf4EExBtSvUyIT7zOXLrKRahGZ+FcUZ6eBIQ2IEhGXJ9RYH wOSqurWv5yFnIaFx3GMAT0ct6Ur5RTYfvzPguMJ0gkITUa/moMsK399/Z /+OyfWen6fHVdxMPegBPACWB/M6kmFy4LIrkjV6mzvvmZrxS0F3zCE6Gh 8XJ24xX2J8fhrtUt0M+AJyECoxaFOVABgtpYOEpsiTBPkOw4GJUE13y1E A==; X-CSE-ConnectionGUID: vpdw6cnHRsqHDaTU112uuw== X-CSE-MsgGUID: DxCQJM/lROyWEnfxeoNVFg== X-IronPort-AV: E=McAfee;i="6800,10657,11656"; a="79742755" X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="79742755" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2025 06:23:55 -0800 X-CSE-ConnectionGUID: EaYgHQLWRIOzMbmfrkunXA== X-CSE-MsgGUID: ix4nVGJ6TdGq3Xn8j52rQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="205829433" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa004.fm.intel.com with ESMTP; 29 Dec 2025 06:23:53 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 2E79C9E; Mon, 29 Dec 2025 15:23:51 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven Subject: [PATCH v1 5/7] auxdisplay: arm-charlcd: Use readl_poll_timeout Date: Mon, 29 Dec 2025 14:52:38 +0100 Message-ID: <20251229142349.1251843-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.com> References: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.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 readl_poll_timeout_atomic() from instead of using custom poll loops. The timeout settings are different, but that shouldn't be much of a problem. Instead of polling 10 times in a close loop, it polls for one millisecond. Signed-off-by: Andy Shevchenko --- drivers/auxdisplay/arm-charlcd.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-char= lcd.c index ac8604d3b9a0..a537126f5d6a 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -115,20 +115,14 @@ static u8 charlcd_4bit_read_char(struct charlcd *lcd) { u8 data; u32 val; - int i; =20 /* If we can, use an IRQ to wait for the data, else poll */ if (lcd->irq >=3D 0) charlcd_wait_complete_irq(lcd); else { - i =3D 0; - val =3D 0; - while (!(val & CHAR_RAW_VALID) && i < 10) { - udelay(100); - val =3D readl(lcd->virtbase + CHAR_RAW); - i++; - } - + udelay(100); + readl_poll_timeout_atomic(lcd->virtbase + CHAR_RAW, val, + val & CHAR_RAW_VALID, 100, 1000); writel(CHAR_RAW_CLEAR, lcd->virtbase + CHAR_RAW); } msleep(1); @@ -140,13 +134,9 @@ static u8 charlcd_4bit_read_char(struct charlcd *lcd) * The second read for the low bits does not trigger an IRQ * so in this case we have to poll for the 4 lower bits */ - i =3D 0; - val =3D 0; - while (!(val & CHAR_RAW_VALID) && i < 10) { - udelay(100); - val =3D readl(lcd->virtbase + CHAR_RAW); - i++; - } + udelay(100); + readl_poll_timeout_atomic(lcd->virtbase + CHAR_RAW, val, + val & CHAR_RAW_VALID, 100, 1000); writel(CHAR_RAW_CLEAR, lcd->virtbase + CHAR_RAW); msleep(1); =20 --=20 2.50.1 From nobody Sat Feb 7 18:33:38 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A525531E0EA for ; Mon, 29 Dec 2025 14:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018240; cv=none; b=l78siT22WkP+v7+L+LrUPYO4mYLzlAKKMB+BXPyeZ7KcRPc/Jr+V8H+ZLIXpdRTtHvwO/V4AhPrVu04n0YojB7AEQD0w1br4OWfmjqCB4D1g6PqjV9s/AoLfeRue9yjpy0XyD/qF80DrRgPE8Ebfvx6TKWG8ahLQ/62In8iTd1U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018240; c=relaxed/simple; bh=UkOC+q1YVj1Ms1Ista9ztysWpFA6RF8qzhEnoWolRC8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NU+wlTsbVnEFjRi0CcUHq/L6GYvxhlhcDokeMCm8C/3rvdAbCfyxsOXX0TOYFtzX8R8FXhqVfLrjkBdXtOnKzBE5vJIdIoJ3kYc6uV2qu0FbzlY3uDQ63PpTo5yE5VuPKdwREGTFGIjfnwufbUNwNkpK9cCdJno/kIFWprHd41Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IIt4HfSc; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IIt4HfSc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767018239; x=1798554239; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UkOC+q1YVj1Ms1Ista9ztysWpFA6RF8qzhEnoWolRC8=; b=IIt4HfScWZIFWjWAIkUim1Xqq4BxKkSUEQARXcpnyXpi7I3kclcsMvRV YGuSKgaBIf3h4gx8qGi0PNkjO24Rs7bFnoSLLLoV7zbT2oS3rIV/yz1nf Jf+LT+GsdZ7FDrTZnTq2FpSRiyQkNjr63RQKZ2bJjv//2zH8M2IdZ8ncn puoeSOUXoQedLqoVEbdE8RcdPm9duzoBhTmelangu4kPUSYCLQlEWNxL0 Mn4Lss9Nb/kmQspAb5Bzb/kqF/b0wE+D2KTJ0Xff7T9tTW53Zhcfc7MUM w/BdL5LTfxoJDKY/RU87Hr8dLBx7kByEZASHFB7kAI5uB42l1fB+vJfw/ Q==; X-CSE-ConnectionGUID: fZ6pDRtBR3eOkC1NjuovMw== X-CSE-MsgGUID: cRW/cD4nTMyEkjR6aw7Uaw== X-IronPort-AV: E=McAfee;i="6800,10657,11656"; a="79742757" X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="79742757" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2025 06:23:55 -0800 X-CSE-ConnectionGUID: KUnUCvvMQf6bk7gmC55DYg== X-CSE-MsgGUID: toFKtMp/Qxi4ld8/6w6yfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="205829435" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa004.fm.intel.com with ESMTP; 29 Dec 2025 06:23:54 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 32893A1; Mon, 29 Dec 2025 15:23:51 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven Subject: [PATCH v1 6/7] auxdisplay: arm-charlcd: Join string literals back Date: Mon, 29 Dec 2025 14:52:39 +0100 Message-ID: <20251229142349.1251843-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.com> References: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.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" For easy grepping on debug purposes join string literals back in the messages. No functional change. Signed-off-by: Andy Shevchenko --- drivers/auxdisplay/arm-charlcd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-char= lcd.c index a537126f5d6a..7395a6dd6dc9 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -99,14 +99,13 @@ static void charlcd_wait_complete_irq(struct charlcd *l= cd) =20 if (ret < 0) { dev_err(lcd->dev, - "wait_for_completion_interruptible_timeout() " - "returned %d waiting for ready\n", ret); + "wait_for_completion_interruptible_timeout() returned %d waiting for re= ady\n", + ret); return; } =20 if (ret =3D=3D 0) { - dev_err(lcd->dev, "charlcd controller timed out " - "waiting for ready\n"); + dev_err(lcd->dev, "charlcd controller timed out waiting for ready\n"); return; } } --=20 2.50.1 From nobody Sat Feb 7 18:33:38 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FBAC3203AA for ; Mon, 29 Dec 2025 14:23:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018241; cv=none; b=LlBKVWjwWdF/AzWWePScRgIHeUNMKRL8b6jbYTOFM9WrFjJagAbaimUFpPQC03zmtOG7om6Hbcf3H5uPuWM3j074mGySd33N4NvJDr61k1vcongc6GnnWgMYUkaLFEL2wQr8WaUXZTae9yW8aRoDVPhVP03o0GU8caiGgKHPB5Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767018241; c=relaxed/simple; bh=wAwLx/SBo9CfvolBPJXNd0BI6rbuWVewrUIYKT255Lo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rJjtgvwImPEHIQgPbMYpXmWYBJvf153TqxniVbl52nV4DYB0FFwZo4NMgIiX+AtOQFzd4WdU+CjjyY3IA7Sywl21gK9LXgEA7B0sYb7/dMqbQ3lK6GWHZuqSpyNXVRyZZkL5N9HHi54+Xv1aAz6IGYwvCdCDLTb6ERJ6rjiNjMA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=hgm0OUT3; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hgm0OUT3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767018239; x=1798554239; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wAwLx/SBo9CfvolBPJXNd0BI6rbuWVewrUIYKT255Lo=; b=hgm0OUT3THJ25bxQ/WnyS9bHZK53NSQhGn1crxMYuJrquCDen5dPoGzF uqgU8zc2+zIlZMGODpSBs/frf70qeo97q+EUDhgZDhQaJbM+L1HyBuzwn Tu1YYOeNtb7EPveL8+/h3o9bYX2mtb8grrudhhQ9DRUx/lWaWmVCjoP/w XT4Yq8JDBtX/wrnc7iuVHbhs+T3ZvEfwZfW8z1p03pO/b74aKh2jpNBPR vStHNHXjFzuDuqPqAlvBIXbYvu5zzCs18kswZc4zVGEvJIgoRvDSkQMET 8r9qfPmYUQjR///7EOWynGRsKEmqOiumFxXPAlH2aSEjxJdnLr/0Pw2Fl A==; X-CSE-ConnectionGUID: lHc4KzpuTrq7n/UY7pepjg== X-CSE-MsgGUID: FugO0jYiS26FmsBH+KdGcQ== X-IronPort-AV: E=McAfee;i="6800,10657,11656"; a="79742761" X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="79742761" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2025 06:23:55 -0800 X-CSE-ConnectionGUID: smtUUBqTSOuHJN6sYEms8Q== X-CSE-MsgGUID: evu1f7QURMWep402T1LmHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="205829436" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa004.fm.intel.com with ESMTP; 29 Dec 2025 06:23:54 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 36891A2; Mon, 29 Dec 2025 15:23:51 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven Subject: [PATCH v1 7/7] auxdisplay: arm-charlcd: Remove redundant ternary operators Date: Mon, 29 Dec 2025 14:52:40 +0100 Message-ID: <20251229142349.1251843-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.com> References: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.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" For ternary operators in the form of a ? true : false, if a itself returns a boolean result, the ternary operator can be omitted. Remove redundant ternary operators to clean up the code. Signed-off-by: Andy Shevchenko --- drivers/auxdisplay/arm-charlcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-char= lcd.c index 7395a6dd6dc9..30fd2341c628 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -157,7 +157,8 @@ static bool charlcd_4bit_read_bf(struct charlcd *lcd) writel(0x01, lcd->virtbase + CHAR_MASK); } readl(lcd->virtbase + CHAR_COM); - return charlcd_4bit_read_char(lcd) & HD_BUSY_FLAG ? true : false; + + return charlcd_4bit_read_char(lcd) & HD_BUSY_FLAG; } =20 static void charlcd_4bit_wait_busy(struct charlcd *lcd) --=20 2.50.1