From patchwork Sun Jul 3 22:02:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Hauser X-Patchwork-Id: 12904503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 078E8CCA483 for ; Sun, 3 Jul 2022 22:03:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232277AbiGCWDa (ORCPT ); Sun, 3 Jul 2022 18:03:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232425AbiGCWD2 (ORCPT ); Sun, 3 Jul 2022 18:03:28 -0400 Received: from sonic312-26.consmr.mail.ir2.yahoo.com (sonic312-26.consmr.mail.ir2.yahoo.com [77.238.178.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BEFB2DE2 for ; Sun, 3 Jul 2022 15:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1656885802; bh=06ZbKj/O4G/euSZD9awuYJpka4OzYY+PQp4ku8CMgmQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=VTjDKusmbE02aK9POjVKUDrEC5I4ZIGFE3sIKrhcmxXegw59xksRqoCToLxs5XUe3kwS96oAfHiiVhUcYNHZn4URm7Ap4bdC9OwAJo9r/O1GpFOw42+yJqTuuN2QlwjbJlrjEzh74TZlVHfTGxSzpsmQfHF9jVUhnx/nJiGMqcd/Q7o/1596Gj3iE+KbbomLwOGoefXK8pHVWZxrx+CBe4lBh6IgTl1i+GZXd937Y56cBKG9lYy766WT42JeKXuvFKpUXsWSBXJ6CL0k8C4EN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rgvASPUsBkc fkHAYvASQpRf5UIdQbI11MbozIflGGcJi3h8OIj4MX7fmEvhcOt_tUHcsnb6KG4_oM7aV_eV18GG 6y1vxzMzhAMduAZKPeW4kUWmLc7Y_EMDZA5_9YYhbRtNABnC8jgp52d7HSLrCRIQdKoL_DPtPXdg vR841Af4fQh8x1LyDvjSsfMC5SyzpVBFRFIgIr5vbGO7oTUeTdShaep48wHLybmFME6DdaoJSKPD 9uzVHVIV0h15Mmpr632k0vQ4SzDKMwyOs_s1D8YcsmcrBlPqYgRa8hEqnS_y7fTvtSjDG63KctkA Ea9KdGVS4DD_pN.IWPrzDw2scfdguI9k5d1pdhpgZchG_PEpb92Mhi_gvIShEnHa19L5U.t6glH5 fFvg..MlH4MQ9XwiYtEIIrky1WMgwYkE9J3pcVrQxK.hk2Eh0d4GWrB_Izc5yRIoRhXdTSfMQwXY aNPN.UlPnUh0t05ZeRQ9Vvl_uYN3jusDs4Ej.SwSvBVIHeMAyYpNnGhyVAvbsr1kWv4v22P.lmvZ _tJFNLGLjGO6xEyiKYVpuG3gzeAiAfhWFFiD8HB5Dp6nTGuZTW2sQuqdXAi1mN_1VfWHGIZTyo6T RvKH0ouibkymiedTG2Vrep4ekvRdc5mzX72EvFIZAQD0NTRrm2ZoRYKQkDi2xadkABkgEz6K5hFJ n7sFEQ4YvfMKl1vteN9kC5Gk8xB2k9XifsLN9nT.UCbVkwAaBUAfiGe96wYqnJowTRhWCRXpqTJO xZ.hfKtoqzc8ERuti X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Sun, 3 Jul 2022 22:03:22 +0000 Received: by hermes--canary-production-ir2-74b4d6d794-tv8mb (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0849bd8970b52a790a5a1bb96f2e336c; Sun, 03 Jul 2022 22:03:20 +0000 (UTC) From: Jakob Hauser To: Jonathan Cameron Cc: Lars-Peter Clausen , Linus Walleij , Andy Shevchenko , Hans de Goede , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH v4 07/10] iio: magnetometer: yas530: Move printk %*ph parameters out from stack Date: Mon, 4 Jul 2022 00:02:41 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Use less stack by modifying %*ph parameters. Additionally, in the function yas530_get_calibration_data(), the debug dump was extended to 16 elements as this is the size of the calibration data array of YAS530. Signed-off-by: Jakob Hauser --- drivers/iio/magnetometer/yamaha-yas530.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/magnetometer/yamaha-yas530.c b/drivers/iio/magnetometer/yamaha-yas530.c index c250909df8f4..8358d4b3d1e2 100644 --- a/drivers/iio/magnetometer/yamaha-yas530.c +++ b/drivers/iio/magnetometer/yamaha-yas530.c @@ -661,7 +661,7 @@ static int yas530_get_calibration_data(struct yas5xx *yas5xx) ret = regmap_bulk_read(yas5xx->map, YAS530_CAL, data, sizeof(data)); if (ret) return ret; - dev_dbg(yas5xx->dev, "calibration data: %*ph\n", 14, data); + dev_dbg(yas5xx->dev, "calibration data: %16ph\n", data); add_device_randomness(data, sizeof(data)); yas5xx->version = data[15] & GENMASK(1, 0); @@ -708,7 +708,7 @@ static int yas532_get_calibration_data(struct yas5xx *yas5xx) ret = regmap_bulk_read(yas5xx->map, YAS530_CAL, data, sizeof(data)); if (ret) return ret; - dev_dbg(yas5xx->dev, "calibration data: %*ph\n", 14, data); + dev_dbg(yas5xx->dev, "calibration data: %14ph\n", data); /* Sanity check, is this all zeroes? */ if (memchr_inv(data, 0x00, 13) == NULL) {