From nobody Sun Nov 24 22:31:49 2024 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 198538C0B for ; Thu, 31 Oct 2024 19:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730403379; cv=none; b=W/UIZZ1GP8e9pFcYpC3KFMnsvKnGtKIcH6O8GfyP8cCvmPeRKR2s/5OOYBY/XbEP9hROyIZhzbOlbmIPYGJB0dfGQxKKaVrgRx7gJFg4S8wBJoXvSlW0vf8ocoSSNUGHVfBHsQ469kCRdbCVcGiHPI3DwOeGcFVZZGOK36Z1GMg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730403379; c=relaxed/simple; bh=Ss71kMZkB3nVBqGdR/PxkFCC6+zFDRf4WUm385aXJIk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=DgJGFn/JdhDRPMnRxMjwZmmNWGW3TdrHwvbakvbFMHNf56FUdf8YnAzdXrkhPNVpEzABPibP600DTIPheyRqX0oiUVhzIWKNvjCkEtVHTHfFJQNiz+U3s/+E+G3k+aWrx6vtvd4kcf/qYmq0UskynELX7ySyIIRpxEAlg+HB5uo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SBvMknrS; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SBvMknrS" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-720b173a9ebso1092043b3a.0 for ; Thu, 31 Oct 2024 12:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730403376; x=1731008176; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JP34bMLyU2ULdaARQ1dvvtCxqm+pYihhRf8aqhhtSoU=; b=SBvMknrSQKrL4b/ECHyhq8C2QJQjjHD5YEKX9l39GHhm22zyCGf7QTMf5p/GmLXeWM z0hUD99esCHKWFzx2THjcwY9HcyONmp8jtL502An7Cje6yv4HoyKbCmTFKoNV4AFD8L5 YdwInieGe0sHdhIU0rpk1CSbTOcV9G51Bh7/aKa8YSS88wHGwHX+iPHrFymLy8W2y6dI wGaiqCKNt30sa7S+uyF31YfMumh+Yd9QDpvEL1pPg8GOJdJG0j82Tz1jXFwQZAR2Ovf/ kfP5d9gAz7DhGQtOjkPvKuA55DDMfOKsF0pEdsqhCe9P48Uj5+X6sUopNxKoSB+flI/9 yzKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730403376; x=1731008176; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JP34bMLyU2ULdaARQ1dvvtCxqm+pYihhRf8aqhhtSoU=; b=OBB955S79Oo2fxmfebBpbnpru0QybUvfGjKBSnN0PIsL+kRHvLun8hjxlm+9glai1C sSHmSikwDNEI5qf/7RQ+EEiBI/9qRzLLqS3pyO4draDWOw5qNtv5ROuEnn1HQnLRnX3v zmGqOEwxqdqY2qGLaYjTm17XHMJaKr2P3m1Mo15HywdZOA55xa5Nj891QQ9y/NskBM8L ImdFZ1PB8Gg2TfwHZptmHk5i8qdVuz6DnJpGIsKEPBD1Egvx8kF6Ex7xDDrHguTD6ifB 4v2v63N4RSiI8V4eAuDG0p9mYI8y1LO1S4t+YucWDy2AmAsv4mqknbWl6e46r343ytTf NSlA== X-Gm-Message-State: AOJu0YxN+/dbqjELCe8KQlqHqO2KHplRj2Elwed53goCgFQNE8MYOxNr SqaMGGnPtSExAZe3cbjxZAhjaVYR8M3nLmr/e3QmiSpwAN5xDKCA X-Google-Smtp-Source: AGHT+IH0x9Hdi48zugBq3IX7CYinSg5EUVVjQ/7qFowXhJdtwKokqcdkv7kHX/SOoimn7Q48GoBWzg== X-Received: by 2002:a05:6a21:38f:b0:1d9:282f:3d17 with SMTP id adf61e73a8af0-1db91e53617mr5150201637.35.1730403376356; Thu, 31 Oct 2024 12:36:16 -0700 (PDT) Received: from advait-kdeneon.. ([103.170.81.86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-720bc316987sm1453210b3a.206.2024.10.31.12.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 12:36:15 -0700 (PDT) From: Advait Dhamorikar To: Thomas Gleixner , Fabrizio Castro Cc: linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, anupnewsmail@gmail.com, Advait Dhamorikar Subject: [PATCH-next] irqchip/renesas-rzv2h: Fix potentially mismatched datatype Date: Fri, 1 Nov 2024 01:06:06 +0530 Message-Id: <20241031193606.87970-1-advaitdhamorikar@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch updates the type of hw_irq to unsigned long to=20 match irq_hw_number_t. The variable hw_irq is defined as unsigned int at places, However when it is initialized using irqd_to_hwirq(), it returns=20 an irq_hw_number_t, which inturn is a typedef for unsigned long. Signed-off-by: Advait Dhamorikar --- drivers/irqchip/irq-renesas-rzv2h.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-rene= sas-rzv2h.c index fe2d29e91026..f7f27ee5c732 100644 --- a/drivers/irqchip/irq-renesas-rzv2h.c +++ b/drivers/irqchip/irq-renesas-rzv2h.c @@ -102,7 +102,7 @@ static inline struct rzv2h_icu_priv *irq_data_to_priv(s= truct irq_data *data) static void rzv2h_icu_eoi(struct irq_data *d) { struct rzv2h_icu_priv *priv =3D irq_data_to_priv(d); - unsigned int hw_irq =3D irqd_to_hwirq(d); + unsigned long hw_irq =3D irqd_to_hwirq(d); unsigned int tintirq_nr; u32 bit; =20 @@ -128,7 +128,7 @@ static void rzv2h_icu_eoi(struct irq_data *d) static void rzv2h_tint_irq_endisable(struct irq_data *d, bool enable) { struct rzv2h_icu_priv *priv =3D irq_data_to_priv(d); - unsigned int hw_irq =3D irqd_to_hwirq(d); + unsigned long hw_irq =3D irqd_to_hwirq(d); u32 tint_nr, tssel_n, k, tssr; =20 if (hw_irq < ICU_TINT_START) @@ -184,7 +184,7 @@ static int rzv2h_nmi_set_type(struct irq_data *d, unsig= ned int type) =20 static void rzv2h_clear_irq_int(struct rzv2h_icu_priv *priv, unsigned int = hwirq) { - unsigned int irq_nr =3D hwirq - ICU_IRQ_START; + unsigned long irq_nr =3D hwirq - ICU_IRQ_START; u32 isctr, iitsr, iitsel; u32 bit =3D BIT(irq_nr); =20 @@ -204,8 +204,8 @@ static void rzv2h_clear_irq_int(struct rzv2h_icu_priv *= priv, unsigned int hwirq) static int rzv2h_irq_set_type(struct irq_data *d, unsigned int type) { struct rzv2h_icu_priv *priv =3D irq_data_to_priv(d); - unsigned int hwirq =3D irqd_to_hwirq(d); - u32 irq_nr =3D hwirq - ICU_IRQ_START; + unsigned long hwirq =3D irqd_to_hwirq(d); + unsigned long irq_nr =3D hwirq - ICU_IRQ_START; u32 iitsr, sense; =20 switch (type & IRQ_TYPE_SENSE_MASK) { @@ -241,7 +241,7 @@ static int rzv2h_irq_set_type(struct irq_data *d, unsig= ned int type) =20 static void rzv2h_clear_tint_int(struct rzv2h_icu_priv *priv, unsigned int= hwirq) { - unsigned int tint_nr =3D hwirq - ICU_TINT_START; + unsigned long tint_nr =3D hwirq - ICU_TINT_START; int titsel_n =3D ICU_TITSR_TITSEL_N(tint_nr); u32 tsctr, titsr, titsel; u32 bit =3D BIT(tint_nr); @@ -265,9 +265,9 @@ static int rzv2h_tint_set_type(struct irq_data *d, unsi= gned int type) u32 titsr, titsr_k, titsel_n, tien; struct rzv2h_icu_priv *priv; u32 tssr, tssr_k, tssel_n; - unsigned int hwirq; + unsigned long hwirq; u32 tint, sense; - int tint_nr; + unsigned long tint_nr; =20 switch (type & IRQ_TYPE_SENSE_MASK) { case IRQ_TYPE_LEVEL_LOW: @@ -329,7 +329,7 @@ static int rzv2h_tint_set_type(struct irq_data *d, unsi= gned int type) =20 static int rzv2h_icu_set_type(struct irq_data *d, unsigned int type) { - unsigned int hw_irq =3D irqd_to_hwirq(d); + unsigned long hw_irq =3D irqd_to_hwirq(d); int ret; =20 if (hw_irq >=3D ICU_TINT_START) --=20 2.34.1