From patchwork Wed Feb 21 21:33:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 129136 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1073902ljc; Wed, 21 Feb 2018 13:33:44 -0800 (PST) X-Google-Smtp-Source: AH8x227p0r0IVnntwocZadFVxgP26ltYSwGbIw0rPqAToGIlYzZhwkkdmSgD/c+O1atathgNF4O8 X-Received: by 10.99.133.193 with SMTP id u184mr3687055pgd.401.1519248824738; Wed, 21 Feb 2018 13:33:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519248824; cv=none; d=google.com; s=arc-20160816; b=Is6mo0eCEFEyWOqRAUrr/7D3a3bqyYNwe7/fTXYOn0foeRUPof2fQoWoMZml3Lh2+5 mT7sfRwaXR44tkdfqAY2ppj2le2R2g8TTIFk/fhOsuIvZZuR//Li5x3IHAvKe8YWPf76 qNSE5qUby1HzfefyTwQUxJOeBirg1q9r0S2vrIp8O0kMRUL0CkeuipjMDcI1azB4CHou ulI5Uos7wdvwiRG8e2ohY5BBWlFOyPdw0hN6eUNul5TPbgVblnSm9r5O/GEX8x3KWeJm 6K1hKd+Is31uADHcz+4jCwU9OqwqktXRBE5ej/H9ZkAZl61Utr4lFa6+02d/m39cOdbX OlcQ== 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=fB2owl9EEAyserlqrLADwXhbPRE/GjYYc39Ky1nb5l0=; b=PQgJC/0QJ/deUh7Z0snR1DA9/1lu2bILhsE6WAWjD9Mh0rpdO+9Ip60tcR7qLR6Q5u yk0afl/sqpmKinmGw6gpgkg0AvDdiENFzfrS44IejVHhF0Xts4RxKt85aoh4tXUq5rfs drZiUYPR8ufKkPv555K09TORl/uBn+VQis5EcwtN0XfdpSXLFv+fcWoZV5oG7OquU2UO WBGAORb9eFDZoLj+uuQ+ZdcxxU81uxkS3DQwNftPRjvSmagbTrQWL897L3loMHJzqn4/ SAa1jY2RZErGBhJ8sK6ksAjmdATu5zHwAfIDvcnrlPOBoY6ZJKXvv3oovSuatLGQnpvx lJZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=g5aCaYkL; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (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 q11si1806398pgf.225.2018.02.21.13.33.42; Wed, 21 Feb 2018 13:33:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=g5aCaYkL; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751155AbeBUVdl (ORCPT + 5 others); Wed, 21 Feb 2018 16:33:41 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:45563 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826AbeBUVdk (ORCPT ); Wed, 21 Feb 2018 16:33:40 -0500 Received: by mail-lf0-f67.google.com with SMTP id x196so4432055lfd.12 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=Hm9DlmmBWCPQekaLDTjolEM/w/Ep1+GOF6oYWhzHMw02ZBLzA6ZCa6MT7/7jKIuYVj jKCpMQRECyjI5W2hNVhIVyga7dzLYRUAcqPSB07NtXzJMMmNJuyZt4IkzKipf7J6cGT6 9oALobngLL2ZCAqAmWmhLNkJD+O1mHnWTvpa5pIdmWapeG4W+zF0AafRauKFqvq8Gg1u w4Yr1qPTNYV6SzPgLe1cYJnCdoQZJaA+2ehD2XA99lTThzoRGTdZZkzjPGOXS5AkyN9f xmmk2f6RU6lFBA/QQGpirgIw06hEtMrRcxp2UOAQE/NVPvrjWrhPcnSR/4tVzF+1VrRz DX6w== X-Gm-Message-State: APf1xPBK+qC0qCj7tDg+9Ay/72Xxcvp6GIHJZoFUnU67+vttNCccWNtH QcRvlzA9Ena8duywbwOcQND2lg== 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 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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");