From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 673E2282 for ; Mon, 26 Jan 2015 00:05:00 +0100 (CET) Received: by mail-pd0-f182.google.com with SMTP id z10so8449269pdj.13 for ; Sun, 25 Jan 2015 15:04:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=EhVlZ+jaChcWozE4/YTAhrDoyFpJ63Ffk3pnHFOXmHM=; b=bEQH5+ZzMcjPCgGt71CAOLrLlTfisIOaCDon9WjYvxBPz9097wdQzH50J+pMfBUJnM i48yGdroHqPHfTqDp0vAwEvKlL6+YDd5IpQ/fjZ1q1yBu6qnxZ9WniGDAr2CHDpNEM6M cDkKueQAAvemLp6XTJcWioDzQo8RNIe6lduWs75Ot7ymi3fe70upIZ+osx8pC87oUhQ+ dsxtS5aeQ9MNB7yJAyUq6chAcB8unVmzl2lP+0ceAJbU5rqbFISLH4lx34D0UdnP5emU OR/vf4RQ3LfkA9ugkptV+beg0r7P0ylIg9TRR3lONNxYvA5i20IeKeNV+jE+DhFaB0GL G3Eg== X-Gm-Message-State: ALoCoQnllYx3ixLlBwE50uQ4Lh74VCej7eLRNkYKSsBDmDWMF9pUocuX0Z45jQpCXkvc5mtpXzLg X-Received: by 10.68.69.3 with SMTP id a3mr29418046pbu.3.1422227099627; Sun, 25 Jan 2015 15:04:59 -0800 (PST) Received: from uryu.home.lan ([144.49.132.22]) by mx.google.com with ESMTPSA id c9sm8123821pdm.51.2015.01.25.15.04.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2015 15:04:59 -0800 (PST) Date: Sun, 25 Jan 2015 23:04:49 +0000 From: Stephen Hemminger To: Cunming Liang Message-ID: <20150125230449.3dbf4306@uryu.home.lan> In-Reply-To: <1421914598-2747-10-git-send-email-cunming.liang@intel.com> References: <1417589628-43666-1-git-send-email-cunming.liang@intel.com> <1421914598-2747-1-git-send-email-cunming.liang@intel.com> <1421914598-2747-10-git-send-email-cunming.liang@intel.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v1 09/15] malloc: fix the issue of SOCKET_ID_ANY X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 23:05:00 -0000 On Thu, 22 Jan 2015 16:16:32 +0800 Cunming Liang wrote: > - return rte_socket_id(); > + unsigned socket_id = rte_socket_id(); > + > + if (socket_id == (unsigned)SOCKET_ID_ANY) I prefer not casting -1 to unsigned it will cause warnings. It is better to make socket_id an integer and then have the implicit cast in the return.