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 54851C433F5 for ; Mon, 28 Mar 2022 12:47:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242620AbiC1Ms4 (ORCPT ); Mon, 28 Mar 2022 08:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239014AbiC1Msz (ORCPT ); Mon, 28 Mar 2022 08:48:55 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61C6F4D9D6 for ; Mon, 28 Mar 2022 05:47:14 -0700 (PDT) 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=ZTZ9JHwlpWTpwIIeBU2FSj4LgQndUnbr98C4VDSogUo=; b=OJFHQKJSoMf1EJycCcC6CvVBv4 8ygbNMDVL7vG7fcjnDnh4A2QuDOGvXa86hnT1EGF5ETtg3a6qaY/LTMdOI/JqccKpEERU7ZC+o55v 1JJdfjsxOx8aLgNeNyW3XwVdigloUAohcPx06fHUCMbF6eXyHGQpiInw2sObZmkYXTVQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nYolt-00D135-Ke; Mon, 28 Mar 2022 14:46:57 +0200 Date: Mon, 28 Mar 2022 14:46:57 +0200 From: Andrew Lunn To: Damien Le Moal Cc: Michael Chan , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Netdev , Pavan Chebbi Subject: Re: [PATCH v2] net: bnxt_ptp: fix compilation error Message-ID: References: <20220328033540.189778-1-damien.lemoal@opensource.wdc.com> <2bc8f270-e402-5e34-8d87-6b02fe8ef777@opensource.wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2bc8f270-e402-5e34-8d87-6b02fe8ef777@opensource.wdc.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > The call to bnxt_ptp_cfg_pin() after the swith will return -ENOTSUPP for > invalid pin IDs. So I did not feel like adding more changes was necessary. > > We can return an error if you insist, but what should it be ? -EINVAL ? > -ENODEV ? -ENOTSUPP ? Given that bnxt_ptp_cfg_pin() return -ENOTSUPP, we > could use that code. https://elixir.bootlin.com/linux/v5.17.1/source/include/linux/errno.h#L23 ENOTSUPP is an NFS only error code. It should not be used anywhere else. EOPNOTSUPP is the generic error that should be used. However, don't replace an ENOTSUPP with an EOPNOTSUPP without considering ABI. Andrew