From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="MQiWBJ2V" 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