🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7493

Re: [PATCH net] net: dsa: motorcomm: Fix function parameter types

#7493
From: Andrew Lunn
Date: Mon, 26 Oct 2026 12:41
15 lines
8659 bytes
On Mon, Oct 26, 2026 at 04:32:48PM +0800, David Yang wrote:
> yt921x_fdb_add_index_in12() mistakenly takes the two register images
> as u16, while all registers are 32-bit wide, silently losing the upper
> half. Widen the parameters to u32.

I'm surprised the compiler is not warning about this. Have you tried
building with W=1? or W=2 ?

> Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x")
> Signed-off-by: David Yang <mmyangfl@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Technical Details
Message-ID: <46921fb6-e89a-49c8-b15d-eba8d3eb3f8e@lunn.ch>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351898-linux-kernel-netdev=dewy.ru
References: <20261026083252.12684-1-mmyangfl@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351898-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: dsa: motorcomm: Fix function parameter types
Date: Mon, 26 Oct 2026 13:41:47 +0100
Organization: Usenet Network
Message-ID: <46921fb6-e89a-49c8-b15d-eba8d3eb3f8e@lunn.ch>
References: <20261026083252.12684-1-mmyangfl@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1307767"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:+NhM7/dsv9DTN/0tDxCmP4uxEx4= sha256:Im9VghPErbYRxMxlx02GpKdeGQTUqLZnhuB5hJX5EHo=
	sha1:UfXK9L/aX8kRKNeQ/e5GsFDwTJU= sha256:vvGEpPghC5Awo3Rf/F8vfy+IKunVtaXnwBLcQlNO2jM=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 5063D125BA9; Mon, 26 Oct 2026 15:55:00 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=lunn.ch
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id KaTaPQTr7par;
	Mon, 26 Oct 2026 15:54:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-351898-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 18D2A125BA7; Mon, 26 Oct 2026 15:54:48 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 329B82AC4A; Mon, 26 Oct 2026 12:41:59 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793018516;
	b=KYQ+b1Dx33yxQrkEmTF467/7825Bga/BzY4W9B3aUF3dV02wdGphZ9i+FduVmPaBYSow
	 U1quTX8gH5+4ragTZEOhkHolY3tEn4Ah9/Cz7v2k3T8hi0Q+7zgTMC3xXMlnXsXPuerTu
	 9MXcrowTLAt4bdzdAUysV2DqfovocvFkpa+8a3/gicL2Q9C8CbKre3QEXeA9TpDRc5YW4
	 UvYxLxGQB9ULcUtoL7VLn1bxpKlp2FE61iKkxHZUQFfqeSuWnf1iA5hnUKwhANhUMbio7
	 VxxcOBu2sJzMOyiDHKTbPR6k3+nEVkmBtN94Ovjh3mBtATNI3CdzIDHDF2IhQt5G6pA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793018516;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=KO7AYtEHal7/gxD3bZY/yRpvMfzoftniypepjR/yBzQ=;
	b=BQ3bBR6VpVdV9KgLpcP0Yua5cptEgRwJX7RHUYcfbxEvTniq9s1q6WHy4zagJGVmFSz/
	 P6BcVPW5XvG1OWbK3sEOIXRyIOV1B68dT9poyWYgryGeZV2uIvfFV6i7mBlYYVWg3zWl9
	 DY5Y5FTTEvyuc7QShrsiiq7wxVgDjXAgt21prXjJOVso5RBIPhXyZ61zrv797yPHm74m/
	 6BdhCposb3mXpDZg8YcueIjTBo6ydE+iY7K098hy8/hST7zhc8/hVj3nSofD4KMhmDC7G
	 vtJgxkQOj+dObXMhljI+DavBP8f5ghETPOyqd0MRZm4pAo1Y+fl1Em6xYSFnZg2KZtQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=r6x+pAn3;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B64D606A324;
	Mon, 26 Oct 2026 12:41:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=r6x+pAn3
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793018515;
	b=dZyjEjYZPuhh5e+PtPYIKlv/PjrhVEhq4EKOeXsUzsKS/5UUlXEOsmyhBSIBDA7chhEG
	 YglAIMUYnBuJRSPh4thrJA2RhNRWe0kgGVfOrbTeSRi1QfmV+48EwqUJlfEsoafKlomOF
	 b1UMsKZbnBIkyLuUSBn1RDQpPGM2O3CnAtclEfjvWIFvTfqRnvgnKHj6+Z6P5zviDR63o
	 uXAA1Z5b7i7C5kFkUzjyE7x7S5/nGI47sJnpE2GBlpUlfZINYvWlX/pYPsyN+CXrf7v8w
	 5273WZrBTEIexOgCBtsPUWHnQZNt4En3qJw5qvSqbg9H+PF+NahbICPvReMUu7Ni3Mg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793018515;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=KO7AYtEHal7/gxD3bZY/yRpvMfzoftniypepjR/yBzQ=;
	b=G0Gfe9kFgzD1iklOwhdOCzbWLgVTI+lN4nn7k/18TezS3phrIjGxr+l7sqO3jaUT1+ki
	 9KUjTUv6v+9IUHIihQA5zATMN50YLLzodq65hKjwb6ef19/SWXgePBXrxdGKBSScnaLIv
	 o1ZByr0d1fS5nW0RkbHhjYwKPXVv+BOyK20gany2E0d9SMn1aMOiNjKrGPKd2p9hDXfMS
	 ++Q+Mra0eagdnUYqStZeYchbaQFoMwRuvflV1MM5OchC31RJ+UiD+sLoY6wLr20KT9uUX
	 /XX01CFNHzraKkRGjKGmiNtJJB3jnWfDW1xY3VI3ZAG5UawYjVFnM91i+lcWd2UQCNQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=r6x+pAn3;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38AAE606A31B;
	Mon, 26 Oct 2026 12:41:55 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 38AAE606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=KO7AYtEHal7/gxD3bZY/yRpvMfzoftniypepjR/yBzQ=; b=r6x+pAn3/3SnE4lLsyaHXEwvxg
	/d+P3KMrgPP0jUVmei8RNTPdbQ0cOBhVfKbtikmsd+RhqX8aOD1SmkrefuiLVhhvWc/nFDL5ViXA+
	tOvuXuAPDoighu2Ox0apsNs3b3BbsVEJzltMqtkdySK1svrEhKErqzlM0fP3XgPL00Dc=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xLK1L-00CnVL-Ae; Mon, 26 Oct 2026 13:41:47 +0100
X-Cc: netdev@vger.kernel.org, Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261026083252.12684-1-mmyangfl@gmail.com>