Received: by 10.223.185.116 with SMTP id b49csp1178353wrg; Wed, 21 Feb 2018 13:34:38 -0800 (PST) X-Google-Smtp-Source: AH8x224Mv+GOgF34chP1A9/imoChq+V9E7EGbhNWC9bD6wEttIYYvqkr/VDdByXJ/8mKfIm+/34S X-Received: by 10.101.92.138 with SMTP id a10mr3758063pgt.191.1519248878294; Wed, 21 Feb 2018 13:34:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519248878; cv=none; d=google.com; s=arc-20160816; b=syeNCszIXFCPkont8j8YBpK5Oxpl+apovLwM/8Hffz0ZG4q1snuw/SMfs+mYfOHSeL iMtGvnverrEtTGzL1pestTOvXDV04459Utk1l8v5K9SACMkosWzL2+sLJ4TuPR17+ZDi +z24sG5vRUQDzj1fhn99UoU5zjjGcAlcBWxfRD0KHIwatqVrBFhyajiaWzI/cg92Fafe FfIE92C3FWZcWWCrb4RLnRqvEgM0odFtQs0c8RpmYM0otYOpgjuhXkz6PtTuOotXoc5t fgasxP76FhgTgk3RCYBg39GOVQmJgfM5y+nL1ecIhC492vpkP/gKFB/friB6ymMFC98p jY4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=DRk3TQ624WLYSLo4paxIz++Z3GYu6pTm237sgrtju0k=; b=0Yv2JbSOinG+hJddk6UoRy9f+X2PsaELBKkEHkTAE6NsscVJ8FXeljq6l68wo4uXOf W3FCt5SSE5V7dgMHDqpHh986Vfal9mXy+cR3+fE4FiJZEiIzzGoGmAYgR9iTK3+1shDM FNXCyXrMIC0wE0U6Lpug9hO+3uP85WG92jeR7ETFCb7iq/Wx7nU5Sjvi4KB9uggZt9Ju dYmCVpDK210meBQFoh/7n9upplzEfOSaH4i5uwd7NXACovjh5gFAwTLfo2A7CkB7PjxX 1L2CujJSMAc2r9pN63JgFQlMnp5S3o7j1yJU5LEKcXbREOfu0SqkY7fTrXwY4eBjjEdu 7U2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g5aCaYkL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3-v6si2209376plg.575.2018.02.21.13.34.22; Wed, 21 Feb 2018 13:34:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g5aCaYkL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751339AbeBUVdm (ORCPT + 99 others); Wed, 21 Feb 2018 16:33:42 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:42000 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbeBUVdl (ORCPT ); Wed, 21 Feb 2018 16:33:41 -0500 Received: by mail-lf0-f65.google.com with SMTP id t204so4446201lff.9 for ; Wed, 21 Feb 2018 13:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DRk3TQ624WLYSLo4paxIz++Z3GYu6pTm237sgrtju0k=; b=g5aCaYkLbdLrB+4vt9ZAX7FWyXAQDM8wPr82bCW5tCvWkwoL+yRYaq++By0DGoMJsx AAW1iIGe13VXUob2eRd7N7dscOVyjQyqGRZemzNiA9yQ6Cb1P1+KuyJxBUsDrX6QVko2 Lq5TIYXL+F2x7xGEELjYX4s71eYFB8YW+XlzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DRk3TQ624WLYSLo4paxIz++Z3GYu6pTm237sgrtju0k=; b=QBJa4dkV8Ga6z8oDNg/NyBtz5yNk2zayyGgGi3MltfNqRzBM0idXz5MqDGExmKcW7S tTHM/nDdhWGyqqrsXQuRBDg2dBQRnIC4+2qXVq6xTKOwKRI55Go9XQ2A3NweetxPpYMe 3AloeNNxhQ/h7o8j6j0DgfQsDVv1Rv74iVljI3fzZKDpHjyOiMhH9OIWzDausXy0APVu m5IkeCOmuYp0FtgxS+DYbDVy83GKkhqSkkd2rq/aEgfggM9AV/ERedEwYUBuQ9HrqL5f kF1iF9MIRIq+MHkNjtaL2go/PFehPqXh5g5b92KM6ZSaX0r2+OyiLZLOPVRE2EK/Gzly mfAA== X-Gm-Message-State: APf1xPDvO8o3wjXbC5ovwATv3y5XXa5F5xRmHdoi82rRLhL5UN6D/1p/ pC8abN0h3SMd531ZPhcWOgF3PA== X-Received: by 10.25.196.66 with SMTP id u63mr3312564lff.108.1519248819500; Wed, 21 Feb 2018 13:33:39 -0800 (PST) Received: from localhost (c-2c3d70d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id y198sm6212274lfd.62.2018.02.21.13.33.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Feb 2018 13:33:38 -0800 (PST) From: Anders Roxell To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] tools/gpio/gpio-event-mon: fix warning Date: Wed, 21 Feb 2018 22:33:34 +0100 Message-Id: <20180221213334.19969-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PRIu64 is defined in user space to match libc's uint64_t definition. However, gpioevent_data structure in the kernel is defined using the kernel's own __u64 type. gpio-event-mon.c: In function ‘monitor_device’: gpio-event-mon.c:102:19: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘__u64 {aka long long unsigned int}’ [-Wformat=] fprintf(stdout, "GPIO EVENT %" PRIu64 ": ", event.timestamp); ^~~~~~~~~~~~~~ LD /tmp/kselftest/gpiogpio-event-mon-in.o LINK /tmp/kselftest/gpiogpio-event-mon Fix is to replace PRIu64 with llu, which we know is what the kernel uses for __u64. Signed-off-by: Anders Roxell --- tools/gpio/gpio-event-mon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio/gpio-event-mon.c index dac4d4131d9b..c864544efe05 100644 --- a/tools/gpio/gpio-event-mon.c +++ b/tools/gpio/gpio-event-mon.c @@ -99,7 +99,7 @@ int monitor_device(const char *device_name, ret = -EIO; break; } - fprintf(stdout, "GPIO EVENT %" PRIu64 ": ", event.timestamp); + fprintf(stdout, "GPIO EVENT %llu: ", event.timestamp); switch (event.id) { case GPIOEVENT_EVENT_RISING_EDGE: fprintf(stdout, "rising edge"); -- 2.11.0