From patchwork Mon Dec 8 19:36:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dev-bounces@dpdk.org X-Patchwork-Id: 1820 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 9F60B7F07; Mon, 8 Dec 2014 20:36:27 +0100 (CET) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id C3CAACE7 for ; Mon, 8 Dec 2014 18:51:22 +0100 (CET) Received: by mail-pd0-f179.google.com with SMTP id fp1so5286144pdb.38 for ; Mon, 08 Dec 2014 09:51:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:user-agent:date:from:to:cc:subject :references:mime-version:content-type:content-disposition; bh=2ENsUerRPYVWa0feNdruAFoyESSMbPuFxIASFBw2J24=; b=O3ER27C1Vz92KE/LU9lgxaJ46+91RnIXNVqPV1rJGmwU7l14rZQChOVaGCg5/8SQtI /EotBFCIkn0OvSJLVK9H6bnfCU9QRyDo50tmLotsL6NdUjOpZs/crFiqzxZ1KQmeySp/ 9ELoD33INvvOB1McH7DeNRc5G4TZTd6Qop961f2AczgZTtz5YVVZvMSOTyX+KeBqlvr3 nv5oYedYX8EMS+TvKpVxqhKm8E7ev/2wcwcrETzzUlBS/MZcBm8f4xws3XfwoA1BAvo6 +RQtbiHdY0P8tk0S0t1bLEnrrhlWaL1RgAFRLYRvr+rrNTzUUWYkksjRQLRTibdLIKwk NtKw== X-Gm-Message-State: ALoCoQmy19FJZoud2gJ8w4ZERwGOoGucQM6WZOyMe5gL0rnJ341APtDHCwE4v9E7diF7rZayXva4 X-Received: by 10.68.132.225 with SMTP id ox1mr62750255pbb.85.1418061082052; Mon, 08 Dec 2014 09:51:22 -0800 (PST) Received: from localhost (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id vy1sm37248671pac.20.2014.12.08.09.51.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Dec 2014 09:51:20 -0800 (PST) X-Mailman-Approved-At: Mon, 08 Dec 2014 20:36:25 +0100 Subject: [dpdk-dev] (no subject) 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-Id: <20141208193627.9F60B7F07@dpdk.org> Date: Mon, 8 Dec 2014 20:36:27 +0100 (CET) From: dev-bounces@dpdk.org From stephen@networkplumber.org Mon Dec 8 09:46:51 2014 Message-Id: <20141208174651.064719116@networkplumber.org> User-Agent: quilt/0.63-1 Date: Mon, 08 Dec 2014 09:45:55 -0800 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, Stephen Hemminger Subject: [PATCH 1/6] rte_log: remove unnecessary stubs References: <20141208174554.889069531@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=rte-log-unneeded-funct.patch The read/seek/close stub functions are unnecessary on the log stream. Per glibc fopencookie man page: cookie_read_function_t *read If *read is a null pointer, then reads from the custom stream always return end of file. cookie_seek_function_t *seek If *seek is a null pointer, then it is not possible to perform seek operations on the stream. cookie_close_function_t *close If *close is NULL, then no special action is performed when the stream is closed. Signed-off-by: Stephen Hemminger --- a/lib/librte_eal/linuxapp/eal/eal_log.c 2014-12-08 09:25:23.725812125 -0800 +++ b/lib/librte_eal/linuxapp/eal/eal_log.c 2014-12-08 09:25:23.661811703 -0800 @@ -83,33 +83,8 @@ console_log_write(__attribute__((unused) return ret; } -static ssize_t -console_log_read(__attribute__((unused)) void *c, - __attribute__((unused)) char *buf, - __attribute__((unused)) size_t size) -{ - return 0; -} - -static int -console_log_seek(__attribute__((unused)) void *c, - __attribute__((unused)) off64_t *offset, - __attribute__((unused)) int whence) -{ - return -1; -} - -static int -console_log_close(__attribute__((unused)) void *c) -{ - return 0; -} - static cookie_io_functions_t console_log_func = { - .read = console_log_read, .write = console_log_write, - .seek = console_log_seek, - .close = console_log_close }; /* @@ -150,33 +125,8 @@ early_log_write(__attribute__((unused)) return ret; } -static ssize_t -early_log_read(__attribute__((unused)) void *c, - __attribute__((unused)) char *buf, - __attribute__((unused)) size_t size) -{ - return 0; -} - -static int -early_log_seek(__attribute__((unused)) void *c, - __attribute__((unused)) off64_t *offset, - __attribute__((unused)) int whence) -{ - return -1; -} - -static int -early_log_close(__attribute__((unused)) void *c) -{ - return 0; -} - static cookie_io_functions_t early_log_func = { - .read = early_log_read, .write = early_log_write, - .seek = early_log_seek, - .close = early_log_close }; static FILE *early_log_stream;