From patchwork Thu Jul 15 18:01:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhansaya Bagdauletkyzy X-Patchwork-Id: 12380659 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D816C636C7 for ; Thu, 15 Jul 2021 18:01:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 357BF61289 for ; Thu, 15 Jul 2021 18:01:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 357BF61289 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 81D188D00EA; Thu, 15 Jul 2021 14:01:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7CDC36B00F2; Thu, 15 Jul 2021 14:01:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 66DD68D00EA; Thu, 15 Jul 2021 14:01:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 461D06B00EF for ; Thu, 15 Jul 2021 14:01:06 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 27D2E18097 for ; Thu, 15 Jul 2021 18:01:05 +0000 (UTC) X-FDA: 78365588490.34.2E578AB Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by imf20.hostedemail.com (Postfix) with ESMTP id E462ED0000B9 for ; Thu, 15 Jul 2021 18:01:04 +0000 (UTC) Received: by mail-lj1-f174.google.com with SMTP id x19so1356475ljc.4 for ; Thu, 15 Jul 2021 11:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Juo3AM+b40dS1hlfCODzT9PCdvoocT9eJfDW+eUcng8=; b=XwEA5JR850+TGWCt6vJfhkjleSiwtQZzAqAkkd/ng64jUPk6N10XXFblaVpnhTkRY6 Vp3gHpAYGpjMuDDtFclHkmA8Lh4y7UMzJLof9RsM1a5syeWOzv3+v6uF32na48RTKEwT LIldxzV4RPbj9aIDeVuke1TIFzu25vg01kF7acjcZm0NXuLs4MlcQlRHKBhykj2k4RfU yNpSJGFgURlj/5skQIisfQs2w24QtOWyXvq7m8kz6774oCJ3scRlI02LNLQixcS69yjN e6WlnQotTb/gZAqBS9USBUF4Rlp+95RNCZb4xlDMDLZbTCZ3348RfmiHLELt9RyMl73X ov4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Juo3AM+b40dS1hlfCODzT9PCdvoocT9eJfDW+eUcng8=; b=gjC6YZbQtRbayoh3L4GdCkhnxqAJ2tgm1EQG85x6yCef39CHvZRdUk5O/wFYgOAwWy HnqNdRBe7PT1oFRoE6lZja2JGCFmvMo46ta59NpoW7X1R8AnNKbZrU3BK5g6K2g4LeEQ dEBdFG2niC0hVFogIE7I80zsrH7ZgeeQFoxZzErB7tnabsHgbdYh0cNBb2YKpbUpDgqI lQxCHVCL9czChZqN4Rx0GhDC/Vtz/+/+B2R9iOUb/IyFHtGf5iTPNESGmRWnfv6ilRsz /DMiNpOY2bNbiym934FF7NXIiuY7fR2P7tkSGWOuLgkv3FI0mYhAAfU2AxdKE671kEck +8sQ== X-Gm-Message-State: AOAM531wiJpFdWKs3CT8RMYagK+IR8rBftdXfpVUTrRItOraIyzneLgC EyvfFq/Ek88825WC8valuDQ= X-Google-Smtp-Source: ABdhPJwuiTKtNZkDuhZjUUNbAr6X37vDGYkYk/ZXWGJBYgBX33LWROANBmsf54sPkcLD8batIYicOQ== X-Received: by 2002:a2e:950:: with SMTP id 77mr5203883ljj.438.1626372063632; Thu, 15 Jul 2021 11:01:03 -0700 (PDT) Received: from asus ([37.151.208.206]) by smtp.gmail.com with ESMTPSA id b14sm461804lfb.149.2021.07.15.11.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 11:01:03 -0700 (PDT) Date: Fri, 16 Jul 2021 00:01:01 +0600 From: Zhansaya Bagdauletkyzy To: akpm@linux-foundation.org Cc: tyhicks@linux.microsoft.com, pasha.tatashin@soleen.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mm: KSM: fix ksm_run data type Message-ID: <343394260f599d940cacc37f1dcc0309239ae220.1626371112.git.zhansayabagdaulet@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=XwEA5JR8; spf=pass (imf20.hostedemail.com: domain of zhansayabagdaulet@gmail.com designates 209.85.208.174 as permitted sender) smtp.mailfrom=zhansayabagdaulet@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam02 X-Stat-Signature: zg59s1c599nwczz8g41whorgck5q4q5u X-Rspamd-Queue-Id: E462ED0000B9 X-HE-Tag: 1626372064-671004 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: ksm_run is declared as unsigned long but in run_store(), it is converted to unsigned int. Change its type to unsigned int. Signed-off-by: Zhansaya Bagdauletkyzy Reviewed-by: Pavel Tatashin --- mm/ksm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/ksm.c b/mm/ksm.c index 3fa9bc8a67cf..057d0c245bf4 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -289,7 +289,7 @@ static int ksm_nr_node_ids = 1; #define KSM_RUN_MERGE 1 #define KSM_RUN_UNMERGE 2 #define KSM_RUN_OFFLINE 4 -static unsigned long ksm_run = KSM_RUN_STOP; +static unsigned int ksm_run = KSM_RUN_STOP; static void wait_while_offlining(void); static DECLARE_WAIT_QUEUE_HEAD(ksm_thread_wait); @@ -2874,7 +2874,7 @@ KSM_ATTR(pages_to_scan); static ssize_t run_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { - return sysfs_emit(buf, "%lu\n", ksm_run); + return sysfs_emit(buf, "%u\n", ksm_run); } static ssize_t run_store(struct kobject *kobj, struct kobj_attribute *attr,