From patchwork Mon Sep 30 12:03:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13816038 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 6616DCF649C for ; Mon, 30 Sep 2024 12:06:51 +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=U/d/VxAIFFwk8ny3jYVhNIfPO7NwT5z32rk28KK4f8Y=; b=vfBReXz0/z205hyk3jhNhWnfnF 7hd5q6QmUOZpRBVPg2dEWkmpPFNhDwt9rRfnSyBMcw6iGXnZfniX01HSSRrj8gsStc1qNzUQT2oGm wSiqCQamUvMn77IvdvIEKWCzuyUuTmZUGv2L9wsVRONPVYDFDtK1e0XqN6qCsKpIfzqgwI+xcCnl6 /t3R11pRQJJOsiyQ1+FNnIOPiyJsIOxd1WalY+wkia14LbkmKOrw8gFI4/Lgpq5uFtYqWH49NBx+I j5pAYhEfca6J5NVPqtTTDTaU6g3bLLT/JG/V3ejEEU+IAnYge58ttZ6jQVR5Ozfu2NeZkzNdyWNea RH1IsbwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svFAk-0000000Gx4C-3XyS; Mon, 30 Sep 2024 12:06:38 +0000 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svF8H-0000000Gw8o-1W87 for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 12:04:06 +0000 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5e56759e6d7so2480890eaf.3 for ; Mon, 30 Sep 2024 05:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727697844; x=1728302644; 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=U/d/VxAIFFwk8ny3jYVhNIfPO7NwT5z32rk28KK4f8Y=; b=NwxQP8ZICE1PabWixZwOi1LnqOqBwVkGx+Qqp0H/RcYh02v2aBxQozuUPu99WI9oDX siMRz8Bsq8Og/Dc2MgobfntWHoc9eyRAXYnDR7B2wp5MuSX0MQsZLFRR8xDOL1xmoFhV vZtTaJ3DeRwDpCd89nu9qkUJzRHY58WENM0oY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727697844; x=1728302644; 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=U/d/VxAIFFwk8ny3jYVhNIfPO7NwT5z32rk28KK4f8Y=; b=MocU2+8J+fKZdZ33pEljywZ63UoyPcHRN2iLrYUeBC9097vJXEwcocdfc50aPP7GlC 6zSP5rZWE9jAQLsF8uRmfoFPvrKZmDhCik7h5iKNUYrZuuIoS/t2ELUiDVUIXfkRyov4 +/nVOkoozxXRgVUNmEilMB1OVVijbPpjl0LQMZmohamEr2ynw1GfVIcsxvKRhVDqvptJ zZK3AQBd6LHXcg7DfrDAwfmO8hFxrX3xYAlikiU+XLeKzmjzfix/1oFDnT6Od0l/RRty TU4OFAA74WdK9b1QBabbWISpge7+sKSSvotN7gM+UBr7grOzUqQKhDeYhXJhgFhOT+Kj GWFg== X-Forwarded-Encrypted: i=1; AJvYcCW/lgZcUkglD3YKnugTfMmvki0GbZQnWAnyoAGZc8ov38u8dCIMJQ/maybJeg/r5wsZSYCvjlOSbTSR59gE5P2A@lists.infradead.org X-Gm-Message-State: AOJu0YzOyn2pr323IYnjjwlTJ3HDbLTnc3y56GMRKrBfCb4BRq55FH4X GQyamSzUsBZ8nPevf/am6oOaPQs6CiZegJ4GG/GSIfD2RNp2f7O/jQwoKLahJg== X-Google-Smtp-Source: AGHT+IG/KAG5rLZearz2Wa+2ErVyBcttWaRGk175qbpKywxFfy3PRamVmOosYeNbd61Fqm2746wGGw== X-Received: by 2002:a05:6358:4314:b0:1b1:ac2e:af69 with SMTP id e5c5f4694b2df-1becbd0a143mr332064355d.17.1727697843926; Mon, 30 Sep 2024 05:04:03 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 05:04:02 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 30 Sep 2024 12:03:56 +0000 Subject: [PATCH 01/45] media: staging: ipu3: Use string_choices helpers MIME-Version: 1.0 Message-Id: <20240930-cocci-opportunity-v1-1-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_050405_437484_04BB1F68 X-CRM114-Status: GOOD ( 12.75 ) 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/staging/media/ipu3/ipu3-v4l2.c:290:3-31: opportunity for str_enabled_disabled(flags & MEDIA_LNK_FL_ENABLED) drivers/staging/media/ipu3/ipu3-v4l2.c:305:3-31: opportunity for str_enabled_disabled(flags & MEDIA_LNK_FL_ENABLED) Signed-off-by: Ricardo Ribalda --- drivers/staging/media/ipu3/ipu3-v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index e7aee7e3db5b..443067ad0a50 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -287,7 +287,7 @@ static int imgu_link_setup(struct media_entity *entity, WARN_ON(pad >= IMGU_NODE_NUM); dev_dbg(&imgu->pci_dev->dev, "pipe %u pad %u is %s", pipe, pad, - flags & MEDIA_LNK_FL_ENABLED ? "enabled" : "disabled"); + str_enabled_disabled(flags & MEDIA_LNK_FL_ENABLED)); imgu_pipe = &imgu->imgu_pipe[pipe]; imgu_pipe->nodes[pad].enabled = flags & MEDIA_LNK_FL_ENABLED; @@ -302,7 +302,7 @@ static int imgu_link_setup(struct media_entity *entity, __clear_bit(pipe, imgu->css.enabled_pipes); dev_dbg(&imgu->pci_dev->dev, "pipe %u is %s", pipe, - flags & MEDIA_LNK_FL_ENABLED ? "enabled" : "disabled"); + str_enabled_disabled(flags & MEDIA_LNK_FL_ENABLED)); return 0; }