From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1917C433EF for ; Wed, 13 Jul 2022 01:09:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231656AbiGMBJS (ORCPT ); Tue, 12 Jul 2022 21:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbiGMBJS (ORCPT ); Tue, 12 Jul 2022 21:09:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E240C9100; Tue, 12 Jul 2022 18:09:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BC017618CA; Wed, 13 Jul 2022 01:09:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C12C5C3411E; Wed, 13 Jul 2022 01:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657674556; bh=VmntzbmKZNafnsvnBrCuHRRxUYzJnrYmUnQpuOsb25c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=flhpv2LdQeVnrTmtUCCwfApQkLHolqYRJRldzyCy3iflwjtwG3OsmK3ElrktCKc/N Dtk6frRurVe1SRfPMwQyBHMEfUCutZZNBu3pk+sGXKvi3kHYAVT15NPwx7sT6+r3AK s7Sdml5NrAU6echUu5aUd3NiHeb2Rf6RzroS4nMBOVCdAlOL9ouUXcrdr5XSpdAOR7 OABef5AYx/axL45gRGlb49CwOyHp0spdrDlaf4f8PTshaaTT7wso1NX9lfjvAW416u VV5FA5qhZRmPUXuBNWgFjhNncey479kx9NyHu0hISHRjhLdxlrzUUroMxEdThG+6Hl BaYCLctE/ixDw== Date: Tue, 12 Jul 2022 18:09:06 -0700 From: Jakub Kicinski To: Zhengchao Shao Cc: , , , , , , , , , Subject: Re: [PATCH v2,net-next] net/sched: remove return value of unregister_tcf_proto_ops Message-ID: <20220712180906.07bea7f8@kernel.org> In-Reply-To: <20220711080910.40270-1-shaozhengchao@huawei.com> References: <20220711080910.40270-1-shaozhengchao@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 11 Jul 2022 16:09:10 +0800 Zhengchao Shao wrote: > Return value of unregister_tcf_proto_ops is unused, remove it. > -int unregister_tcf_proto_ops(struct tcf_proto_ops *ops) > +void unregister_tcf_proto_ops(struct tcf_proto_ops *ops) > { > struct tcf_proto_ops *t; > int rc = -ENOENT; > @@ -214,7 +214,10 @@ int unregister_tcf_proto_ops(struct tcf_proto_ops *ops) > } > } > write_unlock(&cls_mod_lock); > - return rc; > + > + if (rc) > + pr_warn("unregister tc filter kind(%s) failed\n", ops->kind); I was saying WARN, by which I meant: WARN(rc, "unregister tc filter kind(%s) failed %d\n", ops->kind, rc);