From patchwork Mon Dec 2 15:47:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13890960 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 C9AC2D78332 for ; Mon, 2 Dec 2024 15:52:00 +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=RkEW/0Y6zT4/Atf/d+puMl0WcNDtT8U8UDsIe65uvgE=; b=NgnmY/I1ag258ZQHzL9UkUeM8Y GP0Q6RSyWo4r6s+rgcb9cogKRoQ9/LoKVtwvrEwDj86tx9vOSibnoGMG/j8zWLSovfGtJ+w+m4dOH YXv+BLtjjEvDgyIRMpcMKmjuusxJKnA3Dm98BGCrqeXIGhGu/bdf3H1AMWB1T06Sn+9OtBGHmnY0z pCys5AxoyUqxxtMYbhBHAgs3dwWexxDWhppq074ADKITAUWIgHr9DFxzyBsMLQWRrJGL9L00Niofy 9UDvm1IzG6Q/pNJexVOnNS1B3e+r2rz5yQPQlSmzY0pTcbuVtDUEkKPTef70h+a6bu7OZStDdO/sv pcSL92pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI8iN-00000006jOS-3j8x; Mon, 02 Dec 2024 15:51:59 +0000 Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI8du-00000006iJU-3eiq for linux-mediatek@lists.infradead.org; Mon, 02 Dec 2024 15:47:24 +0000 Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-4af6031095bso1460440137.1 for ; Mon, 02 Dec 2024 07:47:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733154441; x=1733759241; 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=RkEW/0Y6zT4/Atf/d+puMl0WcNDtT8U8UDsIe65uvgE=; b=FDRJubqaJtiS8vV27eNmwvZaeFLSAADr3R6RC2Yntf/BLrSAZU/SNvESescSS7K1pZ wKBQ+Ebaoyizm6NjIyuzATTZVM/r4Rmux6fW1Z9Cf0pnLpgL2wtHr3xL4pjuaYd2999E jXKt3ihKnfCZTX9uwNJ3uQu2SHvFBB8fc0xDk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733154441; x=1733759241; 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=RkEW/0Y6zT4/Atf/d+puMl0WcNDtT8U8UDsIe65uvgE=; b=FE/2envUkBVQzNiPLqnedS87Fs9Ba08b26E9B7+M9Lt1VoRqtSDfW8JSqzLABakdVZ IGMyJEDrYYVXo1VB1QGmYaQuW7A3sqSsdABeI7O0a5zMkxj+RALYtGLIKF67dLKU64KU JF5+vgcUoC+HV0AV8Bh57o7NfL8xeKrEtjwK6d1fBieJQg2o68DWISRBU6RCjmJ2GIwY nBtN6YpiOTg13bj+z5QEwZKan9dW901WguOGbGe6wXvSxJbfn4pzJw0e6W28Prp6SoX5 h4KuyEhAk8J3/mraBgrZ/eFJPpP+OcKrkUwESZrn8oMfasrHY5RgKpumD0E7DbJ1Wd+0 p/wA== X-Forwarded-Encrypted: i=1; AJvYcCUpj383P+9dIsaoR177I8jy1s+Y3Lou3TzQzbLXzEKxdvOrA+dCk2TJEWIJbJ3N3l1SKiei04HpP3h//P4xLQ==@lists.infradead.org X-Gm-Message-State: AOJu0YwVlLicORU9xxB41lidwPEG+ZKlI4j7A0hHj0kjQ3LzS74+Nbsa AQ/p1t2bSnhJMTT8wstS04hbadKB8/lazjZuxCJFl1bNkBfbdLApugKqKPEAo4FdZBLPm1t3xJo = X-Gm-Gg: ASbGncuOHijV92E/44GzuJ40fea9unSqJaUjOfKlos/X0NTjDDX/BS01xY0/4kYPUfC Ex9JOt9eBoUQjcmbBtt4a/OK1Z0tHHXSXUUxczj/of1JwQFM2oyOa5+zUc9Ry51szgmTwk/IO9x uHRFKMRX+2oaXygWnx3uBYQaCZ+HUeBQBQtqTg2pMDcwULLGw5dMjS7WN/FgSP+2+3ILJq07t0X VX9TwrwaYffNuBPc7KFDDIFSbtBL7PneseYm+/YSPBhIzAP/0sZjb/QZ1ocNN/xKJdCP/xT7AHo Iyy5tYxxFJW2rzTH3NJSqSwc X-Google-Smtp-Source: AGHT+IGBHPCXG9TwBD4LE/oxUh/BqCKafbDdQlV9UV4NbH/ohrUS+/WPS+6wYQbT3toO5YK2KCH6Sw== X-Received: by 2002:a05:6122:500e:10b0:515:20e6:7861 with SMTP id 71dfb90a1353d-5156a8069d4mr18897232e0c.2.1733154441340; Mon, 02 Dec 2024 07:47:21 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5156d0f8ad6sm1159729e0c.49.2024.12.02.07.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 07:47:20 -0800 (PST) From: Ricardo Ribalda Date: Mon, 02 Dec 2024 15:47:15 +0000 Subject: [PATCH 1/3] media: cx231xx: Convert enum into a define MIME-Version: 1.0 Message-Id: <20241202-fix-llvm9-v1-1-2a50f5acfd0b@chromium.org> References: <20241202-fix-llvm9-v1-0-2a50f5acfd0b@chromium.org> In-Reply-To: <20241202-fix-llvm9-v1-0-2a50f5acfd0b@chromium.org> To: Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Hans de Goede , Sakari Ailus , Andy Shevchenko , Greg Kroah-Hartman , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.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-20241202_074722_905652_9D3EA7D2 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The code is running arithmentics with the enum, which when not done with care makes the compiler a bit nervous. Because those enums are only used as defines (no argument or variable from that enumeration type), convert it into a define and move on. It is required to build with llvm 9 without these warnings: drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:673:17: warning: bitwise operation between different enumeration types ('enum TS_PORT' and 'enum POWE_TYPE') [-Wenum-enum-conversion] drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:680:21: warning: bitwise operation between different enumeration types ('enum AVDEC_STATUS' and 'enum POWE_TYPE') [-Wenum-enum-conversion] drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:687:21: warning: bitwise operation between different enumeration types ('enum AVDEC_STATUS' and 'enum POWE_TYPE') [-Wenum-enum-conversion] drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:702:17: warning: bitwise operation between different enumeration types ('enum TS_PORT' and 'enum POWE_TYPE') [-Wenum-enum-conversion] drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:709:21: warning: bitwise operation between different enumeration types ('enum TS_PORT' and 'enum POWE_TYPE') [-Wenum-enum-conversion] drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:718:21: warning: bitwise operation between different enumeration types ('enum AVDEC_STATUS' and 'enum POWE_TYPE') [-Wenum-enum-conversion] drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:727:21: warning: bitwise operation between different enumeration types ('enum AVDEC_STATUS' and 'enum TS_PORT') [-Wenum-enum-conversion] drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:737:21: warning: bitwise operation between different enumeration types ('enum AVDEC_STATUS' and 'enum TS_PORT') [-Wenum-enum-conversion] drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:749:21: warning: bitwise operation between different enumeration types ('enum AVDEC_STATUS' and 'enum TS_PORT') [-Wenum-enum-conversion] Signed-off-by: Ricardo Ribalda --- drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h index 5bc44f194d0a..62ffa16bb82c 100644 --- a/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h +++ b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h @@ -57,19 +57,17 @@ enum USB_SPEED{ }; #define TS_MASK 0x6 -enum TS_PORT{ - NO_TS_PORT = 0x0, /* 2'b00: Neither port used. PCB not a Hybrid, +#define NO_TS_PORT 0x0 /* 2'b00: Neither port used. PCB not a Hybrid, only offers Analog TV or Video */ - TS1_PORT = 0x4, /* 2'b10: TS1 Input (Hybrid mode : +#define TS1_PORT 0x4 /* 2'b10: TS1 Input (Hybrid mode : Digital or External Analog/Compressed source) */ - TS1_TS2_PORT = 0x6, /* 2'b11: TS1 & TS2 Inputs +#define TS1_TS2_PORT 0x6 /* 2'b11: TS1 & TS2 Inputs (Dual inputs from Digital and/or External Analog/Compressed sources) */ - TS1_EXT_CLOCK = 0x6, /* 2'b11: TS1 & TS2 as selector +#define TS1_EXT_CLOCK 0x6 /* 2'b11: TS1 & TS2 as selector to external clock */ - TS1VIP_TS2_PORT = 0x2 /* 2'b01: TS1 used as 656/VIP Output, +#define TS1VIP_TS2_PORT 0x2 /* 2'b01: TS1 used as 656/VIP Output, TS2 Input (from Compressor) */ -}; #define EAVP_MASK 0x8 enum EAV_PRESENT{ @@ -89,10 +87,8 @@ enum AT_MODE{ }; #define PWR_SEL_MASK 0x40 -enum POWE_TYPE{ - SELF_POWER = 0x0, /* 0: self power */ - BUS_POWER = 0x40 /* 1: bus power */ -}; +#define SELF_POWER 0x0 /* 0: self power */ +#define BUS_POWER 0x40 /* 1: bus power */ enum USB_POWE_TYPE{ USB_SELF_POWER = 0, From patchwork Mon Dec 2 15:47:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13890961 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 D2CF8D78333 for ; Mon, 2 Dec 2024 15:53:00 +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=4pxSoz1ajcI3n8y8uPzRsEcpmfNX2HaWKguXvR+KRDQ=; b=sJOFVxd/q0etAw8rd+WerkIHxJ 0DT+O0//q/vg3duQCtjOVQvQ4HktMESeKH4e/ghunjESG616CDv/758w8VtVdel7/SQkk4NnaZ0h3 kuyOpk3p1o3fuBypWRQb5MQ0Ak+uUzJuKKLgI7R8VXmmpUnS5qgcPhe5EGHv7GyT7fk5trOOnFX1J C5O/7VyyPBuXhCWvhfkSVVV1veCALHRwewgz/Ti2G1hHrWdcxwhVbXrjviRy71SMkMOqCbe8/glCV BKelO4HkFeB/yaeBbYTm0vLgBeU2JjCoQlza4+Gx3mH0+2miWUPtl9UDmpexhM0ON5MfQ8GJW+DfI movU/1WA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI8jL-00000006jcl-3RvT; Mon, 02 Dec 2024 15:52:59 +0000 Received: from mail-vk1-xa35.google.com ([2607:f8b0:4864:20::a35]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI8dx-00000006iKr-0cc8 for linux-mediatek@lists.infradead.org; Mon, 02 Dec 2024 15:47:26 +0000 Received: by mail-vk1-xa35.google.com with SMTP id 71dfb90a1353d-5152831bddfso953415e0c.2 for ; Mon, 02 Dec 2024 07:47:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733154443; x=1733759243; 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=4pxSoz1ajcI3n8y8uPzRsEcpmfNX2HaWKguXvR+KRDQ=; b=e4JH/3nvq/DVTYMyawz/A10g+fFtsty6yuX89g2psHdVfRE9vdi4hjyX5PNJPOyis0 KX6UzJSSOof4NGO5gQBUkam73BZ6x/AP92/IcUAaOk28U2WNi71ED9X3AYyaVpwUNFwJ WYNz0mBNRL+0Mi7H39MQtVfbVKUKK31jEBoGA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733154443; x=1733759243; 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=4pxSoz1ajcI3n8y8uPzRsEcpmfNX2HaWKguXvR+KRDQ=; b=EeOTQR8lawVsIfoRORNB/1rUy2RPgZUCpX8e674cMHPEMnvEOItqNX4SoLzE0y0xF4 Arg7lpmJUf/UeGHgudbYjOuYbE2EvpEm2jiwucgEyJvlG6fBWq5oQRs6FQPOWpcbq3ic I3vjRDpHWcgrVxDzMEQGibB/s2rxYIRaHzjG2qN1qHHDJY4AGNfrncq7pSOGv5CL78WG aAGbOrMT2+ljUT39dXXS9lvw3x1VBqk26IPI2UxIJmLgQc39vvNnSdPdGzBNbL73Ai9d ZPG8gYUvnaLNB6cW4/hLDQomvdSmiWTDZrXiFTzKQ7CCh0uYgSNgUn3RNbRgj5rZEE/w hynw== X-Forwarded-Encrypted: i=1; AJvYcCVqh09zVuXXX3Uc0t/68qcz7/8iQnmcMbkKSKL7qAfP0ZxT5sdA5Rs3PWH+wSsaIFAQVTAjeFMHX0kX3hfBPg==@lists.infradead.org X-Gm-Message-State: AOJu0Yz+SZCgeipjvq/O319jmlw5WCudeo8daCsCkqRzHpy0pHuptdfE jjWsljtYb5b9BVKLaXpmGUMqr3HSBcvqpuTuRxD/xAqelJIp6jSf3BGWkrlbiA== X-Gm-Gg: ASbGncuiqQin5ZK9/3qMWqin6pzsiMKUxPH2CRhejopreryMa9xy2b2E6UXZy+kHWy9 1IkpWCGqmcCtDLr7NQHnzpW1O4N61Qhl+QGPsHCMPWipDm5RVJV+21I6AIN03MLx+26J1zEgxXG QjnosLRLht07KBP6qh/cZ203eOvAyMaN62xSmrkcO/tEozSsrYWB536EnKo3QF24ygwE/fZfP+b r9KQTM+o4hN1ljB3OEBnJtW3+SB4HdHt/OSXFKQcUWxaxu9i4M3I8+TC1U+Ep8hes4VjSEzPx2R HyBnh7BY5GAOZNKn1R4Ym6CD X-Google-Smtp-Source: AGHT+IGaWcZbV6qtojnjaBkX2eRGECUPG2dd+i3FQicKN4gnW5JGkqWcKAek6j+Ilms9M2b0vFq/qA== X-Received: by 2002:a05:6122:3c4f:b0:515:3bfb:c7b7 with SMTP id 71dfb90a1353d-515568dab17mr30842699e0c.3.1733154443629; Mon, 02 Dec 2024 07:47:23 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5156d0f8ad6sm1159729e0c.49.2024.12.02.07.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 07:47:22 -0800 (PST) From: Ricardo Ribalda Date: Mon, 02 Dec 2024 15:47:16 +0000 Subject: [PATCH 2/3] media: atomisp: Use the actual value of the enum instead of the enum MIME-Version: 1.0 Message-Id: <20241202-fix-llvm9-v1-2-2a50f5acfd0b@chromium.org> References: <20241202-fix-llvm9-v1-0-2a50f5acfd0b@chromium.org> In-Reply-To: <20241202-fix-llvm9-v1-0-2a50f5acfd0b@chromium.org> To: Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Hans de Goede , Sakari Ailus , Andy Shevchenko , Greg Kroah-Hartman , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.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-20241202_074725_190208_47FD7253 X-CRM114-Status: GOOD ( 12.62 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org hrt_isp_css_irq_sw_pin_0 has a different enum type than irq_sw_channel_id_t. Replace it with the actual value of hrt_isp_css_irq_sw_pin_0 to avoid arithmetic operations between different enum types (and make the compiler happy). It is required to build with llvm 9 without these warnings: drivers/staging/media/atomisp/pci/sh_css_hrt.c:68:19: warning: arithmetic between different enumeration types ('irq_sw_channel_id_t' and 'enum hrt_isp_css_irq') [-Wenum-enum-conversion] drivers/staging/media/atomisp/pci/sh_css.c:1233:40: warning: arithmetic between different enumeration types ('irq_sw_channel_id_t' and 'enum hrt_isp_css_irq') [-Wenum-enum-conversion] drivers/staging/media/atomisp/pci/sh_css.c:1237:40: warning: arithmetic between different enumeration types ('irq_sw_channel_id_t' and 'enum hrt_isp_css_irq') [-Wenum-enum-conversion] ro Signed-off-by: Ricardo Ribalda Reviewed-by: Andy Shevchenko --- drivers/staging/media/atomisp/pci/hive_isp_css_common/irq_global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/irq_global.h b/drivers/staging/media/atomisp/pci/hive_isp_css_common/irq_global.h index 2c47e7820bd7..69e68ecd6bc3 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/irq_global.h +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/irq_global.h @@ -18,7 +18,7 @@ #endif /* The IRQ is not mapped uniformly on its related interfaces */ -#define IRQ_SW_CHANNEL_OFFSET hrt_isp_css_irq_sw_pin_0 +#define IRQ_SW_CHANNEL_OFFSET HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID typedef enum { IRQ_SW_CHANNEL0_ID = hrt_isp_css_irq_sw_pin_0 - IRQ_SW_CHANNEL_OFFSET, From patchwork Mon Dec 2 15:47:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13890962 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 33831D7832F for ; Mon, 2 Dec 2024 15:53:01 +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=l2F2lVT/48t59mZz2zC2oH5sxyMbSECeGcR5hkq1C/k=; b=ERU5r8ADCiqyB8xy4i0fvrijG8 VVhFudRnBASOExb9llKPg3XdceXQ+BvgcjXxDgxSPziW4IgkV34bONqoh4w9oJK0qpZoia30eNU0k J7leYJfueodOz2+LmEZatLHtlY5FIx27oh1s2WXQmrWdVDnpkdNU36oLaf1grneGKcIT3KsHH9QaT /1RqVyNH+e7pqK3jkCLyjaoMymkpw4ebpCu+NOwduZagnY1vedfKIpFlwTBLN3zfPokc9MdgVLx8+ oEW48JzI/OHRb94OhoSMezoRLMOdixxQM0+2CgTkQRkQ38x+KAYG46Xofb47c3GX8+SFohyqAmWMv ZtCfDDUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI8jM-00000006jd6-0WF8; Mon, 02 Dec 2024 15:53:00 +0000 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI8dz-00000006iMc-3e9q for linux-mediatek@lists.infradead.org; Mon, 02 Dec 2024 15:47:28 +0000 Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-6d88d3d1eb6so23649956d6.0 for ; Mon, 02 Dec 2024 07:47:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733154445; x=1733759245; 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=l2F2lVT/48t59mZz2zC2oH5sxyMbSECeGcR5hkq1C/k=; b=Aom54JQGAaw5QcfFuJuQ9pz+7+Mi/6a2sO8XiF3jn8abdb0Dilr/K2eRgjV438i/z5 dpRkIwlt2X2dhL3dvy6daMcwOqPtmXG4fVqdYzN2QSIFFD9cu9owjNvzwVr+ueuE5X4A Im1HcPD30q6DLxhUz37EGe8f9at/qOWIdFC8k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733154445; x=1733759245; 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=l2F2lVT/48t59mZz2zC2oH5sxyMbSECeGcR5hkq1C/k=; b=TcG8lv8pCJzb5GpIi5P6C75HA7cCPVvVyHb8tlkzWeovBjUN74kEZCFO2fakDTdKdy FPjPg2ouREnRtVANCj4mdrzJl9LaN+NmiMzn78Pg75vnjslPqP3frSnEhqXqxTRqAwp9 jy2uw/+pBlVoviPz9uvveHoMs3f2OgLZfHyBP7EtSfaa7SFDUPQ7e48uTOw8SKwsIfb2 hbLy5TDcmft8+mnuqiWQBhjgSSd5qV2KnYKcBsmkZItgaFIRPoeJVtG3B0/HfN3z97dL YSRnK8YPdQaUk3RzCLr6qCaoa0agbpPVsxRydxLAM8kLkjryBC12ncvaLTrs38L6qwyd juog== X-Forwarded-Encrypted: i=1; AJvYcCXq12rmHT/i54VmOi6nxTucJN1Gs3UsCHsv8RSJ0outxh4IOlOoRYNzn2bLIZV9LIMBpqCE2ZmcQ9ppM6Ed8w==@lists.infradead.org X-Gm-Message-State: AOJu0Yxqhfz+H5dHSxTaDBnWvv7MF0IMqvDMMApLPVZE5lpqJlmBugry I+Dxg+05lmjP+P6nwB3iFpIS0xDLpr0jsRwY99bP82aAwLA2ojS7h1pgvp0X8A== X-Gm-Gg: ASbGnct3XZvIXEGyW8rRAmefEDH4RMIne3iljkK6oy8ktogn2/cJ8Jr+Lej7VQRyoQX bxlo2D/X6QNWgKTK9yHvfDlJZ8fCEYPbc+1P+cjtiX4BeJWnYBTYoaLInq1VoSlXVwqJRU4xAsM EqGF//QX1sytdhJpZPTBa+WXdotNPHdVypqoEQk9D7kSUj0hMVJzVNx8JN5Gj7qou/55mFxMsEp ylwtT2MasZanLn5ZHinnxVZhnbX6qTM5EEf6b2vlczpbweiLnnrfMNsTV4HlQTrDTpFV5+JIPRF JILnkAfdZB3P3ychMbIC7bDm X-Google-Smtp-Source: AGHT+IGi/PMi7HKxN0drYRNoeMrQehkEDZgCgHDgtdOzyjj8HEWJDMxx4Dj3/iwSYHFuTdJy9nQktg== X-Received: by 2002:a05:6214:626:b0:6d8:a1b4:b58f with SMTP id 6a1803df08f44-6d8a1b4bb2amr99633466d6.11.1733154445272; Mon, 02 Dec 2024 07:47:25 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5156d0f8ad6sm1159729e0c.49.2024.12.02.07.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 07:47:24 -0800 (PST) From: Ricardo Ribalda Date: Mon, 02 Dec 2024 15:47:17 +0000 Subject: [PATCH 3/3] media: mediatek: vcodec: Workaround a compiler warning MIME-Version: 1.0 Message-Id: <20241202-fix-llvm9-v1-3-2a50f5acfd0b@chromium.org> References: <20241202-fix-llvm9-v1-0-2a50f5acfd0b@chromium.org> In-Reply-To: <20241202-fix-llvm9-v1-0-2a50f5acfd0b@chromium.org> To: Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Hans de Goede , Sakari Ailus , Andy Shevchenko , Greg Kroah-Hartman , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.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-20241202_074727_913462_074EB667 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org llvm identifies that the SCP_IPI_VENC_H264 and IPI_VENC_H264 are from the same enum type, but their are part of the same ternary operator. vpu_inst.id is of type int, so we can just rewrite a bit the code and avoid the following llvm9 warning: drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c:597:29: warning: conditional expression between different enumeration types ('enum scp_ipi_id' and 'enum ipi_id') [-Wenum-compare-conditional] Signed-off-by: Ricardo Ribalda Reviewed-by: Nathan Chancellor --- drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c b/drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c index f8145998fcaf..4786062e879a 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c +++ b/drivers/media/platform/mediatek/vcodec/encoder/venc/venc_h264_if.c @@ -584,7 +584,6 @@ static void h264_encode_filler(struct venc_h264_inst *inst, void *buf, static int h264_enc_init(struct mtk_vcodec_enc_ctx *ctx) { - const bool is_ext = MTK_ENC_CTX_IS_EXT(ctx); int ret = 0; struct venc_h264_inst *inst; @@ -594,7 +593,10 @@ static int h264_enc_init(struct mtk_vcodec_enc_ctx *ctx) inst->ctx = ctx; inst->vpu_inst.ctx = ctx; - inst->vpu_inst.id = is_ext ? SCP_IPI_VENC_H264 : IPI_VENC_H264; + if (MTK_ENC_CTX_IS_EXT(ctx)) + inst->vpu_inst.id = SCP_IPI_VENC_H264; + else + inst->vpu_inst.id = IPI_VENC_H264; inst->hw_base = mtk_vcodec_get_reg_addr(inst->ctx->dev->reg_base, VENC_SYS); ret = vpu_enc_init(&inst->vpu_inst);