From patchwork Thu Jan 11 13:20:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Massot X-Patchwork-Id: 762087 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 43FE315EBD for ; Thu, 11 Jan 2024 13:20:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="YLuzraUe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1704979230; bh=Ch+zIXbfH/CkA9GnlGmsCVz/TYMlrguj7Id6jLj8Je0=; h=From:To:Cc:Subject:Date:From; b=YLuzraUeN1M3jjwTkLLQQEGjg9WEW2AmPgh6SzgKFCG2UCTVLSisDolkpBwWPuaF8 0mkoiUhu+yS2FCJNVaCa9osWUmKfBlgLEGmmNkrwZ2Lv3N60pmv5PZGhVR1DAu3Rgk 0PdQRpzAEtysthrBUmQdal33R6Sxtak7a8STVQwqSpSnQ2KOurP9cQlVua6XPwd/fM q4PKtdaaNbZgNpYjygUjEpz0u3NWer7H35WKVg/MXqaLXFmFoQQVIQrN7dKVpQnuzO L5a6cMoqzuPYK0hkGk2o5LsYHpCYIWqg1Buod5lkQ93VN4NONusA2gtIVs2j4xn/i5 TxHPjEn+GEOww== Received: from stla-brain-8255-1.home (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jmassot) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 1B5133780894; Thu, 11 Jan 2024 13:20:30 +0000 (UTC) From: Julien Massot To: hdegoede@redhat.com Cc: sakari.ailus@linux.intel.com, linux-media@vger.kernel.org, Julien Massot Subject: [PATCH] media: v4l2: cci: print leading 0 on error Date: Thu, 11 Jan 2024 14:20:03 +0100 Message-ID: <20240111132003.2778044-1-julien.massot@collabora.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In some error cases leading '0' for register address were missing. Fixes: 613cbb91e9ce ("media: Add MIPI CCI register access helper functions") Signed-off-by: Julien Massot Reviewed-by: Hans de Goede --- drivers/media/v4l2-core/v4l2-cci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-cci.c b/drivers/media/v4l2-core/v4l2-cci.c index 10005c80f43b..ee3475bed37f 100644 --- a/drivers/media/v4l2-core/v4l2-cci.c +++ b/drivers/media/v4l2-core/v4l2-cci.c @@ -32,7 +32,7 @@ int cci_read(struct regmap *map, u32 reg, u64 *val, int *err) ret = regmap_bulk_read(map, reg, buf, len); if (ret) { - dev_err(regmap_get_device(map), "Error reading reg 0x%4x: %d\n", + dev_err(regmap_get_device(map), "Error reading reg 0x%04x: %d\n", reg, ret); goto out; } @@ -131,7 +131,7 @@ int cci_write(struct regmap *map, u32 reg, u64 val, int *err) ret = regmap_bulk_write(map, reg, buf, len); if (ret) - dev_err(regmap_get_device(map), "Error writing reg 0x%4x: %d\n", + dev_err(regmap_get_device(map), "Error writing reg 0x%04x: %d\n", reg, ret); out: