Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1138002lqp; Fri, 22 Mar 2024 06:46:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW94A6uwdqk8v435N1u+ovwxEPj0wSjuNtWPjmDDfGG9f+DHC1y7gRaUzXgnGMrElLJq6QrdbLWmJdNXD675bbJ2Q6Mu/mSMlMD2XJG+w== X-Google-Smtp-Source: AGHT+IGMAqvjQqWOO91hzztHZybWtAdj/QRMHoAL7HsWr5CSIOxAsQRbfLPusOcSLFZA0Wa2VQJf X-Received: by 2002:a17:906:b818:b0:a46:206d:369b with SMTP id dv24-20020a170906b81800b00a46206d369bmr1669546ejb.28.1711115177185; Fri, 22 Mar 2024 06:46:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711115177; cv=pass; d=google.com; s=arc-20160816; b=emEA9ts1JuoQWeselO7eWpPR4rIWuru2neLPswa/Bjwl4tJ6LNWcwoVbw4/uOLSS9D y59rag+J8yWwGbvHaDJu7y12WrV990nN37y8pvF0XyKqB/wT1xQmDzqGQH74MIEb/SeS 3Nar8bPvpjvV7VwEZTm+44RsncIAEXEpRVqW4EMsgoDrRMLBwT6itO0tMksYVlop8/og cL/rItu2dpLbYh6NVf9eXbOLoPqU1x+j064TZ1nboYrOTAjKMhIAmQAVNlpw5AuynShN auzEMaTACQLDdgfoENbndQiCbQQ9GBndaoFOY9oT0CTiTLNKiIMqmSpRTDysO8tT76Jr mXQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=XsXGuptKt13EJ/gv1xo+2KCLb6yaD1Leqmnh5HvA8so=; fh=gDXXhGbsCPjp+rETi+GmLJJuXboOYVeMKkQ82grV9dE=; b=QEDEAN6cG+IkZAZwPCk+S+Xl9x7pqezoTN9Ha4hDO2gNSSXd7Yz94rOosC1IiZg1Zw qDMeyu3mqni0l+BlyHVfOWbMJmFlfxdWqk3UG34ZEbg4fnYG0hSGnpdynvf66oA5Rc50 AtnY2cdOzm9NQ/ujh5lk9TaYYckQ/7Mx2sPgnL6BXJ54c2tzkQWnznwQW0cwy99Qee2L HwVEr1gOWq2CFZkgKbZqazJ13D9S8WCKgsZNDeC0bI3ZvH4cRar/UM15lmVh8/zo+uAI Gc8ZboBauD4juguHkXpapdHRV9oUmG+LBFpzWlLrsiPyLZ7DDLZPKAtFILOIwBtDBU6j /0Jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ragnatech.se header.s=fm1 header.b=k0ncReND; dkim=pass header.i=@messagingengine.com header.s=i80c9496c.fm2 header.b="DlJ/kagk"; arc=pass (i=1 spf=pass spfdomain=ragnatech.se dkim=pass dkdomain=ragnatech.se dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=ragnatech.se); spf=pass (google.com: domain of linux-kernel+bounces-111557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ragnatech.se Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 17-20020a170906201100b00a46a9c4442fsi955394ejo.613.2024.03.22.06.46.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 06:46:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ragnatech.se header.s=fm1 header.b=k0ncReND; dkim=pass header.i=@messagingengine.com header.s=i80c9496c.fm2 header.b="DlJ/kagk"; arc=pass (i=1 spf=pass spfdomain=ragnatech.se dkim=pass dkdomain=ragnatech.se dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=ragnatech.se); spf=pass (google.com: domain of linux-kernel+bounces-111557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ragnatech.se 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 26EF91F214E9 for ; Fri, 22 Mar 2024 13:45:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5649604AE; Fri, 22 Mar 2024 13:39:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ragnatech.se header.i=@ragnatech.se header.b="k0ncReND"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DlJ/kagk" Received: from wflow3-smtp.messagingengine.com (wflow3-smtp.messagingengine.com [64.147.123.138]) (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 C167346449; Fri, 22 Mar 2024 13:39:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711114779; cv=none; b=SRqolVK7RuhQp2fBrFid2pHNPqhDKRbDnqrs1IP3bYH7lZ8MIzTqUsCQOhSiGSIgpgMgqCYgk3VzYJrQr/2t1EyeOYYJYBPM70QIaiT44t4qUAKwezfY1NOIoT0lO/CcTjv/OD6AlXBBTpyCY2D5s5WoZ3n0++e5lAnjTqG+wjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711114779; c=relaxed/simple; bh=WTmXfI0M08pmpvv63nQvhaH1TNGPWtey9xubpmGccnc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KhnOjW1ku34BVD/41E1OFDGAyIuq4aWyIxx5T/+XEn+nJkEiRXH+8bKoHp3diwxF/pWHZSeYOUktpw6Qfo876/GbAZ846C2B97yOoe7tG660VXLHWvqNUWRk8CE00a889QtQeWpwSEYaZ2YVsfTdxzIneX+FlxYSlfIwt1ZIpeE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ragnatech.se; spf=pass smtp.mailfrom=ragnatech.se; dkim=pass (2048-bit key) header.d=ragnatech.se header.i=@ragnatech.se header.b=k0ncReND; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DlJ/kagk; arc=none smtp.client-ip=64.147.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ragnatech.se Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailflow.west.internal (Postfix) with ESMTP id 8C2972CC00C8; Fri, 22 Mar 2024 09:39:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 22 Mar 2024 09:39:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech.se; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1711114773; x=1711118373; bh=XsXGuptKt13EJ/gv1xo+2KCLb6yaD1Leqmnh5HvA8so=; b= k0ncReNDYOXBstPpIoz6beSva/3UwX13jbsVhdTSKIA1834wcDuyyKKFxF6AZzKJ pHwpZ+tChYC9eaQaN2BhIV9DmbMNMD7+Aiob0H/LiJt5g+g1n1NdMqa1Eqv4rP5q sfeqG/XsK1vAEJZ6gyuob297taaB7D1pDzh2tm6BC8dfeE8R+CcQWfiPn4O7TJb6 Tgnw53/v+CfN6vOSWbW1iMZLPweIk2/0qETiOYgueQY6OTADOkTl8tnQsJbjqs/p 0LWZC2ZSbc/Xte2kUcIir4GNMMM/MVk0D4jPRfK5XUtQ48R0GTdl4vBwnXQ1ln52 KrZwmZKj8/qkzB9CJdEYkA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=i80c9496c.fm2; t= 1711114773; x=1711118373; bh=XsXGuptKt13EJ/gv1xo+2KCLb6yaD1Leqmn h5HvA8so=; b=DlJ/kagkU1GsShBar6DPexYUIkGyob8Ht5T6E9Byo9h4iYGJQ3k oFOEKSF8BEQn7j39eiX1K8XnbdcarP8SV4/Y6eIvMI0AICln3yQuUL2LMU9RQ8+I T106wcfZ2bRnmhL2EO4gFU1QhkAxenIZp4vQl+PVqi+AYfH/JRKna20xih921kHI JxTFNLFNn12AWPZvs07QAvX3W3aXw3peM8dzZHFXjB7OojPduGp4bUTpiEaYzAWu tcn+/m5ty0nkUIkrq7KujkLzkd+4y4oosKxGJpDd2PurJGwUOYJb4BC4QQ4fERRo zUxULPg6aVxcYIx2KcDmsglJBo3pxlb4uIw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddttddghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpefpihhk lhgrshcuufpnuggvrhhluhhnugcuoehnihhklhgrshdrshhouggvrhhluhhnugesrhgrgh hnrghtvggthhdrshgvqeenucggtffrrghtthgvrhhnpeevteegtddvvdfhtdekgefhfeef heetheekkeegfeejudeiudeuleegtdehkeekteenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehnihhklhgrshdrshhouggvrhhluhhnugesrhgr ghhnrghtvggthhdrshgv X-ME-Proxy: Feedback-ID: i80c9496c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Mar 2024 09:39:31 -0400 (EDT) Date: Fri, 22 Mar 2024 14:39:27 +0100 From: Niklas =?utf-8?Q?S=C3=B6derlund?= To: Arnd Bergmann Cc: Mauro Carvalho Chehab , Nathan Chancellor , Jacopo Mondi , Sakari Ailus , 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: Re: [PATCH] media: rcar-vin: work around -Wenum-compare-conditional warning Message-ID: <20240322133927.GG3438308@ragnatech.se> References: <20240322133353.908957-1-arnd@kernel.org> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240322133353.908957-1-arnd@kernel.org> Hi Arnd, Thanks for your work. On 2024-03-22 14:33:46 +0100, Arnd Bergmann wrote: > 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 Reviewed-by: Niklas Söderlund > --- > 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 > -- Kind Regards, Niklas Söderlund