Message ID | 20180130224904.GA11309@ziepe.ca (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-rdma-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 49529601A0 for <patchwork-linux-rdma@patchwork.kernel.org>; Tue, 30 Jan 2018 22:49:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36D91274D2 for <patchwork-linux-rdma@patchwork.kernel.org>; Tue, 30 Jan 2018 22:49:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29FC127FAE; Tue, 30 Jan 2018 22:49:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8AE4274D2 for <patchwork-linux-rdma@patchwork.kernel.org>; Tue, 30 Jan 2018 22:49:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753714AbeA3WtP (ORCPT <rfc822;patchwork-linux-rdma@patchwork.kernel.org>); Tue, 30 Jan 2018 17:49:15 -0500 Received: from mail-he1eur01on0088.outbound.protection.outlook.com ([104.47.0.88]:30240 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753703AbeA3WtN (ORCPT <rfc822;linux-rdma@vger.kernel.org>); Tue, 30 Jan 2018 17:49:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cTY/gIAaE3WPJvTxZmzkQDD5vrevNMJo/07XS3Wggvw=; b=pVy0SHaE77C0c8hdCP62Gj96X6S+gCa2mbRalA8/IopqyNyjN1FrnN7BXXbP/F+fE3rEcjlgI+FS5YkdD7jXrZEfxIJ8vxge2FfwGJf2uzWyDqjMlU4wIsk3Hyi4PqhD+80Ftyf/UYd9EEP9s551SDLT6mASpeiWgg2K29XH/2I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; Received: from mlx.ziepe.ca (70.74.179.152) by AM4PR0501MB2851.eurprd05.prod.outlook.com (2603:10a6:200:5c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Tue, 30 Jan 2018 22:49:11 +0000 Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from <jgg@mellanox.com>) id 1egei8-0002wy-Ah for linux-rdma@vger.kernel.org; Tue, 30 Jan 2018 15:49:04 -0700 Date: Tue, 30 Jan 2018 15:49:04 -0700 From: Jason Gunthorpe <jgg@mellanox.com> To: linux-rdma@vger.kernel.org Subject: [PATCH] verbs: Use correct type for printf from struct rlimit Message-ID: <20180130224904.GA11309@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [70.74.179.152] X-ClientProxiedBy: AM0PR0102CA0064.eurprd01.prod.exchangelabs.com (2603:10a6:208::41) To AM4PR0501MB2851.eurprd05.prod.outlook.com (2603:10a6:200:5c::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 970f3dba-7020-4b70-6e7c-08d56833adf2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM4PR0501MB2851; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2851; 3:qufYuh72itcIaGOt1jYuGyPlSvw2kqaoIMU7b8OXqvM1TOUlwQuRyYuqy6w9yyNyBVosb7xiwHdBDa2TifO8E+chnapRtgntA0sSx97y2Fd1NDPf8+OuAgask0vYDPVg/0lCt6r6Wl4qyPkcwxBmrz6ixMNoygawMG8pZzNhUBA42XW0bP3dJjhWtP8eg9ke72o08pYgOplrDZKgoRfs+6gNI9Y0yIm+6uspeDQkpW8yRYxJyWOoCz56eHltZQUR; 25:ak6AJR/IT8oW7mR+we9EA1kmiWNwtEfQ9hJXWraSPVz9lLDgQDsF4hIp5X31Gz7qp/lQUL9q2PU2CLexTp3KzePHKSAiyIUYYKk0UbTcHa/crON+O4TssJhR7gbsvfuIz7Iboa47T0ZVef+beRJac4ZhmebinDR7kGr6BzyEOOHxX++mxzHHeIw/4Ym4B4K0Hy4PdWqNNzmEJ5XWUOowz6cKNe+TjO06+sBgXAMbTdYKS3XrRXZPY4w2DTLfqzaL4cGt+EwQC2FIIkxRz2kPjMFS9OTXFTYy1TSZ+MUCXMBQKURT9YJ2Jn+BEpqp3U/Mx5Q7+R7zgaB8EacTpRE5Aw==; 31:/MLc0JuB6LDWsENUnVDoG6MJREjmeslu6+BbZbOtodZ8RThUhDJ5f2ftaDXqegr14eWsHnZJbLEk9qJ/Pt9Km8YQmW4qHT2NOmE9Cx0ew86Lx9gDHeNcJtVhme6erFBjjCyQsMt5KDSxoKUwX5vmegGT35R8Pw6MMlqeEjIgJ0snAfoC4bG2pEOydYQGYCJlHQgz5ZwP7nGoKGOrfCjczrCiQuvsXX07JM2bzCtfArE= X-MS-TrafficTypeDiagnostic: AM4PR0501MB2851: X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2851; 20:SRNstLy1+XUk00/Xg/l3qFcMr3ekfyrf2yJsxNnR2O5+ep0QDJEpSwjMlFH5VS12WkOkGYUVogGN+VzXWAZcI9Aq7cpxyK8lX62Z1dAMiER3Uci5SKMoQzMO+f9nOhtC14j9B6BDR9fo7oA9CGNQY82TmGbtNoeKc4EurqjJGw0fud4XLNdwElO2GVA7ti3CaErfzZrkWxC/jqhgJFU4O/OpqXpSu8EylC+h4Vhj5oM9PCf5s+yvAAcQ6lwMH5/zG3dxKb4judO6KUxc914xMy5I4kWgf09GWMBX5FBGyHcxp8DJlNkM/HAmPgOPnsmba4eoLMD1b2/21savrP2YGdT6dTSvCe524ho0RBTkKUMcikHKDEYZfB8eTYMfHVinsPB1fjP0XCM8WjhbneOBAP05sEJ2J/1Mj82jwta9F6EL6Y+0GKZEWNohCbNr0I9+E13x4qBDAzDtMNJRKZ0U4nhSG7B51vE80dv3ENQxQ0E+WFufEAJLYHmLXTLrz/hV; 4:XXo4XxszF13IucB3AFm24BPWuaorKy98froh9aBIVz+ZuWny2H9OCCWgfCzJ36X8OEiCwi0LAWW/dM3oKL+vW1oryPNsCANUBgZJtLenfz/mkbd3mE8xm3bYao3ez4SEORcnDmp8/72OhIPugwwvfTZ7hxhHiSfYjLhiFmThYPZhrebmEj9pCc5ZOOaD7D/YDlZ9pXCfpyU81aYsoofvd3u/hN70eoijyTQENbOEGgj+mwg9g+CEPJjhfOUhoB0tQME1gOod3/D05BeVjdLxYg== X-Microsoft-Antispam-PRVS: <AM4PR0501MB2851E1BFF75EE1CDE18544F9CFE40@AM4PR0501MB2851.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231101)(944501161)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:AM4PR0501MB2851; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2851; X-Forefront-PRVS: 0568F32D91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(346002)(39380400002)(366004)(396003)(199004)(189003)(316002)(46656002)(2906002)(53936002)(66066001)(9686003)(386003)(47776003)(58126008)(2361001)(6916009)(69596002)(2351001)(3846002)(16586007)(106356001)(83506002)(68736007)(9786002)(57986006)(9746002)(6116002)(36756003)(59450400001)(8936002)(1076002)(478600001)(186003)(8676002)(23726003)(33656002)(105586002)(5660300001)(81156014)(26005)(305945005)(86362001)(7736002)(33896004)(83796002)(97736004)(81166006)(52116002)(122856001)(50466002)(18370500001)(24400500001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2851; H:mlx.ziepe.ca; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR0501MB2851; 23:bz+p0GKNz2olwSF4gDjjkhoboHAiS6MMOhmtBAr?= =?us-ascii?Q?wFQE2YiKNNbmGS3kTtNw3kOlZUKU8UpPDgVF6M82P0clgg8NmiyoZWIrIT0d?= =?us-ascii?Q?/94qOu5j495yZjrpEqkM9zn7QXqxlXwvQCqllN0MhFv+sOUo3tnx06E8ud8n?= =?us-ascii?Q?zC0g8PPSbYWHDFDqecwy7lnSWZh13vPlb4+1u6L8Qx+27/wOQhhsESsCZaCz?= =?us-ascii?Q?Bl3wO1l6jFOFo49KplIuiSgWJzGWvyjoabicpJUAO604lICxJ6UfTbhVMqpm?= =?us-ascii?Q?kx3k5FBXKw1lFC4n1/ksj5346UlDxxhP9yom0WbrrjjlczzyVIn4RhhYm800?= =?us-ascii?Q?FtgpVlyUrXYIactcaEZD18XHEUqFqRMKeSdbLt8jBrQHSHBMkpi4kl0eMZUt?= =?us-ascii?Q?w5rhSrVXy9YNXpxEdJBPMS2//OsWdtzN+hNapL05A2+o4n5O35TiFXbvp9Ci?= =?us-ascii?Q?QKqouRDBrtQtvMtd5gFdzQLPYbM4uAAGaBhCc9ve/6yr+Y+Na89MBS3a24uf?= =?us-ascii?Q?VEz/JzB8VYMaLh4ji0i5x34Y17HIxPSg9EMjkizKNbGtw2OeFZ1ocbd+iXGv?= =?us-ascii?Q?GO5kMWLH/nPzZsgydh/vEYu4sOyKqx51EaSEN9c2Y7w/fWSEqXMnR4sqU5uJ?= =?us-ascii?Q?yvF6tZVtEVQgju000IXwD6sQKGvqrxDQv20eWBze1To7zNRGtZdnI43/pqnd?= =?us-ascii?Q?gefzH1HmGdGv/dCDX3RWnHpa6KsWY3VDZE32ps2FHoHkq3HwVcRMPKpMInpn?= =?us-ascii?Q?oXLsJc4RbSF2LWR5jgH9/77XhDvoiT8bQxvQTzSLuo1SKO2r26Sxdf0p5D+9?= =?us-ascii?Q?88AlgCH4ZroHDCmuXPQ+qXofOkgQ/I4bFLFp4BediY4F7BfFWeSJ2j0ckDzV?= =?us-ascii?Q?wrZV7QF9eWQJNd3og90++sD1LzhP4zmVADEgQ36h+txCtBEuTr/FZOFBgsSu?= =?us-ascii?Q?Qmxa1HTqbb0wvRHz1XhOFBjLF4bts/55oYkAFTN30w41s+k2nsyMl2+RiWkq?= =?us-ascii?Q?tu2kYG2iWlNrGHADN/G60JKXfCp745AhVa+FKS+k9zOqLokJyEI1M6ooNnP1?= =?us-ascii?Q?JUgvbRf0XUgNn6mmmNsj3sMvv3507RnItbzFnvQqISsSbitdahYALyByfWQw?= =?us-ascii?Q?uw3VJLAb6y8HeRflfvyPMBAHPjR/plgV4khSWGUg4fryuvNeUI4xjHUHURO8?= =?us-ascii?Q?/h5epPuoZWzuJBvrwfrPzE+t9hpmb+eu5SlR2goAO3lm1mUXizivZmQdxzet?= =?us-ascii?Q?9h7HVBUiOoiJCaAqAEFg6GnKpxA19PWQtIm8aLsipJpqLpjr/FZ1rW2RyCqJ?= =?us-ascii?Q?6FA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2851; 6:7/TQ7nDKgqy4SJAyAu815NHvPtXSAk/UmPmY5OdjnwIBqOY4jkrXczsdI+XDU43YHviOpApCNk1BhWqVJRodA7cMZdVuR77OM61AzasKpIzZNvIzvo9/ZCZkXu8SWwXCE9M+zvuQ4vUT+figfNFWRD/s3PA+6vTRXCZpxkuc3N/C8WeMCgTaPGITcA7/JiCo8ZF8sez44YDAJ9fHy9Z/5AOtLBrSQgekiP8za+yx+LXCvecwU//d7tci3WnJFn5KJWmChBgcE3vcXgiU8U7FUYrK1ZUcKpCNJfowKF1+NKI31qDgGOx4q0V8ufsFGu4YvtGxBWomlQSCUDIEoMAA232nj9yPCi+JtIBnBd5mOsY=; 5:PBLIU3yoO5+yg71dz5iox2VvYXGKOqQgVke6BmiQ/Kvy02/j7PPs8H1TtSAyEPCEzDi/M0I00wcBxU/VQAwaFsHS9kN6d5qq0QJ4lm09h5+Z6UFmVq6JRylbLbmtPPgVARQhOEwoPMpWHpTgpau/+CoekjLbdaqM1dd0TTXnuZ0=; 24:/xCR+b5alTtWEGRDYE87zg5HwtbE9+q9RpBTtVBoYnqQN8Ibj211DFUuKnyiJO26aXNnMiJ1m1TJNf+tRp1CRKW4PkoDQEaaLY6zKtO/J50=; 7:JayXf22Kw3ojbJMTFluwkb/ff26XCMqetYzXyZMyZgaQFJ914DFJAdi7ZL4uwO+B3Z+3s/lWaYtqT2d91JG9M9Bj1pD4abvgpvJOY0gHrse1HUGrPUTMBLZpx0TcM9QBZEasvh1v7F1vbasZO9VEDDEdca1Mc3Kpqljvh+cnGqS4YqZMCr2MYsxro24ASLpU+g/uo2xfb7HqIF15oPuaM/zg1iR/72SvgsJhDGq+ebCjYsiX3C8vNWZw1hQpCQhk SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2018 22:49:11.2197 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 970f3dba-7020-4b70-6e7c-08d56833adf2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2851 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: <linux-rdma.vger.kernel.org> X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
On Tue, Jan 30, 2018 at 03:49:04PM -0700, Jason Gunthorpe wrote: > The actual type of the members is rlim_t which only happens to be > unsigned long on the platforms we have tested so far. x32 uses something > else. > > Casting to unsigned long long for printing is the safe solution. > > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> > --- > libibverbs/init.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Thanks, applied.
diff --git a/libibverbs/init.c b/libibverbs/init.c index ff2c60ffcbc963..cda628b9e0544d 100644 --- a/libibverbs/init.c +++ b/libibverbs/init.c @@ -552,9 +552,9 @@ static void check_memlock_limit(void) } if (rlim.rlim_cur <= 32768) - fprintf(stderr, PFX "Warning: RLIMIT_MEMLOCK is %lu bytes.\n" + fprintf(stderr, PFX "Warning: RLIMIT_MEMLOCK is %llu bytes.\n" " This will severely limit memory registrations.\n", - rlim.rlim_cur); + (unsigned long long)rlim.rlim_cur); } static int same_sysfs_dev(struct verbs_sysfs_dev *sysfs1,
The actual type of the members is rlim_t which only happens to be unsigned long on the platforms we have tested so far. x32 uses something else. Casting to unsigned long long for printing is the safe solution. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> --- libibverbs/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)