From nobody Tue Nov 26 19:36:56 2024 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 E5D3E206042 for ; Wed, 16 Oct 2024 10:52:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729075929; cv=none; b=g7qGWmV1tK/fvoGZen2YLufnA6BWyqdtBTcMHN5Qo3FYzIGKLj55CqeSvNL43HgOi4oKZ04TfrQRz/JJMWpI9kJ7gDEAO7bbcuGcbkYTfRowGW7UbgueF43eXJuhlfGhj15TjZCSyntVnAu+wbJ4JJcdGjFHg6R1zzKmBiJ/onM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729075929; c=relaxed/simple; bh=kHvO6cMD7+Y2mZ3ub+f8kAMvCDz4oA82AXi5wleV3Cg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qcpGXJ4Fec33BPyggwg6G86zzyrd9ZBlJLRTdtAdYXGW9uL/AqGp1HR3dksjUS2w5LuplepIdeW5hsaE61xtRtGCvDA7RfGRsDazrcZ/MD2zOSD1La6YHGhc939yNKwJL3yGIhtLliQPIre0x2jNyeiJ8vBRD4PD6QiJkEY9HZ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JXD8I7Zh; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JXD8I7Zh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729075928; x=1760611928; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kHvO6cMD7+Y2mZ3ub+f8kAMvCDz4oA82AXi5wleV3Cg=; b=JXD8I7ZhzBbDXouudAGavwYGYMeV1q07VxrkIY0Tx2GCB/+FI5p9sY0D pte+LfqgTVaxZE/P9Eolx3Rfj4HY0noTO5QeHb5/QgU04MPi/J28gnHo3 5AV+oGMkz/510LRWjyX8K4TU/ldR3X3V1SN3q2rqk+xZuaQSe4/nauLFH YC+NF9gLA5raOQ4TLyIbYMmXNMCVE8FQasbFZCmx2MTmmwr9uMkWOWzI3 ECJmejbWM8LSqS0vQvNI60cz6bDfi2oz5Cwnl9NjhD9cHigO7Rn7fL3/I Nkk3hdkgT6LeS0JeeQ5V7+ODdGKbIUPMqbWu/4kfWuc1D/5iCLAFdTvaR w==; X-CSE-ConnectionGUID: cWqKRO3IQXWxjLszaRLJOA== X-CSE-MsgGUID: VFyd7v/fQRGn2Xq1TRLPew== X-IronPort-AV: E=McAfee;i="6700,10204,11226"; a="28645805" X-IronPort-AV: E=Sophos;i="6.11,207,1725346800"; d="scan'208";a="28645805" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2024 03:52:05 -0700 X-CSE-ConnectionGUID: UAhH8tn8SDe2JjzxmdAlSw== X-CSE-MsgGUID: LGYaMeeBRk+KuV68KdqVpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,207,1725346800"; d="scan'208";a="115631222" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 16 Oct 2024 03:52:05 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E8E631E0; Wed, 16 Oct 2024 13:52:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Lee Jones Subject: [PATCH v1 1/4] mfd: intel_soc_pmic_bxtwc: Switch to use ATTRIBUTE_GROUPS() Date: Wed, 16 Oct 2024 13:49:51 +0300 Message-ID: <20241016105201.757024-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com> References: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Embrace ATTRIBUTE_GROUPS() to avoid boiler plate code. While at it, move DEVICE_ATTR_ADMIN_RW() closer to the callbacks. This should not introduce any functional changes. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_soc_pmic_bxtwc.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmi= c_bxtwc.c index b7204072e93e..c130734f308e 100644 --- a/drivers/mfd/intel_soc_pmic_bxtwc.c +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c @@ -364,6 +364,7 @@ static ssize_t addr_store(struct device *dev, =20 return count; } +static DEVICE_ATTR_ADMIN_RW(addr); =20 static ssize_t val_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -400,23 +401,14 @@ static ssize_t val_store(struct device *dev, } return count; } - -static DEVICE_ATTR_ADMIN_RW(addr); static DEVICE_ATTR_ADMIN_RW(val); + static struct attribute *bxtwc_attrs[] =3D { &dev_attr_addr.attr, &dev_attr_val.attr, NULL }; - -static const struct attribute_group bxtwc_group =3D { - .attrs =3D bxtwc_attrs, -}; - -static const struct attribute_group *bxtwc_groups[] =3D { - &bxtwc_group, - NULL -}; +ATTRIBUTE_GROUPS(bxtwc); =20 static const struct regmap_config bxtwc_regmap_config =3D { .reg_bits =3D 16, --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Tue Nov 26 19:36:56 2024 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 350AD2071FE for ; Wed, 16 Oct 2024 10:52:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729075941; cv=none; b=VZaFu7r/rV35y62J2AQ/Rq9CeufrEcmd7lo9GrgEu1/ZdGvZLUdbrdDxqdplNxV6865HspPbOugnSno07PpVsA5ApHJePska2RW0Ar6+bR+r1f/Z/IKbyp6hyo4GATbacJcNMfYqACiHAtqXKdvuP0SCxxNr5Lev5op/xTG0fck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729075941; c=relaxed/simple; bh=jJ5Dx5nScUtZW8vUTxHnxSqXEChMTGzv9BI+vmS133Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i/sOf2EiVkEmk25ubd1gkNAzq8G9aoVBNgNJZ1X9dQKFel/awB1W6P4e4eLlokzkTGTk6D8hWQce2A6ufgvUfUHCYJvyoyUYZtak55XblsoUpdg6J5QZWeQ0kH+Wx5g7x/JwXfKWaXHUPFbsRXV3Llv4id4gQRmRG+qQqFPP6h0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fPJ706jw; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fPJ706jw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729075940; x=1760611940; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jJ5Dx5nScUtZW8vUTxHnxSqXEChMTGzv9BI+vmS133Y=; b=fPJ706jw+DVlVlRoi3S5QEZgu2cGagZZgblUbQ6fRNh5MKmQS2g9dRt7 nmWnaJa9SYN9Afvcx9J8D4ENhHcp8sNdoFPMjbv1GqMFjF6Sy0ys8j9hZ YGo1f6qwnMfx0r5JKKDrlj1F2ZEep4wMz6Ut0Y86WNhL98dRiQc6R/YJo aTU7HFoctAl77HhSph6Tu/e9SHpD2w+/Mccq9SwvsSOsehJBYCxL5terY l+hayZsTVMAunbdLbmxMep2GVjnpGwaZeJ4Gxfcmo1QlIoS9FbIGY3J9U wPlL2bS6bD0rgIISJcoMYfkyPsPBKOzRIfyEj5podx5sQCioH6W+SmXuq Q==; X-CSE-ConnectionGUID: /rdFdTTeS1W/w4Hy3bdFfw== X-CSE-MsgGUID: jui2hkZIQcuCWrgcoCTblQ== X-IronPort-AV: E=McAfee;i="6700,10204,11226"; a="31382474" X-IronPort-AV: E=Sophos;i="6.11,207,1725346800"; d="scan'208";a="31382474" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2024 03:52:05 -0700 X-CSE-ConnectionGUID: WfMSlj0mSba/ZfPYKI/r2A== X-CSE-MsgGUID: PIxhc3UzSJiHLtuok1CRTw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,207,1725346800"; d="scan'208";a="82740099" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 16 Oct 2024 03:52:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 02DE250F; Wed, 16 Oct 2024 13:52:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Lee Jones Subject: [PATCH v1 2/4] mfd: intel_soc_pmic_bxtwc: Don't use "proxy" headers Date: Wed, 16 Oct 2024 13:49:52 +0300 Message-ID: <20241016105201.757024-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com> References: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_soc_pmic_bxtwc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmi= c_bxtwc.c index c130734f308e..1469e89b88ce 100644 --- a/drivers/mfd/intel_soc_pmic_bxtwc.c +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c @@ -6,16 +6,27 @@ */ =20 #include +#include #include #include +#include #include +#include +#include #include -#include +#include +#include #include #include #include +#include #include #include +#include +#include +#include +#include +#include =20 /* PMIC device registers */ #define REG_ADDR_MASK GENMASK(15, 8) --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Tue Nov 26 19:36:56 2024 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 AA86A20697A for ; Wed, 16 Oct 2024 10:52:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729075941; cv=none; b=NbeKnQY0+SRUQeWXLeVJWZ1Lf484gRM0POmToLch2O/w6E0iHGclx2D097FthFnvmZYrNKvWMA/KnZqZ5qQI1/uArV6znDrO2AEkTkhM0IgFN1iRIJNwgpSj22w8AgKQW2oBj4/oKauD80rjE2XGk6jdGRaNdH5Vyst3VRBKD/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729075941; c=relaxed/simple; bh=k2E+W1Blaw/I3rKlkRTqHbOxfFTC4GWOb6JoYS5d3qw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B9KfZjWKZv7cd51ndL8zasjXx/7Iv+I0bk3HF4tonoRBaNRoAr1L9PyVArpVZZgFlef8pEn0KxW/DbUoO2VFnx1kpG7dMmAL26DKlAkEJSVjPxCZXCbYj+qzbi2+TlFyU9+fBQIkpjf4Pu7teoGXwveMXeg2Q0UoabKaD/JHHGM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NQ3GDTad; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NQ3GDTad" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729075940; x=1760611940; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k2E+W1Blaw/I3rKlkRTqHbOxfFTC4GWOb6JoYS5d3qw=; b=NQ3GDTadojwgVxfw71N30YdjjBK9dg9fjm6POIV1OQPlakKhLlt5pBiP TDlgOR1xYMBCJZEk4l3qktJ0zZRUCSC5FPmhsng5J+faW7u+LC6WKnLbK 6NqTK5TqC9GE5yM8Ls37Kr528Mkca5BbZPg0kOjTgV0co/8YBVnBwqBPr 7br8N0Ej66UAzwaQNT4Wr2Fn82k65iGci4dFvRGwqpG2seAIykb+qvPlH 1NPc4DqKZUjvKJCPZbHo6G6Yb2EGpO/HLCUDxI4aqlY3xrrEwSLomvB3J SFGcb494+UK7TarjIbfJln1a9t3+l/r+MplUuO1jOgEkzpvG6BceWLaQa g==; X-CSE-ConnectionGUID: Tj5PCmAmRWq7xSbnQ9z8pA== X-CSE-MsgGUID: PCFrVGXCTEakzzHjIDnPjQ== X-IronPort-AV: E=McAfee;i="6700,10204,11226"; a="31382472" X-IronPort-AV: E=Sophos;i="6.11,207,1725346800"; d="scan'208";a="31382472" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2024 03:52:05 -0700 X-CSE-ConnectionGUID: wfsqdfupQle48vKHGFQBgQ== X-CSE-MsgGUID: /tTzzYUHQSKH7qTXrg8jHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,207,1725346800"; d="scan'208";a="82740098" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 16 Oct 2024 03:52:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0BE15388; Wed, 16 Oct 2024 13:52:03 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Lee Jones Subject: [PATCH v1 3/4] mfd: intel_soc_pmic_bxtwc: Use temporary variable for struct device Date: Wed, 16 Oct 2024 13:49:53 +0300 Message-ID: <20241016105201.757024-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com> References: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use a temporary variable for the struct device pointers to avoid dereferencing. This makes code a bit neater. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_soc_pmic_bxtwc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmi= c_bxtwc.c index 1469e89b88ce..5e6cffb162a0 100644 --- a/drivers/mfd/intel_soc_pmic_bxtwc.c +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c @@ -434,15 +434,15 @@ static int bxtwc_add_chained_irq_chip(struct intel_so= c_pmic *pmic, const struct regmap_irq_chip *chip, struct regmap_irq_chip_data **data) { + struct device *dev =3D pmic->dev; int irq; =20 irq =3D regmap_irq_get_virq(pdata, pirq); if (irq < 0) - return dev_err_probe(pmic->dev, irq, "Failed to get parent vIRQ(%d) for = chip %s\n", + return dev_err_probe(dev, irq, "Failed to get parent vIRQ(%d) for chip %= s\n", pirq, chip->name); =20 - return devm_regmap_add_irq_chip(pmic->dev, pmic->regmap, irq, irq_flags, - 0, chip, data); + return devm_regmap_add_irq_chip(dev, pmic->regmap, irq, irq_flags, 0, chi= p, data); } =20 static int bxtwc_add_chained_devices(struct intel_soc_pmic *pmic, --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Tue Nov 26 19:36:56 2024 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 1514B1CACDB for ; Wed, 16 Oct 2024 10:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729075927; cv=none; b=EpcPaEDt96pcKi+fAbU6V94oASx5ShqdwSOLdE1NO4iMJBXdU1bWstccmkHS2Er9E/8kEHnlCjWf32vfK7Cv2M/WF7v82KLfP47u7ppgqeghGAIfOP5+6dmmp//qyb5KKTp630saKOjUsngcLUcop0tSOhLFrhNPLaAH0R9Vsg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729075927; c=relaxed/simple; bh=C37zMoRvT7ptp1nf+FGWQBF+/uvvk9C/Aw3oL1cr7bU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JlEwRrMUcAmJCoNGmI+IzKpuqdWryEAg8uWaS9f8ACKnYMmTmhwNTABYJrfimrKcMK34oFYtMQ350Q2hGbGIauPxlGEzZqPxTTTac0SvvtwfzuCZPpLtPFSvXPDEyNRu3BizbhH4U+qJcxQwMVHTMivBnml3BOxXYJOWgZ2ekhI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=hYFvuJmF; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hYFvuJmF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729075926; x=1760611926; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=C37zMoRvT7ptp1nf+FGWQBF+/uvvk9C/Aw3oL1cr7bU=; b=hYFvuJmFkpI1prRAUDzJjWq4RH+wkeW4vTiU/Sfit0eSMpuHZqeEZcMg HYfCuxOtCKLBdho+FUEYsNoTzoLma5Fc1aXWVTf4YRzsz9yVx1F80WjEE Q0W+BV2o0YhcjrgKTwz+nq5EUU8ovzmo1VDXM2E5/FPXc7/z/OpYOjViq TI2IPk4C/YVGVlB4GtORGQRw38ITWXVak4KgquFo5PqqkkukorTv6ItMM PS8zJuhUj+J9XIGeSxdGo/B/IDlcVhZoAXIHmBrkh2tMoK8TlLVT5167l 9nFpTfRyQxaZs0QYih58maPQM+5Ea2FWXY+ZIe7bPxOq1ZlhUjNBMWEwn g==; X-CSE-ConnectionGUID: d1f2o07QS1q138vS83EWUQ== X-CSE-MsgGUID: QKf9BOFKT56hRDdzHmckcg== X-IronPort-AV: E=McAfee;i="6700,10204,11226"; a="28645804" X-IronPort-AV: E=Sophos;i="6.11,207,1725346800"; d="scan'208";a="28645804" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2024 03:52:05 -0700 X-CSE-ConnectionGUID: leKeOUS4QcmfnwU8ZVjcAQ== X-CSE-MsgGUID: mj6obJL1QgKbhLK5cTAY9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,207,1725346800"; d="scan'208";a="115631221" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 16 Oct 2024 03:52:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 150655A7; Wed, 16 Oct 2024 13:52:03 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Lee Jones Subject: [PATCH v1 4/4] mfd: intel_soc_pmic_bxtwc: Deduplicate error messages Date: Wed, 16 Oct 2024 13:49:54 +0300 Message-ID: <20241016105201.757024-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com> References: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Move the individual error messages inside bxtwc_add_chained_irq_chip() in order to deduplicate them. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_soc_pmic_bxtwc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmi= c_bxtwc.c index 5e6cffb162a0..cc4056a64dbd 100644 --- a/drivers/mfd/intel_soc_pmic_bxtwc.c +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c @@ -435,14 +435,18 @@ static int bxtwc_add_chained_irq_chip(struct intel_so= c_pmic *pmic, struct regmap_irq_chip_data **data) { struct device *dev =3D pmic->dev; - int irq; + int irq, ret; =20 irq =3D regmap_irq_get_virq(pdata, pirq); if (irq < 0) return dev_err_probe(dev, irq, "Failed to get parent vIRQ(%d) for chip %= s\n", pirq, chip->name); =20 - return devm_regmap_add_irq_chip(dev, pmic->regmap, irq, irq_flags, 0, chi= p, data); + ret =3D devm_regmap_add_irq_chip(dev, pmic->regmap, irq, irq_flags, 0, ch= ip, data); + if (ret) + return dev_err_probe(dev, ret, "Failed to add %s IRQ chip\n", chip->name= ); + + return 0; } =20 static int bxtwc_add_chained_devices(struct intel_soc_pmic *pmic, @@ -458,7 +462,7 @@ static int bxtwc_add_chained_devices(struct intel_soc_p= mic *pmic, =20 ret =3D bxtwc_add_chained_irq_chip(pmic, pdata, pirq, irq_flags, chip, da= ta); if (ret) - return dev_err_probe(dev, ret, "Failed to add %s IRQ chip\n", chip->name= ); + return ret; =20 domain =3D regmap_irq_get_domain(*data); =20 @@ -521,7 +525,7 @@ static int bxtwc_probe(struct platform_device *pdev) &bxtwc_regmap_irq_chip_pwrbtn, &pmic->irq_chip_data_pwrbtn); if (ret) - return dev_err_probe(dev, ret, "Failed to add PWRBTN IRQ chip\n"); + return ret; =20 ret =3D bxtwc_add_chained_devices(pmic, bxt_wc_bcu_dev, ARRAY_SIZE(bxt_wc= _bcu_dev), pmic->irq_chip_data, @@ -557,7 +561,7 @@ static int bxtwc_probe(struct platform_device *pdev) &bxtwc_regmap_irq_chip_crit, &pmic->irq_chip_data_crit); if (ret) - return dev_err_probe(dev, ret, "Failed to add CRIT IRQ chip\n"); + return ret; =20 ret =3D devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, bxt_wc_dev, ARRAY_= SIZE(bxt_wc_dev), NULL, 0, NULL); --=20 2.43.0.rc1.1336.g36b5255a03ac