Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp986234lqm; Thu, 2 May 2024 01:33:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDqtzXMKKInqcmvtAFAp50p4dklfsIG4uOp6p7fzDIrkAjSYXRCN0Pwpfv365KUyuaznlf2MMpJ1O1A4g9o3NITDbqa5ApGYM2mum+4Q== X-Google-Smtp-Source: AGHT+IGR0zw6ovtho+QzA3oH1Y2yfLfRu1vjya0dxpHkEXB9QQ/uCDTlJpMYnc3IhXCDWyfhACnO X-Received: by 2002:a17:90b:2282:b0:2ae:6277:16a with SMTP id kx2-20020a17090b228200b002ae6277016amr4960479pjb.36.1714638809311; Thu, 02 May 2024 01:33:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714638809; cv=pass; d=google.com; s=arc-20160816; b=btUsOjhNnYo0t1yrM9Y0jZRaSJAhpVmRT/H2B0GjAXJsUKRFWnkkAV1rV9e/4WkmVU bf7876ssREyKE0v/x6NyYLSxC63T70Kr6JRJ9lteAT2Wd2xx5z/KdyQXTlJziOU0pxZe 7izViN+g96TpBctBy9m4Ql4C+s6C4dQjLfCmXxgLxhkWxKt3eCIamzCsgZsVrhTjGiF3 ouiLKTxTARxcDyUxDszBYnuk0/vEAnrS9LtxxDbiu4GJYpDl6WEsZp/QsceQxnRnYef2 GAVRcW52XK76frewBOtZv5Al4SfMQ3obkldqgEXr2T9rAGjvRp1msRRaDK86t6Hhzq1k sA2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=24YyTRYR6RGICTEPRKVLXQM7MeeLdxtmJnjzlihyxds=; fh=Oi0M0pl3Ijb9qsOrt0FA1f9E6GY32RDDmqlJO8/9YXE=; b=TsV9AyEmEi10zdcBimjVEeQp4QGarqHsSsrN3uoXH6EN0/jvEyUhvEqjspwRWZwhy1 Hqqk2pN99tNKaW7g7ig9NukW3HuXUctzoeHzwgAEYDifzbR+SUtWOz9Nq+JXLqsKzcm3 nJuLc0n77UDYCcWpPsH6/nSIae8dpqTVKGKoppouTuJgXx7kIrR7hDLKgvIpuyo+z3iV 0/2gA/tr02cOWPUc5CX8TfVRoOs7f/LU/ulYp7QAXnwb2uYrnBTAUrBFoolzmOAPD1uH KrmAUrsrE4gUmg1CL9dL69AbDyosfHF2Tb7Ni563RKIhYOpP5s7AfGDF2/lm8WbUNM9l h28A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EElmt4gW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-166114-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166114-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m9-20020a17090a34c900b002b225753c36si3095554pjf.37.2024.05.02.01.33.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 01:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166114-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EElmt4gW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-166114-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166114-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 99E782876FD for ; Thu, 2 May 2024 08:23:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F4B1383AE; Thu, 2 May 2024 08:23:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EElmt4gW" Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B54BE33CFC for ; Thu, 2 May 2024 08:23:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714638202; cv=none; b=kRcKuIkb7OlscM5E6QoclDT+bnlYj2N0nMnbdNjkayqS9Y7xs/arNC9Q0sK4UAObPdhnA/McKASjDLDE6xXi/4t5u+eJfjT/i29V8wc3h5T36PPgHZ6rWG1/meIV3E8OIaLHGgQYguLDqmEak/17KIGpYcvVEsrPtZaf1Q+QGlI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714638202; c=relaxed/simple; bh=24YyTRYR6RGICTEPRKVLXQM7MeeLdxtmJnjzlihyxds=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=SuEqbEsjPpOlDWxTbagdFIUHd9UIEsQhUEvjXUTL+oW5oTmTJESU++kodEqadl5axMDiJwG7gicVnkk9oQZIZ+rDSSJNR2T/LwRQH4q1CneZdR4NWzsbHsfIhj+WawoXxykXGeh34dcuhssOlkoF3Mn7wQgw49QPjNGK0hc6Ruc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=EElmt4gW; arc=none smtp.client-ip=209.85.219.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-de59daab3f3so7167131276.3 for ; Thu, 02 May 2024 01:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714638200; x=1715243000; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=24YyTRYR6RGICTEPRKVLXQM7MeeLdxtmJnjzlihyxds=; b=EElmt4gWUzf2LkC1r3k54+Tdvda62KYBoiZ5I024uGIqmrIbhosHhpOcZQJAl9f270 7IdeJYcGB38Rt5DXblpV8GTgzV1aBvIz4N2F54DTCGLobq/MRCH/6edlVWyGk1L8A7zF /SNnzpYO/pOquJR1ug+9dBi3Hcre5/UiBrlmNMgpDF5ejXPESgma62eCbHS8zJNuB842 yqTD4guEaMjQvWd5o1fC3zUI5toizeD8BN7XKr7X+WwW6EeMffhlpU6xyQNrburgOHq3 TaFB1Wl1lSw1o2/tclKPVCRoSIg7Wkuh+i9c+M6777ykZiXDaDP4+iZrDSU4BMtRCkjY 4Itg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714638200; x=1715243000; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=24YyTRYR6RGICTEPRKVLXQM7MeeLdxtmJnjzlihyxds=; b=WKaqQszGSRbp/KQrvfuDBatlxKSKV08pS+K0KQtHnb2uKAsTS8ZrqwN8LrmLv2FZZv HwgQfFtQwPSGIH8R1oLClttFz+YCmyXmVF6JvcxEeUkJ6PeFEePhUXHahBczOWR2iYfZ vu2LJv8TiRLmqaydvSnOo2+ENIptgqcx6zHa8+N2qUEssv4UtR3ZnUBFOC7dqQy30N/g chhVB7KSHSbVp+yZg6JfLhydFgz9Sej7VkpFHU5XMtS3Nh+AjWjHP6wg05gdEmGwPByy LidIJpdZYxifAEjqqqK8Y0fKSsu9VCqjpbX/o3wFlW9UX1mzloUmIVm2jRLkOFqvhLss lMtw== X-Forwarded-Encrypted: i=1; AJvYcCV6JgqtTVZ9qXIfzFKSqkUyPnjPbR6yujnu3L1Ct7zlKI7nhaxpN9KBSpmnpUiChMQl3saelV5FhWH4O0paX+Xa71brJyGp2ph/dWw+ X-Gm-Message-State: AOJu0YyBHKP08ibAFkpe23eyLmaa5EEC30TDNO2AHAsNpMS5//W1t/y6 tkFLn+bVdA2JTjFaIsg2IFeRAgO90YofQf9f8ReMTYO65f9jL2Hvl2r5vQg+8GwStwoqlNB4W8v kkn48s7a35Z1xKD4FA0ysfoPbHL6A7lgwmwQSwA== X-Received: by 2002:a25:2b81:0:b0:de4:7603:e888 with SMTP id r123-20020a252b81000000b00de47603e888mr5029716ybr.29.1714638199758; Thu, 02 May 2024 01:23:19 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240501154251.3302887-1-dianders@chromium.org> <20240501084109.v3.4.Id15fae80582bc74a0d4f1338987fa375738f45b9@changeid> In-Reply-To: <20240501084109.v3.4.Id15fae80582bc74a0d4f1338987fa375738f45b9@changeid> From: Linus Walleij Date: Thu, 2 May 2024 10:23:08 +0200 Message-ID: Subject: Re: [PATCH v3 4/9] drm/mipi-dsi: Reduce driver bloat of mipi_dsi_*_write_seq() To: Douglas Anderson Cc: dri-devel@lists.freedesktop.org, Jani Nikula , Dmitry Baryshkov , Cong Yang , Hsin-Yi Wang , Brian Norris , Sam Ravnborg , Neil Armstrong , Javier Martinez Canillas , Joel Selvaraj , lvzhaoxiong@huaqin.corp-partner.google.com, Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 1, 2024 at 5:43=E2=80=AFPM Douglas Anderson wrote: > Through a cooperative effort between Hsin-Yi Wang and Dmitry > Baryshkov, we have realized the dev_err() in the > mipi_dsi_*_write_seq() macros was causing quite a bit of bloat to the > kernel. Let's hoist this call into drm_mipi_dsi.c by adding a "chatty" > version of the functions that includes the print. While doing this, > add a bit more comments to these macros making it clear that they > print errors and also that they return out of _the caller's_ function. This doesn't really explain why this takes so much less space. Please add some explanation like that "the macro gets inlined and thus the error report string gets inlined into every call to mipi_dsi_dcs_write_seq() and mipi_dsi_generic_write_seq(), by using a call to a "chatty" function, the usage is reduced to one string in the chatty function and a function call at the invoking site". With some explanation like that +/- added in: Reviewed-by: Linus Walleij Yours, Linus Walleij