From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757571AbdJKOCC (ORCPT ); Wed, 11 Oct 2017 10:02:02 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:25489 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751657AbdJKOCA (ORCPT ); Wed, 11 Oct 2017 10:02:00 -0400 X-IronPort-AV: E=Sophos;i="5.43,361,1503385200"; d="scan'208";a="7846211" From: To: , , , , , Subject: RE: [PATCH v2 net-next 1/2] net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging Thread-Topic: [PATCH v2 net-next 1/2] net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging Thread-Index: AQHTQcZ53hZuvJZOKkWy6iLYvoiTz6LdMGTQgAB68ID//429cIABizYA///qvdA= Date: Wed, 11 Oct 2017 14:01:57 +0000 Message-ID: <9235D6609DB808459E95D78E17F2E43D40B4A47B@CHN-SV-EXMX02.mchp-main.com> References: <20171010124953.386-1-privat@egil-hjelmeland.no> <20171010124953.386-2-privat@egil-hjelmeland.no> <9235D6609DB808459E95D78E17F2E43D40B48C3D@CHN-SV-EXMX02.mchp-main.com> <2d03fb99-fd1c-9a0b-3274-eda605c3eb2d@egil-hjelmeland.no> <9235D6609DB808459E95D78E17F2E43D40B48CC6@CHN-SV-EXMX02.mchp-main.com> <20f8c457-0f61-641e-a12a-7c0bcf2fba21@egil-hjelmeland.no> In-Reply-To: <20f8c457-0f61-641e-a12a-7c0bcf2fba21@egil-hjelmeland.no> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.10.76.4] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v9BE2D3O016573 > >>>> @@ -644,6 +648,10 @@ static int lan9303_setup(struct dsa_switch *ds) > >>>> return -EINVAL; > >>>> } > >>>> > >>>> + ret = lan9303_setup_tagging(chip); > >>>> + if (ret) > >>>> + dev_err(chip->dev, "failed to setup port tagging %d\n", ret); > >>>> + > >>> Still move on when error happens? > >>> > >> Good question. I just followed the pattern from the original function, > >> which was not made by me. Actually I did once reflect on whether this > >> was the correct way. Perhaps it could be argued that it is better to > >> allow the device to come up, so the problem can be investigated? > > Maybe depends on severity of setting? > > BTW, lan9303_setup() still returns ZERO at the end? > I did quick survey of the _setup functions of the other dsa drivers. > Some return on error, some ignore errors. > If you think so, I can make a v3 series that return on error. Otherwise > I leave it as it is. Unless Andrew, Vivien or Florian raises flag, I guess it will be fine as-is. Thanks. Woojung