From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 BFD1C175A67; Wed, 27 May 2026 14:41:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892862; cv=none; b=nbdwlUZbW083S2v3cT91OyXtmKO5QPazRNvQI2s5P1EHQynlxOndh1wAK7kmPama2460u46Jl9EVSsG2A9WxU5gB+yWp/MDA24Ieq2y1ybb4PwbZSb9QTE1WpUIj9Xo1PpxY2MW0FaLixkklH3Oavl584E0ZNIM7dFspsSfAAx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892862; c=relaxed/simple; bh=V3QR3jP44aqqC9ymtZ4lbbwtzZ+8iYreYhsmQlowOPU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=iHW6Dh3XrKd21dNz0pH5dUMwj8yN1SA7FeUDecWJ3+22WSQV0l8lRMRO4tikxCYNV5p9ldMoCohFuUdto9DLlUjuhXZNF9rZGsdjt0KRv4u2VmVY7OyjExfusmcg8rI/2FufbdoFcZ1LSanoUzr91QMdbZJwHsvcOiIZ5h5znmU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=zflJPWBG; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="zflJPWBG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892861; x=1811428861; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=V3QR3jP44aqqC9ymtZ4lbbwtzZ+8iYreYhsmQlowOPU=; b=zflJPWBGWJVWEM/B0V3mQ0pGgnxVQ8gawPnNvA06X4G6e4Lr5hKm7uW5 P++DV2XBA5jERRmbY6SPlFLqwlno4udWnMlury0i2jMVgcKaVqiONij5F 2vsQ87TAja/aWDB0Zr54GJlbpgJ4FlrYG19qM8+c3MR2CGTi1oa7nu5SQ G2hIS+P0b0ET1V5xRkB3qn0TD4lveWxRf7RZcRTPkGmPV1Cad6pUtc8L2 oeTJZiqEHtJir1XE1xZwUjPBn+HqYmCrsSyIyE85vvMRrOVSLGZjW87Pl KlmgGgU+ZlcKb1rQuUv+Gu7DMIF9NSfotyen+k03NDISWKgFiDBNAT57q Q==; X-CSE-ConnectionGUID: H1EI0QVERrmv8Nk8ruBKDw== X-CSE-MsgGUID: e/iu+SMCS4qhbyMQGWZA4w== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="67002841" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2026 07:41:00 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.87.71) by chn-vm-ex2.mchp-main.com (10.10.87.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.41; Wed, 27 May 2026 07:40:59 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:40:55 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:50 +0530 Subject: [PATCH 01/12] media: max9286: use string_choices helper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-1-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/max9286.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index ac0712ce1..e2954ed26 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -22,6 +22,7 @@ #include #include #include +#include =20 #include #include @@ -1330,7 +1331,7 @@ static int max9286_poc_enable(struct max9286_priv *pr= iv, bool enable) =20 if (ret < 0) dev_err(&priv->client->dev, "Unable to turn power %s\n", - enable ? "on" : "off"); + str_on_off(enable)); =20 return ret; } --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 4FDAB3EF0BD; Wed, 27 May 2026 14:41:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892866; cv=none; b=Su3Ytgi3DytfiFQAy+RRvx9hZmzjcRRZif++a4JcjGgXLIinp49O6hJNIhnx+Zz7pyosZZGpT9JkP5g7qmvELpWlNpbpfxYf/JxQjmjxUcNSEYBtJ0Vh+DFCr9k3RRCBBWDd6SdajiPAUJpVMPAPzHX1jQ9jVKE2j1FKTGfo630= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892866; c=relaxed/simple; bh=oE5mj4rGsyYfvuPNTQPgc1MpWW2/Njp+jQxWihFclGw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=FCI6SK4gdUVgMlo/cUNdeP7fi4ykauWmH9hV/6DkNfI9UEv9N5NK9HRuFlvWbVLdTTIYwK9Y7sQwvirsi63yc+sB2X/m5G9/DnHFZHWynyh6N3MSC6ykcnAcMa2bfy4uSUaeelPMZzaJ5KeznKk9Wjix1oza0WcNcuWYU3/O0OI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=D60zGYmk; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="D60zGYmk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892866; x=1811428866; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=oE5mj4rGsyYfvuPNTQPgc1MpWW2/Njp+jQxWihFclGw=; b=D60zGYmkuRVB5+HEsgSFMaMHCmvgGKJaesAjxUO7ddjVjo3RaYsjXz0T UtSHgTRCuoqjTxq2vucx4PW5QZWlQeVTB2Uu/LaSzJfjrwDr1CVMLzhNf 13vF5YPOUwQTWUX1BZpASX6AtmTHY1p6X8rwfLvCMMluVQAuefnpTa8gq zlfBpAOwnzmpk7/+zs0hls0r5IToexevtiRxML2AXXzv5arX0+T5C33er QGLiGvho3p7+8syIMXvRwl1+X5qDUSxEOtn9h0KNWEFDCgF2jtlu0Zm2E HU0sn/5KbvP+MkTHL8jH0V1PNE+rVbfbd9KQZKlZpOPhWeK/ymq1r4uS+ A==; X-CSE-ConnectionGUID: I1rlg2WKSEWH1y5tIre4uQ== X-CSE-MsgGUID: lC1VCca1QAmayBZzWtSSsQ== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="58122884" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 May 2026 07:41:05 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 27 May 2026 07:41:04 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:00 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:51 +0530 Subject: [PATCH 02/12] media: saa7110: use string_choices helper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-2-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/saa7110.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/saa7110.c b/drivers/media/i2c/saa7110.c index 652058b8f..d4b205db7 100644 --- a/drivers/media/i2c/saa7110.c +++ b/drivers/media/i2c/saa7110.c @@ -14,6 +14,7 @@ =20 #include #include +#include #include #include #include @@ -310,7 +311,7 @@ static int saa7110_s_stream(struct v4l2_subdev *sd, int= enable) if (decoder->enable !=3D enable) { decoder->enable =3D enable; saa7110_write(sd, 0x0E, enable ? 0x18 : 0x80); - v4l2_dbg(1, debug, sd, "YUV %s\n", enable ? "on" : "off"); + v4l2_dbg(1, debug, sd, "YUV %s\n", str_on_off(enable)); } return 0; } --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 83D74400E19; Wed, 27 May 2026 14:41:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892870; cv=none; b=LmCoTisZNdm0QVYazNX8GBfbIUOXWlo9SOROS7FLJQidaeJBw3jPyjmL6WoP7dQ+wq7sFBeFpgySbNYnuRpf3leUcwNiZ6NshBj2O+Sp3K+pbLMea4S3L+sS1lT6MkIF1T2mKCc4FRAhfqbt0zP01GDnl6SJ4Ig1ScUKwMg8Kwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892870; c=relaxed/simple; bh=56TZVMmwQ350rP+Hhihbq5MeeuCza3ba16eSGAAbTUQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=rqLGAIvjOJ67gW15dQYgdkz2nkq9QEwxAvGnkIkLW3AgWD2rGN4oCgsgC/ewGoHTv5GtJBQZf7tTgIJK4GWct57/r1c0QGF76Z93hskYUhobtkJKkLRqiS+ulbGkbJpn2BS7WMW4TeZE7E3UMlNnwyntz8x3VLSsuNVnDSixAoU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=VsgYminU; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="VsgYminU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892869; x=1811428869; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=56TZVMmwQ350rP+Hhihbq5MeeuCza3ba16eSGAAbTUQ=; b=VsgYminUQKyz7KYz9Xvn5Magt9TWBmLMnrYiMZr42rZoa86XGaoIHs3L 1c+Fqm6gdAE363xBudaF0YxeyL/iFTFZxNRhQAWbs5h6VdB6gXfMiBKka PLti2SMZ2pOEMH9dhBV4B29Ai70TY27IDyswrTRA3Q8XQQK/UybMTLvJ8 Bacmr5zdgOficpi4L/xMn3W0hHQoGz2LSqoO90QljDC5Yrgi6lgwLmVbW IKOtcHLzsa21uwbfQruhR4FBQzXJS4F/3AkuUIPVE95e7FPB4983bpJvh GmSYZVohel4F+AkKoO1BukSfcByLFvndKrnvjDBWVBfPqXC6nmaUfRS2O w==; X-CSE-ConnectionGUID: IGAoKRODQneZmtxPcp4fiA== X-CSE-MsgGUID: hbxYEbFcSGSKBcRvIA5RVQ== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="225365653" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2026 07:41:08 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.87.71) by chn-vm-ex1.mchp-main.com (10.10.87.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.41; Wed, 27 May 2026 07:41:08 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:04 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:52 +0530 Subject: [PATCH 03/12] media: tvp7002: use string_choices helper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-3-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/tvp7002.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 3979ccde5..fba668a60 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -772,7 +773,7 @@ static int tvp7002_log_status(struct v4l2_subdev *sd) bt->width, bt->height); } v4l2_info(sd, "Streaming enabled: %s\n", - device->streaming ? "yes" : "no"); + str_yes_no(device->streaming)); =20 /* Print the current value of the gain control */ v4l2_ctrl_handler_log_status(&device->hdl, sd->name); --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 F25154014B8; Wed, 27 May 2026 14:41:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892875; cv=none; b=kcwUsBYnASU4zo2wqwf2NQmhAd8Iv5yuY/nLaTY4npvSKmgKSJnhbC637oAn7jUui+YWe/FYey9Xa5X9eQjLCG6/vIi29YbOze9JmLOtbJbYml01sIjo/EymfQSaAxgNR6p+8GphVpbXVPcTBU2gMnfOvTJu8tvmriol0bdjymI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892875; c=relaxed/simple; bh=DqXouRUNnZrNiECLoQjlXkQiq7bWi8maOlUbJfbta/0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=Jr+4CML/7MHkgmsvVvo66nONvZTWoHEfE3KA6TS2hCsplc8O3miwE7Ov/TWNWJwTRXTc1+RW0DspaypxzaQDQMrBgedgDXWPn48ujFHCYgPzdrg3CJHSRlg+FA0HOT+yIdz/P2Jvn6YJRSZGZfEryeb84Ad0+Dy9ky9RyRfFeDc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=k81LvWLh; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="k81LvWLh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892874; x=1811428874; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=DqXouRUNnZrNiECLoQjlXkQiq7bWi8maOlUbJfbta/0=; b=k81LvWLhherIAapUgmb1iGYtbuwe4EOV17ZQPyN4FTt7wkSITBs1ktMM 41NM/5O8vL5L4ZpaXWTOB3NfQKYlHqIEppcmZdVvk8pNeYbR61uobWY2R yy50DBgTjKqtIelCzgmI8IABoh7Wh/NzWUulV000ilN/iCU+R67TWQBQv vILX77aqrKnffDpRAFZ7fzk5lXv3hltTAQXb2055tF6Tr6w3ioqApDYxW c4MUt/nLe9AnsjVIb04M/iW3+7tA7DT27lTxSdrIxk8esb8nKwpeQafx1 rwbNyMa2rp4G1zWazpvjKU6SThHsAlmevQvifKkC+vXTQDZhRYEmIE0bN w==; X-CSE-ConnectionGUID: ksn6MGF8TJCKdr8YE52grQ== X-CSE-MsgGUID: o5o1Ux5AT9ijaTGI9BANuA== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="58122890" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 May 2026 07:41:14 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 27 May 2026 07:41:12 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:09 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:53 +0530 Subject: [PATCH 04/12] media: vpx3220: use string_choices helper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-4-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/vpx3220.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/vpx3220.c b/drivers/media/i2c/vpx3220.c index 29bcbb5a5..881129d67 100644 --- a/drivers/media/i2c/vpx3220.c +++ b/drivers/media/i2c/vpx3220.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -401,7 +402,7 @@ static int vpx3220_s_routing(struct v4l2_subdev *sd, =20 static int vpx3220_s_stream(struct v4l2_subdev *sd, int enable) { - v4l2_dbg(1, debug, sd, "s_stream %s\n", enable ? "on" : "off"); + v4l2_dbg(1, debug, sd, "s_stream %s\n", str_on_off(enable)); =20 vpx3220_write(sd, 0xf2, (enable ? 0x1b : 0x00)); return 0; --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 62C624014B2; Wed, 27 May 2026 14:41:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892879; cv=none; b=pQGG9qKLKLUYNncFzqaIGAk8wAqZ+PZQdjfv4tqYDuIuw7vUfNu+f4fB5CMlFdc9/hvSO6y9RLE9ZePsomUcChzEMjDNAVMorOuRG2VxdNikMwZK8SmjIm9PgLC88OdxwxcyC19KpgeZtrtn0F2n0X9eE5TQ9rhjcO7adMdq7hA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892879; c=relaxed/simple; bh=syYAYwWLcKAglC7BMCTOhMVncEhqXuo7fInXwJfLQ2c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=ninnBEZv8iu5qWx98QaFJK64h1tq1cJSrGUhQTUZyLmK7AVuG5poDLfgw+IBct2H23WP6BjiZdnomaQb9c93uFR52fLVDTfZxrIpJXAztH/YREUp/SJPqeraR6+mnL7plRQIqFOJwik7aGTjI3yZ55McBdmKIvnO89nRYU1fnvw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=kYFX/2Qn; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="kYFX/2Qn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892879; x=1811428879; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=syYAYwWLcKAglC7BMCTOhMVncEhqXuo7fInXwJfLQ2c=; b=kYFX/2Qn8iPHw8Kmj09rak/y4pcWHYKKm9fhDeglxfH/9n9GDYeqZtd/ eUUtNJi9wx6SOFBODrbP0NcT0zTvd6cHiXww0QyBW7Vv+VhbGyM+STwcY mxmZLip07kWENoUDGUk3ituzt9Us0wjw78pScXZBVHPZwdyJu5GkZqMNZ GBa2VfBBQAJT/5+iQLFN7nu767fGu2T+xc9H5+3Ff2cFHOo9B3L/xUkQx Pbdk7MM3csqzbhuFXzpB+aqZxDnTV1OZB/fa1kPfj4z3JuZtBDbOfAxgf rupPUbI8gJOtAPk14aMN6CyEGl05WjTid+Xk/f/asShm/Je6jaZIPFGhu g==; X-CSE-ConnectionGUID: RqOWIvG/QvGZQ7RtiasKVw== X-CSE-MsgGUID: /aRN1AQPTgiNq1WrPDxwCA== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="289515129" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2026 07:41:18 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.87.71) by chn-vm-ex2.mchp-main.com (10.10.87.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.41; Wed, 27 May 2026 07:41:17 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:13 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:54 +0530 Subject: [PATCH 05/12] media: msp3400: use string_choices helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-5-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/msp3400-driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/msp3400-driver.c b/drivers/media/i2c/msp3400= -driver.c index 413cfbc2d..88952e7e2 100644 --- a/drivers/media/i2c/msp3400-driver.c +++ b/drivers/media/i2c/msp3400-driver.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -338,8 +339,8 @@ static int msp_s_ctrl(struct v4l2_ctrl *ctrl) val =3D (val * 0x7f / 65535) << 8; =20 dev_dbg_lvl(&client->dev, 1, msp_debug, "mute=3D%s scanning=3D%s volume= =3D%d\n", - state->muted->val ? "on" : "off", - state->scan_in_progress ? "yes" : "no", + str_on_off(state->muted->val), + str_yes_no(state->scan_in_progress), state->volume->val); =20 msp_write_dsp(client, 0x0000, val); --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 913654014B2; Wed, 27 May 2026 14:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892884; cv=none; b=iMEB2IHsOFirIGArUiNq4HLfJsCCs4V8uoQ7BASahtNenxaPRKWmMmYMtG4dirBhzUzsabnU2jAz/mJZ2rUTwd1XIvBf8YiYXO5Ufyt+k2k/rXAZ28b1qHoLfqUuVOxiSIYnETZwL0Fut5V+fiOY0/WfdDxQAW5Xd4n5AyHq5ok= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892884; c=relaxed/simple; bh=t5MAiVhsMpEGMjr1W5caWLxpCOAhkKjvZOCk+Mzuae0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=M2Jt3i7oO+U9RVvuEqeSF1/NS26lfComCRB7JML64AZWdaT9ScmwPOtrEJUVWQsSOsfU4KDiOJoVgxtNbli/LhYgf+IBYyzKRrYTemdfq26Ba9RFyJYqa6MQtN/sqn4NRBAsyinzYufn6eEJZoxeJ3CdikXor+ziGaoYHNnUTIY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=WH7Z1WH2; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="WH7Z1WH2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892882; x=1811428882; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=t5MAiVhsMpEGMjr1W5caWLxpCOAhkKjvZOCk+Mzuae0=; b=WH7Z1WH2EMi7nzBZsEZFPDW1uE4CccAave7BUoqEcTYVrD84IeXsPwfg A8NCE0v1yoJXAZBDCVmiIXs7muAVmL649QCYzItYbRI9ZN6/fQeSp1H89 izMVT2iCT/IMSS4XqJySbhWL2qtMC9IruWIIvDyuTCZAx6EuW7lLKiRad Sz5YnfW3qLtRZ/fExTeZKJCE4JvetzZxtiYjL9zMKLLbQnjBAufX6Devn QCq2/zQpVc7gWw+HSxcA3dVTGyQdosJxt63QpVJ7B44DJt4ZNRpoZafMq w+/4bZ9MQQTBFnvZxz2OYNP2BJCV9tlMAryRVDyprtAjsZ4KexczgK7Gn A==; X-CSE-ConnectionGUID: d4O2hpbfR1qu8CdKosrxyA== X-CSE-MsgGUID: 65z3L5BOQpe5Le3CHpKihw== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="67002849" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 May 2026 07:41:22 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 27 May 2026 07:41:21 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:17 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:55 +0530 Subject: [PATCH 06/12] media: tda1997x: use string_choices helper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-6-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/tda1997x.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index afa1d6f34..d509d26ba 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -1969,13 +1970,13 @@ static int tda1997x_log_status(struct v4l2_subdev *= sd) v4l2_info(sd, "-----Chip status-----\n"); v4l2_info(sd, "Chip: %s N%d\n", state->info->name, state->chip_revision + 1); - v4l2_info(sd, "EDID Enabled: %s\n", state->edid.present ? "yes" : "no"); + v4l2_info(sd, "EDID Enabled: %s\n", str_yes_no(state->edid.present)); =20 v4l2_info(sd, "-----Signal status-----\n"); v4l2_info(sd, "Cable detected (+5V power): %s\n", - tda1997x_detect_tx_5v(sd) ? "yes" : "no"); + str_yes_no(tda1997x_detect_tx_5v(sd))); v4l2_info(sd, "HPD detected: %s\n", - tda1997x_detect_tx_hpd(sd) ? "yes" : "no"); + str_yes_no(tda1997x_detect_tx_hpd(sd))); =20 v4l2_info(sd, "-----Video Timings-----\n"); switch (tda1997x_detect_std(state, &timings)) { --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 E96104014B2; Wed, 27 May 2026 14:41:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892888; cv=none; b=ensPPKTmae0CH7eSzy9Tpb2Sg1TTi/mXPmYWKWtizZl7wHs8WpQfsaSWiXraYTNMByduNMADrxfTBNdyJVOzp5ovg/Srt68G9sUPtVzmSvU/6ysvfQs5o5UGzYe/5m9kqo4RSZ2Joj4syVWP+BASw126KtBbIE03NhgRpFY/LIg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892888; c=relaxed/simple; bh=O9dF5ZEfJNpQgmZIBOVHmn07Ohic32zxhXXlKJXsZmc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=JL/KLwD3kOUuSKU7RJkOwJLQOU2Mtye9Gi3rfb5NWqNqPoRbT+KUfAvuU4vdDLg+m/dF2R5ujkfoVPt+ejnTgrd1lXxKezuKWzIHoDJ1Z2uabEkZTTtiNv4xiHc1pHih8lAOpdBD73HB2QZkJUNj1W3ELArjcFaJqvSoh0sdO9M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=nbYKXuDa; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="nbYKXuDa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892887; x=1811428887; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=O9dF5ZEfJNpQgmZIBOVHmn07Ohic32zxhXXlKJXsZmc=; b=nbYKXuDa9LJp1RhEafJ1G6vziQSiQADKvpJu6d+ler+5JSWfQEs43Ktk srW0Nbj6hH5YFVAR+Ea8bMIPPhFEQ0noDdhNBIfeFQz3D6jGPCF0/fNUp iKHzv3bw9XFwl3tMDPslRKCqlGuHdq8LG6THMykBWSzqGHBwRin7Zqkzx IhplcYsLp977kP+HZ4jN+21m77VRTd37sCHL9Uvw7BuyX5btaRS0U0TWY 13Cnp4kw3xkEFMesZECVKg2IdYnPjOPaSWJsCjPYhR2/IwkhhxFexAd8S OblSoqwk5wDfcnBb3HmlJBdv9jjh5+fFfX8jsNF/3ufPgJDOMHAdO9v8d w==; X-CSE-ConnectionGUID: G1pshg5NRriwkIlwEHTZbQ== X-CSE-MsgGUID: rqgfLAxBSeyiVaOpOA/9Kw== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="58541474" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 May 2026 07:41:26 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 27 May 2026 07:41:25 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:22 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:56 +0530 Subject: [PATCH 07/12] media: ths8200: use string_choices helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-7-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/ths8200.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ths8200.c b/drivers/media/i2c/ths8200.c index 808ef16ec..88d826a03 100644 --- a/drivers/media/i2c/ths8200.c +++ b/drivers/media/i2c/ths8200.c @@ -20,6 +20,7 @@ #include #include #include +#include #include =20 #include @@ -127,10 +128,10 @@ static int ths8200_log_status(struct v4l2_subdev *sd) =20 v4l2_info(sd, "----- Chip status -----\n"); v4l2_info(sd, "version: %u\n", state->chip_version); - v4l2_info(sd, "power: %s\n", (reg_03 & 0x0c) ? "off" : "on"); - v4l2_info(sd, "reset: %s\n", (reg_03 & 0x01) ? "off" : "on"); + v4l2_info(sd, "power: %s\n", str_off_on(reg_03 & 0x0c)); + v4l2_info(sd, "reset: %s\n", str_off_on(reg_03 & 0x01)); v4l2_info(sd, "test pattern: %s\n", - (reg_03 & 0x20) ? "enabled" : "disabled"); + str_enabled_disabled(reg_03 & 0x20)); v4l2_info(sd, "format: %ux%u\n", ths8200_read(sd, THS8200_DTG2_PIXEL_CNT_MSB) * 256 + ths8200_read(sd, THS8200_DTG2_PIXEL_CNT_LSB), @@ -146,7 +147,7 @@ static int ths8200_s_power(struct v4l2_subdev *sd, int = on) { struct ths8200_state *state =3D to_state(sd); =20 - v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, on ? "on" : "off"); + v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, str_on_off(on)); =20 state->power_on =3D on; =20 --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 B7D03426ED8; Wed, 27 May 2026 14:41:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892892; cv=none; b=UDlXBFZPPhI9d+oaEJjF3Q82YwPqWn73JpoppHSx+r2GG77tVX5X18erw1Xm/9nMrQrwdv1rBxZAGL3bibYH/y00cQssl0jl3tqzKK0EjGe/iGfQ1nSaUrCfVZcGh/L6SXnXJOFgiGtZAcy0S9uRdMJMbnWksfQdGE8M4C3Sv78= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892892; c=relaxed/simple; bh=QgACeNWqZEfeqr8+YCjS0n7Pug4kQEtqpeNrOcFaEy0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=J5cgCQn5ZSxia3aXlltYJafj2WPXAGSolNjgz702p4HFAmMUX3m1acG+4UyMPBgrpCna58MB8fUAMmh78ixpVAclu0XQHWQHhc2+QeVVMnVJjGt8UxYt0PLApJhhITKuY1Jzfkis7fGjDgYH5wl9F55YAYwHG4eBv4kQKx8GUp0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=tw7piZUu; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="tw7piZUu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892890; x=1811428890; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=QgACeNWqZEfeqr8+YCjS0n7Pug4kQEtqpeNrOcFaEy0=; b=tw7piZUuTO60pwSDtuwWgqb5a9ldfOWnpjGoNa2x5ByTUxdSInRIKLrL QXAviWxQ9XldQhA6M1eU169l3zkzeEt84vNOfQTMcdp34M3FpgfqVX/UI xacJy5ChnsfcUSQ0gDCDsYCtLtCrBl3kuZZgwHndb3aJnQ4FyVCgF94Ci wGCqUH6j0f3ufWr2/MSGkMuO+LJdiAp1mBCknrzygLzbXR6cxBViXGBMr TMKvcKjzG7QZyPiSXdubJKgbiPmV92sHbTgVaU0CPdsrl5Fg6QseMoO54 Y93UrsDxooIBvkoS5+XR7TWOi/WVUFOIH6O0swYRDal0LalHbqHs/HVCe Q==; X-CSE-ConnectionGUID: wgJtjh2CS+auOMm79b/qjg== X-CSE-MsgGUID: DJm/sH9/TYi1gcwMf1QBXA== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="58541478" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2026 07:41:30 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.87.71) by chn-vm-ex2.mchp-main.com (10.10.87.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.41; Wed, 27 May 2026 07:41:30 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:26 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:57 +0530 Subject: [PATCH 08/12] media: adv7511: use string_choices helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-8-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/adv7511-v4l2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/adv7511-v4l2.c b/drivers/media/i2c/adv7511-v= 4l2.c index 860cff50c..062ef8844 100644 --- a/drivers/media/i2c/adv7511-v4l2.c +++ b/drivers/media/i2c/adv7511-v4l2.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -583,7 +584,7 @@ static int adv7511_log_status(struct v4l2_subdev *sd) "9", "A", "B", "C", "D", "E", "F" }; =20 - v4l2_info(sd, "power %s\n", state->power_on ? "on" : "off"); + v4l2_info(sd, "power %s\n", str_on_off(state->power_on)); v4l2_info(sd, "%s hotplug, %s Rx Sense, %s EDID (%d block(s))\n", (adv7511_rd(sd, 0x42) & MASK_ADV7511_HPD_DETECT) ? "detected" : "no", (adv7511_rd(sd, 0x42) & MASK_ADV7511_MSEN_DETECT) ? "detected" : "no", @@ -592,8 +593,7 @@ static int adv7511_log_status(struct v4l2_subdev *sd) v4l2_info(sd, "%s output %s\n", (adv7511_rd(sd, 0xaf) & 0x02) ? "HDMI" : "DVI-D", - (adv7511_rd(sd, 0xa1) & 0x3c) ? - "disabled" : "enabled"); + str_disabled_enabled(adv7511_rd(sd, 0xa1) & 0x3c)); v4l2_info(sd, "state: %s, error: %s, detect count: %u, msk/irq: %02x/%02x= \n", states[adv7511_rd(sd, 0xc8) & 0xf], errors[adv7511_rd(sd, 0xc8) >> 4], state->edid_detect_counter, @@ -635,8 +635,7 @@ static int adv7511_log_status(struct v4l2_subdev *sd) =20 v4l2_info(sd, "i2c cec addr: 0x%x\n", state->i2c_cec_addr); =20 - v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ? - "enabled" : "disabled"); + v4l2_info(sd, "CEC: %s\n", str_enabled_disabled(state->cec_enabled_adap)); if (state->cec_enabled_adap) { for (i =3D 0; i < ADV7511_MAX_ADDRS; i++) { bool is_valid =3D state->cec_valid_addrs & (1 << i); @@ -657,7 +656,7 @@ static int adv7511_s_power(struct v4l2_subdev *sd, int = on) const int retries =3D 20; int i; =20 - v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, on ? "on" : "off"); + v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, str_on_off(on)); =20 state->power_on =3D on; =20 --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 568F7407570; Wed, 27 May 2026 14:41:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892896; cv=none; b=WujKpievpNwiix74/Fiq/joTcwTaUIRz5LU3R3n75Cgc2xmaIbe+yWv96PyfRJoUeAO5P+iNXEq07SJK3vrhjmaN4Z0auK9aHOpx+Um/+JEP9ABlazeo1ar9aEoEjjxipPBoiJ3a0IQU7bl8Ck43XoCGCBtcQ1doJcJgUdJtL4c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892896; c=relaxed/simple; bh=1u9zQE3qO7VfrYuwQr+KPDUAWfSiUM1PI/Z9Lz9dUWg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=He6eXpJygygAQBbSiulHPtB8d2WW/vAgcsNQ3RQbYPAC7zlSBspQ+9joeByV0ftJRarlkuBtRYF5SnW08mfm2BAInXSNmBqmVqxkbiAbFSPc9hd/J1nHVHk5gfHKnJ/VeR+zFKzOr9OhhDYTnm508FkPaNZH9+CcI42jmamQPm4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=LiGQJ26x; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="LiGQJ26x" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892895; x=1811428895; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=1u9zQE3qO7VfrYuwQr+KPDUAWfSiUM1PI/Z9Lz9dUWg=; b=LiGQJ26xVse9AJiQ/vCUAG1Aa9KiLLyfe/2RO5Od6sPLHd9HqrmkK0sx AiSSwWvm9YlcenSGhFT347NQRrWDjX/o/scPGSBohWxrCujqnQpZweWf+ kCiHmt6cs8CG5GKh5596QVLeCLhS2J7rndEbRoVGKexHHrAwUArkukdHL DeFBWuc6U6Rfd2+agXK025QdhuHgZzZN/kVgx0VFmnVQI8I8o/wgXO/Ph PRwLCtMhoFOlh5gCXk8pAp2LbrFzVtPc1EA4SbH8UR+AOBwN6MLO8XWTV uDcRvfVRCFJ3FjvnmBZuEDWz9Tz6qFba9hB81vJKaYaZRobmTGCLC/Gsm A==; X-CSE-ConnectionGUID: aQL9OlPaTXebelIQomfbOw== X-CSE-MsgGUID: 0rewc6iFQWW1r1jZ2HiGrA== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="67002854" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 May 2026 07:41:35 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 27 May 2026 07:41:34 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:30 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:58 +0530 Subject: [PATCH 09/12] media: saa7127: use string_choices helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-9-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/saa7127.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/saa7127.c b/drivers/media/i2c/saa7127.c index fdf17f6fa..182b40855 100644 --- a/drivers/media/i2c/saa7127.c +++ b/drivers/media/i2c/saa7127.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -343,7 +344,7 @@ static int saa7127_set_vps(struct v4l2_subdev *sd, cons= t struct v4l2_sliced_vbi_ if (enable && (data->field !=3D 0 || data->line !=3D 16)) return -EINVAL; if (state->vps_enable !=3D enable) { - v4l2_dbg(1, debug, sd, "Turn VPS Signal %s\n", enable ? "on" : "off"); + v4l2_dbg(1, debug, sd, "Turn VPS Signal %s\n", str_on_off(enable)); saa7127_write(sd, 0x54, enable << 7); state->vps_enable =3D enable; } @@ -376,7 +377,7 @@ static int saa7127_set_cc(struct v4l2_subdev *sd, const= struct v4l2_sliced_vbi_d return -EINVAL; if (state->cc_enable !=3D enable) { v4l2_dbg(1, debug, sd, - "Turn CC %s\n", enable ? "on" : "off"); + "Turn CC %s\n", str_on_off(enable)); saa7127_write(sd, SAA7127_REG_CLOSED_CAPTION, (state->xds_enable << 7) | (enable << 6) | 0x11); state->cc_enable =3D enable; @@ -402,7 +403,7 @@ static int saa7127_set_xds(struct v4l2_subdev *sd, cons= t struct v4l2_sliced_vbi_ if (enable && (data->field !=3D 1 || data->line !=3D 21)) return -EINVAL; if (state->xds_enable !=3D enable) { - v4l2_dbg(1, debug, sd, "Turn XDS %s\n", enable ? "on" : "off"); + v4l2_dbg(1, debug, sd, "Turn XDS %s\n", str_on_off(enable)); saa7127_write(sd, SAA7127_REG_CLOSED_CAPTION, (enable << 7) | (state->cc_enable << 6) | 0x11); state->xds_enable =3D enable; @@ -427,7 +428,7 @@ static int saa7127_set_wss(struct v4l2_subdev *sd, cons= t struct v4l2_sliced_vbi_ if (enable && (data->field !=3D 0 || data->line !=3D 23)) return -EINVAL; if (state->wss_enable !=3D enable) { - v4l2_dbg(1, debug, sd, "Turn WSS %s\n", enable ? "on" : "off"); + v4l2_dbg(1, debug, sd, "Turn WSS %s\n", str_on_off(enable)); saa7127_write(sd, 0x27, enable << 7); state->wss_enable =3D enable; } @@ -674,8 +675,8 @@ static int saa7127_log_status(struct v4l2_subdev *sd) output_strs[state->output_type] : "disabled"); v4l2_info(sd, "WSS: %s\n", state->wss_enable ? wss_strs[state->wss_mode] : "disabled"); - v4l2_info(sd, "VPS: %s\n", state->vps_enable ? "enabled" : "disabled= "); - v4l2_info(sd, "CC: %s\n", state->cc_enable ? "enabled" : "disabled"= ); + v4l2_info(sd, "VPS: %s\n", str_enabled_disabled(state->vps_enable)); + v4l2_info(sd, "CC: %s\n", str_enabled_disabled(state->cc_enable)); return 0; } =20 --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 D072B402B8A; Wed, 27 May 2026 14:41:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892901; cv=none; b=QRtZ6l+DPzim06IKPkmd3HyBX415nzDKxoqUeaY1ePxr3YaFvbD6XWDAW8jxOONn8nAcHv1Rv8bQITF9t7v5vt6MsHyHr1qZNkBlvQI3JAA0ufx+e5bWCndH+Ww+2LnCevwWKsn798pbBhsOscZV+aKEr3o6gR/jUIoRN1HgRUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892901; c=relaxed/simple; bh=1yf0UY0Ap0VuYT9Fb7dhFa0Rl/LF/JNp175GQkm5AiM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=pVTZYX56Z+E7N9/LEumrW3Y1fchpTYPfDo82/z2/UTVmNT0OGoLZOowMY2HMdEUKM0HJGT9sjHfd+E3z5x3u1B8ImR0P76mJTWpuGvTt7J52JmXtyOE0S1zzr3Zb37GHvVGmeROXjMUbWsMKIDu/85+nFhAoSePrDS6q02D4bZ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=Uuyh7HR3; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="Uuyh7HR3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892900; x=1811428900; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=1yf0UY0Ap0VuYT9Fb7dhFa0Rl/LF/JNp175GQkm5AiM=; b=Uuyh7HR3GjDeOq75LJHP5Ml6ABEUoWxGKmTDKprVrOwr038QYoizAOAJ v4lYyS2GFA0TiXE6biZy1Q7FqSkzWw0UVcyF0KJZX6P6gGyzRJDVuYjwO ojFDybAOyhUo0PS3Z0egzjx98oj8ayGxxhTJEw/JxTv7TM5rmtpoepLTm I/sJJeEcuUn4uPKDDCBOaw+pewtVUHogfwa8wGnAM6n4gaWKN8IyvEedh V/hURMZehwCg2HeLEWXrTW0CS/bz+jqOowsuwyEOHwW9DjpXnG+TCdZ4t H/jQXwxRD4NGynL9ypNoGWflKJNhT1MM748Oi2RilAkgTIGP98yTuHX+r w==; X-CSE-ConnectionGUID: 3BotJfn9SoKWL3f5S53HqA== X-CSE-MsgGUID: gjQ+AwKrT5Sgbv0o94ZhZw== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="289515140" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 May 2026 07:41:40 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 27 May 2026 07:41:38 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:35 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:10:59 +0530 Subject: [PATCH 10/12] media: adv7604: use string_choices helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-10-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/adv7604.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index ac9c69ce4..3b06ddad8 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -2563,15 +2564,14 @@ static int adv76xx_log_status(struct v4l2_subdev *s= d) }; =20 v4l2_info(sd, "-----Chip status-----\n"); - v4l2_info(sd, "Chip power: %s\n", no_power(sd) ? "off" : "on"); + v4l2_info(sd, "Chip power: %s\n", str_off_on(no_power(sd))); edid_enabled =3D rep_read(sd, info->edid_status_reg); v4l2_info(sd, "EDID enabled port A: %s, B: %s, C: %s, D: %s\n", ((edid_enabled & 0x01) ? "Yes" : "No"), ((edid_enabled & 0x02) ? "Yes" : "No"), ((edid_enabled & 0x04) ? "Yes" : "No"), ((edid_enabled & 0x08) ? "Yes" : "No")); - v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ? - "enabled" : "disabled"); + v4l2_info(sd, "CEC: %s\n", str_enabled_disabled(state->cec_enabled_adap)); if (state->cec_enabled_adap) { int i; =20 @@ -2592,14 +2592,14 @@ static int adv76xx_log_status(struct v4l2_subdev *s= d) ((cable_det & 0x04) ? "Yes" : "No"), ((cable_det & 0x08) ? "Yes" : "No")); v4l2_info(sd, "TMDS signal detected: %s\n", - no_signal_tmds(sd) ? "false" : "true"); + str_false_true(no_signal_tmds(sd))); v4l2_info(sd, "TMDS signal locked: %s\n", - no_lock_tmds(sd) ? "false" : "true"); - v4l2_info(sd, "SSPD locked: %s\n", no_lock_sspd(sd) ? "false" : "true"); - v4l2_info(sd, "STDI locked: %s\n", no_lock_stdi(sd) ? "false" : "true"); - v4l2_info(sd, "CP locked: %s\n", no_lock_cp(sd) ? "false" : "true"); + str_false_true(no_lock_tmds(sd))); + v4l2_info(sd, "SSPD locked: %s\n", str_false_true(no_lock_sspd(sd))); + v4l2_info(sd, "STDI locked: %s\n", str_false_true(no_lock_stdi(sd))); + v4l2_info(sd, "CP locked: %s\n", str_false_true(no_lock_cp(sd))); v4l2_info(sd, "CP free run: %s\n", - (in_free_run(sd)) ? "on" : "off"); + str_on_off(in_free_run(sd))); v4l2_info(sd, "Prim-mode =3D 0x%x, video std =3D 0x%x, v_freq =3D 0x%x\n", io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f, (io_read(sd, 0x01) & 0x70) >> 4); @@ -2639,7 +2639,7 @@ static int adv76xx_log_status(struct v4l2_subdev *sd) (reg_io_0x02 & 0x02) ? "RGB" : "YCbCr", (((reg_io_0x02 >> 2) & 0x01) ^ (reg_io_0x02 & 0x01)) ? "(16-235)" : "(0-255)", - (reg_io_0x02 & 0x08) ? "enabled" : "disabled"); + str_enabled_disabled(reg_io_0x02 & 0x08)); } v4l2_info(sd, "Color space conversion: %s\n", csc_coeff_sel_rb[cp_read(sd, info->cp_csc) >> 4]); @@ -2651,9 +2651,9 @@ static int adv76xx_log_status(struct v4l2_subdev *sd) v4l2_info(sd, "Digital video port selected: %c\n", (hdmi_read(sd, 0x00) & 0x03) + 'A'); v4l2_info(sd, "HDCP encrypted content: %s\n", - (hdmi_read(sd, 0x05) & 0x40) ? "true" : "false"); + str_true_false(hdmi_read(sd, 0x05) & 0x40)); v4l2_info(sd, "HDCP keys read: %s%s\n", - (hdmi_read(sd, 0x04) & 0x20) ? "yes" : "no", + str_yes_no(hdmi_read(sd, 0x04) & 0x20), (hdmi_read(sd, 0x04) & 0x10) ? "ERROR" : ""); if (is_hdmi(sd)) { bool audio_pll_locked =3D hdmi_read(sd, 0x04) & 0x01; @@ -2674,7 +2674,7 @@ static int adv76xx_log_status(struct v4l2_subdev *sd) v4l2_info(sd, "Audio N: %u\n", ((hdmi_read(sd, 0x5d) & 0x0f) << 16) + (hdmi_read(sd, 0x5e) << 8) + hdmi_read(sd, 0x5f)); - v4l2_info(sd, "AV Mute: %s\n", (hdmi_read(sd, 0x04) & 0x40) ? "on" : "of= f"); + v4l2_info(sd, "AV Mute: %s\n", str_on_off(hdmi_read(sd, 0x04) & 0x40)); =20 v4l2_info(sd, "Deep color mode: %s\n", deep_color_mode_txt[(hdmi_read(sd= , 0x0b) & 0x60) >> 5]); v4l2_info(sd, "HDMI colorspace: %s\n", hdmi_color_space_txt[hdmi_read(sd= , 0x53) & 0xf]); --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 AC1EA42882B; Wed, 27 May 2026 14:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892905; cv=none; b=PQlpO+DXgRXDzL37i6iIBkq9ghV2POmlmlNvK1QqdctIduyCHXu6X1AXaEth6zK+WWHRS+6p2cGNgmNvyzUcbv0SK2LJKPZTIPLE/yEhp3DaQlgI1IeLMJScIveGZnNtq5WGpyodJ5fW8E4I8wfT1eqlTdHCu+MI0MJubAeZDz4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892905; c=relaxed/simple; bh=uBSKdqLZP6Jmy0x9HDnccItPG/Ikh98WNY28qCku4n4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=BJyiOLZiqxc5SawvFfKHECtow/MndPcWAL4dhJPjcJJR0N34yFTXRjQS1iXpf/NbtI0/kqCdjw9aI3ErvYSwiQe9P+tr1jkfTAZvmkaI8+kWAeeiTApSgFJujrk/0u3cixSGySowc1dNLiWqi7/9DcPDwh7BEdo7il6wjcNgdSQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=titjY1KU; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="titjY1KU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892904; x=1811428904; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=uBSKdqLZP6Jmy0x9HDnccItPG/Ikh98WNY28qCku4n4=; b=titjY1KUpQ0ufvlxQri4O19Lor075fTkoJ1RqJBpZmKRIALmxDjsZTLG GdVyvRBjbMHn1Ghr+3A6cSw8YII2wllllo01WjGR0tvvbh2QFbz3ncLuQ ONSc5ym3r/kG54Xaf2jJWLxc7ydEzEXXokwDfbPT2m4/TYCee5H4RGIUD K3BSJK8Yg5efEAr0u+9b6dywTVDNz+Ny5WrL0P4AQIF5tok7XbIPbuyLf 5kE7U4sfQx59Hr5WGh8m0IrGuLtgiY6Dlouv0CHvNYy5hF+e4EEa83Ofp Rd4srn0moNwyoDvJKfCYH8KAXUbBfvkSOOLOQpBhdv9LV+TTbJIiF94Ew w==; X-CSE-ConnectionGUID: ZBZWZdEiQKO5N6QPoYMTJw== X-CSE-MsgGUID: +vNeos2QQf+TdieNbxDGXA== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="289515143" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2026 07:41:44 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.87.71) by chn-vm-ex2.mchp-main.com (10.10.87.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.41; Wed, 27 May 2026 07:41:42 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:39 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:11:00 +0530 Subject: [PATCH 11/12] media: tc358743: use string_choices helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-11-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/tc358743.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index fbd38bbfe..57d2808ba 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1308,7 +1309,7 @@ static void tc358743_hdmi_sys_int_handler(struct v4l2= _subdev *sd, bool *handled) bool tx_5v =3D tx_5v_power_present(sd); =20 v4l2_dbg(1, debug, sd, "%s: Tx 5V power present: %s\n", - __func__, tx_5v ? "yes" : "no"); + __func__, str_yes_no(tx_5v)); =20 if (tx_5v) { tc358743_enable_edid(sd); @@ -1385,26 +1386,24 @@ static int tc358743_log_status(struct v4l2_subdev *= sd) !!(sysctl & MASK_CECRST), !!(sysctl & MASK_CTXRST), !!(sysctl & MASK_HDMIRST)); - v4l2_info(sd, "Sleep mode: %s\n", sysctl & MASK_SLEEP ? "on" : "off"); + v4l2_info(sd, "Sleep mode: %s\n", str_on_off(sysctl & MASK_SLEEP)); v4l2_info(sd, "Cable detected (+5V power): %s\n", - hdmi_sys_status & MASK_S_DDC5V ? "yes" : "no"); + str_yes_no(hdmi_sys_status & MASK_S_DDC5V)); v4l2_info(sd, "DDC lines enabled: %s\n", - (i2c_rd8(sd, EDID_MODE) & MASK_EDID_MODE_E_DDC) ? - "yes" : "no"); + str_yes_no(i2c_rd8(sd, EDID_MODE) & MASK_EDID_MODE_E_DDC)); v4l2_info(sd, "Hotplug enabled: %s\n", - (i2c_rd8(sd, HPD_CTL) & MASK_HPD_OUT0) ? - "yes" : "no"); + str_yes_no(i2c_rd8(sd, HPD_CTL) & MASK_HPD_OUT0)); v4l2_info(sd, "CEC enabled: %s\n", - (i2c_rd16(sd, CECEN) & MASK_CECEN) ? "yes" : "no"); + str_yes_no(i2c_rd16(sd, CECEN) & MASK_CECEN)); v4l2_info(sd, "-----Signal status-----\n"); v4l2_info(sd, "TMDS signal detected: %s\n", - hdmi_sys_status & MASK_S_TMDS ? "yes" : "no"); + str_yes_no(hdmi_sys_status & MASK_S_TMDS)); v4l2_info(sd, "Stable sync signal: %s\n", - hdmi_sys_status & MASK_S_SYNC ? "yes" : "no"); + str_yes_no(hdmi_sys_status & MASK_S_SYNC)); v4l2_info(sd, "PHY PLL locked: %s\n", - hdmi_sys_status & MASK_S_PHY_PLL ? "yes" : "no"); + str_yes_no(hdmi_sys_status & MASK_S_PHY_PLL)); v4l2_info(sd, "PHY DE detected: %s\n", - hdmi_sys_status & MASK_S_PHY_SCDT ? "yes" : "no"); + str_yes_no(hdmi_sys_status & MASK_S_PHY_SCDT)); =20 if (tc358743_get_detected_timings(sd, &timings)) { v4l2_info(sd, "No video detected\n"); @@ -1421,17 +1420,13 @@ static int tc358743_log_status(struct v4l2_subdev *= sd) v4l2_info(sd, "Lanes in use: %d\n", state->csi_lanes_in_use); v4l2_info(sd, "Waiting for particular sync signal: %s\n", - (i2c_rd16(sd, CSI_STATUS) & MASK_S_WSYNC) ? - "yes" : "no"); + str_yes_no(i2c_rd16(sd, CSI_STATUS) & MASK_S_WSYNC)); v4l2_info(sd, "Transmit mode: %s\n", - (i2c_rd16(sd, CSI_STATUS) & MASK_S_TXACT) ? - "yes" : "no"); + str_yes_no(i2c_rd16(sd, CSI_STATUS) & MASK_S_TXACT)); v4l2_info(sd, "Receive mode: %s\n", - (i2c_rd16(sd, CSI_STATUS) & MASK_S_RXACT) ? - "yes" : "no"); + str_yes_no(i2c_rd16(sd, CSI_STATUS) & MASK_S_RXACT)); v4l2_info(sd, "Stopped: %s\n", - (i2c_rd16(sd, CSI_STATUS) & MASK_S_HLT) ? - "yes" : "no"); + str_yes_no(i2c_rd16(sd, CSI_STATUS) & MASK_S_HLT)); v4l2_info(sd, "Color space: %s\n", state->mbus_fmt_code =3D=3D MEDIA_BUS_FMT_UYVY8_1X16 ? "YCbCr 422 16-bit" : @@ -1440,14 +1435,13 @@ static int tc358743_log_status(struct v4l2_subdev *= sd) =20 v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D"); v4l2_info(sd, "HDCP encrypted content: %s\n", - hdmi_sys_status & MASK_S_HDCP ? "yes" : "no"); + str_yes_no(hdmi_sys_status & MASK_S_HDCP)); v4l2_info(sd, "Input color space: %s %s range\n", input_color_space[(vi_status3 & MASK_S_V_COLOR) >> 1], (vi_status3 & MASK_LIMITED) ? "limited" : "full"); if (!is_hdmi(sd)) return 0; - v4l2_info(sd, "AV Mute: %s\n", hdmi_sys_status & MASK_S_AVMUTE ? "on" : - "off"); + v4l2_info(sd, "AV Mute: %s\n", str_on_off(hdmi_sys_status & MASK_S_AVMUTE= )); v4l2_info(sd, "Deep color mode: %d-bits per channel\n", deep_color_mode[(i2c_rd8(sd, VI_STATUS1) & MASK_S_DEEPCOLOR) >> 2]); --=20 2.34.1 From nobody Mon Jun 8 17:55:01 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 E34D042885A; Wed, 27 May 2026 14:41:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892909; cv=none; b=rcS/eBNQ1IhoitxVbnsPZq1j+YDsKJACH7Q4CYtlKCRdcSbuKR20jWRAKGDCQjX6hHUNeKkXHm73zy4N3t+GCGveoYM7Ch2Md07I4cQey2w3LiwmYGe8ftXp+hDIMlPnsryUlQIKfzdHNuTJUfxv7vxj00hUnkggGDH89NIar3I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892909; c=relaxed/simple; bh=dzAsQe9dSQKP/KKmETVzvlpxhwS+UPSSjNHgL8CwdWk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=b9f16VG2VgmGAJMCbb7tBEzyPcs2C1Y/l/UEPHfwP+3bOIUfXiCo1LjbCEiVJvkGDTYttpsB4pY+LrxWxI3B25nDuXpeI5zNUzgBh3rXx17EheMQ7viVdOwpTZHo4FXDP/Skij/UyKqyH4M9w9kqB7IUNgs1kohwCp8GzTMz3QU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=cBtalCB6; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="cBtalCB6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779892908; x=1811428908; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=dzAsQe9dSQKP/KKmETVzvlpxhwS+UPSSjNHgL8CwdWk=; b=cBtalCB62UvxMq4JhX5m7UTANc3ZlQW3OyHVMrCTpeO3zvnD/jjE98+J UohJfQlntRAvYrZGb3J6nyCHmlGwKF5KfNLkOOMzn2wTCrbPC24qPEsZD zsB5CMJxM0mPS2Rmim5pKWgSyLvuQiwxqDFGPA+u9OGZ1mYQwp/l4T1XR 2MXp2sm1VzecphicUZhxd4tYTYirGvWwAgDUb4A+ivecaCHdOLqGZN0MQ 5ma65TAfFFV92IqlCgYBqYHmaH7iumU8oCve5tyYhkOlihhvvkDfJm3Kq fWwfUupHZgx5IbQAv6nJDo7bkne+YWJ0tobi3hObWRNHCmbvhES9CkMRR A==; X-CSE-ConnectionGUID: cxUHnWiKRT2tRCofX2HxKA== X-CSE-MsgGUID: MGrItY/ASNuWyJCTMQANiA== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="58122906" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2026 07:41:48 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.87.71) by chn-vm-ex1.mchp-main.com (10.10.87.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.41; Wed, 27 May 2026 07:41:47 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 07:41:43 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 20:11:01 +0530 Subject: [PATCH 12/12] media: adv7842: use string_choices helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260527-cleanup-string-choices-media-i2c-v1-12-e8f7d2284288@microchip.com> References: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> In-Reply-To: <20260527-cleanup-string-choices-media-i2c-v1-0-e8f7d2284288@microchip.com> To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Tim Harvey , Hans Verkuil CC: , , Balakrishnan Sambath X-Mailer: b4 0.14.3 Replace open-coded boolean-to-string ternaries with the standard helpers from . No functional change. Signed-off-by: Balakrishnan Sambath --- drivers/media/i2c/adv7842.c | 44 +++++++++++++++++++++--------------------= --- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 3cfae89ce..3b68a6ad6 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -2657,12 +2658,12 @@ static int adv7842_sdp_log_status(struct v4l2_subde= v *sd) /* SDP (Standard definition processor) block */ u8 sdp_signal_detected =3D sdp_read(sd, 0x5A) & 0x01; =20 - v4l2_info(sd, "Chip powered %s\n", no_power(sd) ? "off" : "on"); + v4l2_info(sd, "Chip powered %s\n", str_off_on(no_power(sd))); v4l2_info(sd, "Prim-mode =3D 0x%x, video std =3D 0x%x\n", io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f); =20 v4l2_info(sd, "SDP: free run: %s\n", - (sdp_read(sd, 0x56) & 0x01) ? "on" : "off"); + str_on_off(sdp_read(sd, 0x56) & 0x01)); v4l2_info(sd, "SDP: %s\n", sdp_signal_detected ? "valid SD/PR signal detected" : "invalid/no signal"); if (sdp_signal_detected) { @@ -2687,7 +2688,7 @@ static int adv7842_sdp_log_status(struct v4l2_subdev = *sd) v4l2_info(sd, "SDP: %s\n", (sdp_read(sd, 0x57) & 0x08) ? "Interlaced" : "Progressive"); v4l2_info(sd, "SDP: deinterlacer %s\n", - (sdp_read(sd, 0x12) & 0x08) ? "enabled" : "disabled"); + str_enabled_disabled(sdp_read(sd, 0x12) & 0x08)); v4l2_info(sd, "SDP: csc %s mode\n", (sdp_io_read(sd, 0xe0) & 0x40) ? "auto" : "manual"); } @@ -2735,19 +2736,16 @@ static int adv7842_cp_log_status(struct v4l2_subdev= *sd) }; =20 v4l2_info(sd, "-----Chip status-----\n"); - v4l2_info(sd, "Chip power: %s\n", no_power(sd) ? "off" : "on"); + v4l2_info(sd, "Chip power: %s\n", str_off_on(no_power(sd))); v4l2_info(sd, "HDMI/DVI-D port selected: %s\n", state->hdmi_port_a ? "A" : "B"); v4l2_info(sd, "EDID A %s, B %s\n", - ((reg_rep_0x7d & 0x04) && (reg_rep_0x77 & 0x04)) ? - "enabled" : "disabled", - ((reg_rep_0x7d & 0x08) && (reg_rep_0x77 & 0x08)) ? - "enabled" : "disabled"); + str_enabled_disabled((reg_rep_0x7d & 0x04) && (reg_rep_0x77 & 0x04)), + str_enabled_disabled((reg_rep_0x7d & 0x08) && (reg_rep_0x77 & 0x08))); v4l2_info(sd, "HPD A %s, B %s\n", - reg_io_0x21 & 0x02 ? "enabled" : "disabled", - reg_io_0x21 & 0x01 ? "enabled" : "disabled"); - v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ? - "enabled" : "disabled"); + str_enabled_disabled(reg_io_0x21 & 0x02), + str_enabled_disabled(reg_io_0x21 & 0x01)); + v4l2_info(sd, "CEC: %s\n", str_enabled_disabled(state->cec_enabled_adap)); if (state->cec_enabled_adap) { int i; =20 @@ -2763,21 +2761,21 @@ static int adv7842_cp_log_status(struct v4l2_subdev= *sd) v4l2_info(sd, "-----Signal status-----\n"); if (state->hdmi_port_a) { v4l2_info(sd, "Cable detected (+5V power): %s\n", - io_read(sd, 0x6f) & 0x02 ? "true" : "false"); + str_true_false(io_read(sd, 0x6f) & 0x02)); v4l2_info(sd, "TMDS signal detected: %s\n", - (io_read(sd, 0x6a) & 0x02) ? "true" : "false"); + str_true_false(io_read(sd, 0x6a) & 0x02)); v4l2_info(sd, "TMDS signal locked: %s\n", - (io_read(sd, 0x6a) & 0x20) ? "true" : "false"); + str_true_false(io_read(sd, 0x6a) & 0x20)); } else { v4l2_info(sd, "Cable detected (+5V power):%s\n", - io_read(sd, 0x6f) & 0x01 ? "true" : "false"); + str_true_false(io_read(sd, 0x6f) & 0x01)); v4l2_info(sd, "TMDS signal detected: %s\n", - (io_read(sd, 0x6a) & 0x01) ? "true" : "false"); + str_true_false(io_read(sd, 0x6a) & 0x01)); v4l2_info(sd, "TMDS signal locked: %s\n", - (io_read(sd, 0x6a) & 0x10) ? "true" : "false"); + str_true_false(io_read(sd, 0x6a) & 0x10)); } v4l2_info(sd, "CP free run: %s\n", - (!!(cp_read(sd, 0xff) & 0x10) ? "on" : "off")); + (str_on_off(!!(cp_read(sd, 0xff) & 0x10)))); v4l2_info(sd, "Prim-mode =3D 0x%x, video std =3D 0x%x, v_freq =3D 0x%x\n", io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f, (io_read(sd, 0x01) & 0x70) >> 4); @@ -2821,7 +2819,7 @@ static int adv7842_cp_log_status(struct v4l2_subdev *= sd) (reg_io_0x02 & 0x02) ? "RGB" : "YCbCr", (((reg_io_0x02 >> 2) & 0x01) ^ (reg_io_0x02 & 0x01)) ? "(16-235)" : "(0-255)", - (reg_io_0x02 & 0x08) ? "enabled" : "disabled"); + str_enabled_disabled(reg_io_0x02 & 0x08)); temp =3D cp_read(sd, 0xf4) >> 4; v4l2_info(sd, "Color space conversion: %s\n", temp < 0 ? "" : csc_coeff_sel_rb[temp]); @@ -2831,9 +2829,9 @@ static int adv7842_cp_log_status(struct v4l2_subdev *= sd) =20 v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D"); v4l2_info(sd, "HDCP encrypted content: %s\n", - (hdmi_read(sd, 0x05) & 0x40) ? "true" : "false"); + str_true_false(hdmi_read(sd, 0x05) & 0x40)); v4l2_info(sd, "HDCP keys read: %s%s\n", - (hdmi_read(sd, 0x04) & 0x20) ? "yes" : "no", + str_yes_no(hdmi_read(sd, 0x04) & 0x20), (hdmi_read(sd, 0x04) & 0x10) ? "ERROR" : ""); if (!is_hdmi(sd)) return 0; @@ -2853,7 +2851,7 @@ static int adv7842_cp_log_status(struct v4l2_subdev *= sd) (hdmi_read(sd, 0x5e) << 8) + hdmi_read(sd, 0x5f)); v4l2_info(sd, "AV Mute: %s\n", - (hdmi_read(sd, 0x04) & 0x40) ? "on" : "off"); + str_on_off(hdmi_read(sd, 0x04) & 0x40)); temp =3D hdmi_read(sd, 0x0b) >> 6; v4l2_info(sd, "Deep color mode: %s\n", temp < 0 ? "" : deep_color_mode_txt[temp]); --=20 2.34.1