Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp667782ybg; Mon, 1 Jun 2020 11:12:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4u51aaKTnvIUceD1ldyApwyqdsdz/rUfHX1ys+/UPOBwTX2i9J+KOZKcX/+dErNkhlcBm X-Received: by 2002:aa7:c942:: with SMTP id h2mr23022391edt.23.1591035129398; Mon, 01 Jun 2020 11:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591035129; cv=none; d=google.com; s=arc-20160816; b=HfjmNhyfFsmpnCXmU5RhZlSQY7eOCI9X2FKIah/2lymrUefrCprdc0uNZHlMfoo2Ok YBuFqRbfb6PDD0yARNKciVCoF/0Y1/SnwxRdYQOm+RP8xNhioaltdZUQtVH1QX+J7tv/ NKjq5INEiQ9SsrYD3151TojxtXPHoD169vpTn1Mbm1mLN2ejtKLNk8nlGxi3+2wD/HbK vMunntvhX6rQONPLnyPWPOfx4/uZ/F4//MHyKmttJLQdQOsCH3NCD4w8LEfrURsfGtf0 VuWtu2j2ID4Qg0gzNTSkcnj9fLB5q+uEciIwIbnT0KFV0jMz2QvArSFWVDjNXDR+Fbqf w8/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RYPqYHoHPsDnGufy+gKzZTQleYEm41cwLWPZTf/ZoVU=; b=jTM/Y8CqxhNNSINyIYRkRi42gN7JVA8jgZSpD8BArTur5Yhz1jF6UN2tkvf0CtTphc Na+CFGWGOhPGB6x4UlzH/c/0iWPH9DaAzq4tMeGOW/V4boAbozXvD7rPClYGVEOiVA1H bpgkVrR0ySBwBtPPUgPZMdnmWrKIXjLtftcvyJGbUNg3glX2eMSkhedX5b0HxWSajSLV W0Bpcu1hsB3IFvWPYHp5wNRWRdYNcsbEssBOhOgI7YIb6R0lj1TOJNCLEtnH9nBujODE Jz1rvS1PLvdlFeib1n4hjNGEX4BTF8OMzvNHvHR7m+TgoAskQTjUHDDRQwnDM5mb6s9a yx3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KZYQ8oZQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb16si76181edb.163.2020.06.01.11.11.46; Mon, 01 Jun 2020 11:12:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KZYQ8oZQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729886AbgFASIy (ORCPT + 99 others); Mon, 1 Jun 2020 14:08:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:55158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728782AbgFASIx (ORCPT ); Mon, 1 Jun 2020 14:08:53 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 668CC20872; Mon, 1 Jun 2020 18:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034932; bh=X4x75h3oHXMkeOrIher/65hlTtP64x+5i4tluufMDaA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KZYQ8oZQalgh2U6M1t6hF2SZ+Zo5FlY4kH16QBxAE021wxfTwxww5HiGXj4LwYnG9 nW69+K4gUyqC7mgkQbHl0lj5d30gmm0mBwMn8XASQmd0tfMzR2Afme62SWh8Cu4kLM 7/NDLhlLeOasAZ4FeyRPjmKbvFBK9FK1pN3lp3AM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , Sam Ravnborg , Sasha Levin Subject: [PATCH 5.4 078/142] gpu/drm: Ingenic: Fix opaque pointer casted to wrong type Date: Mon, 1 Jun 2020 19:53:56 +0200 Message-Id: <20200601174046.115405710@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Cercueil [ Upstream commit abf56fadf0e208abfb13ad1ac0094416058da0ad ] The opaque pointer passed to the IRQ handler is a pointer to the drm_device, not a pointer to our ingenic_drm structure. It still worked, because our ingenic_drm structure contains the drm_device as its first field, so the pointer received had the same value, but this was not semantically correct. Cc: stable@vger.kernel.org # v5.3 Fixes: 90b86fcc47b4 ("DRM: Add KMS driver for the Ingenic JZ47xx SoCs") Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200516215057.392609-5-paul@crapouillou.net Acked-by: Sam Ravnborg Signed-off-by: Sasha Levin --- drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c index 9e95f6fd5406..376fca6ca9f4 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c @@ -467,7 +467,7 @@ static int ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder, static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg) { - struct ingenic_drm *priv = arg; + struct ingenic_drm *priv = drm_device_get_priv(arg); unsigned int state; regmap_read(priv->map, JZ_REG_LCD_STATE, &state); -- 2.25.1