Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758749AbcCDNKT (ORCPT ); Fri, 4 Mar 2016 08:10:19 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:38457 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753545AbcCDNKP (ORCPT ); Fri, 4 Mar 2016 08:10:15 -0500 Subject: Re: [PATCH net-next v3 4/4] ethtool.h: define INT_MAX for userland To: Nicolas Dichtel , davem@davemloft.net References: <20160303.170804.2300821465150459193.davem@davemloft.net> <1457088739-1065-1-git-send-email-nicolas.dichtel@6wind.com> <1457088739-1065-5-git-send-email-nicolas.dichtel@6wind.com> Cc: netdev@vger.kernel.org, ben@decadent.org.uk, Karen Xie , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org From: Nikolay Aleksandrov Message-ID: <56D98934.4050409@cumulusnetworks.com> Date: Fri, 4 Mar 2016 14:10:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1457088739-1065-5-git-send-email-nicolas.dichtel@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 20 On 03/04/2016 11:52 AM, Nicolas Dichtel wrote: > INT_MAX needs limits.h in userland. > When ethtool.h is included by a userland app, we got the following error: > > .../usr/include/linux/ethtool.h: In function 'ethtool_validate_speed': > .../usr/include/linux/ethtool.h:1471:18: error: 'INT_MAX' undeclared (first use in this function) > return speed <= INT_MAX || speed == SPEED_UNKNOWN > ^ > > Fixes: e02564ee334a ("ethtool: make validate_speed accept all speeds between 0 and INT_MAX") > CC: Nikolay Aleksandrov > Signed-off-by: Nicolas Dichtel > --- > include/uapi/linux/ethtool.h | 4 ++++ > 1 file changed, 4 insertions(+) > Thanks! Acked-by: Nikolay Aleksandrov