Skip to content

ENOSYS has ambiguous meaning. #11207

@Mierunski

Description

@Mierunski

In the errno.h file, we can find:

#define ENOSYS 71 /* Function not implemented */

While checkpatch gives following information:

WARNING:ENOSYS: ENOSYS means 'invalid syscall nr' and nothing else

i.e. I wanted to use it in the following way:

__syscall int uart_configure(struct device *dev, struct uart_config *cfg);

static inline int _impl_uart_configure(struct device *dev,
				       struct uart_config *cfg)
{
	const struct uart_driver_api *api =
				(const struct uart_driver_api *)dev->driver_api;

	if (api->configure) {
		return api->configure(dev, cfg);
	}
	return -ENOSYS;
}

Where
-ENOSYS If driver has not implemented this function
-ENOTSUP If device does not support given configuration.

Which information if true? errno.h file or checkpatch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementChanges/Updates/Additions to existing featurespriority: lowLow impact/importance bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions