From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C32AC77B73 for ; Tue, 6 Jun 2023 13:08:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237998AbjFFNI5 (ORCPT ); Tue, 6 Jun 2023 09:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237768AbjFFNIy (ORCPT ); Tue, 6 Jun 2023 09:08:54 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31F2F170F for ; Tue, 6 Jun 2023 06:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686056915; x=1717592915; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=EGypTDkiiflKHYna6oC/dC9BQiC2e9SaCPgHT4ONrUQ=; b=HuuuH8UalcIaVBXkDeVDDr5dzhozbp2jx3OM2CafOpBYcyzU6LH1gJnm Z2jVzcy3VQkXzLXVA7jUnBLYW/I4AI8MpB8lE0Q27bbFWrAM0hU3ZOCLQ Gs2A+PXqiQ9TGYwSKet3ioRC6r+jwX/LvAwEvQQ8OHlEI8MJDL3tllsWp uXxq7oroJA47llteKIJ5xu/x//Mr5OqbFqFfEPoNkWcSf1AF+NBUvfPsk HiXpYwi+tFqiqv9WZugd8ABSxxwsafWNu7WIVjAQUPVS5nlwF+IIiVqJP plt3qdBrysvZ/GwB0CEmQlrtz54HvbZ6x6Tf67w2/vuOSHvsmG3bP81aK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="443041112" X-IronPort-AV: E=Sophos;i="6.00,221,1681196400"; d="scan'208";a="443041112" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 06:07:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="821626227" X-IronPort-AV: E=Sophos;i="6.00,221,1681196400"; d="scan'208";a="821626227" Received: from abobyr-mobl1.ccr.corp.intel.com (HELO localhost) ([10.252.59.4]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 06:07:53 -0700 From: Jani Nikula To: Laurent Pinchart , Siddh Raman Pant Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Suraj Upadhyay Subject: Re: [PATCH v9 1/8] Revert "drm: mipi-dsi: Convert logging to drm_* functions." In-Reply-To: <20230606125537.GC25774@pendragon.ideasonboard.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20230606125537.GC25774@pendragon.ideasonboard.com> Date: Tue, 06 Jun 2023 16:07:47 +0300 Message-ID: <87pm68u4bg.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 06 Jun 2023, Laurent Pinchart wrote: > Hi Siddh, > > Thank you for the patch. > > On Tue, Jun 06, 2023 at 04:15:15PM +0530, Siddh Raman Pant wrote: >> This reverts commit 1040e424353f5f4d39f6f3aa8723eb3bd6ea6446. >> >> It used an incorrect way to use drm_* functions. Only drm_device ptrs >> should be passed, but the mentioned commit passed mipi_dsi_host ptr. >> It worked by accident due to macro magic. >> >> Reported-by: Jani Nikula >> Reviewed-by: Jani Nikula >> Signed-off-by: Siddh Raman Pant > > Reviewed-by: Laurent Pinchart > > Any chance we could prevent this from happening by turning the macros > into inline functions ? Patch 2 adds static inline struct device *__drm_dev_ptr(const struct drm_device *drm) which should tackle this. BR, Jani. > >> --- >> drivers/gpu/drm/drm_mipi_dsi.c | 15 ++++++++------- >> 1 file changed, 8 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c >> index 3fd6c733ff4e..a37af4edf394 100644 >> --- a/drivers/gpu/drm/drm_mipi_dsi.c >> +++ b/drivers/gpu/drm/drm_mipi_dsi.c >> @@ -33,7 +33,6 @@ >> >> #include >> #include >> -#include >> >> #include