Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1888945lqg; Mon, 4 Mar 2024 06:56:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFurzXarnPYTB3YpwN1kV8VM53eE6/2k5kjkcttNrXUlJSrz2J2s4RxYlolWDjOas6m7+H+n2CEVZzNFbP0mBo43KlXy4XzijoW8Z8jw== X-Google-Smtp-Source: AGHT+IEgp+ug1RKUXVKh3aC1BJNYiskhvKlaqOg862mWQRyUgJo76l6mBZ7CIU9KT/zHoMNH3HkG X-Received: by 2002:a05:6a00:1898:b0:6e5:696d:9eb8 with SMTP id x24-20020a056a00189800b006e5696d9eb8mr12581387pfh.3.1709564164839; Mon, 04 Mar 2024 06:56:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709564164; cv=pass; d=google.com; s=arc-20160816; b=qzuQbr5RN7mex2pZpj52qp+yuMztmkPthqzST50mvvNx+u2qXxmbprR03nYNemkKFy TK/fbDoB+b7eHzSKo3zJyKQEY2MWIoGnkMMka7VqhFjoAUb7dw7+NdEI6hLQDX/884iN 66ieCaJfzvNjxI+3wFq2BfmT8SABqykomJX1hUc03B80WMKB3gsPvWw6M/gVcGLz22cD 6s3ZV79MMAhUNFj4VokbBgZvXNC5cV1Lq7mBPv1Lc64h+fALhHdKGqz0CuwnYqPfTetT N6rLW19VWQgA3pCXbIY1UaHjPmn6+nLZpLYuPzqOk40oorz27tlzFJbNr6btERDPVAht 1+Pg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WvR0p5GSCXE5oGgnR+uiY4hoWKU9F5AvnkOVWd0PDnE=; fh=39VYHzi8PyqNjCr1Qa7OIwxfZF9vu+ThR/2mG1L5TUI=; b=q3cphsIdHDJ58eujNZKJi0F4eeQOcu7KLiWNiPjqtxeomKAflN4CapY/n6MXpcxCL0 BVYvL3sVeWrVf7m3GFcwGFDxmUCk0FQ4j7wqXNV71yt5KSs04Zt3PNtXX67IxjarLtor WnyRfmwH0KBjVCQlRA5DdomjZS2fcm2ytR5kkxnA+16hB3Mlq9ZPvvXrlqneubN9JNuh 4QJHBUlO3Jm/++lgMEMljwUJO52/rPiZLNZJVga6hM5Ro7dTbOMxcgn7KAc+82u0eO89 F1p2V3BaxdaA06egFZU96OoNqdRBu+jshlaCummJ8Qb8mPXBgHG/0JTfFE69p6mC8TFP zXQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=h2FcZ3z0; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-90727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g8-20020a056a0023c800b006e5b1c6a755si6942238pfc.107.2024.03.04.06.56.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 06:56:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=h2FcZ3z0; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-90727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BC73CB263E2 for ; Mon, 4 Mar 2024 14:27:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2717047A6B; Mon, 4 Mar 2024 14:24:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="h2FcZ3z0" 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 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: linux-kernel@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