Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp316138pxk; Thu, 24 Sep 2020 06:28:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq/kO2JUIN1FZHawCU0aSssV/ZSl7ewLZw3HI+BBdnedIylOoAj/d7Ah202m7rTMyBykNh X-Received: by 2002:a17:906:c2c5:: with SMTP id ch5mr1058647ejb.183.1600954129738; Thu, 24 Sep 2020 06:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600954129; cv=none; d=google.com; s=arc-20160816; b=V+q3HLFhHXI3GTxNTVkwVv5mzZszaXdFyM1Zzn8VLp+CkU3UkxIakUC19xYPIh/0LX z6yTHvpQ9wpkLANvT5HOVQ1qsHC/vK/A9FLdyJ6KrY1Xq2dY49vu0F/tl5brc/IcL2cs 6ZlbyDasBrcxl6of2bfe5QfZph1mDsrY7azrp2MBI9rBKZy3UnANAcqZhg+snSgxpTHQ N/3UH159Xa53dwv6ZNeIObJWOk5tlH7mwa7U9PXm4pxtzIcAqxrkg14LUMxlLkYQD3he glkAaCOl151msmq8lDi29M+RZ9QKtIlDJnU/lyQ6u0FkXJ/RXMMwnXJuI/ZD5e9aMA5/ HGtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=13CQbbbCVICRMofyq52vrwixbhSdHJNGZxZmv9+sfFk=; b=G95tqCi0sRBGqxyC+UUYrxTgY3+/VhJgtcfF93BJ7THvgZ695xZmD0DAjt5XVvl+Om HJ50aWZ7DCF0WKCuTGLXB1cBi3TgBKZowCaRm9bUOHRjkOjS9MrjMkD2v9c7d+ajhTlp dNfUQTzxXHN2PqnTWWBPZkvXL4650DJ8TwBtpFRzCrPEpuN/Ki+9v0JhxIPVcpVgTi+E Az9yfDcg/A8AJjb2pVMvoGNVhlRf835gZdXI4Gl8M3bwpBTVb9ECS7CdVb8AKUdtoII1 lPRYAG3R6mCMNKUN3bU05MCf6IzZlcOWt5MDvPHaupkK70GHlwCpWoiBPXNR0FKMouTf 6ocw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=uKdAiTCc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb22si1254777edb.550.2020.09.24.06.28.24; Thu, 24 Sep 2020 06:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=uKdAiTCc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbgIXNZr (ORCPT + 99 others); Thu, 24 Sep 2020 09:25:47 -0400 Received: from mailgw02.mediatek.com ([216.200.240.185]:22843 "EHLO mailgw02.mediatek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727846AbgIXNZq (ORCPT ); Thu, 24 Sep 2020 09:25:46 -0400 X-UUID: b3e13f1d512a445aa0a2469b08f363b8-20200924 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=13CQbbbCVICRMofyq52vrwixbhSdHJNGZxZmv9+sfFk=; b=uKdAiTCcp84WiecPLMb8VJ4qqgSK3b1CbHzaTPHk0YiSpmKIGNFrmX4OcU4sb+/ZcX0SOgBPTo0kaB0+v/DIeCLXJUQltLi9kDrzY2FEaiqj/yMdAE2Y2Tr/219fqF6b9R+x/NBpNNZELXZmqS5Xy5FDbZI9uljg0j0rSUcgsck=; X-UUID: b3e13f1d512a445aa0a2469b08f363b8-20200924 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1637863272; Thu, 24 Sep 2020 05:25:44 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 24 Sep 2020 06:25:41 -0700 Received: from [172.21.84.99] (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 24 Sep 2020 21:25:32 +0800 Message-ID: <1600953934.19244.2.camel@mtksdccf07> Subject: Re: [PATCH v2] net: dsa: mt7530: Add some return-value checks From: Landen Chao To: Alex Dewar CC: Sean Wang , Andrew Lunn , "Vivien Didelot" , Florian Fainelli , "David S. Miller" , "Jakub Kicinski" , Matthias Brugger , Russell King , "netdev@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , "linux-kernel@vger.kernel.org" Date: Thu, 24 Sep 2020 21:25:34 +0800 In-Reply-To: <9db38be8-9926-b74b-c860-018486b17f3a@gmail.com> References: <1600327978.11746.22.camel@mtksdccf07> <20200919192809.29120-1-alex.dewar90@gmail.com> <1600949604.11746.27.camel@mtksdccf07> <9db38be8-9926-b74b-c860-018486b17f3a@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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