Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7291425rwd; Tue, 6 Jun 2023 08:44:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7isypS2zDCwmP0bo0DBBcmwF5JtWoPHD24vgEgFUy7CBPx8ulPuY4gf3YHGT56JLj8/peV X-Received: by 2002:a05:6214:226e:b0:5ef:5456:783c with SMTP id gs14-20020a056214226e00b005ef5456783cmr2756600qvb.40.1686066241108; Tue, 06 Jun 2023 08:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686066241; cv=none; d=google.com; s=arc-20160816; b=ITLG7G00kHtROKIANiGUN0lDm3S1Ix9bMCGnLBx9p+p+pGKm6ZPJILJJQzcg6h6QY7 qLhZPAepkTyP4TGhdD7GBiy0NFyrjizTKKA6+52WL/3F7zA0vm0OjV1QmKPfZs+ztaYe MrODtfUAxhAv8Y59QUrM29FhOyfSckbd3UfADker+JTQ7rqnhkx/zb5fzNMpwEYnjEqt 4aLh4hKAWdDOPge+K/L6ZUAHTkRllj1V3qP4IMXyZ6AE6WIP1xxM5tH07ATkpLkGMwcd nzEdHbdbcwkQTKU4ua9w0N7UlOnhVep5ph3dlgZDLm6cHob8unWM6BF5y6fcjI9EVeqO iwNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9v/8NdFKwdrIcXJaKsYKtuTU5x2+ZDFag/LwISXr6UU=; b=R6SF7xc3QelALgGXtZZnZevIlHrIbRL3OBpAb6Gsf2MtRZc7rD3rYyFoQ6wcxX3MmA S4mgeXqwueSz1iN678sAQVTgxJUsSEc7yPDuvQU2q5uI1KqBJ/uuZFuurQwCiswqUURK LC4FxS3R9PbTyFVjC/R/c1574LBy0TsxZuHPD8FICyh0SLsejEf7bqUlxsiqBon8puQr EUozD3UA+hZQ6UVZX0iQN4d1XOiMo7QjFzqPTKU5Vo9Biktj03aYawSFuSadoLgvKpZ9 aMav+A3a1ToY57LtA2HisO/SB5JqvSnI+aFtQzsjErbkvd5NqyTbi+P86HMh6B3EO2aB u9RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="p2H//vRK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 10-20020a0562140dca00b00628418847a5si6381044qvt.470.2023.06.06.08.43.46; Tue, 06 Jun 2023 08:44:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="p2H//vRK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238399AbjFFOla (ORCPT + 99 others); Tue, 6 Jun 2023 10:41:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238212AbjFFOkX (ORCPT ); Tue, 6 Jun 2023 10:40:23 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2437F19B5 for ; Tue, 6 Jun 2023 07:39:02 -0700 (PDT) Received: from pendragon.ideasonboard.com (om126253223039.31.openmobile.ne.jp [126.253.223.39]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5BE0CAB; Tue, 6 Jun 2023 16:37:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1686062268; bh=SlYjAxQ88VfcgDbxzfQdqVW8absnYmwE1GYlH2uvgyA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p2H//vRKtHfTqkbrO1+l/tMtYeC3G/DKhQBKZfHL9Y6zJPpYnOOWz5uz+/Dm7XlOS i/WdCD887zHat9i9b39M2rGjrC26htPbnQh6u4WIERU3kSsHhYIRDbU/wrxapOwC9n /73Eq3tO6iO2+oBeYRtfz8o+q3ddQUZYXT9KKaKo= Date: Tue, 6 Jun 2023 17:38:10 +0300 From: Laurent Pinchart To: Siddh Raman Pant Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Jani Nikula , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Suraj Upadhyay Subject: Re: [PATCH v9 7/8] drm: Remove usage of deprecated DRM_DEBUG_DRIVER Message-ID: <20230606143810.GC5197@pendragon.ideasonboard.com> References: <22d3153244242e08984b16065da19308a513a743.1686047727.git.code@siddh.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <22d3153244242e08984b16065da19308a513a743.1686047727.git.code@siddh.me> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Siddh, Thank you for the patch. On Tue, Jun 06, 2023 at 04:15:21PM +0530, Siddh Raman Pant wrote: > drm_print.h says DRM_DEBUG_DRIVER is deprecated. > Thus, use newer drm_dbg_driver(). > > Also fix the deprecation comment in drm_print.h which > mentions drm_dbg() instead of drm_dbg_driver(). > > Signed-off-by: Siddh Raman Pant > --- > drivers/gpu/drm/drm_mipi_dbi.c | 10 +++++----- > include/drm/drm_print.h | 2 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c > index 58ff9503a403..ab5dd5933a1a 100644 > --- a/drivers/gpu/drm/drm_mipi_dbi.c > +++ b/drivers/gpu/drm/drm_mipi_dbi.c > @@ -70,11 +70,11 @@ > #define MIPI_DBI_DEBUG_COMMAND(cmd, data, len) \ > ({ \ > if (!len) \ > - DRM_DEBUG_DRIVER("cmd=%02x\n", cmd); \ > + drm_dbg_driver(NULL, "cmd=%02x\n", cmd); \ > else if (len <= 32) \ > - DRM_DEBUG_DRIVER("cmd=%02x, par=%*ph\n", cmd, (int)len, data);\ > + drm_dbg_driver(NULL, "cmd=%02x, par=%*ph\n", cmd, (int)len, data);\ > else \ > - DRM_DEBUG_DRIVER("cmd=%02x, len=%zu\n", cmd, len); \ > + drm_dbg_driver(NULL, "cmd=%02x, len=%zu\n", cmd, len); \ > }) > > static const u8 mipi_dbi_dcs_read_commands[] = { > @@ -708,7 +708,7 @@ bool mipi_dbi_display_is_on(struct mipi_dbi *dbi) > DCS_POWER_MODE_DISPLAY_NORMAL_MODE | DCS_POWER_MODE_SLEEP_MODE)) > return false; > > - DRM_DEBUG_DRIVER("Display is ON\n"); > + drm_dbg_driver(NULL, "Display is ON\n"); > return true; > } > @@ -1256,7 +1256,7 @@ int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *dbi, > > mutex_init(&dbi->cmdlock); > > - DRM_DEBUG_DRIVER("SPI speed: %uMHz\n", spi->max_speed_hz / 1000000); > + drm_dbg_driver(NULL, "SPI speed: %uMHz\n", spi->max_speed_hz / 1000000); We don't have access to a struct drm_device pointer here, but we have access to a struct device through spi_device. It's quite annoying to be forced by drm_dbg_driver() to use NULL. This isn't a regression, so I'm fine with this patch, but it probably shows that the drm_print macros are not always good fits and that API improvements are needed. With the commit message fixed as mentioned in the review of an earlier patch in this series, Reviewed-by: Laurent Pinchart > > return 0; > } > diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h > index 4b8532cf2ae6..2bac5e8fd550 100644 > --- a/include/drm/drm_print.h > +++ b/include/drm/drm_print.h > @@ -589,7 +589,7 @@ void __drm_err(const char *format, ...); > #define DRM_DEBUG(fmt, ...) \ > __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__) > > -/* NOTE: this is deprecated in favor of drm_dbg(NULL, ...). */ > +/* NOTE: this is deprecated in favor of drm_dbg_driver(NULL, ...). */ > #define DRM_DEBUG_DRIVER(fmt, ...) \ > __drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__) > -- Regards, Laurent Pinchart