Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1938085ybk; Sun, 17 May 2020 05:25:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCnq7ZxwHM7McliHmHy9rl6lKAHTb/Y4IdVOxDlKFUFgr6cB/uN8+clpzwQ25h1vKH/i2+ X-Received: by 2002:a50:fd04:: with SMTP id i4mr10031237eds.43.1589718316566; Sun, 17 May 2020 05:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589718316; cv=none; d=google.com; s=arc-20160816; b=SBPmO2JWF3M7bcH6jS1evIV2mh53zYZlY1Am6TzcEgZZonTtPBC1kck8lImRV/Cj5o U9WrWK1lsHKpx8GICo8hd9uRszouRFBxFsHxy5uLUaWCl2NJL8hUtlJlU0QIdfVAbJjx K7e+FpBbL+2bkXXAd+j9kRMdi/LDRlV90WBhHcVUV405cWonQ33jbdD3sql5Y8SDtIQj nAploDGgNmkMf6lR/g35IM/AoQDcyXeygg0y3H1n12cOsOoohyVSUr/lrRLNoS5bTVxS WLEKuvQeGq18OoTDbrAGT1m9fmnD0q0SicPpe+1rs0AAUj4mZzBT2YEG/wsUyArl+XT2 xmDg== 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 :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=9lAqsVvAIASjKFbEhPDBxhbFVPKcLMddVhVPAD4MtNs=; b=QVrFz5JO/2UKfvxA48eW8tF4uqxzr8KKLbhzGmnYvxa9TNsDKnJUIJy8tKg0EEOfkh LflqVmeF8to/ao63nZIRNjNCnuBYHYr/ad44pjsryxwN+/H6AleAlGy0f3CsbyEcpmbw /3GU61Jv8koqF877EIKH8J6VPQ/LQKIFfTnyx2yv0p2TbkEbodcCDiSLyXgnnRSCnpLg OKNUsmCyO/mcEAz4s9womwRtFv8qLl80oK5GDtp7f1uhu2epvTgRWwGzvU3qNQwwDwX1 2iclDQaW6rZtTx7g+3ZIBePTNYcUqzSHxTb5MQxHhzTNx8OkNixv03avZ0k5neOh74xN hjhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b="vG/oYm1r"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u27si4490455edl.78.2020.05.17.05.24.38; Sun, 17 May 2020 05:25:16 -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=fail header.i=@crapouillou.net header.s=mail header.b="vG/oYm1r"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727983AbgEQMUJ (ORCPT + 99 others); Sun, 17 May 2020 08:20:09 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:45694 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727969AbgEQMUI (ORCPT ); Sun, 17 May 2020 08:20:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1589718006; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9lAqsVvAIASjKFbEhPDBxhbFVPKcLMddVhVPAD4MtNs=; b=vG/oYm1r0CrhRofO/eXELE3n5/czRaZ1Mk0pnntlYvJyV4JqsSm+HtaxMXipIy2tzyGoYL s8Ob0J1DuXgXhwqeMWHTJGIt3Y6zzy7vUxrwt9qBFhCqAtz6wHeQ7Nj9rivo8NPUWvYWnq YAtndBgSbClCsZJN0j+Vcwm4HxmvV/w= Date: Sun, 17 May 2020 14:19:54 +0200 From: Paul Cercueil Subject: Re: [PATCH 05/12] gpu/drm: Ingenic: Fix opaque pointer casted to wrong type To: Sam Ravnborg Cc: David Airlie , Daniel Vetter , Rob Herring , Greg Kroah-Hartman , "Rafael J . Wysocki" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, od@zcrc.me, dri-devel@lists.freedesktop.org Message-Id: <696HAQ.LSNC2851KFSC@crapouillou.net> In-Reply-To: <20200517062105.GD609600@ravnborg.org> References: <20200516215057.392609-1-paul@crapouillou.net> <20200516215057.392609-5-paul@crapouillou.net> <20200517062105.GD609600@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sam, Le dim. 17 mai 2020 =E0 8:21, Sam Ravnborg a =E9crit : > On Sat, May 16, 2020 at 11:50:50PM +0200, Paul Cercueil wrote: >> The opaque pointer passed to the IRQ handler is a pointer to the >> drm_device, not a pointer to our ingenic_drm structure. >>=20 >> 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. >>=20 >> Cc: stable@vger.kernel.org # v5.3 >> Fixes: 90b86fcc47b4 ("DRM: Add KMS driver for the Ingenic JZ47xx=20 >> SoCs") >> Signed-off-by: Paul Cercueil > Acked-by: Sam Ravnborg Pushed to drm-misc-fixes, thanks for the review. -Paul >> --- >> drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c=20 >> b/drivers/gpu/drm/ingenic/ingenic-drm.c >> index 0c472382a08b..97244462599b 100644 >> --- a/drivers/gpu/drm/ingenic/ingenic-drm.c >> +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c >> @@ -476,7 +476,7 @@ static int=20 >> ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder, >>=20 >> static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg) >> { >> - struct ingenic_drm *priv =3D arg; >> + struct ingenic_drm *priv =3D drm_device_get_priv(arg); >> unsigned int state; >>=20 >> regmap_read(priv->map, JZ_REG_LCD_STATE, &state); >> -- >> 2.26.2 >>=20 >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel