Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754878AbbGCKR2 (ORCPT ); Fri, 3 Jul 2015 06:17:28 -0400 Received: from conssluserg002.nifty.com ([202.248.44.40]:38688 "EHLO conssluserg002-v.nifty.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754765AbbGCKRU (ORCPT ); Fri, 3 Jul 2015 06:17:20 -0400 X-Nifty-SrcIP: [209.85.160.174] MIME-Version: 1.0 Date: Fri, 3 Jul 2015 19:17:11 +0900 Message-ID: Subject: [Question] Usage of ENOTSUPP error code From: Masahiro Yamada To: Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1256 Lines: 44 Hello experts, I noticed many drivers return -ENOTSUPP on error. I assume ENOTSUPP is defined in include/linux/errno.h as follows: /* Defined for the NFSv3 protocol */ #define EBADHANDLE 521 /* Illegal NFS file handle */ #define ENOTSYNC 522 /* Update synchronization mismatch */ #define EBADCOOKIE 523 /* Cookie is stale */ #define ENOTSUPP 524 /* Operation is not supported */ #define ETOOSMALL 525 /* Buffer or request is too small */ #define ESERVERFAULT 526 /* An untranslatable error occurred */ #define EBADTYPE 527 /* Type not supported by server */ #define EJUKEBOX 528 /* Request initiated, but will not complete before timeout */ #define EIOCBQUEUED 529 /* iocb queued, will get completion event */ I also assume the comment "Defined for the NFSv3 protocol" is valid for whole of this block. If so, should ENOTSUPP be only used for NFS-related errors? In fact, ENOTSUPP is used by various drivers including non-network ones such as pinctrl, USB, etc. -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/