From patchwork Mon Sep 30 12:04:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 831729 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B45519FA72 for ; Mon, 30 Sep 2024 12:05:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727697920; cv=none; b=DOaIKY1dS2IyWGYO03ttRrQwsLDTCAJCt3/fA/ipxVLJRZaShkZZL1w6xeG7cE+al0u0NMkjt7hwKF6wMHw2emwwEcF8XGPM1OJFBHfolHXTh5Q4p5d47WZoNu1p/JlG6Jrb+Wc26cFYg2xvzZ2FWAuSriJ4A4f+4w0410uly0E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727697920; c=relaxed/simple; bh=aBtuDT9YPo78PM4HWkajYyL24yWOJ9YEO0Dm4FdZ3Rg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XsOUiWwoJMHHN7UBgNR90uFBw1cGqA1XPtjeTmVHn1ye3LQxEhWOdvYdGrVQkrRPdKJ2fgxX/Zx6Hs00fa4t/Z09XexznLt5dhn2/865Q+IvmObugemvU586ZSjdYcG4N0/7wAxZIko7MqcXe0WeAvzxbkCYRdPBTPco2DQw708= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ZCD5B08q; arc=none smtp.client-ip=209.85.219.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZCD5B08q" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-6cb4c013b78so18085346d6.1 for ; Mon, 30 Sep 2024 05:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727697918; x=1728302718; darn=vger.kernel.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=HJx29BD9yZboyGEAUyw+4rBBbXZtXq331Q8okj0vBtk=; b=ZCD5B08qgC087lPHrULv0sb4AT/R4EQtvNOnHcoYz2UdSrpU6sdz/c++EQb6VSh0ge 5wRsZgjaKFSO5knR3DStPQjQBf2j3JCnUxBcFllImVCnX+Zyxn6Ym7wZDYEEq0406OYI bYQvfawfrF8075UiuSnyFIkObLzHpJD4lq0zA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727697918; x=1728302718; 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=HJx29BD9yZboyGEAUyw+4rBBbXZtXq331Q8okj0vBtk=; b=dQ6zfF5vAOUvz4CP9g+YcFEVl1VTdJQFqrdExjfRR1p0fsJ34V8vPw+f0c27X+lsDd 2Xwjaoh5e9K+JSwKQP5IDML/P8BKS91wtD2vLH/0c2zdfjYiHvOxPZ3bO0rPXTJA0srq oJGbrXK/jLUhFJNjUKHsqBEplk8jzzzWFkaKp0e2hIi5n/xmvd0PIXwDr/E9M7JqDQvo 7Hap5aGGfSCacj46hADsviTHXx/BV6u9ktb/GZNSnaTrmlE+KwkSKI3XLA2hCnexgx0s KEBNBWWSdyyvQBn8L+1BVj5P6A4yegiHQ4t2/PSiCCELMGP3Q0ZNw1EY1SWRazZf/vop T/+w== X-Gm-Message-State: AOJu0YyfvDv8+exuM8vddSJcWVwsSt770+aIeFSo37D2lswv0pRn24Ks ZK3vtdSkX8FmPYbls/sPI5/6gdpKldo5l5UwSXz2QnUjZPV1USyoyOfBKn9u9g== X-Google-Smtp-Source: AGHT+IHvBkaWPQbVKiD/u2iOrMRkK3daurGtkkhjknrAX1KIWB3cA5A9a8FHevVPAdBTGyigNIjY6g== X-Received: by 2002:a05:6214:3a88:b0:6cb:2e94:3e24 with SMTP id 6a1803df08f44-6cb3b5b7edcmr189314226d6.11.1727697918247; Mon, 30 Sep 2024 05:05:18 -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.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 05:05:17 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 30 Sep 2024 12:04:33 +0000 Subject: [PATCH 38/45] media: i2c: max9286: Use string_choices helpers Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240930-cocci-opportunity-v1-38-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 The following cocci warnings are fixed: drivers/media/i2c/max9286.c:1333:3-9: opportunity for str_on_off(enable) drivers/media/i2c/saa7115.c:1366:3-9: opportunity for str_enable_disable(enable) Signed-off-by: Ricardo Ribalda --- drivers/media/i2c/max9286.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index 9fc4e130a273..d0f542343344 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -1330,7 +1330,7 @@ static int max9286_poc_enable(struct max9286_priv *priv, bool enable) if (ret < 0) dev_err(&priv->client->dev, "Unable to turn power %s\n", - enable ? "on" : "off"); + str_on_off(enable)); return ret; }