From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C0B2E397E7D; Mon, 30 Mar 2026 19:28:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774898903; cv=none; b=SUu1/rGlve08OwSuts7XQULRkI/iXzLfdCOXSvIKYJWKzEc6bWXsgJSILBJa1XE+XMsqIa5l41bcqqdpqEIuU2qhAmimxsxEfeNxPeP8g5P+RmuVLVF6L/aWl6xYpiUmqg6n8Rwo8ucaGQbt+UMsyjKvJWNzDEVSsEYe3he0XuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774898903; c=relaxed/simple; bh=dAGFeP4nP8HMvhgV9SKrun5aegYvL/MhIs1kziaPbwQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pSxknhruD6iQIVVKAxSY+IWQPBb5AGuLf7rWHBZFci/vofuofvmRHQ/vp5jG2yyptQ9yQnUHKC1x/35Ymx0wf6r5gweBwSakqiARRFPrfIMrq96QgtqpZP5wqvlFzBTe2emO7HPfC1l6ahBgRolsnpkY9gF/4jp1lsXP6Z+tvSU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LM7R+O1c; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LM7R+O1c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 124EFC2BCB1; Mon, 30 Mar 2026 19:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774898903; bh=dAGFeP4nP8HMvhgV9SKrun5aegYvL/MhIs1kziaPbwQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LM7R+O1cwF7GVHPmmRaJuQUZthf2zr17D/KgWgi5IdV+4A0iFSuPD/hMp467QJgGS FRDIFg4oCBsm0abLrorViWZaAQ+BIBPPIDt3LXp6i4RAjS88nDToHaIsPpnz+nXDLb LTZAA65y6onKLJKFNjh1HCWj3bmMP4YFyApgcLPSAyb8LV/tiNCoyzsb2wx9wl+wS1 1nXpTbGhB+TpEfWCXT5HypC1IJw0Fujfl7INrBvtzu8vQRYPz5MT0JVxmSAlMkb7Oe cJwHAx96O5/sSgmHkXNA7OgfjQBkqSdebTzx4hn8zMUnFGShpvRBhJiJhvmdF1Htrh bsIWOlOQ17zkg== Date: Mon, 30 Mar 2026 14:28:19 -0500 From: Rob Herring To: manivannan.sadhasivam@oss.qualcomm.com Cc: Greg Kroah-Hartman , Jiri Slaby , Nathan Chancellor , Nicolas Schier , Hans de Goede , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Mark Pearson , "Derek J. Clark" , Manivannan Sadhasivam , Krzysztof Kozlowski , Conor Dooley , Marcel Holtmann , Luiz Augusto von Dentz , Bartosz Golaszewski , Andy Shevchenko , Bartosz Golaszewski , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-pm@vger.kernel.org, Stephan Gerhold , Dmitry Baryshkov , linux-acpi@vger.kernel.org, Hans de Goede Subject: Re: [PATCH v7 1/8] serdev: Convert to_serdev_*() helpers to macros and use container_of_const() Message-ID: <20260330192819.GA3107726-robh@kernel.org> References: <20260326-pci-m2-e-v7-0-43324a7866e6@oss.qualcomm.com> <20260326-pci-m2-e-v7-1-43324a7866e6@oss.qualcomm.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260326-pci-m2-e-v7-1-43324a7866e6@oss.qualcomm.com> On Thu, Mar 26, 2026 at 01:36:29PM +0530, Manivannan Sadhasivam via B4 Relay wrote: > From: Manivannan Sadhasivam > > If these helpers receive the 'const struct device' pointer, then the const > qualifier will get dropped, leading to below warning: > > warning: passing argument 1 of ‘to_serdev_device_driver’ discards 'const' > qualifier from pointer target type [-Wdiscarded-qualifiers] > > This is not an issue as of now, but with the future commits adding serdev > device based driver matching, this warning will get triggered. Hence, > convert these helpers to macros so that the qualifier get preserved and > also use container_of_const() as container_of() is deprecated. > > Tested-by: Hans de Goede # ThinkPad T14s gen6 (arm64) > Reviewed-by: Bartosz Golaszewski > Signed-off-by: Manivannan Sadhasivam > --- > include/linux/serdev.h | 15 +++------------ > 1 file changed, 3 insertions(+), 12 deletions(-) Reviewed-by: Rob Herring (Arm)