From mboxrd@z Thu Jan 1 00:00:00 1970 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: 7bit 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)); 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))); v4l2_info(sd, "-----Video Timings-----\n"); switch (tda1997x_detect_std(state, &timings)) { -- 2.34.1