Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp436521pxa; Thu, 27 Aug 2020 06:33:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0m1aT8lSYOAyIPeyiUyjQ5d/xwvv73rzs8tKvBZs9Gnt7fR9QqK6SEvHWY7EtpY5IwTzr X-Received: by 2002:a17:906:91c8:: with SMTP id b8mr11787975ejx.103.1598535184394; Thu, 27 Aug 2020 06:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598535184; cv=none; d=google.com; s=arc-20160816; b=v179dSrTLpCYvVOaD91Fy3E+bb009IM6DU4fr5+YmQ6bI8CuR1PE+xco6Zr+E7SMqj ++LvXMqvXVolkuFCk1YKaLdMXfrQjzvkXbyUPKK55w+uf5XCq3tNBagkWiZlz5oRG8ik mH6K/lvZ7uiHGOc8AYd7d/oq2ffAQ4UNtSmLpHRx0EHAinya3s54uLXu6gi/IseR2yp+ PnWj1uYuardp6iyzDZwjqLth660Hw1Cf0GWk0J92r77exE4zyHpQx+jLibM8L0Y3rWFw TyCvRYJzjI0GNgra3jsRdCmroED5co8Z6V+4KyL/iJ9g42paahvRgBE3B8WGtwjArya+ v1RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=bNdiejgmrP6UyoxidBCnn4mIur5XympzIClUiV4GOpI=; b=x/h3kwpDlKKcDGy2iqKhMPcdu4f/KuvPK6DzpWsj/hm+6oxLHySSpN7Ge43v/aICbD pXuZSnzmTLmbM3LW0iRnSHEK3wzxj4RRPb6I2C/TPR9iRVftdQAloydtHRg5C6HnEe3g FB7tetstciZ6KWLL1WG+Kwk/A+1CsNgWiC1x88GUwiX83ixlDh1FadLU48gobddGTW2W UWbSLnIBsFn9h2cflLLFGD268Z1HJLUuH1KshMxKsqVQCO1xIJj8Ry4kYYLR0OIWv6ms iUfGA3pMFtsOzkDFl+ILfJg4nYYvy6nO0rtsJMYK93T1nhPyf8XHF5wKrvUWKSv2Nd+d ET/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b8mxLPPu; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w26si1577340edu.383.2020.08.27.06.32.41; Thu, 27 Aug 2020 06:33:04 -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=@ti.com header.s=ti-com-17Q1 header.b=b8mxLPPu; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727992AbgH0NbY (ORCPT + 99 others); Thu, 27 Aug 2020 09:31:24 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:50636 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728014AbgH0NWX (ORCPT ); Thu, 27 Aug 2020 09:22:23 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 07RD0oGN084176; Thu, 27 Aug 2020 08:00:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1598533250; bh=bNdiejgmrP6UyoxidBCnn4mIur5XympzIClUiV4GOpI=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=b8mxLPPuz/qNstwFOEFuw9TyyfpFBYHln26sR0eUm3txSf4jqoADDhNjCPwN+SUYk eHTbW63h9keDDONxlm20Pv3iQBclhrGa26WkupSWOb3jcFTsXE+3xGjKPifbeQ0jln iKuYBWCNJl3LrEg3yaNW0JAlXSMuf+LjXouH1hLU= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 07RD0o70124320; Thu, 27 Aug 2020 08:00:50 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 27 Aug 2020 08:00:49 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 27 Aug 2020 08:00:49 -0500 Received: from [10.250.227.175] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 07RD0mS7108067; Thu, 27 Aug 2020 08:00:48 -0500 Subject: Re: [net v3 PATCH] net: ethernet: ti: cpsw_new: fix error handling in cpsw_ndo_vlan_rx_kill_vid() To: David Miller CC: , , , , , References: <20200824170100.21319-1-m-karicheri2@ti.com> <20200825.093603.2026695844604591106.davem@davemloft.net> From: Murali Karicheri Message-ID: <5be2b575-238c-247f-db9a-95680984e26d@ti.com> Date: Thu, 27 Aug 2020 09:00:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200825.093603.2026695844604591106.davem@davemloft.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dave, On 8/25/20 12:36 PM, David Miller wrote: > From: Murali Karicheri > Date: Mon, 24 Aug 2020 13:01:00 -0400 > >> + ret = cpsw_ale_del_vlan(cpsw->ale, vid, 0); >> + if (ret) >> + dev_err(priv->dev, "%s: failed %d: ret %d\n", >> + __func__, __LINE__, ret); >> + ret = cpsw_ale_del_ucast(cpsw->ale, priv->mac_addr, >> + HOST_PORT_NUM, ALE_VLAN, vid); >> + if (ret) >> + dev_err(priv->dev, "%s: failed %d: ret %d\n", >> + __func__, __LINE__, ret); >> + ret = cpsw_ale_del_mcast(cpsw->ale, priv->ndev->broadcast, >> + 0, ALE_VLAN, vid); >> + if (ret) >> + dev_err(priv->dev, "%s: failed %d: ret %d\n", >> + __func__, __LINE__, ret); >> cpsw_ale_flush_multicast(cpsw->ale, ALE_PORT_HOST, vid); > > These error messages are extremely unhelpful. You're calling three > different functions, yet emitting basically the same __func__ for > each of those cases. No user can send you a useful bug report > immediately if they just have func and line. > > Please get rid of the "__func__" and "__line__" stuff completely, it's > never advisable to ever use that in my opinion. Instead, describe > which delete operation failed, optionally with the error return. > OK. I had considered your suggestion, but thought having a line number would be handy for a developer. Function name would be better. Will re-send with changes as you have suggested. -- Murali Karicheri Texas Instruments