From nobody Wed Dec 17 03:59:53 2025 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 03DA5271A7B for ; Mon, 15 Dec 2025 12:26:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765801617; cv=none; b=Vh4k3UwP4mOy1qewxWLcd8NjQhzOPsTyaEwYvlnQO47gdUg1S4EUK45b8x+tD36cZVXBkmRS8ryEUk94ZGbv2pMi6mLXzDDeLEEmgSeZxtxQxXtc0Wzrv/PTxy83pdEUL8YMpBldOvhc/2ckhn2yvKRGmrx6dTPVy6dNDff+/2Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765801617; c=relaxed/simple; bh=XBGKZ/ITWegS8/ZOHvxWMsrdL4N3bSH2oHummdA8vgo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AKd1+1FOsNJQYRjEN6mocxRB9R9CpK8w2xYwTYp/HX/eajP84/2NYEBmUt5bZqIKMlmLvOLdBpfyd0xO9v9N5PjxabKu18OVkoBpMzE83BCBQlGD2thFzbXjgsKAcdY1MaFmALOs2E7wabbFUENYIWwGLmjlKXH2Lg1Cjv07/oU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=AaU3J27r; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="AaU3J27r" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1765801599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MW5H/hhDK3ViWMzsjxgvpJkjVz/r8K1RDrjdz24ubXo=; b=AaU3J27rkREZl98Fuz8kBeSs0paOtwoJjMtSFpYDTVgQEpmFGYWpGR3rXw6ceyov3Y/9qm OY0/F6dQWIYhP8oz1uMp2LSILnqqd1bK7xqRYZFI6JsuwXOxTjcu2sbINdVuV8ODIPTUA5 XQy1x9Q+Yl/hoQT0EdK30skNyPv4dtY= From: Thorsten Blum To: Srujana Challa , Bharat Bhushan , Herbert Xu , "David S. Miller" Cc: Thorsten Blum , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: octeontx2 - Use sysfs_emit in sysfs show functions Date: Mon, 15 Dec 2025 13:26:05 +0100 Message-ID: <20251215122608.385276-3-thorsten.blum@linux.dev> 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 X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Replace sprintf() with sysfs_emit() in sso_pf_func_ovrd_show() and kvf_limits_show(). sysfs_emit() is preferred for formatting sysfs output as it performs proper bounds checking. No functional changes. Signed-off-by: Thorsten Blum --- drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/c= rypto/marvell/octeontx2/otx2_cptpf_main.c index 1c5c262af48d..f54f90588d86 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c @@ -2,6 +2,7 @@ /* Copyright (C) 2020 Marvell. */ =20 #include +#include #include "otx2_cpt_hw_types.h" #include "otx2_cpt_common.h" #include "otx2_cpt_devlink.h" @@ -507,7 +508,7 @@ static ssize_t sso_pf_func_ovrd_show(struct device *dev, { struct otx2_cptpf_dev *cptpf =3D dev_get_drvdata(dev); =20 - return sprintf(buf, "%d\n", cptpf->sso_pf_func_ovrd); + return sysfs_emit(buf, "%d\n", cptpf->sso_pf_func_ovrd); } =20 static ssize_t sso_pf_func_ovrd_store(struct device *dev, @@ -533,7 +534,7 @@ static ssize_t kvf_limits_show(struct device *dev, { struct otx2_cptpf_dev *cptpf =3D dev_get_drvdata(dev); =20 - return sprintf(buf, "%d\n", cptpf->kvf_limits); + return sysfs_emit(buf, "%d\n", cptpf->kvf_limits); } =20 static ssize_t kvf_limits_store(struct device *dev, --=20 Thorsten Blum GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4