From patchwork Fri Aug 24 09:32:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 10574975 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C54EB14BD for ; Fri, 24 Aug 2018 09:32:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4F852C346 for ; Fri, 24 Aug 2018 09:32:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7EDB2C3B1; Fri, 24 Aug 2018 09:32:30 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4834A2C346 for ; Fri, 24 Aug 2018 09:32:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 50F446B2EED; Fri, 24 Aug 2018 05:32:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4BEA16B2EEE; Fri, 24 Aug 2018 05:32:29 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D4B26B2EEF; Fri, 24 Aug 2018 05:32:29 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by kanga.kvack.org (Postfix) with ESMTP id EBB4C6B2EED for ; Fri, 24 Aug 2018 05:32:28 -0400 (EDT) Received: by mail-pf1-f199.google.com with SMTP id p22-v6so3692354pfj.7 for ; Fri, 24 Aug 2018 02:32:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:sender:from:to:cc:subject:date :message-id; bh=F2idZfVkJ1qXOK3JbG2V/nxdIrzhu73uB/2TBusRpLc=; b=LowUERPNOZMHFRS3uHQB+fOQ7cG2IVgHzHXKsRjE6F3aYPb2n/yZD0MY+ZqUk/CzDv nxOmIEWtV1CZOeiW7VhYG9AaGDXvAjuWhUpQkoHM7nX5kGsn47IFZ/IfGe+f/adlKjdM a2jTHQlicyCXWAr0pJKhodzf4zsee5dMvX0s4MDI9nbEbsgLW5iDCk75rUM2jNWQSFwJ Ovsr7BvDOUe79fPCxhtyBJxi3IbYbgt7jmq2C5yZrOM1v879OL2QDO7SOii2kRA6+QzV vVRMvcdq+ZFKsZzlOJa2uP9DxIcOyeNhISViddzxwSMdY/BSpLo5DjkYJpVt/a56tQnx AKZg== X-Gm-Message-State: APzg51DMN8Bwlpl9x9viXhVgHCBLjrXsWCA6UGPy2Yf+LBnBDMA3oMMY IHNGhbeWazdf7cudrK5KMd4EhN5HrAxAAWB5aUz6OPDgLzCaiJyLmBmBvfuJNiNxAVxNSJ7v9O7 yXWJqvDnWSDA6Vdxc4CTkDRJEQuHXdbACM/lApdZhTBB4Hcrof8GD00PrlzIY7uN0tJuFV5LE7F 9R+Kil7UM5LcfqNFeSdJNzyWMdU24oibZByf7VN4IBi0ODXThgg0125JOEqoRLHBTZE+GhP15Kn UHoSEGFtj+2VuH9MfIrZLOzwpd9PD3UQX7d9RzCG0vE3A3sX20rdLoa+i1WR+7+1iieTCs+nQHd 23BGNwE0iJrjbEgLKcXY1PlHwRi1W56iWu4YL7X4mSTPRoy960jMA/qLWwu3qVShCK5NYxO5dw= = X-Received: by 2002:a63:4757:: with SMTP id w23-v6mr952081pgk.140.1535103148497; Fri, 24 Aug 2018 02:32:28 -0700 (PDT) X-Received: by 2002:a63:4757:: with SMTP id w23-v6mr952036pgk.140.1535103147843; Fri, 24 Aug 2018 02:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535103147; cv=none; d=google.com; s=arc-20160816; b=di6lgkWeUaxqldDDQPfF/MjBY1PMnNu5IjFVsGV7N0pkVjUffOG7hV4AP/0CbAvyGd QTYwAQ3ZltUKqgjh+Nx8Q0b46hlQb0qfwOqCxn6695FIwUo6M7AqBzg3AvojDXeiGM4I MngDIxZlGprWPPIC51EgDqwy+cT7alkXjiDTOY2MpCw5obS9hOdPwrPg08IglEsZ13E0 vT1cbdjnZ1AkUKfWQlycp80YSFO8hA4uC7eRMD18VbounQ0YUkE1XRvi9ynttqqeY8+v vS5p5Fk8EKnhSYEEGY8/0Ux1Wfy+vnvYx0ocOmyCMe+mpq95s4e2Reoo11CM8JIRGLlx K1iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:sender:dkim-signature :arc-authentication-results; bh=F2idZfVkJ1qXOK3JbG2V/nxdIrzhu73uB/2TBusRpLc=; b=HJ8MnOo4kSOoFnWXzoXXXlgnSe5Vr+Bu6vfqpsxjXTyLxxn8JT+6PMWoqgF7eShU44 n+oVzDT5NCP/voiUxtku77Tevtk90drNbvgvHUxT7qnVmn1CySlxV2RMMF1Mv8vglcdO yP3aX9pjGc8cJ+MVjPGXSFK5Wb6G8Vf52caCPlFLWXz7nHyoJmSjKP6TLiZOT0FaYaCF jKLqhSU9V4VvoMX8+aBM/l6SRjRyiEpqz0PjstrVprN1KFCfmj4Dom6eZBDEKq0SOiuB as14c5LmBPFJYowFSnL9rvvNueb9YvOy6/yHl2CzTytI5YGggakw2mCBWg9OZCoKOLtA CBwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BoAtPDKB; spf=pass (google.com: domain of nao.horiguchi@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=nao.horiguchi@gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 192-v6sor1602228pgf.194.2018.08.24.02.32.27 for (Google Transport Security); Fri, 24 Aug 2018 02:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of nao.horiguchi@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BoAtPDKB; spf=pass (google.com: domain of nao.horiguchi@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=nao.horiguchi@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=F2idZfVkJ1qXOK3JbG2V/nxdIrzhu73uB/2TBusRpLc=; b=BoAtPDKBpo7Z38mhsdKONIvEzrIxMr7TTojyzO/rU8MGzQRbWunuy/8wXTvq8nzm78 iSyj0Vy2fLKJsdpGJgOPDKZiTN3fyFnUPsPdWNGy+T91qzBM/pbk2tUf1RSogYQ/r8Sy KnjPc9ITl/12SqG2AaJBtCDlDPh+HdFKMH/uYFJPjt/KFWVOKZPhLS0aK3lbhbwA056H VcCAMGW9GckbT1mXnLBrleX9C9kxM6/1IHyyteE7MLJUSmWVyo1yuEgR6udOpC/ELQQz Cjwn5tddWGZGh+QjUE/t5nzK63CAb7AlWCXM/ausIvGGgkgHIcK97mFgOKlIVGmPthEr x0Pw== X-Google-Smtp-Source: ANB0VdZdVXVrhk3WdLpX7p8fHDAieSTt5tfMi/IfpDbXFeRFrTw5ZfgStFrbSLIu/tWov6vQvHOuMQ== X-Received: by 2002:a63:b544:: with SMTP id u4-v6mr925687pgo.247.1535103147147; Fri, 24 Aug 2018 02:32:27 -0700 (PDT) Received: from www9186uo.sakura.ne.jp (www9186uo.sakura.ne.jp. [153.121.56.200]) by smtp.gmail.com with ESMTPSA id h7-v6sm16746557pfd.155.2018.08.24.02.32.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Aug 2018 02:32:26 -0700 (PDT) From: Naoya Horiguchi To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Andrew Morton Subject: [PATCH v1] tools/vm/slabinfo.c: fix sign-compare warning Date: Fri, 24 Aug 2018 18:32:14 +0900 Message-Id: <1535103134-20239-1-git-send-email-n-horiguchi@ah.jp.nec.com> X-Mailer: git-send-email 2.7.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Currently we get the following compiler warning: slabinfo.c:854:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (s->object_size < min_objsize) ^ due to the mismatch of signed/unsigned comparison. ->object_size and ->slab_size are never expected to be negative, so let's define them as unsigned int. Signed-off-by: Naoya Horiguchi --- tools/vm/slabinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git v4.18-mmotm-2018-08-17-15-48/tools/vm/slabinfo.c v4.18-mmotm-2018-08-17-15-48_patched/tools/vm/slabinfo.c index f82c2ea..eebeeb1 100644 --- v4.18-mmotm-2018-08-17-15-48/tools/vm/slabinfo.c +++ v4.18-mmotm-2018-08-17-15-48_patched/tools/vm/slabinfo.c @@ -30,9 +30,10 @@ struct slabinfo { int alias; int refs; int aliases, align, cache_dma, cpu_slabs, destroy_by_rcu; - int hwcache_align, object_size, objs_per_slab; - int sanity_checks, slab_size, store_user, trace; + int hwcache_align, objs_per_slab; + int sanity_checks, store_user, trace; int order, poison, reclaim_account, red_zone; + unsigned int object_size, slab_size; unsigned long partial, objects, slabs, objects_partial, objects_total; unsigned long alloc_fastpath, alloc_slowpath; unsigned long free_fastpath, free_slowpath;