From patchwork Mon Sep 30 12:04:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13816091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B95DFCF6497 for ; Mon, 30 Sep 2024 12:29:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kc6yac9SyLlHs7WRhmQW1+HPAOFx8yEw2UfT0f5Qnn8=; b=CFKosHTovrZ1Aman4RbpYrnUAy nVx5QXkA0v172WFZQiBDbzTHVkQ8Qkx1pPfCmJc1xoFzTPYZCG7TfP8/7dkcQFLy3HlUCAM+OqKor jy7rgxRu9C05SrJSe5aHjs6FFoIztjHJ9nSLfZf4+zSnAmpW6EKb9xXnlpcJjJx3RRhzv9uYL+J9q G8H0B26juy+m0ZggwlqQzwzmW/rbXrKk66coYwcPW8+xDMgRo/4OFtoQE5nbnj1gHEJxMZx5cZ6Te 6EiEQrVEmu1Ki1h9+XM04T5QGq/KkfuY3JxJb0MyGZ+FTuRpbLayiUvSjK5yKaUtikUoNBCRx+ICo 9f2TcnRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svFWK-0000000H3DU-3kPS; Mon, 30 Sep 2024 12:28:56 +0000 Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svF94-0000000GwUX-44cJ for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 12:04:56 +0000 Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-6cb2aac40faso38500546d6.1 for ; Mon, 30 Sep 2024 05:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727697894; x=1728302694; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kc6yac9SyLlHs7WRhmQW1+HPAOFx8yEw2UfT0f5Qnn8=; b=kPznu9+zz72LdJ26Yx09pcVrzSf8XEkRsY0Go2OJj1UrYxsodLxMKA5883/RV5N6sp mEjWawbaPQI1ywWSyKPoTtPxgKnOE04fd02BVfjvh78oslxuhJPVx9bvSvBNPk70TRiH EwSxBwg5y2BgDO4s+FsITvEQaJsHqzdr7pOU4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727697894; x=1728302694; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kc6yac9SyLlHs7WRhmQW1+HPAOFx8yEw2UfT0f5Qnn8=; b=OICOaaVvWCCGacj1rNYBo76OHrf1wQVu2iZMG0BqczH7tpf1yz2835TzqEQzWswb+L en1dAkHNkARetKVggnzPVt2UL0RJn5U33aFkO2+L0aq1TJD7wPZ7zkvs9RS0bcTcWIA6 Ad0XMs0EGQBQ9+AQEF53BUCOWBJTzlZKV8WeyN75Ka7nLL+LhmmAPXZogWOfV3dP1CCz o+WW9GAWgu6GLpRG/KdSlip+yfQCYmL0kY3fucK/CDVjQm2It7BGz5JQxOxEGrzYfUv7 g0LcbA4kkDNGdFnWIHU1NRsLblwiPjN+NUdgp3o2mzvYOEkZ1zjUkZVkpYurOXhpKtuW Bsjg== X-Forwarded-Encrypted: i=1; AJvYcCV7fi7lzm3rCnbP4ruk7S4AUYUS6PaUa1Czdsu7dlv9Lv8yP6Bbvsiy+g9Yd80HyNN3IoP3YBPQlnp3aQYMvXdS@lists.infradead.org X-Gm-Message-State: AOJu0Yw++80fC19wGz91SVE8kuggLtER2eW97Cr+6WJSFvgvKqppV/Vr znDsDuUSG44NE2u6ppvOWx6MCCXmEVpInH04lBu6kuiCyAoQ/PWRvcjUlYMAkQ== X-Google-Smtp-Source: AGHT+IHvTtSCRFSBPeJou8A8lJWRExB8EwT4CA/+ss3rMSh3j0C8PX4s4DLpZYrCskrdUJWUEmVJfQ== X-Received: by 2002:a05:6214:489:b0:6cb:2de5:d7a1 with SMTP id 6a1803df08f44-6cb2f270becmr284661826d6.8.1727697893842; Mon, 30 Sep 2024 05:04:53 -0700 (PDT) Received: from denia.c.googlers.com (76.224.245.35.bc.googleusercontent.com. [35.245.224.76]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b694369sm38822536d6.144.2024.09.30.05.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 05:04:52 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 30 Sep 2024 12:04:19 +0000 Subject: [PATCH 24/45] media: cx18: Use string_choices helpers MIME-Version: 1.0 Message-Id: <20240930-cocci-opportunity-v1-24-81e137456ce0@chromium.org> References: <20240930-cocci-opportunity-v1-0-81e137456ce0@chromium.org> In-Reply-To: <20240930-cocci-opportunity-v1-0-81e137456ce0@chromium.org> To: Sakari Ailus , Bingbu Cao , Tianshu Qiu , Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans de Goede , Andy Shevchenko , Hans Verkuil , Mike Isely , Olli Salonen , Maxim Levitsky , Sean Young , Sergey Kozlov , Abylay Ospan , Jemma Denson , Patrick Boettcher , Ming Qian , Zhou Peng , Andy Walls , Laurent Pinchart , Michal Simek , Jean-Christophe Trotin , Philipp Zabel , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Eddie James , Joel Stanley , Andrew Jeffery , Hans Verkuil , Tomasz Figa , Marek Szyprowski , Tim Harvey , Benjamin Mugnier , Sylvain Petinot , Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Ni?= =?utf-8?q?klas_S=C3=B6derlund?= Cc: linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, openbmc@lists.ozlabs.org, linux-aspeed@lists.ozlabs.org, Ricardo Ribalda X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240930_050455_071700_CF448117 X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The following cocci warnings are fixed: drivers/media/pci/cx18/cx18-av-core.c:1013:40-46: opportunity for str_enable_disable(enable) drivers/media/pci/cx18/cx18-av-core.c:1118:8-24: opportunity for str_yes_no(( mute_ctl & 0x2 )) Signed-off-by: Ricardo Ribalda --- drivers/media/pci/cx18/cx18-av-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/cx18/cx18-av-core.c b/drivers/media/pci/cx18/cx18-av-core.c index ee6e71157786..5701abdf9427 100644 --- a/drivers/media/pci/cx18/cx18-av-core.c +++ b/drivers/media/pci/cx18/cx18-av-core.c @@ -1010,7 +1010,7 @@ static int cx18_av_s_stream(struct v4l2_subdev *sd, int enable) { struct cx18 *cx = v4l2_get_subdevdata(sd); - CX18_DEBUG_INFO_DEV(sd, "%s output\n", enable ? "enable" : "disable"); + CX18_DEBUG_INFO_DEV(sd, "%s output\n", str_enable_disable(enable)); if (enable) { cx18_av_write(cx, 0x115, 0x8c); cx18_av_write(cx, 0x116, 0x07); @@ -1115,7 +1115,7 @@ static void log_audio_status(struct cx18 *cx) } CX18_INFO_DEV(sd, "Detected audio standard: %s\n", p); CX18_INFO_DEV(sd, "Audio muted: %s\n", - (mute_ctl & 0x2) ? "yes" : "no"); + str_yes_no(mute_ctl & 0x2)); CX18_INFO_DEV(sd, "Audio microcontroller: %s\n", (download_ctl & 0x10) ? "running" : "stopped");