Author: hselasky Date: Fri May 13 11:30:56 2016 New Revision: 299663 URL: https://svnweb.freebsd.org/changeset/base/299663
Log: Add unlikely() statement to optimise the IS_ERR_VALUE() macro. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/err.h Modified: head/sys/compat/linuxkpi/common/include/linux/err.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/err.h Fri May 13 11:27:49 2016 (r299662) +++ head/sys/compat/linuxkpi/common/include/linux/err.h Fri May 13 11:30:56 2016 (r299663) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,9 +31,11 @@ #ifndef _LINUX_ERR_H_ #define _LINUX_ERR_H_ +#include <linux/compiler.h> + #define MAX_ERRNO 4095 -#define IS_ERR_VALUE(x) ((x) >= (unsigned long)-MAX_ERRNO) +#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) static inline void * ERR_PTR(long error) _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
