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 X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E973C433DB for ; Tue, 30 Mar 2021 11:20:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 065A06195C for ; Tue, 30 Mar 2021 11:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231664AbhC3LTy (ORCPT ); Tue, 30 Mar 2021 07:19:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231574AbhC3LTn (ORCPT ); Tue, 30 Mar 2021 07:19:43 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18504C061574 for ; Tue, 30 Mar 2021 04:19:43 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id f10so11469766pgl.9 for ; Tue, 30 Mar 2021 04:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=qIay2yJaGw8H+hG15KImlYeu0r6L9MLLcQDEnZF2qFdTW2zSpQ40IXg+/vxlnJQz4o TKzi5YqlKrIHttRWaLvFbdM20gKQ/igZVcwm8SFzdsf0/GzVTOyvvDeB6kqpBolWhn33 iI+TCXiaVJhMe/oW7DCLEON36LzdAAwFwyEShryYOFQyky1isZ0YY5RVfN5W3oiAYvwy 8+KnWX/nQwEbJaqACWTSuM18VOAT1ks9X9zr7SchWYDgwTLwBD/knap1CJ7Ca9tlGG8b sFpNlx44sNZxtyb4faahEv9qJLV1qWz1e1po03itPLigsO5ao0DVK7AqSPfVLMue7R6H nwTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=CHg5gpTfa0Nu2Jz7RY6ONuzgoAaFb5EDIMHG1qwjQY4z00Hwy556RFvYdId9SdHlHE r6QtpmeojmIg5k60cDgGmGOT5a+aAbAJJjMwNsWPaNL8PTn1WoyzsvRln+KwGcxy6fyF BU68XJWTLn8Ne4PHT/dQtjbfhmDSkxBa+L5kPFnXmnyMouByjptVkN6ipWDZ3PiUNyNB LsiYgFq8b7JE5ftsnBl3mnRT1vjIwQl0w0jJAvu1NSDRrmp64MXBUgbyVdcKBaNCJvP1 PWR2PS+uTy5IA/eMrf4/cK3tGEQPwl4PSGFLk5HriKuK+3UkFgVMux+p8C9I609tKycp UfsQ== X-Gm-Message-State: AOAM5330E0RK+wU3YZeAUfY0la3hVqHosDi6+njtTr0rI4xqKTEsoNIJ fSOuQsZcslZ9gAH8D8uiBy+5jq/9nbLckW1amAb54Q== X-Google-Smtp-Source: ABdhPJxq5q/aaT+6jdvgQQdbDwMNlvYfZjAmKD/2J/yR3c6DqBDMvry2T/Awy6EWGZ+THIsQHdyfhPbS801PyKVA3nE= X-Received: by 2002:a05:6a00:b54:b029:207:2a04:7b05 with SMTP id p20-20020a056a000b54b02902072a047b05mr29651828pfo.12.1617103182535; Tue, 30 Mar 2021 04:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20210326203807.105754-1-lyude@redhat.com> <20210326203807.105754-21-lyude@redhat.com> In-Reply-To: <20210326203807.105754-21-lyude@redhat.com> From: Robert Foss Date: Tue, 30 Mar 2021 13:19:31 +0200 Message-ID: Subject: Re: [PATCH v2 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*() To: Lyude Paul Cc: nouveau@lists.freedesktop.org, dri-devel , amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Lyude, This patch looks good, but I have one question below. With it addressed, feel free to add my r-b. Reviewed-by: Robert Foss > > -static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > +static bool drm_dp_sideband_parse_req(const struct drm_dp_mst_topology_mgr *mgr, > + struct drm_dp_sideband_msg_rx *raw, > struct drm_dp_sideband_msg_req_body *msg) > { > memset(msg, 0, sizeof(*msg)); > @@ -1117,12 +1125,12 @@ static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > > switch (msg->req_type) { > case DP_CONNECTION_STATUS_NOTIFY: > - return drm_dp_sideband_parse_connection_status_notify(raw, msg); > + return drm_dp_sideband_parse_connection_status_notify(mgr, raw, msg); > case DP_RESOURCE_STATUS_NOTIFY: > - return drm_dp_sideband_parse_resource_status_notify(raw, msg); > + return drm_dp_sideband_parse_resource_status_notify(mgr, raw, msg); > default: > - DRM_ERROR("Got unknown request 0x%02x (%s)\n", msg->req_type, > - drm_dp_mst_req_type_str(msg->req_type)); > + drm_err(mgr->dev, "Got unknown request 0x%02x (%s)\n", > + msg->req_type, drm_dp_mst_req_type_str(msg->req_type)); > return false; > } > } > .. snip .. > @@ -4118,12 +4121,12 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) > > INIT_LIST_HEAD(&up_req->next); > > - drm_dp_sideband_parse_req(&mgr->up_req_recv, &up_req->msg); > + drm_dp_sideband_parse_req(mgr, &mgr->up_req_recv, &up_req->msg); drm_dp_sideband_parse_req() is only called here, and the function arguments could probably stand to have `&mgr->up_req_recv` removed (here and in the func. declaration) since the same data structure is accessible through the `mgr` pointer inside of drm_dp_sideband_parse_req(). I guess this is a matter of taste, so feel free to do what you want with this. > > if (up_req->msg.req_type != DP_CONNECTION_STATUS_NOTIFY && > up_req->msg.req_type != DP_RESOURCE_STATUS_NOTIFY) { > - DRM_DEBUG_KMS("Received unknown up req type, ignoring: %x\n", > - up_req->msg.req_type); > + drm_dbg_kms(mgr->dev, "Received unknown up req type, ignoring: %x\n", > + up_req->msg.req_type); > kfree(up_req); > goto out; > } 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 X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61B50C433E0 for ; Tue, 30 Mar 2021 17:25:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 280686196C for ; Tue, 30 Mar 2021 17:25:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 280686196C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=nouveau-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 057BA6E951; Tue, 30 Mar 2021 17:25:16 +0000 (UTC) Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A9236E8AE for ; Tue, 30 Mar 2021 11:19:43 +0000 (UTC) Received: by mail-pf1-x436.google.com with SMTP id g15so11950652pfq.3 for ; Tue, 30 Mar 2021 04:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=qIay2yJaGw8H+hG15KImlYeu0r6L9MLLcQDEnZF2qFdTW2zSpQ40IXg+/vxlnJQz4o TKzi5YqlKrIHttRWaLvFbdM20gKQ/igZVcwm8SFzdsf0/GzVTOyvvDeB6kqpBolWhn33 iI+TCXiaVJhMe/oW7DCLEON36LzdAAwFwyEShryYOFQyky1isZ0YY5RVfN5W3oiAYvwy 8+KnWX/nQwEbJaqACWTSuM18VOAT1ks9X9zr7SchWYDgwTLwBD/knap1CJ7Ca9tlGG8b sFpNlx44sNZxtyb4faahEv9qJLV1qWz1e1po03itPLigsO5ao0DVK7AqSPfVLMue7R6H nwTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=am1PR2grKv47OFyUVOI9ZDyxe12HhaF+LgukKdvsW1IFst8OsvVhj36dKsmv1lAFxb jDZWvGPX316oqTf4gDJ6cYFP5g8jHBDDPvpD2Gy9x3Hhid5NBXoXINM7SkdcsS4H3fuX 7U/t/NdYs3Etj88v8WzYej3iXesugyaf82h45hhgv8DWWXKRJRjZpscFmQyWq9ohly1x wOwYuk0CX4FkAlDsyzGW/wt+/NN+J0/StqdRdvrpLe80UKIMd6Ty0hllnLglwgp0pG4W IlJsLbI7JwtroZApO0KwEpYXojJgo5QCdYFYSwvEUbcNzUr66NDMv6fhdiOSrnQJLNOR Cpww== X-Gm-Message-State: AOAM530H690ZDisHBjcadu389UwoVqL++Y5DcZngq9REj9VALhr9g8nt u69VlJPZZbkTMfLsuyV5YsLoLgL6/fP4iGPJ8Qh3Fg== X-Google-Smtp-Source: ABdhPJxq5q/aaT+6jdvgQQdbDwMNlvYfZjAmKD/2J/yR3c6DqBDMvry2T/Awy6EWGZ+THIsQHdyfhPbS801PyKVA3nE= X-Received: by 2002:a05:6a00:b54:b029:207:2a04:7b05 with SMTP id p20-20020a056a000b54b02902072a047b05mr29651828pfo.12.1617103182535; Tue, 30 Mar 2021 04:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20210326203807.105754-1-lyude@redhat.com> <20210326203807.105754-21-lyude@redhat.com> In-Reply-To: <20210326203807.105754-21-lyude@redhat.com> From: Robert Foss Date: Tue, 30 Mar 2021 13:19:31 +0200 Message-ID: To: Lyude Paul X-Mailman-Approved-At: Tue, 30 Mar 2021 17:25:14 +0000 Subject: Re: [Nouveau] [PATCH v2 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*() X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel , David Airlie , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Maarten Lankhorst , open list , Maxime Ripard , amd-gfx@lists.freedesktop.org, Daniel Vetter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" Hey Lyude, This patch looks good, but I have one question below. With it addressed, feel free to add my r-b. Reviewed-by: Robert Foss > > -static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > +static bool drm_dp_sideband_parse_req(const struct drm_dp_mst_topology_mgr *mgr, > + struct drm_dp_sideband_msg_rx *raw, > struct drm_dp_sideband_msg_req_body *msg) > { > memset(msg, 0, sizeof(*msg)); > @@ -1117,12 +1125,12 @@ static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > > switch (msg->req_type) { > case DP_CONNECTION_STATUS_NOTIFY: > - return drm_dp_sideband_parse_connection_status_notify(raw, msg); > + return drm_dp_sideband_parse_connection_status_notify(mgr, raw, msg); > case DP_RESOURCE_STATUS_NOTIFY: > - return drm_dp_sideband_parse_resource_status_notify(raw, msg); > + return drm_dp_sideband_parse_resource_status_notify(mgr, raw, msg); > default: > - DRM_ERROR("Got unknown request 0x%02x (%s)\n", msg->req_type, > - drm_dp_mst_req_type_str(msg->req_type)); > + drm_err(mgr->dev, "Got unknown request 0x%02x (%s)\n", > + msg->req_type, drm_dp_mst_req_type_str(msg->req_type)); > return false; > } > } > .. snip .. > @@ -4118,12 +4121,12 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) > > INIT_LIST_HEAD(&up_req->next); > > - drm_dp_sideband_parse_req(&mgr->up_req_recv, &up_req->msg); > + drm_dp_sideband_parse_req(mgr, &mgr->up_req_recv, &up_req->msg); drm_dp_sideband_parse_req() is only called here, and the function arguments could probably stand to have `&mgr->up_req_recv` removed (here and in the func. declaration) since the same data structure is accessible through the `mgr` pointer inside of drm_dp_sideband_parse_req(). I guess this is a matter of taste, so feel free to do what you want with this. > > if (up_req->msg.req_type != DP_CONNECTION_STATUS_NOTIFY && > up_req->msg.req_type != DP_RESOURCE_STATUS_NOTIFY) { > - DRM_DEBUG_KMS("Received unknown up req type, ignoring: %x\n", > - up_req->msg.req_type); > + drm_dbg_kms(mgr->dev, "Received unknown up req type, ignoring: %x\n", > + up_req->msg.req_type); > kfree(up_req); > goto out; > } _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau 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 X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A435C433C1 for ; Tue, 30 Mar 2021 11:19:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0504C61987 for ; Tue, 30 Mar 2021 11:19:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0504C61987 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 27E4E6E8B1; Tue, 30 Mar 2021 11:19:44 +0000 (UTC) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 027AC6E8AC for ; Tue, 30 Mar 2021 11:19:42 +0000 (UTC) Received: by mail-pf1-x42a.google.com with SMTP id s11so5870483pfm.1 for ; Tue, 30 Mar 2021 04:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=qIay2yJaGw8H+hG15KImlYeu0r6L9MLLcQDEnZF2qFdTW2zSpQ40IXg+/vxlnJQz4o TKzi5YqlKrIHttRWaLvFbdM20gKQ/igZVcwm8SFzdsf0/GzVTOyvvDeB6kqpBolWhn33 iI+TCXiaVJhMe/oW7DCLEON36LzdAAwFwyEShryYOFQyky1isZ0YY5RVfN5W3oiAYvwy 8+KnWX/nQwEbJaqACWTSuM18VOAT1ks9X9zr7SchWYDgwTLwBD/knap1CJ7Ca9tlGG8b sFpNlx44sNZxtyb4faahEv9qJLV1qWz1e1po03itPLigsO5ao0DVK7AqSPfVLMue7R6H nwTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=RmmYewwbH4psKYpbenjJmBG0UJ3cP7pWPxoSpuYLY3CSsLvYT0o1p8lZwvP5T87yAl t9Ie3uEymwweW0jpZjomHG6K5dxLIXtc/VoMOOVHw2c5XSmXV9Wqeg+l4ZEKjzB1d33Z UB9/bzmoRsKmUv5lcAEIY6sRuElzVlmJy5TDt2e8Lw/t3zA8Fxc7vcevVPFUYBZVCmsj GWvxyf4yYdPAv4lb7R3urcG9h/pb74tvqrLMlyc8S6m75dELfgANdqGbgyUIyFKCPfxc A1q6qd4DQiIcnE2hJxNTGkziD52OoVsrZ2VPLaqQcfR96e5ZrEw6KiALhYjaE1/YFHV3 h1Eg== X-Gm-Message-State: AOAM530qZBWnTbPJXGrmihFuzu76v5yvzg3WiMSJF4vQYHgu0JWd4M/y dH6mxpLEhdh2ZNNLEKErPE+biH8cRXCl9tPH7G//DA== X-Google-Smtp-Source: ABdhPJxq5q/aaT+6jdvgQQdbDwMNlvYfZjAmKD/2J/yR3c6DqBDMvry2T/Awy6EWGZ+THIsQHdyfhPbS801PyKVA3nE= X-Received: by 2002:a05:6a00:b54:b029:207:2a04:7b05 with SMTP id p20-20020a056a000b54b02902072a047b05mr29651828pfo.12.1617103182535; Tue, 30 Mar 2021 04:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20210326203807.105754-1-lyude@redhat.com> <20210326203807.105754-21-lyude@redhat.com> In-Reply-To: <20210326203807.105754-21-lyude@redhat.com> From: Robert Foss Date: Tue, 30 Mar 2021 13:19:31 +0200 Message-ID: Subject: Re: [PATCH v2 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*() To: Lyude Paul X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel , David Airlie , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, open list , amd-gfx@lists.freedesktop.org, Thomas Zimmermann Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hey Lyude, This patch looks good, but I have one question below. With it addressed, feel free to add my r-b. Reviewed-by: Robert Foss > > -static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > +static bool drm_dp_sideband_parse_req(const struct drm_dp_mst_topology_mgr *mgr, > + struct drm_dp_sideband_msg_rx *raw, > struct drm_dp_sideband_msg_req_body *msg) > { > memset(msg, 0, sizeof(*msg)); > @@ -1117,12 +1125,12 @@ static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > > switch (msg->req_type) { > case DP_CONNECTION_STATUS_NOTIFY: > - return drm_dp_sideband_parse_connection_status_notify(raw, msg); > + return drm_dp_sideband_parse_connection_status_notify(mgr, raw, msg); > case DP_RESOURCE_STATUS_NOTIFY: > - return drm_dp_sideband_parse_resource_status_notify(raw, msg); > + return drm_dp_sideband_parse_resource_status_notify(mgr, raw, msg); > default: > - DRM_ERROR("Got unknown request 0x%02x (%s)\n", msg->req_type, > - drm_dp_mst_req_type_str(msg->req_type)); > + drm_err(mgr->dev, "Got unknown request 0x%02x (%s)\n", > + msg->req_type, drm_dp_mst_req_type_str(msg->req_type)); > return false; > } > } > .. snip .. > @@ -4118,12 +4121,12 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) > > INIT_LIST_HEAD(&up_req->next); > > - drm_dp_sideband_parse_req(&mgr->up_req_recv, &up_req->msg); > + drm_dp_sideband_parse_req(mgr, &mgr->up_req_recv, &up_req->msg); drm_dp_sideband_parse_req() is only called here, and the function arguments could probably stand to have `&mgr->up_req_recv` removed (here and in the func. declaration) since the same data structure is accessible through the `mgr` pointer inside of drm_dp_sideband_parse_req(). I guess this is a matter of taste, so feel free to do what you want with this. > > if (up_req->msg.req_type != DP_CONNECTION_STATUS_NOTIFY && > up_req->msg.req_type != DP_RESOURCE_STATUS_NOTIFY) { > - DRM_DEBUG_KMS("Received unknown up req type, ignoring: %x\n", > - up_req->msg.req_type); > + drm_dbg_kms(mgr->dev, "Received unknown up req type, ignoring: %x\n", > + up_req->msg.req_type); > kfree(up_req); > goto out; > } _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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 X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC8F8C433DB for ; Wed, 31 Mar 2021 09:18:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 704DF619D6 for ; Wed, 31 Mar 2021 09:18:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 704DF619D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E9D4E6EA20; Wed, 31 Mar 2021 09:18:18 +0000 (UTC) Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0851A6E8AD for ; Tue, 30 Mar 2021 11:19:43 +0000 (UTC) Received: by mail-pf1-x42c.google.com with SMTP id h3so11910289pfr.12 for ; Tue, 30 Mar 2021 04:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=qIay2yJaGw8H+hG15KImlYeu0r6L9MLLcQDEnZF2qFdTW2zSpQ40IXg+/vxlnJQz4o TKzi5YqlKrIHttRWaLvFbdM20gKQ/igZVcwm8SFzdsf0/GzVTOyvvDeB6kqpBolWhn33 iI+TCXiaVJhMe/oW7DCLEON36LzdAAwFwyEShryYOFQyky1isZ0YY5RVfN5W3oiAYvwy 8+KnWX/nQwEbJaqACWTSuM18VOAT1ks9X9zr7SchWYDgwTLwBD/knap1CJ7Ca9tlGG8b sFpNlx44sNZxtyb4faahEv9qJLV1qWz1e1po03itPLigsO5ao0DVK7AqSPfVLMue7R6H nwTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=ugWZ78cB77bvupgTmQyoGAqp0s4R2BUpmyXKU10b+A1haoRt1oIMoOMxX5XcwiRQZL IR9jn267N0/ttcrzPuLyMWpni0weLkztJlcLHak/GbfEVFhXpRChH05z6dGuoe1o/HUx EaJDe7z9p8kmI/Ew4WkYuGpNCDbi0Zwh+LGHk8sQ4rqQ9gtMaM7hd9JvD5HT2Ctvg9bx iVF8DAfERw9HVOYCWhFX8isr1D4YNmRsTUIFJyXSBjXB7+HqwLwd+CJPw5rFPyIobbGl FOFaCqhRmk6bBPRf7Vl0TzIb6I2uoiO0CZpNGBcnQSQdART69n3z8CyopOqML9/L4zr7 ZV4g== X-Gm-Message-State: AOAM533o/E6w2exXmUODL3ItvsGATdUH5qHSaEAwmsWSHjhwmA2Kvfzg BP96jy3TaPpWfem7aoPPLArylqJlHxiTudBHDEsjqQ== X-Google-Smtp-Source: ABdhPJxq5q/aaT+6jdvgQQdbDwMNlvYfZjAmKD/2J/yR3c6DqBDMvry2T/Awy6EWGZ+THIsQHdyfhPbS801PyKVA3nE= X-Received: by 2002:a05:6a00:b54:b029:207:2a04:7b05 with SMTP id p20-20020a056a000b54b02902072a047b05mr29651828pfo.12.1617103182535; Tue, 30 Mar 2021 04:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20210326203807.105754-1-lyude@redhat.com> <20210326203807.105754-21-lyude@redhat.com> In-Reply-To: <20210326203807.105754-21-lyude@redhat.com> From: Robert Foss Date: Tue, 30 Mar 2021 13:19:31 +0200 Message-ID: To: Lyude Paul X-Mailman-Approved-At: Wed, 31 Mar 2021 09:18:15 +0000 Subject: Re: [Intel-gfx] [PATCH v2 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel , David Airlie , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, open list , Maxime Ripard , amd-gfx@lists.freedesktop.org, Thomas Zimmermann Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hey Lyude, This patch looks good, but I have one question below. With it addressed, feel free to add my r-b. Reviewed-by: Robert Foss > > -static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > +static bool drm_dp_sideband_parse_req(const struct drm_dp_mst_topology_mgr *mgr, > + struct drm_dp_sideband_msg_rx *raw, > struct drm_dp_sideband_msg_req_body *msg) > { > memset(msg, 0, sizeof(*msg)); > @@ -1117,12 +1125,12 @@ static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > > switch (msg->req_type) { > case DP_CONNECTION_STATUS_NOTIFY: > - return drm_dp_sideband_parse_connection_status_notify(raw, msg); > + return drm_dp_sideband_parse_connection_status_notify(mgr, raw, msg); > case DP_RESOURCE_STATUS_NOTIFY: > - return drm_dp_sideband_parse_resource_status_notify(raw, msg); > + return drm_dp_sideband_parse_resource_status_notify(mgr, raw, msg); > default: > - DRM_ERROR("Got unknown request 0x%02x (%s)\n", msg->req_type, > - drm_dp_mst_req_type_str(msg->req_type)); > + drm_err(mgr->dev, "Got unknown request 0x%02x (%s)\n", > + msg->req_type, drm_dp_mst_req_type_str(msg->req_type)); > return false; > } > } > .. snip .. > @@ -4118,12 +4121,12 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) > > INIT_LIST_HEAD(&up_req->next); > > - drm_dp_sideband_parse_req(&mgr->up_req_recv, &up_req->msg); > + drm_dp_sideband_parse_req(mgr, &mgr->up_req_recv, &up_req->msg); drm_dp_sideband_parse_req() is only called here, and the function arguments could probably stand to have `&mgr->up_req_recv` removed (here and in the func. declaration) since the same data structure is accessible through the `mgr` pointer inside of drm_dp_sideband_parse_req(). I guess this is a matter of taste, so feel free to do what you want with this. > > if (up_req->msg.req_type != DP_CONNECTION_STATUS_NOTIFY && > up_req->msg.req_type != DP_RESOURCE_STATUS_NOTIFY) { > - DRM_DEBUG_KMS("Received unknown up req type, ignoring: %x\n", > - up_req->msg.req_type); > + drm_dbg_kms(mgr->dev, "Received unknown up req type, ignoring: %x\n", > + up_req->msg.req_type); > kfree(up_req); > goto out; > } _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx 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 X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0FE8C433DB for ; Tue, 30 Mar 2021 13:24:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8575D61994 for ; Tue, 30 Mar 2021 13:24:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8575D61994 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46FB76E8ED; Tue, 30 Mar 2021 13:24:41 +0000 (UTC) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0AFE06E8B0 for ; Tue, 30 Mar 2021 11:19:43 +0000 (UTC) Received: by mail-pf1-x435.google.com with SMTP id c204so11944744pfc.4 for ; Tue, 30 Mar 2021 04:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=qIay2yJaGw8H+hG15KImlYeu0r6L9MLLcQDEnZF2qFdTW2zSpQ40IXg+/vxlnJQz4o TKzi5YqlKrIHttRWaLvFbdM20gKQ/igZVcwm8SFzdsf0/GzVTOyvvDeB6kqpBolWhn33 iI+TCXiaVJhMe/oW7DCLEON36LzdAAwFwyEShryYOFQyky1isZ0YY5RVfN5W3oiAYvwy 8+KnWX/nQwEbJaqACWTSuM18VOAT1ks9X9zr7SchWYDgwTLwBD/knap1CJ7Ca9tlGG8b sFpNlx44sNZxtyb4faahEv9qJLV1qWz1e1po03itPLigsO5ao0DVK7AqSPfVLMue7R6H nwTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nEiq5VYqidlia0rfaVKXey2aQI1J0UOeUfwbZ7SzFqw=; b=C223pNCL9dTuwZ0gkJgK8UDvAZT3VaZeWif0j06xU2UOkWPwZ6xoeeqdBR5yi81y9X I/xzt3AkmEVCk2qjeYpoLQgL/q2cQ39+UZDRhrIW2cb2U/zjFSRvePHTRNHOHzCMaqOH TeALt3j468mu1loJSAFXdNbDp6vlXFnPM7autNN0rd1AcQ9moaGP9lVbyU+ZCxX71wiV XiHMvSIaAGvTtSfiabFTo79YJhhdZDHO6LYhA7rDTMoj00qdUO2dihEXTxypYmvixva2 PuABjLis1jxCwopAosF3RE1MKbyH5zf5EBTxhvHoWaMaW/5xLgbFdkTyAMfPf1ATJYE5 S8Ow== X-Gm-Message-State: AOAM530H7QJF992MAANQjpDp2CzkA1Y2AQj/HTrYd4h4mqp0SVJe+Roc c9S6fy85qno0JcMyEKwMD/5gdPYqNA0P4wRMFxPGNA== X-Google-Smtp-Source: ABdhPJxq5q/aaT+6jdvgQQdbDwMNlvYfZjAmKD/2J/yR3c6DqBDMvry2T/Awy6EWGZ+THIsQHdyfhPbS801PyKVA3nE= X-Received: by 2002:a05:6a00:b54:b029:207:2a04:7b05 with SMTP id p20-20020a056a000b54b02902072a047b05mr29651828pfo.12.1617103182535; Tue, 30 Mar 2021 04:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20210326203807.105754-1-lyude@redhat.com> <20210326203807.105754-21-lyude@redhat.com> In-Reply-To: <20210326203807.105754-21-lyude@redhat.com> From: Robert Foss Date: Tue, 30 Mar 2021 13:19:31 +0200 Message-ID: Subject: Re: [PATCH v2 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*() To: Lyude Paul X-Mailman-Approved-At: Tue, 30 Mar 2021 13:24:40 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel , David Airlie , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Maarten Lankhorst , open list , Maxime Ripard , amd-gfx@lists.freedesktop.org, Thomas Zimmermann , Daniel Vetter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" Hey Lyude, This patch looks good, but I have one question below. With it addressed, feel free to add my r-b. Reviewed-by: Robert Foss > > -static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > +static bool drm_dp_sideband_parse_req(const struct drm_dp_mst_topology_mgr *mgr, > + struct drm_dp_sideband_msg_rx *raw, > struct drm_dp_sideband_msg_req_body *msg) > { > memset(msg, 0, sizeof(*msg)); > @@ -1117,12 +1125,12 @@ static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, > > switch (msg->req_type) { > case DP_CONNECTION_STATUS_NOTIFY: > - return drm_dp_sideband_parse_connection_status_notify(raw, msg); > + return drm_dp_sideband_parse_connection_status_notify(mgr, raw, msg); > case DP_RESOURCE_STATUS_NOTIFY: > - return drm_dp_sideband_parse_resource_status_notify(raw, msg); > + return drm_dp_sideband_parse_resource_status_notify(mgr, raw, msg); > default: > - DRM_ERROR("Got unknown request 0x%02x (%s)\n", msg->req_type, > - drm_dp_mst_req_type_str(msg->req_type)); > + drm_err(mgr->dev, "Got unknown request 0x%02x (%s)\n", > + msg->req_type, drm_dp_mst_req_type_str(msg->req_type)); > return false; > } > } > .. snip .. > @@ -4118,12 +4121,12 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) > > INIT_LIST_HEAD(&up_req->next); > > - drm_dp_sideband_parse_req(&mgr->up_req_recv, &up_req->msg); > + drm_dp_sideband_parse_req(mgr, &mgr->up_req_recv, &up_req->msg); drm_dp_sideband_parse_req() is only called here, and the function arguments could probably stand to have `&mgr->up_req_recv` removed (here and in the func. declaration) since the same data structure is accessible through the `mgr` pointer inside of drm_dp_sideband_parse_req(). I guess this is a matter of taste, so feel free to do what you want with this. > > if (up_req->msg.req_type != DP_CONNECTION_STATUS_NOTIFY && > up_req->msg.req_type != DP_RESOURCE_STATUS_NOTIFY) { > - DRM_DEBUG_KMS("Received unknown up req type, ignoring: %x\n", > - up_req->msg.req_type); > + drm_dbg_kms(mgr->dev, "Received unknown up req type, ignoring: %x\n", > + up_req->msg.req_type); > kfree(up_req); > goto out; > } _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx