From patchwork Wed Aug 21 12:20:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13771323 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 3E4CC166F26; Wed, 21 Aug 2024 12:22:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724242961; cv=none; b=C+xR5VWNWYdDachoznB633XHIioHSLNrDA+/9dEmUUEE2JAJL1ZkYW4YUm6E4DR5I2RkzjgAvJQGN+BWKPGTyyzxuSp8NslqNW58BYmUEqP96v7elK6SmRkBcF6fNubpDK/LqZqUuCSewg/o8YM9GwPY/yXJKtuaq8iKFcydE0M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724242961; c=relaxed/simple; bh=srOvWJfBcpoG46ZqWIBdQAKX1Z+0rG2opwsVOdyMo3Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g5aX/wNM4M3/STHTk81jh1hCAhsape9FRDFE0ha5dYaR3QrwG/EO3ww3xhwvRJdD4jRrrktX2uMEh/Qc1jBv010gBBvQyIpQVjGF0WUckmmrJ4w/lL8Cx94SDgRJb+RCojcwOGAiyN1b5ENImCmJop0KkwVrOLwyu1hp6EfU53Y= 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=iJ01oDMR; arc=none smtp.client-ip=198.175.65.11 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="iJ01oDMR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724242961; x=1755778961; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=srOvWJfBcpoG46ZqWIBdQAKX1Z+0rG2opwsVOdyMo3Y=; b=iJ01oDMRl93CpBoNDzNxe65I6zmH9WJUHNQ+1AwDE21p/N4AHjF48hRG JroD/0Nr6TecTguJRllz/PKuNS4MGHkMoen8qkQfjuLkNDFmvnZ1y3T3A TFohKkrwd931kK29RWwd3CY7hbc/wCmW8N1nf82KJu3EOicFQAaKniS4t ssDw8c47DOjM1Zwu/K7WFOq1kcVYMto8xoZkZInmXJtBKL/cnK67AyBl7 O2izJOnTKmAj4gV7wmuHpGujp5Y2XpHNRXcCcBe0FJnaw9JPidFKnsexW sRVrtgqLRnDZTmm7KSlKf41VYDvEE7c5YFkSp8CxM4MhbQJu2vwtbj3GF w==; X-CSE-ConnectionGUID: BufpH5vRTZeKzSvwN2L2JA== X-CSE-MsgGUID: 2aYhTUDBRnO16hbT2wbZVw== X-IronPort-AV: E=McAfee;i="6700,10204,11171"; a="33166193" X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="33166193" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2024 05:22:39 -0700 X-CSE-ConnectionGUID: 3+d6/uLYR/2wq83njxTkoQ== X-CSE-MsgGUID: zjuTrsiqSAWvi8+cNg3WEg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="66035953" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa004.jf.intel.com with ESMTP; 21 Aug 2024 05:22:36 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EF2B2268; Wed, 21 Aug 2024 15:22:34 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , =?utf-8?q?Ilpo_J=C3=A4r?= =?utf-8?q?vinen?= , Andy Shevchenko , Hans de Goede , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally Subject: [PATCH v1 1/4] driver core: Ignore 0 in dev_err_probe() Date: Wed, 21 Aug 2024 15:20:40 +0300 Message-ID: <20240821122233.3761645-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240821122233.3761645-1-andriy.shevchenko@linux.intel.com> References: <20240821122233.3761645-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In the similar way, ignore 0 error code (AKA "success") in dev_err_probe(). This helps to simplify a code such as if (ret < 0) return dev_err_probe(int3472->dev, ret, err_msg); return ret; to return dev_err_probe(int3472->dev, ret, err_msg); Signed-off-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen --- drivers/base/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/base/core.c b/drivers/base/core.c index 6d3897492285..144cb8c201fb 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -5046,6 +5046,10 @@ int dev_err_probe(const struct device *dev, int err, const char *fmt, ...) */ break; + case 0: + /* Success, no need to issue an error message */ + break; + default: dev_err(dev, "error %pe: %pV", ERR_PTR(err), &vaf); break; From patchwork Wed Aug 21 12:20:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13771324 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 82BE717624C; Wed, 21 Aug 2024 12:22:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724242961; cv=none; b=k1VXNwW4JRGokfmZ9EMClfx9k5ebXNO0ghDmPVFv9JSCRayWZQb+c//+PAZpFT4HvVdHOqzMNa34uAIlQDIgQigwvPAxEc3R9rzfHXYnLro0EOrRpcrKRUzmksJTdgOwbS9uud+r6Vol8JhXqRto6wpTQ+6GSBdpvjelRNdpAEw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724242961; c=relaxed/simple; bh=lWiTuHHwy9SIEGdoXAjbdCv7EnBQf/U2g2vjrdeRBqk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jMdZlGLZ/b5Sk2yk3/bnLeTgnOmhJ5KDtDAE9hk2x15i/LNR5w1aHZ4Qo1ERsBCfiAWxVnInJN5kK67q0stzP8eiWHgEYV9srm4GCZVwday6d1wumGr0uhuwsqGh819gT5us7KPceV9F7X0RzMBcMiH1C0RGqXkJB4DlBZwJrsY= 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=NEsD6gHL; arc=none smtp.client-ip=198.175.65.11 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="NEsD6gHL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724242961; x=1755778961; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lWiTuHHwy9SIEGdoXAjbdCv7EnBQf/U2g2vjrdeRBqk=; b=NEsD6gHLqR8q3JttmxPf3MPk39qLs7Gbnm/53Lp5mbYrGoQeUnQv/m/g fsZeoT9C3wIoYTGbMXTCIikQIe3jrQUQNOUCfgqddpEca0RkmfWYXulnR wBfLQC3awnGFiu/Ts7MmSWlSPNRpk/DWt9oNgziqHWaILO2nwuhRQrMxW oj6T00bCEbH6chmiALLACvAEL5JYCnKBSlgcXfXv8SR82McCiTERXeVe8 u3WNt9IHikvPfm1wfxHI0pccxr7tzbdMVJyT+rFjHjAwHVLDjeQ8M+MCj QjEq9EzBm19QZXFBZiqZZfAhRR+a08dp4L9SvbHY3hNKifJfw3XWBAch1 g==; X-CSE-ConnectionGUID: yVss2iB3TQ+TPSWqRXFwsw== X-CSE-MsgGUID: hahX/nSOQXGqVpT4DCxSMA== X-IronPort-AV: E=McAfee;i="6700,10204,11171"; a="33166200" X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="33166200" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2024 05:22:39 -0700 X-CSE-ConnectionGUID: lttx9TOrQxqeL+LW57GxSA== X-CSE-MsgGUID: 1qydYSMrS+mGpPJw7HIBKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="66035954" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa004.jf.intel.com with ESMTP; 21 Aug 2024 05:22:36 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0D7F6644; Wed, 21 Aug 2024 15:22:35 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , =?utf-8?q?Ilpo_J=C3=A4r?= =?utf-8?q?vinen?= , Andy Shevchenko , Hans de Goede , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally Subject: [PATCH v1 2/4] platform/x86: int3472: Simplify dev_err_probe() usage Date: Wed, 21 Aug 2024 15:20:41 +0300 Message-ID: <20240821122233.3761645-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240821122233.3761645-1-andriy.shevchenko@linux.intel.com> References: <20240821122233.3761645-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Since dev_err_probe() ignores success, i.e. 0. we may call it unconditionally. Signed-off-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen --- drivers/platform/x86/intel/int3472/discrete.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c index 07b302e09340..cd0743300d7f 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -289,10 +289,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, int3472->ngpios++; ACPI_FREE(obj); - if (ret < 0) - return dev_err_probe(int3472->dev, ret, err_msg); - - return ret; + return dev_err_probe(int3472->dev, ret, err_msg); } static int skl_int3472_parse_crs(struct int3472_discrete_device *int3472) From patchwork Wed Aug 21 12:20:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13771321 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 AD1101D12E4; Wed, 21 Aug 2024 12:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724242960; cv=none; b=K1r7wSwahGQGbSFaJu/4qKgpoOwSuhHraDh6+dtdtLXB2RXcTETDD+/LSD+XLlF/3n/wq4FHa9E0sBBEK0RmeFrAp1XCDlcWsSL2UvCLpaS1HyoZNoUGNMvfj1TRcYMj5zgi5NidvJ30EhRTOSnsY5Z5BGYHEe/CJrS2Kk1xntI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724242960; c=relaxed/simple; bh=RBpH8hwL+8rZvJde/hlF1OhlTiKmsXGFm5qezkEgjHw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Sbs9aQg4Py3AWWEdJx7zkkRAsJ5k8t2nvLz7wA7jTVJtc7O50fosD2Ta3z34ewDNz8UNGFVjwRs22g0OAzOuBisj7jY4/gHQA4ITxV+hmML65yQp5z7daLdVHg4dWg7nEYnWGHCtvdR5s70+06NJPDw1AzOJKHfWet5EFfnUnUc= 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=WT4H/jXv; arc=none smtp.client-ip=198.175.65.11 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="WT4H/jXv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724242959; x=1755778959; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RBpH8hwL+8rZvJde/hlF1OhlTiKmsXGFm5qezkEgjHw=; b=WT4H/jXvmqOmWgvmhlAefCm6N3fD/N258pnuwSiC5GbGJrB+VNm4PadZ aOoHNjO8EbPgaPBnhmgfm3n58bfq5cMPzNhTUzcPzYaW2oKDuAaHHoXxh GNmtfA4mvgr4C+z6SYkgzQc1tjbUqQwAs6ogm+kamd2eVeM+4lrFdDSAC xX5u7PCD/p18cppFPkluNy2TNRID2dhrBN6g4QBG3c+dJK+5VGbarLmsU 2XmY7dJc7N05eWhhPohS8IpHhEOtWRRrUoYVZ97mfSVAVnjglNVHmq6GV bNj3jiY/ANhefWotTdcfOkVjW15qrRh6Mjan1gmzBRleF+YEZTXjTo9Ym g==; X-CSE-ConnectionGUID: b7EFh8naRNK5We/KCEjVCA== X-CSE-MsgGUID: EQD2UQI9RuGjiewfo+xZ6g== X-IronPort-AV: E=McAfee;i="6700,10204,11171"; a="33166205" X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="33166205" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2024 05:22:39 -0700 X-CSE-ConnectionGUID: Y86rsnDdQVCt9yAjKXkYdw== X-CSE-MsgGUID: yYvvj1xrS0Ce/nPohDk+Rg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="66035955" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa004.jf.intel.com with ESMTP; 21 Aug 2024 05:22:36 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1783F719; Wed, 21 Aug 2024 15:22:35 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , =?utf-8?q?Ilpo_J=C3=A4r?= =?utf-8?q?vinen?= , Andy Shevchenko , Hans de Goede , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally Subject: [PATCH v1 3/4] platform/x86: int3472: Use GPIO_LOOKUP() macro Date: Wed, 21 Aug 2024 15:20:42 +0300 Message-ID: <20240821122233.3761645-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240821122233.3761645-1-andriy.shevchenko@linux.intel.com> References: <20240821122233.3761645-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use GPIO_LOOKUP() macro which provides a compound literal and can be used with dynamic data. Signed-off-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen --- drivers/platform/x86/intel/int3472/discrete.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c index cd0743300d7f..96a9673a0165 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -69,11 +69,7 @@ static int skl_int3472_fill_gpiod_lookup(struct gpiod_lookup *table_entry, if (!adev) return -ENODEV; - table_entry->key = acpi_dev_name(adev); - table_entry->chip_hwnum = agpio->pin_table[0]; - table_entry->con_id = func; - table_entry->idx = 0; - table_entry->flags = polarity; + *table_entry = GPIO_LOOKUP(acpi_dev_name(adev), agpio->pin_table[0], func, polarity); return 0; } From patchwork Wed Aug 21 12:20:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13771320 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 B1E444B5C1; Wed, 21 Aug 2024 12:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724242960; cv=none; b=KFJ1AKyNRdc91dL5S2uBvkkSRKF18VPJ/jKqPVEh6F2qY11HCje/8EyF48og/VEolbDb2QSz+l+lUaZulkycl9FXOCsOehFeu5HgnG78YVam0GsTdJwWRK/pfSRxvBRRuKKeAmTPsFBLdCYQcxybvCLaEelsqG3N9LgRTqlAp7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724242960; c=relaxed/simple; bh=FlOLuxQtdd89SSARaX34UujQADldUtksPmR1X5kA4no=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DdWr/D2QtYMOmyHsCL3OvOIGgOefHAMiOUlq5LVusCPCIYEe842MFKnO1RcTNCZ7R/i5Aju3Dp17TlUr73Ri0Lb1YA/yLMV6Mlia5+XXSnTc4kCxnLKditZqOFeRmqOA/OKd3JCFv0Vgz7/E0QtCMH30CfW0LbfDhD2UUhTOe50= 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=Ve4IpxUv; arc=none smtp.client-ip=198.175.65.9 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="Ve4IpxUv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724242959; x=1755778959; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FlOLuxQtdd89SSARaX34UujQADldUtksPmR1X5kA4no=; b=Ve4IpxUvhNd0I0EMNYbxLOOCfez1In/3gj2TYE7Hj0gZlED04kAWWuTf nt65yUfnWP9Wm/wgzTDwX3ITJfss2VsmgaSQotsj17dVt7bHMOW/e0Iaa olL6UQ70I0B5JsLZQaqpqqYKtsSj2BPIHYVGyUAJ78fQ3CYR74MRrIA8C 7qdEy+Ssb4rlvgXnVGsPnqR5e33+u3/vd5Vo9/6FbDoHspiXIFWHYbOL+ 9jgx9y10Cm7IIEY5iJBUvNjJ+c2DlbqAEeRPtg8zUOKslk7g7WywDGOIH 1/bbqh7VkjdpA728ZldbjWivi+95PVBQ1ZBOGWs6EqEtJC2/U1lL3HBxt w==; X-CSE-ConnectionGUID: X/nGXyuWR9SRkKqGE+eNMQ== X-CSE-MsgGUID: uVvMD7csRjeeMeKs7HV81A== X-IronPort-AV: E=McAfee;i="6700,10204,11171"; a="45123254" X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="45123254" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2024 05:22:39 -0700 X-CSE-ConnectionGUID: ScnMfRBjRk2GW3B1rcHSsg== X-CSE-MsgGUID: ygNQGqK9Qs2qml09G73shA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="61057198" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa008.fm.intel.com with ESMTP; 21 Aug 2024 05:22:37 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2640B49F; Wed, 21 Aug 2024 15:22:35 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , =?utf-8?q?Ilpo_J=C3=A4r?= =?utf-8?q?vinen?= , Andy Shevchenko , Hans de Goede , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Scally Subject: [PATCH v1 4/4] platform/x86: int3472: Use str_high_low() Date: Wed, 21 Aug 2024 15:20:43 +0300 Message-ID: <20240821122233.3761645-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240821122233.3761645-1-andriy.shevchenko@linux.intel.com> References: <20240821122233.3761645-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use str_high_low() rather than open coding. Signed-off-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen --- drivers/platform/x86/intel/int3472/discrete.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c index 96a9673a0165..b5f6f71bb1dd 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "common.h" @@ -230,7 +231,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, dev_dbg(int3472->dev, "%s %s pin %d active-%s\n", func, agpio->resource_source.string_ptr, agpio->pin_table[0], - (polarity == GPIO_ACTIVE_HIGH) ? "high" : "low"); + str_high_low(polarity == GPIO_ACTIVE_HIGH)); switch (type) { case INT3472_GPIO_TYPE_RESET: