Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3602915ybl; Mon, 3 Feb 2020 03:19:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzb7i94EyWtoLbjtFewl1mEe8S76xJHnXPtj9Yum2FReCuJ0ODUcZ3zNOeu0YopjDo8ex89 X-Received: by 2002:a9d:3bc4:: with SMTP id k62mr17978874otc.186.1580728784836; Mon, 03 Feb 2020 03:19:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580728784; cv=none; d=google.com; s=arc-20160816; b=q3wAoxxS25tOGcYlv6zaea08V52xxxbHSGncHW0/LQCjRcPJMlbrmF5AmKVQ6bA62I gQULA4rrlBn4a4bKfVFo74JVkZNugu7nY585FNeQ2OMiIPsoAAOT6QG1y/L9E8LXachj EfDSko0g40fMTmlUIBvs8Wm/I9Z8yAW6BdIHhx552iZSwzLKWIbfo8/dujtsX3XYH0JL bNeyf1G3n/Yf2NueDrC+/qa+wXWJeKPSTHTZ3Eoi0/l0inTBL8eANxdHd++xj49mhUwk K3x/7mQ6zDmsg+Z42g+n6ObxJn09Mu9WZEb+wwTNbkG9FwEZxLZApUp0/iGs06jk8BJo gpyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=Jun4v0Y8OgEAY2zLGv+Re/EtkU8n60zpNHWxcp0S2ok=; b=pwzsdFJNQNmHRTSSftSrUgb/bVtr9666gtRO4ePvGiTmF55MTnNdqd/tZA+a9Si3/Y tl29mjVtl1jeVARWDAeYRg1zurAGBlPZI8/HeY8NzHGZi/GXnrHoFwcslSpmkXXJStpN 1zT2EFYGCyHNyXPfH1KMdBTDtg6nEPzl8w8hUJpHuS8WWsYhzCSSc45bIADnh+jV0pBI 57fOyk3gJ0YDYpDq+b1gACjsNYSqZIkBnKfcKTrpk7wyA225lE6MVP0RtPBZohaNp5at lqdOi5Dw9TuJdQOwAwGXBFlsgU7U/MPnRt0z5reAGOdwvMjj8HzFEldWCINJkNbfdR7L oTuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=CZu5LkOd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p71si8301090oic.138.2020.02.03.03.19.32; Mon, 03 Feb 2020 03:19:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=CZu5LkOd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727950AbgBCJkk (ORCPT + 99 others); Mon, 3 Feb 2020 04:40:40 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38137 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727328AbgBCJkk (ORCPT ); Mon, 3 Feb 2020 04:40:40 -0500 Received: by mail-wm1-f67.google.com with SMTP id a9so16068530wmj.3 for ; Mon, 03 Feb 2020 01:40:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=Jun4v0Y8OgEAY2zLGv+Re/EtkU8n60zpNHWxcp0S2ok=; b=CZu5LkOdQADBeKoarcii40bcLg5DixvMZqaOgVSVexhWCKpjW97W4R6DBldrqPlA2z /HXi3m2ZCrCypXPQVG0ILdVQu/GPR33jC42Y8eP/ViP9qBguZ5vOk2uk321HRn3MI3VS QCS5JclmH4ecTgQCtGDmJQuGMmqCVvY3Rebds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=Jun4v0Y8OgEAY2zLGv+Re/EtkU8n60zpNHWxcp0S2ok=; b=ewB1moY3qkut2HjmNoiQ1zvxFNEgMVP4+AM83w/q22gIH4x/4nZwWAi3GNyyN/carG BWfuflrzsOESYMc+PckDEKrIuXavZh9LxiuV6CtwaU2Ianrn8PpNB5aVxr2WGcjjFVyA vZaWAGjBY2vrmKhGsfWrfxeRRefmburGYd8CeizH31pXWvExWgD0afmlZUhQ4o2exYdb Nnh4hNOwegrl0EvXDpwN79ZZI3psnOyXvpBo0vSsFrH3EOUxWHl6mr/GJg8jTpdNkK4z q1M/vgMQ8z8twERb+KbzG0yePe8IMW9D1Iqf5uSbj2Mo91y53XRkml641pdUvi9UsCsA SDLw== X-Gm-Message-State: APjAAAV58MOGyZuVv3lGQiuM6+8jpwK6lGYuu+MhPWzwa2ii0485j3+Z hPzKtonB72lXX5VrvorRm4amug== X-Received: by 2002:a1c:a4c3:: with SMTP id n186mr28333929wme.25.1580722838511; Mon, 03 Feb 2020 01:40:38 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id g25sm28262597wmh.3.2020.02.03.01.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 01:40:37 -0800 (PST) Date: Mon, 3 Feb 2020 10:40:35 +0100 From: Daniel Vetter To: Benjamin GAIGNARD Cc: Dave Airlie , Lyude Paul , David Airlie , Sean Paul , ML dri-devel , Linux Kernel Mailing List Subject: Re: [PATCH v3] drm/dp_mst: Fix W=1 warnings Message-ID: <20200203094035.GR43062@phenom.ffwll.local> Mail-Followup-To: Benjamin GAIGNARD , Dave Airlie , Lyude Paul , David Airlie , Sean Paul , ML dri-devel , Linux Kernel Mailing List References: <20191128135057.20020-1-benjamin.gaignard@st.com> <878snsvxzu.fsf@intel.com> <08f4b69b1e48a81e90f28e7672da15cc5165969c.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux phenom 5.3.0-3-amd64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 31, 2020 at 08:08:34AM +0000, Benjamin GAIGNARD wrote: > > On 1/31/20 12:22 AM, Dave Airlie wrote: > >>>> hi-actually yes, we should probably be using this instead of just dropping > >>>> this. Also, I didn't write this code originally I just refactored a bunch > >>>> of > >>>> it - Dave Airlied is the original author, but the original version of this > >>>> code was written ages ago. tbh, I think it's a safe bet to say that they > >>>> probably did mean to use this but forgot to and no one noticed until now. > >>> Hi, > >>> > >>> Any clue about how to use crc value ? Does it have to be checked > >>> against something else ? > >>> If crc are not matching what should we do of the data copied just before ? > >> We should be able to just take the CRC value from the sideband message and > >> then generate our own CRC value using the sideband message contents, and check > >> if the two are equal. If they aren't, something went wrong and we didn't > >> receive the message properly. > >> > >> Now as to what we should do when we have CRC mismatches? That's a bit more > >> difficult. If you have access to the DP MST spec, I suppose a place to start > >> figuring that out would be checking if there's a way for us to request that a > >> branch device resend whatever message it sent previously. If there isn't, I > >> guess we should just print an error in dmesg (possibly with a hexdump of the > >> failed message as well) and not forward the message to the driver. Not sure of > >> any better way of handling it then that > > Yeah I think this reflects what I wanted to do, I've no memory of a > > retransmit option in the spec, but I've away from it for a while. But > > we'd want to compare the CRC with what we got to make sure the are the > > same. > > Hmm, that far more complex than just fix compilation warnings :) > > I will split the patch in two: > > - one for of all other warnings, hopefully it can get reviewed > > - one for this crc4 variable. Does checking crc value and print an error > should be acceptable ? > > Something like: > > if (crc4 != msg->chunk[msg->curchunk_len - 1]) > > ??? print_hex_dump(KERN_DEBUG, "wrong crc", DUMP_PREFIX_NONE, 16, 1, > msg->chunk,? msg->curchunk_len, false); Yeah I think that should be reasonable as a start. Then we'll see how much the bug reports start flowing in ... -Daniel > > > Benjamin > > > > > > Dave. > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch