Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp892574img; Fri, 22 Mar 2019 10:47:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqx80M1fSpF+G9ETG5DPedFS8UPiu61lwoxD25qu486YSsBszwT3qFewM60XVH+Kt8POQJGK X-Received: by 2002:a17:902:2963:: with SMTP id g90mr10908776plb.182.1553276845386; Fri, 22 Mar 2019 10:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553276845; cv=none; d=google.com; s=arc-20160816; b=YeFP10woOisGDoC9EeIG0K64Nn72Rz3onggi362p1x80SdMG16XYVBpHt7TyzLTZTo LzuoMxnWsSlUbo16No92m5iO5lPftDSUjnr6Xu+YQLJZjIcbeHU8f9Fx+yxNw0nh/joA OvQWGPnS1Eu6kGEqF/yQjYwyT8+o9Yt9VlumM1CyB1KrJ/YsEXlhGVpki+tnEprdPRY3 EeM/TD2hytrJ0m4J6LB+yeUeGSCE/xwMIdHY2Xxnq/i8UgY/2BtZywMX1Q9RDWV1ky/0 zxIzxFQoeCGsa+00EiujFOsC/Z4nYBwPClKBlRo9+Bv/XaGl6cL2oAXDEh+Wh/v8OYVv r0WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XtOY91txFPHm4rtxLdZR/qdm4ndXlGT3t8QOvyWFvqw=; b=vSxlS+vSncDoePLQKGSzAQ9xHBPhrQUlpB0fVVpP7WG12i9OwKTVQ+9eTigrwSZJz1 tTPQf8EupviNBpnGeCimzf06jvUz3z4uJXZIo9QWgTucMXIOzatPnd4IfC6WL5Vc6PKP ttApeoRImab6T+Gtw91bydF7+esfFB43vzo/dNO5TlpKkltm4RB7ImI8knEN9/c/7KYU RK03++QajNOSQfLhaPZmadyXAPE2nQlIwAyjfEYKI+SOidMfHagy34D3II1FJ4UI4OJg jAP7N842SQCmJQgzjkMC+/OnSRmrNVb+XLFyYcij1A+wXNPfH6HF4HknYRCmbWnkgmJM /Wrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=go6xalmO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6si6905087pgv.344.2019.03.22.10.47.07; Fri, 22 Mar 2019 10:47:25 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=go6xalmO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727844AbfCVRqK (ORCPT + 99 others); Fri, 22 Mar 2019 13:46:10 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45917 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727693AbfCVRqK (ORCPT ); Fri, 22 Mar 2019 13:46:10 -0400 Received: by mail-wr1-f65.google.com with SMTP id s15so3250380wra.12 for ; Fri, 22 Mar 2019 10:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XtOY91txFPHm4rtxLdZR/qdm4ndXlGT3t8QOvyWFvqw=; b=go6xalmOAVzyh7fUS7CoLSk7r0AgGhLqXBJoVOsd6VMu83hG/NSEu/VSfFiX9g2Xjw HcLIVsR84CdozyegyIpahVhAdQL6MAE2ydkJ1fEVDpW1rH1v2Nw8UZFH4N76EWwWBmBI Qer1XHv0Y/Wlceu9WgrC93ABocb00RbuIVJfDUCtW8L9+4/YGrkcetOqZ540+YVD4wNe vRIHIMLHzqL1L99pdvB1aCUuLchI4vz5pNl+5E7s+FkECf13aLqbA0FlfONW3tCCicDN dhQwc1yRwOBFddllO2IyWrRlBLMkiIHVU7txZPm2Qy4LIBs82e2d0smD5J5NYawAyzAv cfGw== 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=XtOY91txFPHm4rtxLdZR/qdm4ndXlGT3t8QOvyWFvqw=; b=e00OagNUijv+Tdw0Z0gEgdI8qZDkhjcf/PUZMRRe+asQc1hpqyj26ZtcAdFwR8RIXv LuO+8HJQp4qijLhYy3Kr0RcgksqML/CprdBwd+rrUj9RoYfh6aCWhv4vYuDxoEYCw9YA pqWxPIcvMzvhwqKnatH6SrDjvSwhCxQ57wpQbsGDVitpHSEa3OpeONuNAE67vEVvoLrV m2sNNCZ4kga3tRyQMuXgqvuQESs1hb0E5na1mufar26dM1gMOUzhO2Kcmr+T8Bnn6iOw QVugZtKJTJs9Qm500sJEbPDJda1ZTZsP3KUpEp7uryk58Hk4y1MXoguohRnqQl+Y4Tf3 moaw== X-Gm-Message-State: APjAAAUN6fYwepz1Uqe2loNhNTDSO2CGdU31B/IF5YbH+A5F8QABwN8r wurU+3L2sRqUiuT8kRiOX4sG0xbH9b+SIZ6Bj/M= X-Received: by 2002:adf:a382:: with SMTP id l2mr789819wrb.79.1553276768058; Fri, 22 Mar 2019 10:46:08 -0700 (PDT) MIME-Version: 1.0 References: <20190322032901.12045-1-andrew.smirnov@gmail.com> <20190322032901.12045-6-andrew.smirnov@gmail.com> <19eddb76-38f7-e7cb-9a9f-5b435e67c63e@ti.com> In-Reply-To: <19eddb76-38f7-e7cb-9a9f-5b435e67c63e@ti.com> From: Andrey Smirnov Date: Fri, 22 Mar 2019 10:45:56 -0700 Message-ID: Subject: Re: [PATCH v2 05/15] drm/bridge: tc358767: Drop custom tc_write()/tc_read() accessors To: Tomi Valkeinen Cc: dri-devel@lists.freedesktop.org, Archit Taneja , Andrzej Hajda , Laurent Pinchart , Andrey Gusakov , Philipp Zabel , Chris Healy , Lucas Stach , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 3:29 AM Tomi Valkeinen wrote: > > On 22/03/2019 05:28, Andrey Smirnov wrote: > > A very unfortunate aspect of tc_write()/tc_read() macro helpers is > > that they capture quite a bit of context around them and thus require > > the caller to have magic variables 'ret' and 'tc' as well as label > > 'err'. That makes a number of code paths rather counterintuitive and > > somewhat clunky, for example tc_stream_clock_calc() ends up being like > > this: > > > > int ret; > > > > tc_write(DP0_VIDMNGEN1, 32768); > > > > return 0; > > err: > > return ret; > > > > which is rather surprising when you read the code for the first > > time. Since those helpers arguably aren't really saving that much code > > and there's no way of fixing them without making them too verbose to > > be worth it change the driver code to not use them at all. > > I fully agree with this patch and thought about the same thing during my > work. > > However, the timing of this patch is not too good, as this one will > totally conflict with any other patch for tc358767, and my series is > still evolving. > The reason I rebased this series on top of yours is because I think mine should go after yours gets accepted and lands in the tree. I am more than happy to wait for your series to mature. This submission was done mostly for the sake of discussion, looping original authors in as well as making you aware of its existence. > We need to figure out how to combine this series and mine, but I think > either this patch should be dropped for now, and reapplied after the > other patches have stabilized, or I think preferably, this one could be > rebased on top of 5.1-rc1, and used as a base for all other tc358767 work. > I think waiting for your work to be done before proceeding to apply this series, should solve this problem. Thanks, Andrey Smirnov