Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1136237lqp; Fri, 22 Mar 2024 06:43:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXW6ez8Xd0S+IQDxtWfG1DT6pK2bctISpuWkUBeX3wRXAxNY8GN4VUbSM6oiIV3HX+dJrwci0E06xP/JIDy87wm55+7QDfnvLxiNaaruA== X-Google-Smtp-Source: AGHT+IGvNXIj24WcjR6KjgtOK40VAcicL7vnEzVEFh4iJ4iYx5da2682qTzqk1aBroHk9rztFQOu X-Received: by 2002:a05:6358:7f96:b0:17e:c7cb:256e with SMTP id c22-20020a0563587f9600b0017ec7cb256emr2778331rwo.12.1711115012809; Fri, 22 Mar 2024 06:43:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711115012; cv=pass; d=google.com; s=arc-20160816; b=t9zsF4Es86xCNtDRr6OeKd0uJDrAYSZCOmV16wN5XusNWSRrE9w8PETODW+JXlkGFd Fe3JshfERiWko/H2006yHeOTHRDTM0JuT53qzcfbDOTvL32Tm26visy377uVUSR1xbH/ OHOW+fLIPu4yhwQO30O5eCDUuKs490mUYOnHHyYnCToawgSqkM+XWgd2+pNcO5RXT7lB LPeD36ZWu/eUG3AwlRjy9Xi1Hp8pwMhfwzMyAHmCk4uDQAX1KrDhgsGrXEmYs3q5jxyT vNRIFuZUs+x4fhcXUHGcBMU7DbD+Oe5Amr6t9pV+uwlzPPmbVgrfCdzq2pBwh1Qklmh4 i5jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=tKHh/k/D0ONRe4BLnnovOecVP0d46MjbPRgA2LGj3Ls=; fh=EzMXlq4m/VnWM1H4Fxb4GUX5kejNRhGES2qAokiUnOk=; b=FtVgJrT/GT+hNIIEOcwkf5PdaNSRD/W2NHGWO6aMLPA5eITNahqlBSoCyB5A8nxHPj SeaMPYQS5yeH3vGc84sSPtQg6TUroNdGw39TYpEeALJ8xOOn/xTT84LWNV6WumzE456Y sKwcDlLAJ6GWuJVAM+ops1c0SMjSmNY2rminzzHb/4KtA5XJ5PDotK5m01Js5DCnLZl1 Wj6Q+KMWrOxo6XYqXnJWHSgtuMppI1VBnl/HlNT8WoPqr6N8L5MpdI+gVLeeIgWcllZ8 p7z0OULQ5d1iqDj2sV4Lt5mKLX8XikeUHBmMHynjzjw1Ve07cvnmOVhjiRwSwYwjYDvR Owxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pQsu4f6/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111547-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111547-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c22-20020a63d516000000b005dc9bea60fdsi2113025pgg.415.2024.03.22.06.43.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 06:43:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111547-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pQsu4f6/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111547-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111547-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DE01128554B for ; Fri, 22 Mar 2024 13:42:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2363947A6F; Fri, 22 Mar 2024 13:34:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pQsu4f6/" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2BEBE4644E; Fri, 22 Mar 2024 13:33:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711114440; cv=none; b=UPyGjtWuQ5+GPy4O14qjprV1GEIrHJNDAAq9tETjj0ZCg4ZTku2eGi3PUNuV3182hN/YLUar6oRIvkntNHnX6WPMOGB9ZN12zS20YBD0o6o1g3NyqFT5GrtPdyiztbxRQn9RxFdfCabCfq74mnYoSvSAddp2dvW6vijf+f3VtCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711114440; c=relaxed/simple; bh=yE5wBVMHogIzvyyzaRHBTaXQJOP4Z2kLr8QtkZBlMWw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=aurM9xdxTg5wYWhJed07z4F89SE+Qxx/D9teTEqbdHScneKLRFpUJsu8gpQRN6BBPonzdkqbOiz6VO5uBwlFXXb+bAi/tSL3nbFjRAH9PxACMFDwJBFzeY4s4Jb4JgGsSz/AqJ2rh7hB2rQ2joBXW36zy8a2/ypuHxG125XhIkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pQsu4f6/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10874C433F1; Fri, 22 Mar 2024 13:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711114439; bh=yE5wBVMHogIzvyyzaRHBTaXQJOP4Z2kLr8QtkZBlMWw=; h=From:To:Cc:Subject:Date:From; b=pQsu4f6/TGxgJUdcMFkAxMPrajaxaOyOog13LeTSk3cPTVDLMGblTTiDM/5+IUV6S KP3VzkDWC4PmSLknOWUl7P4JNkTZol4Z5InmQ2mTE/gkNkzrbOy6tsmWkg9Dn00okJ k1ZqcXjqBInIYf28SnleEBL2bnDYu/BIPMkB0GQjQbX93SH2iW1KCiOjTp4wS0beY1 TiJFn3cMN+oZpbHkchAWoyGp4+iPvZpJiBY+iWXKiAjjqQIyU/67wgQx6FtZtfe8MA uZJ75XKEZOP9qOflsl2Uvti+1B17LZH1KaAucQi3VPYjkvtZte9gElSWq8eEUnGqGk 3195zj7iZOAoQ== From: Arnd Bergmann To: =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Mauro Carvalho Chehab , Nathan Chancellor , Jacopo Mondi , Sakari Ailus Cc: Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] media: rcar-vin: work around -Wenum-compare-conditional warning Date: Fri, 22 Mar 2024 14:33:46 +0100 Message-Id: <20240322133353.908957-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann clang-19 warns about mixing two enum types here: drivers/media/platform/renesas/rcar-vin/rcar-vin.h:296:12: error: conditional expression between different enumeration types ('enum rvin_csi_id' and 'enum rvin_isp_id') [-Werror,-Wenum-compare-conditional] drivers/media/platform/renesas/rcar-vin/rcar-core.c:216:18: error: conditional expression between different enumeration types ('enum rvin_csi_id' and 'enum rvin_isp_id') [-Werror,-Wenum-compare-conditional] drivers/media/platform/renesas/rcar-vin/rcar-vin.h:296:12: error: conditional expression between different enumeration types ('enum rvin_csi_id' and 'enum rvin_isp_id') [-Werror,-Wenum-compare-conditional] drivers/media/platform/renesas/rcar-vin/rcar-vin.h:296:12: error: conditional expression between different enumeration types ('enum rvin_csi_id' and 'enum rvin_isp_id') [-Werror,-Wenum-compare-conditional] This one is intentional, and there is already a cast to work around another warning, so address this by adding another cast. Fixes: 406bb586dec0 ("media: rcar-vin: Add r8a779a0 support") Signed-off-by: Arnd Bergmann --- There are only a couple of -Wenum-compare-conditional warnings in the tree, so it seems best to just address them all instead of turning off the warning globally. --- drivers/media/platform/renesas/rcar-vin/rcar-vin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-vin.h b/drivers/media/platform/renesas/rcar-vin/rcar-vin.h index 792336dada44..997a66318a29 100644 --- a/drivers/media/platform/renesas/rcar-vin/rcar-vin.h +++ b/drivers/media/platform/renesas/rcar-vin/rcar-vin.h @@ -59,7 +59,7 @@ enum rvin_isp_id { #define RVIN_REMOTES_MAX \ (((unsigned int)RVIN_CSI_MAX) > ((unsigned int)RVIN_ISP_MAX) ? \ - RVIN_CSI_MAX : RVIN_ISP_MAX) + (unsigned int)RVIN_CSI_MAX : (unsigned int)RVIN_ISP_MAX) /** * enum rvin_dma_state - DMA states -- 2.39.2