From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 A16444778C; Mon, 4 Mar 2024 14:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709562294; cv=none; b=WGVwbNTkCNqfLqVSiwV8wE3N9sTng0e7mDTWARx2XY4nqeUQKSLm25YsONR+FomJ+J7ek4dH/iALeFJum3vUB63f/eHiA/6BCjRG25nv2pODGgBiCyjARB6KATOKJ1t8WhVC7FlZFED0z6ZOcovDCslK52SJURf3xKkch+IEJVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709562294; c=relaxed/simple; bh=h/9zy1KugOLjtiNSUOCUhZpas7KS/U8qnts/rcA91wE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DYGUjbQQMQxCpUizVkAfBzWdTwEmf0YjL4ePStpkkSbw/rtb3Vpy3AyqihLoFoQr0E695TN5JZLhmAsbvpL6f5hM5W/kMwTq+tC0wgUzLytf3UPXPPKFadUdfxGG+tOzpREfD5YUPC4tD1LcKyqxc0x5yMgqS4LjepHZKwBBrLE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=h2FcZ3z0; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="h2FcZ3z0" 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=WvR0p5GSCXE5oGgnR+uiY4hoWKU9F5AvnkOVWd0PDnE=; b=h2FcZ3z0dUPVTukYzDQK/5txj1 19hQ59T/ECG2s3P3MlPRQQSgzylJDpuMJuj48E4CztOahuz9sBniUwzVGPk3igqASPjUqyyqnxDqm mImJyChKkzqDec2PlT7cyWd0NaK7yU6D1fxDBbEZ1Zbn12pylBGaBHRZjzLBMm+d3hV0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rh9FP-009Kbn-AK; Mon, 04 Mar 2024 15:24:55 +0100 Date: Mon, 4 Mar 2024 15:24:55 +0100 From: Andrew Lunn To: Lukasz Majewski Cc: Oleksij Rempel , Eric Dumazet , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Tristram.Ha@microchip.com, Sebastian Andrzej Siewior , Paolo Abeni , Ravi Gunasekaran , Nikita Zhandarovich , Murali Karicheri , Ziyang Xuan , linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: hsr: Use full string description when opening HSR network device Message-ID: <3f2fc5cb-8c79-4e8a-b72e-edcbbc78971e@lunn.ch> References: <20240304093220.4183179-1-lukma@denx.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240304093220.4183179-1-lukma@denx.de> On Mon, Mar 04, 2024 at 10:32:20AM +0100, Lukasz Majewski wrote: > Up till now only single character ('A' or 'B') was used to provide > information of HSR slave network device status. > > As it is also possible and valid, that Interlink network device may > be supported as well, the description must be more verbose. As a result > the full string description is now used. > > Signed-off-by: Lukasz Majewski > --- > net/hsr/hsr_device.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c > index 9d71b66183da..9a60489fba96 100644 > --- a/net/hsr/hsr_device.c > +++ b/net/hsr/hsr_device.c > @@ -142,30 +142,29 @@ static int hsr_dev_open(struct net_device *dev) > { > struct hsr_priv *hsr; > struct hsr_port *port; > - char designation; > + char *designation = NULL; Thanks for splitting this into a patch. Reverse Christmas tree. I know it is broken already, but we should not make it worse. I guess you can also add a const, since "Slave A" is probably const. Andrew