Received: by 10.223.185.116 with SMTP id b49csp1185550wrg; Wed, 21 Feb 2018 13:44:07 -0800 (PST) X-Google-Smtp-Source: AH8x226GKmW+mkiL/TtyYGOdliM+B4amAlVPaNykAU90SmyBnuXW3SZi2rmf/WHlULDQlWkAWgzL X-Received: by 10.99.185.84 with SMTP id v20mr3900055pgo.112.1519249447573; Wed, 21 Feb 2018 13:44:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519249447; cv=none; d=google.com; s=arc-20160816; b=zp0xpi3yLnvLJ1DuDxjbJ7UWVEDaNnlZxD10HAXxdz76hv4LHeovjzLBS92iCsxuY1 FXYvJT5NM/huGm/rRKUF1ltzbe/wxE59CtWVIsw9mdx+8usgu4C5rBNJL5BS6xL07OKQ qmGwVkt1rlnypT9DCO3alcLtos6OlTE/E3VuHVcvDlcjyPXrW11z9KTBNMsYzzG4UHPI YbHcn95YuwGa6FLobOQOaKtAZ3B6WKAxX+OE0/fIMS5LFIzzNOPgX65/hZPEU/i59bhk KCv0km70WE8z5T9zfC4x3DFUIsnYKfIjaXBlS/3e9tZszHF6MlXH8ClCpY5odEsJbnlZ cibw== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=8Xvqoiq6FsGQ0P1sl7/jPE3UUg5l+YTmpVpRVduvSp8=; b=01q7VFfUhn9s0ObipzIai9OxC/SxsT8xgOUO4oD5o3TQN56SCS3zzUmbS+z4oH40x6 5ML/dIs/t6n0rf8iBlaVnbPnp8XzznfAOnKRmBCo2+vvb7HG6CIr79QnBNnUefIdhGn1 jemjFyNvUluuUOL9T6gMMstidre6zX377Md55mywwacqgH9137+QAMKyQC/D4Nea5J/b xVZ7JfJqjJqvH3Oaq2kMP/gdrS1Mpc7D4LM77FcUleNmQUIz8X52Yf/CQ5f03fgv5eOa wqVtdARh3ZWTyZbBRn8NCKeoBw6DU6zDcJ0Bhrw0rYFffoehHXz2iDmpv4U5RreTEpNd OsBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NTsZ5iNm; 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 z60-v6si2164774plh.306.2018.02.21.13.43.53; Wed, 21 Feb 2018 13:44:07 -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=NTsZ5iNm; 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 S1751579AbeBUVmb (ORCPT + 99 others); Wed, 21 Feb 2018 16:42:31 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:35911 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbeBUVlv (ORCPT ); Wed, 21 Feb 2018 16:41:51 -0500 Received: by mail-lf0-f66.google.com with SMTP id t79so4483220lfe.3 for ; Wed, 21 Feb 2018 13:41:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=8Xvqoiq6FsGQ0P1sl7/jPE3UUg5l+YTmpVpRVduvSp8=; b=NTsZ5iNmsbsk6D7F1zQvF1frdH9zi/THivGRBb1qzL3Ep6KtxVD+YoTMB3QW+bYjE7 0vno7HxYnoFAFP6VZSEl6i818vLzu9Hm/qurIaaICOam3KMTvNscS7EPr8Q9Tg2Y2vr6 jIX3mviFhA6xfsX4Il43jjMVZmPh38fPmgdl4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8Xvqoiq6FsGQ0P1sl7/jPE3UUg5l+YTmpVpRVduvSp8=; b=L5HI+5ilpi0OewitfBsXnMwOgmtO9kvG2XgEArNUoN+2xyuN6cWQ5CahxRoMEIZK05 7st9ekKHoqkcX1UV49ETcDNPpcRhLeJ75qiekyutdHJsX3NWqQbGrvWVkYoUSAOSnJLG NUHvpsBZmXqVnJBXy84eZ80/Ny+RfaLEmCzGSR9pNpNsjoSq5qYgfAGaFdc+M/WD7Xmo fAdrYFM/Jy4Cgb5efX0bUpkNjqkOFOUBRBAbixKlh8IJxQa6RLthYEDBj8xwdIHlm2g1 BjXAgfq7wDviDr6i1A8dkAHInQB0naw0X0U4RVsoY1tfszKzhj3kUXsDEqyv5scLsWTr QMWw== X-Gm-Message-State: APf1xPD/08kIMF3pnYVaAxxZSqxZI1lyO1y2c5duDxumxfKBgVYTelsq RM4qt++Ql382OgQk2W6Hl2LyxpVzN7kF/SIZHqqqFQ== X-Received: by 10.46.34.70 with SMTP id i67mr3170639lji.143.1519249309803; Wed, 21 Feb 2018 13:41:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.104.22 with HTTP; Wed, 21 Feb 2018 13:41:49 -0800 (PST) In-Reply-To: <20180221213334.19969-1-anders.roxell@linaro.org> References: <20180221213334.19969-1-anders.roxell@linaro.org> From: =?UTF-8?Q?Daniel_D=C3=ADaz_Rodr=C3=ADguez?= Date: Wed, 21 Feb 2018 15:41:49 -0600 Message-ID: Subject: Re: [PATCH] tools/gpio/gpio-event-mon: fix warning To: Anders Roxell Cc: linus.walleij@linaro.org, linux-gpio@vger.kernel.org, open list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21 February 2018 at 15:33, Anders Roxell wrot= e: > 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 =E2=80=98monitor_device=E2=80=99: > gpio-event-mon.c:102:19: warning: format =E2=80=98%lu=E2=80=99 expects ar= gument of type > =E2=80=98long unsigned int=E2=80=99, but argument 3 has type =E2=80= =98__u64 {aka long long > unsigned int}=E2=80=99 [-Wformat=3D] > 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 Tested-by: Daniel D=C3=ADaz > --- > 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 =3D -EIO; > break; > } > - fprintf(stdout, "GPIO EVENT %" PRIu64 ": ", event.timesta= mp); > + fprintf(stdout, "GPIO EVENT %llu: ", event.timestamp); > switch (event.id) { > case GPIOEVENT_EVENT_RISING_EDGE: > fprintf(stdout, "rising edge"); > -- > 2.11.0