Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp700416lqt; Thu, 6 Jun 2024 16:23:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVxoahvM3TV0BCMvp7poh7qYxAmJPoJVKCmeOeZH8DO0NgtQ+k4LVpL2RObbMEfqGu04fhau+sM8L8hzHEhP/oGpDsCMZlvSBRwpiGjg== X-Google-Smtp-Source: AGHT+IHzyY+W7mr2hfA33vSq3JiTjtTLHyKO5ISACkvzvD549UJOrSVqaI5OfUutQtdTR48Acec9 X-Received: by 2002:a50:d7d9:0:b0:57c:4f55:a2c8 with SMTP id 4fb4d7f45d1cf-57c509323bbmr402263a12.24.1717716179896; Thu, 06 Jun 2024 16:22:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717716179; cv=pass; d=google.com; s=arc-20160816; b=KgcxspLGMqv31X1zk2CLsOR594on/tITBtwUwKDGmVBBhbYM6AFka02+yJSE9RsnjK p88l/pKK3gD+og7IEAVMNIGEI2vfCR6UPV+iTP8pHjbulV/xNVeNkK33FH0pZp+5eY4f fjoj4D3a/mjpjSCI0JwXrGeRTjI8P9aEeJboVkwF07KOyDBafZA5SaPCEA2ZoBcBoKaK UEAWkIJUrGzVFa1F0qXz/FmFICjx7qE86YHPPSMXDICRWs4QaXwzQj+cnnnFbvSPzHvA ZfgSJS1eoOT9HWoM0FAZJY4MWL4MlW8bw1a7yhy1rxO+dL+0myEm4cLU0DmPNbaWD1Ob nzXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=91bxoLsXc/Ozkmi9Ff/jpiON1tTp9VUV1wHUV+afLP0=; fh=OAx35mhqT7w49CH4c7T09ig2LJq7E8PsKb2Beisg6Ag=; b=jfznwlDD1R5FoRGPJUq4yXHL9LMYNd+WyCqcfsxp2XAfjJdWVw6QciX7HGuwH4GocB OX0uPqT067KVMdRZWORNlQQYl1sazBKRxv+wlNLmmdTsIfCR1ah4g4Rs2zW0LTz0iidK ml2a+5Aev2SuI3zmp2kt3VD3Ze7mRtqKBgXQZvplDj8eCowCtSeCO5Je+NaBJSkKvyTo krfNPLOtMjx8TztGwkaKPEz3G6zXHGxlDtZXVhajXX9FDwJ+J6HH/KXskgF9OylCOPZN Gs8aK0qMWaszSBYSv7exnPv6SxTXi0EVRYp0EliOQa52fJ/zSD7FU5G1lg4a7XwavMVd k2Jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NxvaJO12; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-205015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae0c57ebsi1153965a12.83.2024.06.06.16.22.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 16:22:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NxvaJO12; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-205015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 404F31F2827E for ; Thu, 6 Jun 2024 20:57:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B9579196C9D; Thu, 6 Jun 2024 20:57:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NxvaJO12" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (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 62BDB4AEC3; Thu, 6 Jun 2024 20:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717707443; cv=none; b=mq5bgdEE+R14ho0MdDNG2Qn03nk0Jl7P7vfxdGgMDhuOx5kWxUpdFJHIY5dGCmQPLCEd7obGZoqfa0Q6yIkkAr9rlEf8TprcYIw8hkoLa39fkOMz3wZnIElF+p9B4ZeBceaFSRhpKBqj/xrDBrK1RS4768foFSagd3Kudh6PR20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717707443; c=relaxed/simple; bh=ngr0dpqQ8SleCp2Ne5jcEzrIZLckdn+bTl/6fh4gbMk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nKTvRpby7Wz0fJDYV5Umh5yYbJobP70oeT2WyHgBsp+Se5VTmA42icFF6jjekgcRqLxfUtq47DZZihOfUiGXMbvHo7L0X60CANJPMPJehwbfimAdn25uhFTKB5GZdQ0uJpmBBkIPLDuXlNlo+FVh3SbplH+UhDFHIZ+9yjlsf44= 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=NxvaJO12; arc=none smtp.client-ip=198.175.65.12 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717707442; x=1749243442; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ngr0dpqQ8SleCp2Ne5jcEzrIZLckdn+bTl/6fh4gbMk=; b=NxvaJO12v+K0kZ6nzamqKiDqRBOVbKB45gFWo6lKLccEXTNCI4v/EEIu pUYYeQnHQ7L9Eq2Ti6u70kiuw9BPzW4gVbh+ZrM8PrsHfXBHby6+d9SYl FmpPRld9BhY2s9zpYVHM6l3kqD/nPHogZDeUfBYE8jC3xpdc/2PAdKlnP 5O56BaQLMe1SIFbjRb2s/aDHod6Yfhw8rM/Pw/6dT6SYzaFanfhepSdRL qlmXY2adSHhv2uUC1/BzCW9j7TRelyoaYod1bSa7qOlzlQ4gyTdfTefrQ PStXaMApG5FiXVV7ZissCgSSiahb9L1twLN+VjESL5mwnmQCFx2raKeT1 w==; X-CSE-ConnectionGUID: 1qiVjW8UQD6li1L/w0iItA== X-CSE-MsgGUID: 6ze5cL8gTRCjmweb5tUWcQ== X-IronPort-AV: E=McAfee;i="6600,9927,11095"; a="25812556" X-IronPort-AV: E=Sophos;i="6.08,219,1712646000"; d="scan'208";a="25812556" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 13:57:22 -0700 X-CSE-ConnectionGUID: KdjEOdf4QaaOLJMA4lwAxg== X-CSE-MsgGUID: zjgdXO7wSFKo6stZcuLx7w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,219,1712646000"; d="scan'208";a="75570843" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 06 Jun 2024 13:57:20 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 75BE52CF; Thu, 06 Jun 2024 23:57:18 +0300 (EEST) From: Andy Shevchenko To: Mika Westerberg , Andy Shevchenko , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" , Len Brown , Andy Shevchenko , Hans de Goede Subject: [PATCH v4 2/3] ACPI: PMIC: Convert pr_*() to dev_*() printing macros Date: Thu, 6 Jun 2024 23:54:15 +0300 Message-ID: <20240606205712.3187675-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240606205712.3187675-1-andriy.shevchenko@linux.intel.com> References: <20240606205712.3187675-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: 8bit Since we have a device pointer in the regmap, use it for error messages. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg --- drivers/acpi/pmic/intel_pmic_chtwc.c | 5 +++-- drivers/acpi/pmic/intel_pmic_xpower.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/pmic/intel_pmic_chtwc.c b/drivers/acpi/pmic/intel_pmic_chtwc.c index f2c42f4c79ca..25aa3e33b09a 100644 --- a/drivers/acpi/pmic/intel_pmic_chtwc.c +++ b/drivers/acpi/pmic/intel_pmic_chtwc.c @@ -236,11 +236,12 @@ static int intel_cht_wc_exec_mipi_pmic_seq_element(struct regmap *regmap, u32 reg_address, u32 value, u32 mask) { + struct device *dev = regmap_get_device(regmap); u32 address; if (i2c_client_address > 0xff || reg_address > 0xff) { - pr_warn("%s warning addresses too big client 0x%x reg 0x%x\n", - __func__, i2c_client_address, reg_address); + dev_warn(dev, "warning addresses too big client 0x%x reg 0x%x\n", + i2c_client_address, reg_address); return -ERANGE; } diff --git a/drivers/acpi/pmic/intel_pmic_xpower.c b/drivers/acpi/pmic/intel_pmic_xpower.c index 33c5e85294cd..43c5850b4bf3 100644 --- a/drivers/acpi/pmic/intel_pmic_xpower.c +++ b/drivers/acpi/pmic/intel_pmic_xpower.c @@ -274,11 +274,12 @@ static int intel_xpower_exec_mipi_pmic_seq_element(struct regmap *regmap, u16 i2c_address, u32 reg_address, u32 value, u32 mask) { + struct device *dev = regmap_get_device(regmap); int ret; if (i2c_address != 0x34) { - pr_err("%s: Unexpected i2c-addr: 0x%02x (reg-addr 0x%x value 0x%x mask 0x%x)\n", - __func__, i2c_address, reg_address, value, mask); + dev_err(dev, "Unexpected i2c-addr: 0x%02x (reg-addr 0x%x value 0x%x mask 0x%x)\n", + i2c_address, reg_address, value, mask); return -ENXIO; } -- 2.43.0.rc1.1336.g36b5255a03ac