From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7A48318EF9 for ; Wed, 14 Jan 2026 08:49:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768380578; cv=none; b=sAMxNfcpQuE7U+M8YKBW4ZT8+8lM95VwMSecxVMX3aSLg1r811mQItos1In0lj/Pi9YasMYiOPtppjBln8NJLyWgGv8sMtB4+eALOCQRkS+GZm4zVxwaWYFTwfaywkFntlxOhhm15ICtWH5QRYVgNkVlFKpgUZkKgLgob4wa0tg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768380578; c=relaxed/simple; bh=O7wjKPLRscfU0YwsaALqm/qytv2SqY41h87ZOCdgmFU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JXrXysDY8FjMkl6hGELiGsqy8qySYhGeoLuWLZYhr1tazk06qqnDidXTVa3q1OAHRtZjkIhwSG2ydEF79S17hAUhcgjJP6ZP9fSHQ2iBDR/VTRjfHOvvmcsGY4cGQCcB+xdiiS1Ov16psQ4Da3vCsdrrygZgCUzyRz2a5kqShHg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GbSIBPTk; arc=none smtp.client-ip=209.85.160.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GbSIBPTk" Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-5013c912f9fso17583241cf.2 for ; Wed, 14 Jan 2026 00:49:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768380574; x=1768985374; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DHzo5vnBquKF32S2JW9TXfWUEIvitY0LZE/EnC1pjcU=; b=GbSIBPTkAsY0EDmoKASTxjzf7y+p6KmQZsgFRhaR6t6G8zPoxuPj2ORx3/+U7rXhGh sl6HluAZvfxtVX62Seqc12GXa+T8YdlNTnm6D9lLOyvtcQz3arErKEuHHbhHgPTbRJGO vnmkt3Po2lRn9Y8HTY8S6VE2aJnl8eXR7OSQUkHUdw6uTUo5s0IZUYXf3OlgXj0/9Jw6 Y1rCfbhYZAW6xpcxKGDwJbf25VxA4ePurIm0CnhQgi9zyLIgJc5pSh7YrXh9cTtQS224 8R1wgMb+UIEveVcM2fLxiXsLD7m8hSOvH7nqB27Ydxixji0IRExtL2cKwVSVpdvWfmJ1 NCyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768380574; x=1768985374; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DHzo5vnBquKF32S2JW9TXfWUEIvitY0LZE/EnC1pjcU=; b=a/la/rGwBHsKfX9KLwcu4/ZRi2o2UEg/dSG+NkL7F8pcivjW4q5QyjVUdEY+yeL7tK 1+tWQ5d7tzdAW/JMOcrNcftpr6inqfaBcxorV8y2J6BEpjo18w2/d06iu7S7/48GG+HK bPs0lNbMsdPrOwnlzOZxsKXuJZ0YPIGmsr4xHXK788Yiah650MUBohgU8K+/Jr3GSfXB 78jL3BnNQ/AufqUUNWGiMOuVGyzIiMC4br0HxukoeW/csDak1cZfrWrnZnaxIDojd7rh 8aWdKaW2DfWTVcO5RMLLmVf4B7smZGsk8vmke6n1XeqpY07RKTv97Xo0Ozf02IxxB/1C UuDw== X-Forwarded-Encrypted: i=1; AJvYcCUwn1D9vFYgFyKT+Cc0O7V0W5BxSxliFIgrq0bLWRCjFxpddc5pzdk6spP4Fh6yB4Uc8Ng8B7ekOa7X0XE=@vger.kernel.org X-Gm-Message-State: AOJu0YzLzZB9YjSzhnsJRMqmovN3a7Pbn6FoKklAiAnChnKpAroy+lNl +i0EkqxU4jgOxAhHtsO2Q28JH4Tr/JLP34YIbEfoPyGNQUWW7vBNv/zE X-Gm-Gg: AY/fxX5aHSnI3Ft1tW6Wqj3oZHOLDsi2HyMU5bZfmNJJJ5vmXR05I2BA6aHMksQNUaB bW0c4+Ifif0xeRH404/jcoiNBciWcgI02JyVHuQ6d5lm+zpj/Zy1ensZemFGU/yv9z8JlXElOC5 NgujzidT1TxLEEKRdXGwAxWwPK6Z7cwql5F+M9T+o7EKQmZpCrWHbsC1S7a/wj6YzGI4x7SVEJ0 hk4VbmDEBz70GWSCUqEm2YAertWWEn1lO/uM6kTJEvwy80TuZagG2xVe++HhU/+noY1tLFBeLFV 9SjzclGPzp+gcJVt0wJjl0JSo3z5ehv1g090hKU9VtErx/P0z4LQ8+MBLgMkbz/fr8NnUDAGM3A dYH+XdgwyOqspA4v4gaeEJ6AwEFpMtQZJbniCHojg6wvXchXoe3MdiS1AY+St2nHfmCA2RdO61a TiEjRxRYLzEWlCBZU9Uuu91J9R2oxArWSnGjVkKnhPeolIg+dT X-Received: by 2002:a05:622a:a8c:b0:501:49f9:7478 with SMTP id d75a77b69052e-50149f977dfmr10002871cf.72.1768380573946; Wed, 14 Jan 2026 00:49:33 -0800 (PST) Received: from [192.168.0.155] ([170.10.253.128]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-890770ce298sm175457696d6.8.2026.01.14.00.49.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jan 2026 00:49:33 -0800 (PST) Message-ID: Date: Wed, 14 Jan 2026 04:49:32 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] input: byd: use %*ph for Z packet dump To: Andy Shevchenko Cc: Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar References: <20251202033120.2264474-1-vivek.balachandhar@gmail.com> Content-Language: en-CA From: Vivek BalachandharTN In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thanks Andy — good point. Packet length is fixed here, so |%4ph| is better. I’ll follow this pattern in future patches (and can send a small follow-up to adjust this one if desired). Best, Vivek On 2026-01-14 3:37 a.m., Andy Shevchenko wrote: > On Tue, Dec 02, 2025 at 03:31:20AM +0000, Vivek BalachandharTN wrote: >> Replace the hand-rolled %02x formatting of the Z packet warning in the >> BYD driver with the %*ph format specifier. %*ph is the preferred helper >> for printing a buffer in hexadecimal and makes the logging clearer and >> more consistent. > You probably took one of the oldest examples of such a conversion done in > the input subsystem. > >> + "Unrecognized Z: pkt = %*ph\n", >> + 4, psmouse->packet); > The (not-so-critical) problem here is the stack consumption and additional work > for the printf() to parse '*'. To optimise that, static field widths may be > embedded in the format strings > > "Unrecognized Z: pkt = %4ph\n", > psmouse->packet); >