From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 640D230216E for ; Fri, 14 Nov 2025 09:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763111253; cv=none; b=maxwfx+D3qOPAmvfXrqtjatgjAsbFq6T9HZoR94dyAhBaQiW3v/N0bBAcYUQspTrGI9xQNi85iIyI70HrWdft8LSlhJRfmTbGnFHMpu3B3B7cD79IhnqXgNmOr3xnGcNbNvB3wAJvfH0bF/BmDRzZP4G0hNsoZxli2t6QBnkudc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763111253; c=relaxed/simple; bh=JSs1H0agWCrllX0zoQ2RL3I5lwImx1IPLl+3KiI90Os=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E+pKl4Uxs0E16tHPVuimuyik8LIbVclOakK7kj73fEO1n4AT1KSTxU6ncGoHr4SZm3F5IKDRBmCHnX9MIrnaa2VPPEjHKVbYXA5uJP/kftL4ki4X9Uoma+KC3TLucd/ZJHoL66YnMQkgT/8ZhsJFPn0EmOVRBeqrtBwK5vl8Zz0= 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=nMGmbbxM; arc=none smtp.client-ip=209.85.210.179 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="nMGmbbxM" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-7a9fb6fccabso1366501b3a.0 for ; Fri, 14 Nov 2025 01:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763111252; x=1763716052; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2rYHecsq4zvxvYBq75VRFVLEWv3/K1IVEP6Qf5yN8cw=; b=nMGmbbxM20gInv957Miu6DoXKryX7tpTPA+KiZJbreuV3fnX22uSPH01wEoBncqDsG FCAjzVr0BcJoKsbvKotF5+G/QLKD0FEZOPdLF+0p0olOGDWmUIVqWxvm8QWGPW78M4L4 Pl7b6KSwFjUwaa1AIBAKlkHvAgiCuHmF2vwVKaorQU4CVrVJQjTYZ4Dov4wXBDy50Whs mH1bSnI+ezR1D7m/3P7Xshky7SAMBsg5LR9Y4O9r6qZaBj4pjqhh4xxyRdd4NrGFw34f 0JhUD5i5YJtY+JsWG1RhxfQyGarbPQRaYMWTbEdk/CJYy9x5mH1JEiLrzg5juzKQdcAq 9nCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763111252; x=1763716052; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2rYHecsq4zvxvYBq75VRFVLEWv3/K1IVEP6Qf5yN8cw=; b=eMR/2Ta66Ke1wSQxVGZUYziFNZELQ0vwW5gC/E9ITKwFGADKaAJ0arEpyu48Ob0aBh E1CscP3bdsN1pUm9rhgEt2fRm1FbHJp6nceOqYMUDLXDwKA9WHzcW0jrXxceb1NZfMTN Xyq2POmVnoDV/5QFQhaVcMgXKtS1S1GR5svv3mmwXnSGgytnXDS96EyfhXi5+ZDL0cns p8wL3xsay8KoJhK+uFvMGSqX3QELZIW3SIT1diWk7lYpttnDuj+lc8uRn3+uiNWyqQgu P54LecrOz6bFgXPv/ngN4awRZAQ+mcYBX1Yl/5zd+UAOKsQgp0UoWFCvMEOUZfvBBVpb gYCA== X-Forwarded-Encrypted: i=1; AJvYcCWm6C6t4BCECV3pbaQ5zpoKVgxvdHlSYYxabgK9MyFQYOXj/jfSjb+4Q6reI6bXD0pJnQWUr6HRYf/98as=@vger.kernel.org X-Gm-Message-State: AOJu0YzY3ZWvdQEVFDGrawFlhn2rFxv4k3ovFuERKxEUS3LayJbZ6pEv g/wVQxly0Rm9CtzWdudgl6XmSYOg/81CXefFxqnR4IIwgjfq6mdaJeSQhrgooeym X-Gm-Gg: ASbGnctq9E75TZkvwJ2iH3m6YRG9A0nC9ajIdz+g/5BttvGaoU9ihGcpTjhFCFwFT2D K+yddXoRAgZxxH0EZcgTPGt5l3kuAVyLxnvh4andsowPUdZjpFVtddK72RpCfDAQjIDeWmmU7sN lo3YIZucz93ZBu7oZ2zEkLvBYmPWowVyo9LQ3OyGDCtUScAW63pI28YID7mDITaCHL2f4yZbvZV J8lUsZUG0t5YB/5Fbfuocwv4henReult83u+uVjwtugLA2sp78ibj75z38ok0B39opIw4tuCK66 tStA7aSPUAr84o3r0w6LbxokB/7RmO5XM643Rt5txrI1GiuJLnW087rTc26VQUxLatB8WqfdmMo zFJIOYXlstc1CSZDkEwPVf6xiq+qhabNtucYIYlL60fOmxYuiE3CHlO8hW6puEhLsl+lCFfPVM1 o= X-Google-Smtp-Source: AGHT+IF1HyHMzrr+Mh1xwS8BniwAv9DG6MkLy9OtJ5wmhJOlJxohZkmPSeXsb+2DhZbbA0kfQQDTTQ== X-Received: by 2002:a05:6a21:33a9:b0:35b:5127:d4db with SMTP id adf61e73a8af0-35ba259d9demr3424696637.53.1763111251549; Fri, 14 Nov 2025 01:07:31 -0800 (PST) Received: from fedora ([110.224.242.132]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7b924aea0f8sm4629086b3a.5.2025.11.14.01.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 01:07:31 -0800 (PST) Date: Fri, 14 Nov 2025 14:37:20 +0530 From: ShiHao To: David Laight Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, i.shihao.999@gmail.com, kuba@kernel.org, linux-kernel@vger.kernel.org, mchan@broadcom.com, netdev@vger.kernel.org, pabeni@redhat.com, pavan.chebbi@broadcom.com Subject: Re: [PATCH] net: ethernet: broadcom: replace strcpy with strscpy Message-ID: References: <20251113082517.49007-1-i.shihao.999@gmail.com> <20251113192218.3c17dabc@pumpkin> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20251113192218.3c17dabc@pumpkin> On Thu, Nov 13, 2025 at 07:22:18PM +0000, David Laight wrote: > No one really knows that TG3_BPN_SIZE is in any way related to the destination. > So this doesn't actually make the code that much better at all. > > Since tp->board_part_number is an array and "BCM5717" a constant I suspect > there is already a compile-time check that the string fits. > The strcpy() will also be converted to a memcpy(). > > So all, in all, this makes the code worse on several fronts. > > Davidi Okay. I got it thanks for your time david.