From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (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 4F042391822 for ; Thu, 23 Apr 2026 17:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776964246; cv=none; b=ToMegb+QYVgEg7OhHTFkvKA31Yud392mVgnPnJvL+DjEgw2C3EO9mkKQGG0hgG0v593epeqTqsaFFf+gdcN/M7F4b0DoJq/ngh01c6rEWDb5PKp0DffINsrQm7n82f+AUQX7diop1Th/Qs1/KC+zVD9EV6RQ2KNAfnsmT7RPP1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776964246; c=relaxed/simple; bh=nFVfTyUGFt9QPrEWkty5n0OMahBfbSbjW1nFukqLbgc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cJ4abxHt99uRzcqu8sldgX1bBDSZhnbKW1xnwyrnqfFxC+0hXzK3xqQj6vd1R3r0XeiAdX70KqTarqM5VEJL2mWQachPKP9vZAaxiMsWQqqqAI2G1OMEM+DrzAe8g3iZbfl1EBJ9EMbeMIltzxUBVCfUIi5gVbPguff0ghlN0DQ= 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=Jzwwo855; arc=none smtp.client-ip=95.215.58.178 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="Jzwwo855" 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=1776964236; 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: in-reply-to:in-reply-to:references:references; bh=gorBLGcbnPFGAH2/4QFeUbs8gefs1DDJEPZAI4a0IPk=; b=Jzwwo855EWXzIkAdC0rmcC5XJUNQQfSQ3Scfp2ZY/LrMrBGvXOkAsuZjcAN1u6r7TrFl4U veoTq+/k9xUFArkEbQullUQz4Hv+eqcHHj26tKvLXBhusfvECfsbH/41CJc7NjxCP3DdVc Zcc5/kz52Lfmj/QWIKSVfloDnOV+BE8= From: Thorsten Blum To: Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , Russell King Cc: Thorsten Blum , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] ARM: OMAP2: use sysfs_emit() in type_show Date: Thu, 23 Apr 2026 19:10:18 +0200 Message-ID: <20260423171016.275157-6-thorsten.blum@linux.dev> In-Reply-To: <20260423171016.275157-5-thorsten.blum@linux.dev> References: <20260423171016.275157-5-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=887; i=thorsten.blum@linux.dev; h=from:subject; bh=nFVfTyUGFt9QPrEWkty5n0OMahBfbSbjW1nFukqLbgc=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDJmvgiq/s71a+cn07zfhLlkly2/fxNSDUpMkUyp//5ByO ZjF8+dxRykLgxgXg6yYIsuDWT9m+JbWVG4yidgJM4eVCWQIAxenAEzE7z0jw4Xq8gP7JH+JrbtT xfPop9FSmfDljapb720+KjVfNN08NZmR4YSU9zQlF+0Xp5O2ugncVtV/da9EUzj65I8Dgpm5wTN Z+AE= X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Replace unbounded sprintf() with sysfs_emit() in type_show(). Signed-off-by: Thorsten Blum --- arch/arm/mach-omap2/id.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 44d7471666a8..25ded74e4b01 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -18,6 +18,7 @@ #include #include #include +#include #ifdef CONFIG_SOC_BUS #include @@ -771,7 +772,7 @@ static const char * __init omap_get_family(void) static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf) { - return sprintf(buf, "%s\n", omap_types[omap_type()]); + return sysfs_emit(buf, "%s\n", omap_types[omap_type()]); } static DEVICE_ATTR_RO(type);