Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp252121lqm; Tue, 30 Apr 2024 21:36:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6BzU8YI9XLzk7gCfTjAMnuBKy3eq4DBpDTIkPgMbsvaxbMSVPXPBZqxmD2/yCBtNEGhDsvyIC1zW4gwjm/llGDNL985g+YWKAaMbvAQ== X-Google-Smtp-Source: AGHT+IEIN99f848qyZuzCfA8S/5favm+c0nwjUEbXx6tbE0T5pJUZxLJeU3SiZCdET4jo4Ui1c+A X-Received: by 2002:a17:90a:4093:b0:2a8:1fdf:b1b0 with SMTP id l19-20020a17090a409300b002a81fdfb1b0mr1406149pjg.29.1714538199231; Tue, 30 Apr 2024 21:36:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714538199; cv=pass; d=google.com; s=arc-20160816; b=buaneFuEHNISuV5MPv5rOfDECkIa6cWLom3Ij8/MfwXTB9dIY0FC3TnNnIpDohiONO ZaLwQVh/NfmZc0TAzOV308RTX4uJ1db3XKkdz4ncULvJd76DPbizswq5FigazH6utRhH tuT2FheYw54n0TV0mIcKb5ypftdpogxHfTJ6avx9K5DEshiS7nLGpWK8XHe+XEKmNX6g J0ly4QGmRkVEUBmi/rlv6n6LQ2rj5SMigLboNKaJTdUM0g3L7L7KoTDEoFoS2iw9BYmS lAzvziLURRpMKdjgfJADc6a3FyibxO1pGuTT6VFG9ZcTMx8vNCG5R8zfWZGum+5pI4xM ri4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=M/zxLrv/112LnHWHBf9LH/ua85DzPXjXJ+sUgBkQQh0=; fh=bctS2IeEMiC2Pz/xykNxg0XgZ/7iyucMeVzNhpUMBuc=; b=amCaz7oc9NrDWd5Af7+eZEZQoeMYXpm6WzfdR6miF44r5vzmbuBPb7NS5rDk6taint UdFzHBTHYNdRr+PEYEDZFXrREhKozm4U77J2wtfjYvAxjoAX6X2KyKs3CiOu59+wO19F tpBK/aUWzL4MdDPa5N4TUV7px3s0C2bYpF66/TXspyKSdgD7CFRIUoROR7OgsWSAzDek 66+EjfiftPds6Nvygk9QsUwjJQQtzA3X8LRHdjg09HNHW+se5q1zQMLAbWmffGDszG0S c25DAGSjsC89UzcHTlR9wj24XVrQrqFLzNhsALcc+X/2KwNA5jH9+fM1e348MSlvUXoa tJZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=MQiWBJ2V; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-164927-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k6-20020a17090a910600b002aec2d60d37si688484pjo.174.2024.04.30.21.36.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 21:36:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164927-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=@linux.dev header.s=key1 header.b=MQiWBJ2V; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-164927-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 D4FDC2844F1 for ; Wed, 1 May 2024 04:36:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEB3C3CF65; Wed, 1 May 2024 04:36:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="MQiWBJ2V" Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B9CE11CB8 for ; Wed, 1 May 2024 04:36:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714538192; cv=none; b=KuJilRocHxSbW2s/QHq9ysSrQcuN2VyDNGMWppXmBZ2cw0MzSmjnCNoDa2KydOtSTqpARgf2Aq9/NnHwkGT2zwwZIYvmAl7dF+Xq0tSLBJN7Affg/cGAjF6F2ZX9f0erd0HWUM+xeiVMaPAL26Yaq6RbR3N2tHvSjUaTQkg3SGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714538192; c=relaxed/simple; bh=YKBL3Xlm5cnWdNbk81l0J2LSLyE3+5eFoXiFZouHEfY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nvk7Wu1NPRCfyTKDFz3f13Fjn7U5W34U4knhPkaQMG+ntmblGoHyceXJuBaCCw2CYKAOXk3soyAeGkPgyfeKEursVEAOjk1kSj4VO97VNQtpJYHgKNIZQ8F+udKiC1qdZYpTlbyFJzK7qI5XcPpBtsxfkw+SWm7xJcRkA56tIpI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=MQiWBJ2V; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714538186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M/zxLrv/112LnHWHBf9LH/ua85DzPXjXJ+sUgBkQQh0=; b=MQiWBJ2V6/7jUo+/vdb9BitJWGQJq6EH6FJES4FfwY83SQhPpyRcbtv4B87DA6kPIhKMPF W4y9tzbJcdfCQbNu7Mpg7m5wD0LuKuybya1lKAKBeIPncdzoINeuV24ky0cNyn6SjmPPk9 gwR49jqtTNVU3m6JcohQGzb3s/Dqpl0= Date: Wed, 1 May 2024 12:36:17 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: drm/debugfs: Drop conditionals around of_node pointers To: Doug Anderson , =?UTF-8?B?6ZqL5pmv5bOw?= Cc: Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Biju Das , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20240321222258.1440130-1-sui.jingfeng@linux.dev> <20240429-enchanted-cooperative-jacamar-cf2902@houat> <6db82a3f.c7.18f2c927d9f.Coremail.suijingfeng@bosc.ac.cn> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Hi, On 2024/5/1 05:33, Doug Anderson wrote: > Hi, > > On Mon, Apr 29, 2024 at 6:16 PM 隋景峰 wrote: >> Hi, >> >> >>> -----原始邮件----- >>> 发件人: "Maxime Ripard" >>> 发送时间: 2024-04-29 19:30:24 (星期一) >>> 收件人: "Sui Jingfeng" >>> 抄送: "Sui Jingfeng" , "Maarten Lankhorst" , "Thomas Zimmermann" , "David Airlie" , "Daniel Vetter" , "Douglas Anderson" , "Laurent Pinchart" , "Biju Das" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org >>> 主题: Re: drm/debugfs: Drop conditionals around of_node pointers >>> >>> On Sun, Apr 28, 2024 at 04:52:13PM +0800, Sui Jingfeng wrote: >>>> ping >>>> >>>> 在 2024/3/22 06:22, Sui Jingfeng 写道: >>>>> Having conditional around the of_node pointer of the drm_bridge structure >>>>> turns out to make driver code use ugly #ifdef blocks. >>> The code being ugly is an opinion, what problem is it causing exactly? >>> >>>> Drop the conditionals to simplify debugfs. >>> What does it simplifies? >>> >>>>> Fixes: d8dfccde2709 ("drm/bridge: Drop conditionals around of_node pointers") >>>>> Signed-off-by: Sui Jingfeng >>> Why do we want to backport that patch to stable? > Technically it's not CCing stable and so it's not really incorrect. > ...but I agree that this is a bit of a stretch to call it a "Fix". > Maybe drop the "Fixes" line? OK, good idea, acceptable. Originally, I add the fix tag to hint that my modification belongs to the commit d8dfccde2709 ("drm/bridge: Drop conditionals around of_node pointers") too. But get missed. > >> My commit message is written based on commit of d8dfccde2709 >> >> $ git show c9e358dfc4a8 >> >> This patch is based on commit c9e358dfc4a8 ("driver-core: remove >> conditionals around devicetree pointers"). >> >> Having conditional around the of_node pointer of the drm_bridge >> structure turns out to make driver code use ugly #ifdef blocks. Drop the >> conditionals to simplify drivers. While this slightly increases the size >> of struct drm_bridge on non-OF system, the number of bridges used today >> and foreseen tomorrow on those systems is very low, so this shouldn't be >> an issue. >> >> So drop #if conditionals by adding struct device_node forward declaration. >> >>> Maxime >> I'm just start to contribute by mimic other people's tone, there seems no need >> to over read. > I think the fact that you skipped the reference to commit c9e358dfc4a8 > ("driver-core: remove conditionals around devicetree pointers") was > relevant here. Referencing that commit makes it easy for the reader to > see that you are following convention used throughout the kernel and > not just asserting your own opinion about style. > > If you add that reference into your commit message and send a v2, I'm > happy to apply it. OK, thanks a lot. > -Doug -- Best regards, Sui