Received: by 10.223.185.116 with SMTP id b49csp7494068wrg; Thu, 1 Mar 2018 06:29:02 -0800 (PST) X-Google-Smtp-Source: AG47ELs4YFnwTKd4Xm4qM6GBkpsAJKCsPSmt22Xeuleo77Ht2C+ZymyAs/LA5c6pmUAZUUtPrDcB X-Received: by 10.101.72.199 with SMTP id o7mr1689802pgs.303.1519914542468; Thu, 01 Mar 2018 06:29:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519914542; cv=none; d=google.com; s=arc-20160816; b=l75IYGgm3R6AVp5+1IcNj8aAxem76sTWkGvORYzHlHSnG4BB/L46cGS5qOYlxXja6m 0942iZg2cZbGyFBbcozuJVzgixnaYTT66ErKyZztDH/0+yMs9k0NhRoqnBOYtuOtXeab QrJhdzI8P3BCXsMfkH1TWogrt72cbyJn/caRUrJAJGUiR9S0Jfw6tm13RSXDnDXr4MPy VmYrCVG9FFJNruxJtgfdx8X8ea6F2jAs3ckRsL2M9g6hEpJEz1wGK51mgze8aS+GUV2F LsG0tOw/nj+opAvoSITVn2YnXgqo5eNj5Jys+dKNJ46MUL0fbH9FB3c8Tfk35sTPCR40 mppQ== 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=9M4AUHtMK6Ms2O9aioMdzisDWf8xqimuoIlWHf9e71s=; b=zvERC1r82omHAheJSyOb6z9uoB4PGuhQX2fGRb356ZAWc3QEH2RDDSZooHJBPReRyX plZee010y17kP8abJR9tVxoOOBFCn7RhdQ0r+V/H3RLHKizrW5R1Xz+0QgQotElIGfa8 gawFlP2lkzgiAALkBLhzeA0tr/RFQl4y42TZLDDRBnQCi1gY/SDD98rcAu73kBbfipB8 YxusfB0pDMH6UMEXRt2ylriB54tOTFMOFPWGYBFE5d6LNHdYdg6ya4njUSmMxig6OwsA y+/9HLY2pm3FLWnjj8BmYAQHUjiv8rbdVA5q7d0CE/IMGVmk84n5aDd3yrmoojJ/qryD n3KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FOFDe2uR; 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 o30si2480295pgc.325.2018.03.01.06.28.46; Thu, 01 Mar 2018 06:29:02 -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=FOFDe2uR; 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 S1031505AbeCAO1r (ORCPT + 99 others); Thu, 1 Mar 2018 09:27:47 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:52059 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031485AbeCAO1m (ORCPT ); Thu, 1 Mar 2018 09:27:42 -0500 Received: by mail-it0-f65.google.com with SMTP id u66so5452131ith.1 for ; Thu, 01 Mar 2018 06:27:42 -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=9M4AUHtMK6Ms2O9aioMdzisDWf8xqimuoIlWHf9e71s=; b=FOFDe2uRFMdjHqO5VQH2cr32MWAGUj4XD6ia0sNdync24w3Sgikw/e4l9/xI7PTCel Lf61zcjGE7feXBAGmeAkDxPTT5f4jv4uRhUPe2OZuCF1g8Y+kZoSPXYkvUIO3ufAalYx DG7xgSwTxVHGkfOsV7NIA2UmlntcvIWCKvkXY= 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=9M4AUHtMK6Ms2O9aioMdzisDWf8xqimuoIlWHf9e71s=; b=L5hQ3luE9bD2Gao2v6MwvZFgyrHb/G/1zB+fz07LwgzcAXNpSqw/mUyL/x4RQPVhDq KRCTUh/ljYya4vurrB2dgFiTtoxQZmrg/dagKzEMs6DBvDqhatc7rRuIGR3mhZxJ5yod A3j0Odt5o1FMZ0FiD9U3Aw4Ur/2ckMbGflMO7Mju77IpuUG9XF3+2eGW3OlSwNmXC2ww VmJY3089No8So8KxrbtBx40acibvPIcFtHuyiDE47StlZqwfXUOP0GEFQ46tyclIRToj 2o6l0FS2JkfPvHRThajpZAi914nea6Ska8Oaa988KC5SuY7vBmv7dt2YdPhRVk26aJKY 7noA== X-Gm-Message-State: APf1xPCbuztUsabUkHHJzJjtZD0Fw5nSqLUnZlcqeCKodIhjCF4/vyK+ tLl3DC//6V06CV9RCF77ZGyavACbwkWOOtSuJDdmqw== X-Received: by 10.36.60.138 with SMTP id m132mr2771367ita.132.1519914461805; Thu, 01 Mar 2018 06:27:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.230.25 with HTTP; Thu, 1 Mar 2018 06:27:41 -0800 (PST) In-Reply-To: <20180221213334.19969-1-anders.roxell@linaro.org> References: <20180221213334.19969-1-anders.roxell@linaro.org> From: Linus Walleij Date: Thu, 1 Mar 2018 15:27:41 +0100 Message-ID: Subject: Re: [PATCH] tools/gpio/gpio-event-mon: fix warning To: Anders Roxell Cc: "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" 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 Wed, Feb 21, 2018 at 10:33 PM, Anders Roxell wrote: > 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 Patch applied with Daniel's test tag. Yours, Linus Walleij