From nobody Sat Feb 7 17:55:03 2026 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 846E278F2E for ; Tue, 27 Jan 2026 22:50:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769554211; cv=none; b=gkGrCoakb/9Nph0XxSdUNEstqxevltXs5Si2rtMcDIn42VAPMAJMwCDgUsUJhg7c6N0iO3UhVtOrRsObOq2/5b3T3Ysm6zmfGu/jgBIoWc6M5EnGoPM8Nwt1R4JpB2HFOJVetJUJJNiOBN+dk/XG50zjIBAmmqc0fuopTh2O6f4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769554211; c=relaxed/simple; bh=i35pS36Hw1c6rblDcFdbmaLBx+DU3mM8WbyoCqtsD7M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ay6H53oX6E6XJAA5tKAGSf0bPXrr1JXRu5x9eAn9/TNAmukKZTbdrzooPwxlL7ZdHFQOD07JuQreCd/Ka9mRttW7vp5FWlOaTS9q2iACWsBs9yGtaO33pzLiZTnkCNv3AlqHw9haVWs3UzZsnMLAo79ePlRMhHYwaBWk17LiZE4= 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=AFTUq/mZ; arc=none smtp.client-ip=91.218.175.185 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="AFTUq/mZ" 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=1769554207; 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=41pxQ/NRD0nse0ZR0DYG8Jp7upJ5wvkwOnt2t65T8cs=; b=AFTUq/mZM3PNKlz+kfRF8Li2X+4rzDzoAxFdkkce6Rqr05wD2MWuqCCLOTYanGT3zwUKG+ N8K+U6EnBWtYVv3Oxl1DS3UqFrT+gcuh/KwHmfPpwII0V7EaJa2Ax75lyqkoD0D0j41tEb pW6n976PwWHigIV3SJxbYn9BGUYrwuU= From: Thorsten Blum To: Thomas Gleixner Cc: Thorsten Blum , linux-kernel@vger.kernel.org Subject: [PATCH] genirq/proc: Replace snprintf with strscpy in register_handler_proc Date: Tue, 27 Jan 2026 23:49:49 +0100 Message-ID: <20260127224949.441391-2-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 snprintf("%s", ...) with the faster and more direct strscpy(). Signed-off-by: Thorsten Blum --- kernel/irq/proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 77258eafbf63..b0999a4f1f68 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -12,6 +12,7 @@ #include #include #include +#include =20 #include "internals.h" =20 @@ -317,7 +318,7 @@ void register_handler_proc(unsigned int irq, struct irq= action *action) if (!desc->dir || action->dir || !action->name || !name_unique(irq, actio= n)) return; =20 - snprintf(name, MAX_NAMELEN, "%s", action->name); + strscpy(name, action->name); =20 /* create /proc/irq/1234/handler/ */ action->dir =3D proc_mkdir(name, desc->dir); --=20 Thorsten Blum GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4