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: 13890964 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 CAB67D78332 for ; Mon, 2 Dec 2024 15:52:09 +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=GaB71jhEvGJ6p77znjww8dmF1n +oORKsGFpRhH1iL8FtY4d0Jddq4bsN44XzqhWYTMVb73ecYuVX/749FVorNzC1IsIoU56uajHbj4X zppuMc1bjIicEWVV69pzXIJ7sqrkDm0WN5UH/HrnaW2JHJ+MgmURJSSGfg2jUYf9dpaIRHhfLIbPc Q2dvH14QGoILULwWtCQIYLPukWiRxiEic36t2Dtykx2wjf/iwgHws37gAfyz6ueN7ZO/lQkxZW/uc 2pyzMv5QyHhj5c1jPuitHSfnarYC3iokWX1lxXaTGpyVvtyS2eMU1LcCyX85D9p9VGmsORdej3F4v qPsRUNqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI8iN-00000006jNy-1Uqv; Mon, 02 Dec 2024 15:51:59 +0000 Received: from mail-ua1-x932.google.com ([2607:f8b0:4864:20::932]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI8du-00000006iJS-3Iki for linux-arm-kernel@lists.infradead.org; Mon, 02 Dec 2024 15:47:23 +0000 Received: by mail-ua1-x932.google.com with SMTP id a1e0cc1a2514c-85bc9b60bc8so678176241.0 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=eGk8caxPrEwSR3F1FoDeaWZ4bTg9TNxvlSsu3USOXLkK6f9WhuT9bNT1kH6guVUKm+ WotxlUHqsNfnaGhKdkvrHHzOTnnWSWh5XKBLxn6QTdfBJKK77unIguwh5uPJnWb4bw5M 85d9yiDhWq37ZMaXAf9Fu1GpzyTdAN0TKKMIzicIi2fb6a5gRQne1pwP7C7err2ch9ut DlGy551uaibymbzktEwtfXBFJoe3woMD8nawpTFYVWpTe1qnaFJqgodmVgnkW9SU5sdD NEwIOrWHc03iHXj+8gTOxoCAKVG2ikx/MhuBGDdSS4z5J66aA1HH9aDHQ7p64228J3oR 3Y8w== X-Forwarded-Encrypted: i=1; AJvYcCVlXScJ3Zzl8+rRpyjuvAtBqpfb8rIFxL7rziQozfAb5BFUxBp6vl4d8qkHZxryZ1D11vwUP31GQ0efeG+9m2SZ@lists.infradead.org X-Gm-Message-State: AOJu0YzAr+Lv9IU6htTqG0IyDkNuLpNNHoUBzD+ib3r46a9S3O/ODv6/ 6QTwCqvQhUMJZSrStjlym07UoOwxYly7NLY285qRBfwWAdwCp2r2SCIOuJgp3w== X-Gm-Gg: ASbGnctx9AflT9Ae5XiP5unTqZi/71tSfbB3p3byYsCkXY4e42GQokprDCCZCjvlvlG Mk6TU5HeCCUq3SV57Kga6e3z/QALVKlCPqU2tgvxOzql/KG0JV3uNdzjaYc2mRbb/Aiqdq5KuRJ y8HIEdZUL6wynYpiC/ClpXyDvw3jAUKenXuL4TEu5AK7KJy2SyMsX9QsDzt8FI4y29ychqa2W9j HvSXC1XCGWtTe26959P3u4T9MkY+w+IRCbSOU6oh2QzELPwM18hTDgPy8UJvLA9P0ziC2/oM2Ec M/0tXEvIWhHynC0dNnFl71Em 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_828848_53A704C7 X-CRM114-Status: GOOD ( 12.78 ) 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 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: 13890965 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 1445BD78333 for ; Mon, 2 Dec 2024 15:53:10 +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=t2vcpzoCunjsnM3/ZjoueIgKfy Lc1aUBNeapkwTTbbYpTBF4hY9LiyKxqERLQIqn6OKKMsDv/TgtRsknwH6AKf3mN3qAZi0l922oEDu 3Ux2Cf2vKlmJKFNEPKRgEUe7JCVEKz46PAwM6p7kEVj/cekjlPoqoETn0ChsDqrV6TeoZG6cA4Dj1 uW97hpyKxVi+Sm1s8XjoKaYMJyXc9WlJR5Ux97BCVvxtizOewB0xv/dIA5zL2xGiIBsdO675L+1C0 o8jKwhZMvPIb0m6gyKZrrk6J5ldBhNjMoQbV6f5Z3a8nLGZ5bwsl8AuPzDC3CUUFt6D1cHHm965e4 hpXFOoAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI8jL-00000006jcT-1Otm; Mon, 02 Dec 2024 15:52:59 +0000 Received: from mail-ua1-x933.google.com ([2607:f8b0:4864:20::933]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI8dx-00000006iKs-0d3U for linux-arm-kernel@lists.infradead.org; Mon, 02 Dec 2024 15:47:26 +0000 Received: by mail-ua1-x933.google.com with SMTP id a1e0cc1a2514c-85b92397fe2so517151241.3 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=HYFzjKd70syTg0mhuXrcV/p9FzlvsZY7Jh4XLtpp7yNHv2J3jnsDgHxUVy78D5P+Ya ZWQxFpqPZLbl9zItGJJiB63xZJ7v/90zYH04OqSmyVYCLToGeTfxhf4LgOh/z9pb8s1s nK0vxTdedxN+r4Gp1poYFU+63NLHCFtwnlr3+farkImsLxVQcKA/VoM9bBHOfbInRhwG 0B9Hz+nx5pHJg/Wy8CbYvyex11S/CWtUMXSvX4gj8hpxgv/WKonE/S/iH2hF1pNro5UT b8yr2eAlA6cKlFCUz8AEy6qyr652G08kNSMNyMnhTI1Fmz7RDlNcuDJTOMzJwItUAWzb 6s6A== X-Forwarded-Encrypted: i=1; AJvYcCXc+fmoxP3QXuJC9cZqVNgTKzId1v7hIW9An+u09M74GTnDm3chwT2kNBRWfcX2rarbfjLMyeyzUx99OSjdLWe5@lists.infradead.org X-Gm-Message-State: AOJu0YwjgNhz+p0jtQhimqHPZxfoCiqXDOCuBQc8AiOUKgNlpZWOw9E2 jN8mMp8v5ZPnSSLwKWQKzXWWhH7JvBAsOskDINU5Gx1a0GVLq6s1cW3JxlEgrA== X-Gm-Gg: ASbGnctb8qfrgqcnJoKa08IGGAUj6oYv710Dx3R1p2KROpX1YIk4RTdMQTOiRDwajQS N821rFEl9Mm1Dv1+E0vSD7fOhmLs5unFGsOL/vKsXCnF1ZqDI29PWRbhpaMhcIU2AYMjJojJSoi 5NvugtWX0d1RAAyGZGXhlFIoZHVMCAUknRd4/17VPWyaqYejasBj+xilLSLmasgQXfx3jNeYMU/ Fv2YH0Pck54XhubJdP+/5S/qQB540eLX/to8a8mVNkvEOfiKIvt5US33wpQpkFPqE2PzFMMK7zq Ey8HwDyv/rQI5bBX8/YNxohb 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_190404_4DC3238B X-CRM114-Status: GOOD ( 13.89 ) 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 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: 13890969 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 4C70AD7832F for ; Mon, 2 Dec 2024 15:54:08 +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=PUa0hNwIo5iTs//D7UdUWTIS8k nciMppIMADmnmTHqfBpVqjzljECgu9M9/ty/P/VrJUpgEcL+GZHvnqIYNB4cn2o/b4K62dpapiksp y3GRgqPadENf4EVdpA8t1vtCxH1Bjh7WfQt7Y5N5VaLVavs2GbV75oFf7UrUjLL0hQV3Y3pBZ2NCv QNHti6RppRBCS8uAceW8udL9rswOBR9dVaTQ4hR2XImFYBX/5wAYoSTXrcVVlMEpHrwK5xNWTyeU7 nysLkvw00CRKGSSJ9BeuTSl3R3UGsz4iTLptQsNoePvX6ifjNknXAfL951x/W/N5PcNocFrcG9uVV szJYrlOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI8kJ-00000006jrc-2XFJ; Mon, 02 Dec 2024 15:53:59 +0000 Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI8dz-00000006iMb-3ed7 for linux-arm-kernel@lists.infradead.org; Mon, 02 Dec 2024 15:47:29 +0000 Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-6d88d3d1eb6so23649936d6.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=PhZq/ycslP1noZwru3jJ0QtlsLeiUQ0V6WjT0vEFtOsQynzQnVZ26lNRUuGfuLZ9Au ahruDsPsq/HLxrk04lfdEzip/vOmjEaBYDKDOrcNVapfOInvs+fQa9S/Pefld1AIllJy hux3RUYcYp8ME9LKsShUxSARBs5QF1LqWJxSLH+euq5iAK6B0NZ7NMXjI5UkgbS2Xyow 9/kg0lmaE1P98YxIQcZhHsH5HGO0H+8NCYUO3xJZhqTEUBZZdozjnVJoebX96wyA+een OeB43JjUF51TjLHHYcHvoo6fQzXgkudSvi8Zi72y/OXt1vWDp28e0CVEe7/WE2DI67+l DUnw== X-Forwarded-Encrypted: i=1; AJvYcCVZh3AeC8/LhGlhDA5aJ7dUxEQQdeRk6f8rbS1EBuwK0vGPz+kHsphzVm0Ywqy/r4vk7pGLv+0pDYug9KYehZcU@lists.infradead.org X-Gm-Message-State: AOJu0YxcyLtKr+uaErpWKkatO/O7kWu+WDY78kfcpcQnac3bmk80KctE Tdpedwe4Yu0tcWnXintOoAtU3C3Xgk2zei/OhDIV9KQF/Yy8YzwlRMAmNPJohA== X-Gm-Gg: ASbGncvvyCBws/xKi0p/nnKEQsiPSrK3iHHu8S0VqBH3c0i8q6NQOJtngUDVwAaiiv1 ptMPOKMF0OmhAd2rS/ak/DH8QaSDqb3U2byVBUZcIhHEluuaAHZk1xWpuRfUJG8TIvcOchkFJ1p gZaVKJqqO44T4uofXiwGO+rqS9CQGLVROrgXOTH0wwA/VtjHxNktKmem2yY1h08bNhjUEtLsARm BqmICNl/1sgHStH+KzXpEQRIcwtHRZnnnZ6A6M+wI4soKm5qHJ6cxvWnrIeyi03tTjXfFTuPLun 5vpKRiVhDmfennsBPrEQqrql 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_909781_E3D9CD41 X-CRM114-Status: GOOD ( 14.27 ) 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 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);