Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1905480lqz; Tue, 2 Apr 2024 00:49:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVBNZGHm1sCkQrWDKujr90CoIbyUkXn8VPV2v16/xwyrX9oC4gCqOSL7yp2ktnkuptGoHQtKTBE688WloZe2O6/xTaxcy7E0iO9Ng0zA== X-Google-Smtp-Source: AGHT+IGIc3T8zOVfTBFd6OxBJcIGVw2xer7YDGvllGL27UsKoSgERgI3GZbi+ehKyzljCW38hfRy X-Received: by 2002:a05:6a20:7a84:b0:1a3:5582:4ec0 with SMTP id u4-20020a056a207a8400b001a355824ec0mr8697807pzh.16.1712044148490; Tue, 02 Apr 2024 00:49:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712044148; cv=pass; d=google.com; s=arc-20160816; b=a0zHLLrQqJ5KHn92wMTvumCYI6XX4Dvc0qN4AQl5HqvhO1GibcvWX/sGJZsI9i3EqH 9+RLyFa8uAtSuEwvES0PXBNOVwkFZ9SGqk31yv+DIN9aLNyq5Nd0gTGGz374h1WPyIeF vXz3yPiZBzK3QHLrai1DygX84eTfgxy01DNQnG++8tbbc7Zx2dRV3UQZnz8zASFTc25k yY6rF+9GAvFZKmuu4B2gruPILigF2483rTZGerCb0YdnZxVtfPo1gLXiYqcqt0O4vmnV Hk3vRKYQ6BB2WmNHZQ2PJkBuO+Y05+9uadMrODBxtd2vVpRipBH7drBTUPtFtIEYojm3 OWTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=5fb2ydkzR+/J4HhKtrDYqxQFK7Rp30qgcrxVIahL0v4=; fh=5c9EUT9PaZgXqOG67+IwXfp8rqPMz7OuGC/t22uzjjw=; b=pdDjb/LsPjc6q4BIcOSxqYiwgSc/NW+sZTWUnfUiHrOUk5mcfFu3A4E7fzBd2vnJ3a dS006MaAKX928psQXbDvaC+Sldravzja/V3SDXJnz95mp0ocIorVkGZrhNsQf/me6oDp +dFKULVD7pCQx5FarZcXHIMMH1AQze2oRPL2go0nn7BtGZogFTrKjrrX0ojTm/GSTU9R vzB3PDFziprcWPQOHmsTYQvaPtMVqcBZ3sxO7IzFAiuxBPY3ZsktPmkXaven/ts7Ctgz 7pNmTFDfi39AxbrTorSEDwM1O1ahsqV4KVIESVff6vEtE6YEY+MEgrsrY0QGIDJlgFd6 Crhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-127516-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c12-20020a170903234c00b001e2624072dfsi1381337plh.616.2024.04.02.00.49.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 00:49:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127516-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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-127516-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 5D0F2283298 for ; Tue, 2 Apr 2024 07:48:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C28433CF79; Tue, 2 Apr 2024 07:48:52 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F5753B29A; Tue, 2 Apr 2024 07:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712044132; cv=none; b=d3aPi6jfMUFzRSLky+xQOTPwMhl6/bMOS+kT827pzC3ZHhE7GvxRLAjgp05WYaVarXibm6CHvoZPEyA71ViqRM26sviEQkmzIoPQ8W17HWeBdr8orhDbuMY3pZMfC2NEPXVKxCtYKnq4pstMHLe1OxEPco4TKVQxKfqa83ElZbM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712044132; c=relaxed/simple; bh=xudrbFG1OklbyuU2y6nzlMSY6MlqTsTkKxZNUae6GEs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ob6bMVZHeZiHChgNKymtnc81jxf0YrV0iQOK/fkruCTSoQyMHAOF/ZfLCdK9y7CxbApmcaaISnmDptR9YbjiAvZnOrOcrOdmqo43Jq7Hr5rgnI9IOEOl2SWv6KPBKbKGpTbrAJiD1Kq1qe0DYz50EzZ8AUByzh/D07pLvI70ENs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D201B1042; Tue, 2 Apr 2024 00:49:20 -0700 (PDT) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0C72A3F64C; Tue, 2 Apr 2024 00:48:46 -0700 (PDT) Date: Tue, 2 Apr 2024 08:48:44 +0100 From: Cristian Marussi To: Peng Fan Cc: Andy Shevchenko , "Peng Fan (OSS)" , Sudeep Holla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Dan Carpenter , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" , Oleksii Moisieiev Subject: Re: [PATCH v6 3/4] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Message-ID: References: <20240323-pinctrl-scmi-v6-0-a895243257c0@nxp.com> <20240323-pinctrl-scmi-v6-3-a895243257c0@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sun, Mar 31, 2024 at 01:44:28PM +0000, Peng Fan wrote: > Hi Andy, > Hi Peng, > > Subject: Re: [PATCH v6 3/4] firmware: arm_scmi: Add SCMI v3.2 pincontrol > > protocol basic support > > > > Sat, Mar 23, 2024 at 08:15:16PM +0800, Peng Fan (OSS) kirjoitti: > > > From: Peng Fan > > > > > > Add basic implementation of the SCMI v3.2 pincontrol protocol. > > > > ... > > > > > scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_VIRTIO) += virtio.o > > > scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_OPTEE) += optee.o > > > scmi-protocols-y = base.o clock.o perf.o power.o reset.o sensors.o > > > system.o voltage.o powercap.o > > > > Actually you want to have := here. > > > > > +scmi-protocols-y += pinctrl.o > > > > > > > > > scmi-module-objs := $(scmi-driver-y) $(scmi-protocols-y) > > > $(scmi-transport-y) > > > > Side note: The -objs has to be -y > > > > ... > > > > > +#include > > > +#include > > > +#include > > > > This is semi-random list of headers. Please, follow IWYU principle (include > > what you use). There are a lot of inclusions I see missing (just in the context of > > this page I see bits.h, types.h, and asm/byteorder.h). > > Is there any documentation about this requirement? > Some headers are already included by others. > Andy made (mostly) the same remarks on this same patch ~1-year ago on this same patch while it was posted by Oleksii. And I told that time that most of the remarks around devm_ usage were wrong due to how the SCMI core handles protocol initialization (using a devres group transparently). This is what I answered that time. https://lore.kernel.org/linux-arm-kernel/ZJ78hBcjAhiU+ZBO@e120937-lin/#t I wont repeat myself, but, in a nutshell the memory allocation like it is now is fine: a bit happens via devm_ at protocol initialization, the other is doe via explicit kmalloc at runtime and freed via kfree at remove time (if needed...i.e. checking the present flag of some structs) I'll made further remarks on v7 that you just posted. Thanks, Cristian