From patchwork Sat Apr 20 00:35:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Xu X-Patchwork-Id: 13636874 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCAFCC05023 for ; Sat, 20 Apr 2024 00:35:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 808D56B0087; Fri, 19 Apr 2024 20:35:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B8646B008C; Fri, 19 Apr 2024 20:35:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A6EB6B0092; Fri, 19 Apr 2024 20:35:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 506C26B0087 for ; Fri, 19 Apr 2024 20:35:31 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 0261441645 for ; Sat, 20 Apr 2024 00:35:30 +0000 (UTC) X-FDA: 82028041662.17.968ED97 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by imf20.hostedemail.com (Postfix) with ESMTP id 3753C1C0004 for ; Sat, 20 Apr 2024 00:35:29 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=S4oNPun0; spf=pass (imf20.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.210.175 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713573329; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rSZUBk+dbCuBhbQEFLeD5/VPzrbTWdtNRtfBg+KonAw=; b=zilZg+rQOe+stZRlp6uCbIuZ4oSAuEnEmWD73gLqfOsrHoMGTdFs3kcTDGWkDkLsDURebL dF5QOz4ojOmxv0+PuXO2rRcCOoc9lSih49+U/QuX7zhTobcUTXMYPiY/QxOd6VB6v20yX4 EtLWK+ctx77owNv78D1JLrO48YNMWJw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713573329; a=rsa-sha256; cv=none; b=Gmri4TcADS5T9d9SxH3BImPjEQjsb7cuMEyIF7b6hfoB3Dx3Qn9WbFwaHw8Lxj+O0nk2I1 aw7kc5kLrrOqr7VHhir6JrrbJb0YC7BVHJ32GA8uyiFRmAsWudq5EVgNgir0Yk5T5GUaUR U1yigq/Y1Evvc80R5900upp3eErRtKg= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=S4oNPun0; spf=pass (imf20.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.210.175 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6f16b8625fbso318854b3a.1 for ; Fri, 19 Apr 2024 17:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713573328; x=1714178128; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rSZUBk+dbCuBhbQEFLeD5/VPzrbTWdtNRtfBg+KonAw=; b=S4oNPun0kQAx1tHg2ehUc+f7NldT5p11et3zS9dL+9nwxKARHWrUxlrqGzROdJoiTu Wt1eqWOamdPpC4yqlvOKi1sTB1q3ZEaqs6e3yWNZWveNPPLBHryGAppPA6WR7WLNQ0qe EMYupYJDaGp/p3VRUZbDxUwI1L8QrEMY9FRPg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713573328; x=1714178128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rSZUBk+dbCuBhbQEFLeD5/VPzrbTWdtNRtfBg+KonAw=; b=T+yjLr4kUry2bz2NofgfPs9G31LQTfD52qVVea2WL9wuwI1NhEMQGuIZgqzvMl1yL8 WHGiUUxZan8FaE0LJ6NrleMDu7eaKAiAHdSRT90FCxcc8M4oNk+/9qp4ScOS1Gd7UIVu 0gW7K82zCvl3DS2QskN730QmzoAEwuW64BzkV8+rkrjzmHgXPyjOxVuQ49LYgt3i3bbA /kYLkCyVd7hIf/afGIXAxFTKUMGe6iu7OGss8YnXFyjkjSWrLjladxhmkFzygy63vTfp nj1fYNU+B4DlqEEu4ir4lOD4pdYxrw+91FqLprkUf2WV1P+tofgl+mUvzxG4gtfcwfwt o9gg== X-Forwarded-Encrypted: i=1; AJvYcCVeIsBlcfRBm9YXO5iMEaQr7IG65kxyTj4TU2EuW+jLzyBB1ncCitD+WTUTmsuNcwE9pi5yhOiP1V/HNtpmUIqGy9s= X-Gm-Message-State: AOJu0YwHgMYdUXmhkBADMGVIsGgSOqGeSfAYnNgHyr6Di7zX3XgseZrx dzQrJAvTIRqmevr4YwSeAN1wl+2rKmTGQO9G1IumZq+Vg2tdofqdplfmRgwiEA== X-Google-Smtp-Source: AGHT+IHAnWaldXLkr5TP+r9/gYF60huLiq5MwiOnjV0Lg+sR9Vqt5NIyvRmASZIUPid9B00gjHBAIQ== X-Received: by 2002:a05:6a21:168b:b0:1ac:423b:7c7a with SMTP id np11-20020a056a21168b00b001ac423b7c7amr4351613pzb.21.1713573328072; Fri, 19 Apr 2024 17:35:28 -0700 (PDT) Received: from localhost (15.4.198.104.bc.googleusercontent.com. [104.198.4.15]) by smtp.gmail.com with UTF8SMTPSA id e15-20020a62aa0f000000b006ece85910edsm3838926pff.152.2024.04.19.17.35.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Apr 2024 17:35:27 -0700 (PDT) From: jeffxu@chromium.org To: akpm@linux-foundation.org, pedro.falcato@gmail.com, usama.anjum@collabora.com Cc: jeffxu@google.com, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, Jeff Xu , kernel test robot Subject: [PATCH v2 1/1] selftest mm/mseal: fix compile warning Date: Sat, 20 Apr 2024 00:35:15 +0000 Message-ID: <20240420003515.345982-2-jeffxu@chromium.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog In-Reply-To: <20240420003515.345982-1-jeffxu@chromium.org> References: <20240420003515.345982-1-jeffxu@chromium.org> MIME-Version: 1.0 X-Stat-Signature: h8godngq9gxgfq3654igkq1xoy71hxd7 X-Rspamd-Queue-Id: 3753C1C0004 X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1713573329-892583 X-HE-Meta: U2FsdGVkX198xMa8WQaIbqtkDNPzc+/qCVYBT+pwxiiBME6XoaZatd99YoRkfoo7K59FjCgu65soTxiXY1TZqIxpBAY026he0T07sqmcDkhxO7dw9AB6uyQ0GgwYcAjIdju0SlwdFPRcu+50oI7xBA/qh32d0dcdMVqxutmCyq7Lqz/OqmmPh3TOTjIwl7ODGAMb8qNPvlv/+EllYIhYYhc3ptK0DMZ042YLGzz3bPZ8QKSIx5rYU6UGEWwNK0RxxL4FcGt9/BOGDBzO0fVyH+LFJ/FhPhsCxoXlh8eIVqE+Ywm8CZDg9DxymEbCuFCkGIicpYd+FdBucrOOzPq1CTLUg5AhkZSXZu+WPHdI/4e1ebzITZFwzFvhu9ZFKSZf25mdJwyM3z3VelsVF2UKbj0taCG+SpKupaOISdh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c8mOIa7gtEmr+F08XVgf0FoyC8977s+Yz 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: List-Subscribe: List-Unsubscribe: From: Jeff Xu fix compile warning reported by test robot Signed-off-by: Jeff Xu Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202404190226.OfJOewV8-lkp@intel.com/ Suggested-by: Pedro Falcato Reviewed-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/mseal_test.c | 3 +-- tools/testing/selftests/mm/seal_elf.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c index 4a326334726d..ca8dbee0c612 100644 --- a/tools/testing/selftests/mm/mseal_test.c +++ b/tools/testing/selftests/mm/mseal_test.c @@ -79,7 +79,7 @@ static unsigned long get_vma_size(void *addr, int *prot) return 0; while (fgets(line, sizeof(line), maps)) { - if (sscanf(line, "%lx-%lx %4s", &addr_start, &addr_end, &protstr) == 3) { + if (sscanf(line, "%lx-%lx %4s", &addr_start, &addr_end, protstr) == 3) { if (addr_start == (uintptr_t) addr) { size = addr_end - addr_start; if (protstr[0] == 'r') @@ -208,7 +208,6 @@ static u64 set_pkey_bits(u64 reg, int pkey, u64 flags) static void set_pkey(int pkey, unsigned long pkey_value) { - unsigned long mask = (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE); u64 new_pkey_reg; new_pkey_reg = set_pkey_bits(__read_pkey_reg(), pkey, pkey_value); diff --git a/tools/testing/selftests/mm/seal_elf.c b/tools/testing/selftests/mm/seal_elf.c index 7143dc4f1b10..48a9b12f99de 100644 --- a/tools/testing/selftests/mm/seal_elf.c +++ b/tools/testing/selftests/mm/seal_elf.c @@ -105,7 +105,6 @@ static void test_seal_elf(void) int ret; FILE *maps; char line[512]; - int size = 0; uintptr_t addr_start, addr_end; char prot[5]; char filename[256]; @@ -136,7 +135,7 @@ static void test_seal_elf(void) */ while (fgets(line, sizeof(line), maps)) { if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*u %255[^\n]", - &addr_start, &addr_end, &prot, &filename) == 4) { + &addr_start, &addr_end, prot, filename) == 4) { if (strlen(filename)) { /* * seal the mapping if read only.