From patchwork Fri Feb 28 12:07:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 869427 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 C92C226AAAE; Fri, 28 Feb 2025 12:11:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740744716; cv=none; b=nLj5MIkTLjETqJ1KpXASxRE9zIo5TaciKNskwthRHZ3kwtcU6Gy1zbDbjb5L9Jkp8yeT2UNVRDb0cwiwgRoICFgWEyvgI06L3Q+oFNvhnR9+b9Q+70mZryjVi02Z4yo4CuejLWIPAGUvVcaCEnsfRmxHyuzH2L3ZsQqf96oMsHk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740744716; c=relaxed/simple; bh=iseyydn3166fxxMEU90V1J8zPR+ti7lo2U3jMW76PXY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NvdubhzoiUT8rqC5qUQ5ciWbJoYyUEPtb9M+FovVfAlFfrKmLtHS+xi01JGGR/nC640KGpMN16CunNIehlCIkGLSiC0DD5KgKXbTO/h5pNRVT2OOjGecpxn+DuBuzAOrfmJGZe0orM6R/tWxSxmhQ0gXXhm3rTOtzuD+KLQd7Ao= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mfeurIWd; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mfeurIWd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740744715; x=1772280715; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iseyydn3166fxxMEU90V1J8zPR+ti7lo2U3jMW76PXY=; b=mfeurIWd4Nufc/cMO5Dj60EiPThLFP16SXBM4E8Ohtb1qSJW+hPMMywV UiLJc9IINKJFKbVfEqUgo6mtfur0hGj+7fCujBVhirAcW6Kg1apLbM4Oa rKokuqlbTNSt6shpOrw6/Kho0vAVasnv/EnVBvfqEeA1uRWk6Vy3WgWxc 3LK528ojO+dnnZhOp7gZ+ke6k30G0+GysrPNvxJysWNO5DS3FtUGnRsaa ol0szzLZkleME0Yjt445V2BcqO1CNaXqU/5UW+olLjybV8yKI5UhNa7ie bELkTLXzY/JMgoKelTkUC78sAUTsadGVg7/qll0aEF/u33S5/e1mtcKSb Q==; X-CSE-ConnectionGUID: yT/naTqCTgyYYUxbaKrVVg== X-CSE-MsgGUID: SAYXLnFXSMeMR4oHduV2RQ== X-IronPort-AV: E=McAfee;i="6700,10204,11358"; a="40846708" X-IronPort-AV: E=Sophos;i="6.13,322,1732608000"; d="scan'208";a="40846708" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2025 04:11:52 -0800 X-CSE-ConnectionGUID: NRbvSAkNSZe8jINLZntKXA== X-CSE-MsgGUID: 514ykL25SDe0PoJVUFHAbQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,322,1732608000"; d="scan'208";a="117081034" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa009.jf.intel.com with ESMTP; 28 Feb 2025 04:11:50 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id DB3A4297; Fri, 28 Feb 2025 14:11:48 +0200 (EET) From: Andy Shevchenko To: Dmitry Torokhov , Andy Shevchenko , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Pali_Roh=C3=A1r?= Subject: [PATCH v1 1/4] Input: ALPS - increase size of phys2 and phys3 Date: Fri, 28 Feb 2025 14:07:44 +0200 Message-ID: <20250228121147.242115-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250228121147.242115-1-andriy.shevchenko@linux.intel.com> References: <20250228121147.242115-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When creating a physical device name in the driver the snprintf() takes an up to 32 characters argument along with the additional 8 characters and tries to pack this into 32 bytes array. GCC complains about that when build with `make W=1`: drivers/input/mouse/alps.c:1411:9: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32 1411 | snprintf(priv->phys3, sizeof(priv->phys3), "%s/%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | psmouse->ps2dev.serio->phys, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | (priv->dev2 ? "input2" : "input1")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/mouse/alps.c:3106:17: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32 3106 | snprintf(priv->phys2, sizeof(priv->phys2), "%s/input1", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3107 | psmouse->ps2dev.serio->phys); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Increase the size to cover all possible cases. Signed-off-by: Andy Shevchenko --- drivers/input/mouse/alps.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h index 0a1048cf23f6..9c8f69694f60 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h @@ -287,8 +287,8 @@ struct alps_data { struct psmouse *psmouse; struct input_dev *dev2; struct input_dev *dev3; - char phys2[32]; - char phys3[32]; + char phys2[40]; + char phys3[40]; struct delayed_work dev3_register_work; /* these are autodetected when the device is identified */ From patchwork Fri Feb 28 12:07:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 869428 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 3FD9826AA8C; Fri, 28 Feb 2025 12:11:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740744715; cv=none; b=GoUD5IYzpqRbxTkbHKlSPhD7ClWBX7PK97Cjtqh58xPrPD5b8JVjjhGb6mInxtdkmqRhqNLebhxEjfQy6/mJnsIl49NcD6NcmP5HBallAS++YQ83k/5T9EPslmv8WkiasyZgVL8gzljQ+NCDeUckIY3nz6/NErLzBWM0MFQUElo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740744715; c=relaxed/simple; bh=CLFBxsr69As2ZgbigsO7Hmp0XbIPxom3MMFTr70R99o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s5gF6BuayZJQgoo0dp0TbOzk2kXvTjhJ3ZBdJEwecC9jYe6FlFAfVEYvxtfS8KWgx1329bxVF+fPcaPg0hjIkdmPbs3BSAy+75zlwnvVjWCcWgyjkvWSOvAcBdcrgNMEYyMtWl8JXyhsr8n3Hak5jDJK38Yxg2IemmuRmeKGUD4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HoOdut9x; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HoOdut9x" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740744714; x=1772280714; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CLFBxsr69As2ZgbigsO7Hmp0XbIPxom3MMFTr70R99o=; b=HoOdut9xdWQCblRiGYHFWdYemNMv1ushrRNTlOrEHs7u6S3OEfHRwi3+ xgn35eI15eRKbT1Ygg2bLR/eh4poWPNc/AhI3llOlNucsKAxF1RQERMHc oLgso2em3f1C3Xt68nyI2QnxWgJkn/jGclKULVPKde2/6WnVJMLO5WPJd oobaz73FDqTxmV9sCSQux30XLdku7cQVrb/hBzLvTBWijAGxd4iLgdM8l t1YwMAEhfICUeGY0ud3hCDcH3UT8FfdOua0XR5D8aak54w2INEbIArNpg m/kSOvw5PUVn6ibGB7pUlqf5/9xti4PBPcXA/x4UwK+GtkDChg+9MyrLS Q==; X-CSE-ConnectionGUID: Y1tA1EezTZGcLaIvHfPOGg== X-CSE-MsgGUID: mmmCrPAwQUOiDEdsAsXSjQ== X-IronPort-AV: E=McAfee;i="6700,10204,11358"; a="40846705" X-IronPort-AV: E=Sophos;i="6.13,322,1732608000"; d="scan'208";a="40846705" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2025 04:11:52 -0800 X-CSE-ConnectionGUID: KEkkcrigS0ioy0DvUjm+pA== X-CSE-MsgGUID: L2A+yJ+KSWqY38dCBM/v5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,322,1732608000"; d="scan'208";a="117081033" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa009.jf.intel.com with ESMTP; 28 Feb 2025 04:11:50 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id E653B5F5; Fri, 28 Feb 2025 14:11:48 +0200 (EET) From: Andy Shevchenko To: Dmitry Torokhov , Andy Shevchenko , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Pali_Roh=C3=A1r?= Subject: [PATCH v1 2/4] Input: atkbd - increase size of phys Date: Fri, 28 Feb 2025 14:07:45 +0200 Message-ID: <20250228121147.242115-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250228121147.242115-1-andriy.shevchenko@linux.intel.com> References: <20250228121147.242115-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When creating a physical device name in the driver the snprintf() takes an up to 32 characters argument along with the additional 8 characters and tries to pack this into 32 bytes array. GCC complains about that when build with `make W=1`: drivers/input/keyboard/atkbd.c:1194:9: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32 1194 | snprintf(atkbd->phys, sizeof(atkbd->phys), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | "%s/input0", atkbd->ps2dev.serio->phys); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Increase the size to cover all possible cases. Signed-off-by: Andy Shevchenko --- drivers/input/keyboard/atkbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index adf0f311996c..3bf76dc768be 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -206,7 +206,7 @@ struct atkbd { /* Written only during init */ char name[64]; - char phys[32]; + char phys[40]; unsigned short id; unsigned short keycode[ATKBD_KEYMAP_SIZE]; From patchwork Fri Feb 28 12:07:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 869767 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 7E85426AAA1; Fri, 28 Feb 2025 12:11:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740744716; cv=none; b=Y2to6WKr9MWAqY8cl6C+vBdLD3GQgX2ZB1SIDFhQoJtwVBcVCKTUhchkgAMU6iW2isD01uKCuVz37jcmaIsjKZ99F9f7i4v2rX/fOcTXmEBA+oCE5TYCX6U5oYnFhYMJiMmG0MPtUwiM6n4tj2Z3VHn0z2ldZI4cjtfYRg2/7uc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740744716; c=relaxed/simple; bh=4V0n3DIxRuCjsSIt2VNFo1xATqFm0YNwHI8ecDrJdUQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SgJStTjlKivbVxp5NDCSmQtRRo5z5d5K3APFm+PMBOE/gHaYyGWmrK4BI5pGfszsNjMf1L9fLSSH4nCjkU+w1hgv2e/XLrkpcnM2+af3//3Mutr3zl4OeU6sA2xIBz/QNQwiv4YZI5G/1CeM5nePnybC0kG/LVCp4rg/KiQZVDc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gnlD3iXN; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gnlD3iXN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740744714; x=1772280714; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4V0n3DIxRuCjsSIt2VNFo1xATqFm0YNwHI8ecDrJdUQ=; b=gnlD3iXN0nOEwU2FUDRYg2ibAIxiefhFP4Kz8/rImnuuacoBq1S+bpsd pbRoVoGmOGcWqYt+tf0a8dDPg8NXbYKm8saBMmJpoCId2ZFxfm6BvsPkC JyN/Vu1dH2NkU6GNzP25mtKJxtM6Q3YZh91cjVBp+chsaUBtMz2SCqxLg eNR4aBzpklSaP6cvOuTBIOcG8Yl7Kl5yUUltqj6o10l5p0We285qGwAo0 MHEjoCKe9pDPaTDJzm3y1tkANCZ0nEAVK7Yv+oBdtPREj9bWyuSIDRRTm dNaZw+8eooYk4QHYvA1p4qUAI8XxzBTBp7YX4hJFcViXC1lQCLEL3Fd8W Q==; X-CSE-ConnectionGUID: LeC0KD4TTH+VuFrXVn/vWQ== X-CSE-MsgGUID: vHMl/UywQC23OrevYHippQ== X-IronPort-AV: E=McAfee;i="6700,10204,11314"; a="53081097" X-IronPort-AV: E=Sophos;i="6.12,310,1728975600"; d="scan'208";a="53081097" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2025 04:11:52 -0800 X-CSE-ConnectionGUID: dr0MAJ7jSeu6yjo/zbhw/Q== X-CSE-MsgGUID: VsktOm7uQn6zUXZP2rj4Jg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,322,1732608000"; d="scan'208";a="122269272" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa003.jf.intel.com with ESMTP; 28 Feb 2025 04:11:51 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0653C909; Fri, 28 Feb 2025 14:11:48 +0200 (EET) From: Andy Shevchenko To: Dmitry Torokhov , Andy Shevchenko , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Pali_Roh=C3=A1r?= Subject: [PATCH v1 3/4] Input: lifebook - increase size of phys Date: Fri, 28 Feb 2025 14:07:46 +0200 Message-ID: <20250228121147.242115-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250228121147.242115-1-andriy.shevchenko@linux.intel.com> References: <20250228121147.242115-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When creating a physical device name in the driver the snprintf() takes an up to 32 characters argument along with the additional 8 characters and tries to pack this into 32 bytes array. GCC complains about that when build with `make W=1`: drivers/input/mouse/lifebook.c:282:9: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32 282 | snprintf(priv->phys, sizeof(priv->phys), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 283 | "%s/input1", psmouse->ps2dev.serio->phys); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Increase the size to cover all possible cases. Signed-off-by: Andy Shevchenko --- drivers/input/mouse/lifebook.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 7147dacc404f..628a1b36a5da 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c @@ -21,7 +21,7 @@ struct lifebook_data { struct input_dev *dev2; /* Relative device */ - char phys[32]; + char phys[40]; }; static bool lifebook_present; From patchwork Fri Feb 28 12:07:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 869768 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 BDDD426A1CD; Fri, 28 Feb 2025 12:11:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740744714; cv=none; b=RTbJ+5dOB+X/SZjnjr2WMLgzWqWFvXvXcyOQxfk/HNfCWvKiRauxyYo0dH7r0d62PQOwla07C/VLXjcjOrpu1W8WtGcZ/7KiNBhrunkdNSDQHTcjG3/iOnf98cuoc1cf8tas/Q/EWzXZ+ylbe8KCh0E+CvrHI2HwhKVAIZEqY+Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740744714; c=relaxed/simple; bh=Y8RqZ3t9ywshjp5E7qOrtYjFw/yYF3Z9guCEKfl0Jos=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RCQf8m/ESXKBLQuJISLdfevoe4+S0gQWDzNSigxeyyvZdPqOWy4XvcdXwgz/AIqFo38qwSKJpLKEwfyrU10Afp14uwGKUIEziFZBFmwcBflk67Lb+SkMNmoEadgS1yDkiGcZl4cNyvmfP0d9XfNpjhXmgTRZVhc6HiMQc5Ixl54= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bat3hfc4; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bat3hfc4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740744712; x=1772280712; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y8RqZ3t9ywshjp5E7qOrtYjFw/yYF3Z9guCEKfl0Jos=; b=bat3hfc4wGuGzJ6aIf+R5Hs2sE9nD0xk0TL3+Og28naq2GPiLzzP8uQl pFb5e59EoLNRKiGSWO2D6rR3ahfLy4p7Rrg15Wm1vxbEL0tPhTJQw+Gb9 zNYf4kz+BJOLfDwLBXI36oLMz2gkKb6W+gXNMpekJ19Itdh2JA2ioUItW m2u0zuD1at2iBnSS1cg0SV8luNBFWAM0y3BUonaAVjzUrHyvtLvKmH6Z3 JY0feRe9eGw0JsnW9FOMnIzJhpPs4jQPUGXAy9PsSiGEeMZQzNCxwnlrk XqZ3pYiZM9V9RY/HwD0Fzcx4071yH1PuPz5BFN10FhAGB6qvMC3dLh9k2 g==; X-CSE-ConnectionGUID: Z5smC3a6QWO14uUQhy+OWQ== X-CSE-MsgGUID: HZSinxloSAWsbryGRHTGKQ== X-IronPort-AV: E=McAfee;i="6700,10204,11314"; a="53081089" X-IronPort-AV: E=Sophos;i="6.12,310,1728975600"; d="scan'208";a="53081089" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2025 04:11:51 -0800 X-CSE-ConnectionGUID: IQm4dq1lRwmxCDs4uCTKqQ== X-CSE-MsgGUID: vxQVbooORLWMbeYV1YwavA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,322,1732608000"; d="scan'208";a="122269269" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa003.jf.intel.com with ESMTP; 28 Feb 2025 04:11:51 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 10C14772; Fri, 28 Feb 2025 14:11:49 +0200 (EET) From: Andy Shevchenko To: Dmitry Torokhov , Andy Shevchenko , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Pali_Roh=C3=A1r?= Subject: [PATCH v1 4/4] Input: psmouse - increase size of phys Date: Fri, 28 Feb 2025 14:07:47 +0200 Message-ID: <20250228121147.242115-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250228121147.242115-1-andriy.shevchenko@linux.intel.com> References: <20250228121147.242115-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When creating a physical device name in the driver the snprintf() takes an up to 32 characters argument along with the additional 8 characters and tries to pack this into 32 bytes array. GCC complains about that when build with `make W=1`: drivers/input/mouse/psmouse-base.c:1603:9: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32 1603 | snprintf(psmouse->phys, sizeof(psmouse->phys), "%s/input0", serio->phys); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Increase the size to cover all possible cases. Signed-off-by: Andy Shevchenko --- drivers/input/mouse/psmouse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index 4d8acfe0d82a..8422ee8243bb 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h @@ -107,7 +107,7 @@ struct psmouse { unsigned long num_resyncs; enum psmouse_state state; char devname[64]; - char phys[32]; + char phys[40]; unsigned int rate; unsigned int resolution;