From patchwork Fri Apr 19 03:43:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Xu X-Patchwork-Id: 13635626 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 91686C4345F for ; Fri, 19 Apr 2024 03:44:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32C0D6B0088; Thu, 18 Apr 2024 23:44:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D9C56B0089; Thu, 18 Apr 2024 23:44:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A1506B008A; Thu, 18 Apr 2024 23:44:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id EFD1D6B0088 for ; Thu, 18 Apr 2024 23:44:26 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A8292C01EB for ; Fri, 19 Apr 2024 03:44:26 +0000 (UTC) X-FDA: 82024888932.23.3BE3CCC Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by imf12.hostedemail.com (Postfix) with ESMTP id CF6CD40014 for ; Fri, 19 Apr 2024 03:44:24 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="RoCjj1/P"; spf=pass (imf12.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.210.170 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=1713498264; 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=moZbXiSrismoe0dQ3ENCTqJyGh8l337mZ0AAq1SChd0=; b=IXXqo9R0ItOoQLhKSism6TIpkfO0F9gT+Hd1EHkoSas7Vg0d6FZIPO/b+7/IwSuhXCf7F6 yzDTLOONdiERYwrGe4/C9d0VTGz/X6isx95Y3J/CgszWu0yeuF7mM9aRcr+Ax47eO6Lb5E xJX3w74bp7lmXoGBdaB+X++nB9aR9pY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713498264; a=rsa-sha256; cv=none; b=ViB9ZHhlZPoVeGzhS9j9cbZtbk8NRIy2F/vf78ym5CadgPRXakYmyHZ8c74pyl5nMTROq9 8Ruly9eavwEebG1npzA0VKE82XLCihW+4yzdu+pdS14Ec+DLVhBI8e35GRXPCUphInkn9X gaMx894lsSqPzdOVRuC9GkRO16EKWks= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="RoCjj1/P"; spf=pass (imf12.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.210.170 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6ed627829e6so1739642b3a.1 for ; Thu, 18 Apr 2024 20:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713498264; x=1714103064; 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=moZbXiSrismoe0dQ3ENCTqJyGh8l337mZ0AAq1SChd0=; b=RoCjj1/PPZooNFB4Nr8wNoHW/dC1IXoiwKprhddFoDOkntn71xE0OJbHX+7+obzpj7 UBmZ4TsULUkHt2IyKMTpRCr2cA+VI6Q3kG4iU1Wu5CKeFigYg/pY/n8vG9zC/8TBZCkU m0SPyT0g7mzhRqEZg7peiYW5swjejbmTnAy68= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713498264; x=1714103064; 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=moZbXiSrismoe0dQ3ENCTqJyGh8l337mZ0AAq1SChd0=; b=elWGg4l6fWx+cqTGgflaLWoJsNDxnoTHraKLh7adY64rb0//r7GM6FItl8lYnGXWD0 l3gagtLupk+gD0rIv0YmllJW/tXigifDftxnA6S8HX5YY79doZW78lPgrmEo/EXSvF+j myd04L679S2wU+yrvb0dd06jQ5yk8pEzFeEaXcOBX0S//xkDkHK0drqPDSpYxvr9hckA VPQLrI9kO6ENZhECZdX4QHrkm0Rji/3IhuIOCJo1iLbYGWpJWE7k6QJi7FTh0spQrO3x vif5AdOmQGM1uv9u0Zoma4Pmvsq4lwaqbidJiQDBy+ZPKYpD/azN25laoB8t+FtDqs/R vOcg== X-Forwarded-Encrypted: i=1; AJvYcCV7Gp2oUk72N5h3NRGfAzLwS/6HvyP5zL3Ce2uZ4Q6Sm7T4kkdhXga7nj8+tcxbYyQ8UlWoowErIINgeRdLM0mWiGI= X-Gm-Message-State: AOJu0Ywjy7NkSpypqTKDrythRUojPLc2sLcacuA+WtVIT6RydhUFG1md OdXNOpjxzNJIl0+OoPLreD8m3Wqp6U1roiXUIHE/QsRgbnid6xdcjctod6sxr6WNiewWwbTHjS4 = X-Google-Smtp-Source: AGHT+IEwoOQNdqCLD4LdZu6poUSfjmANH+wicy6Ftf8vNTai7e22muf6AlpjizQc6iWEXTVlhSYReg== X-Received: by 2002:a05:6a00:3a14:b0:6ec:ea14:b829 with SMTP id fj20-20020a056a003a1400b006ecea14b829mr984574pfb.28.1713498263657; Thu, 18 Apr 2024 20:44:23 -0700 (PDT) Received: from localhost (15.4.198.104.bc.googleusercontent.com. [104.198.4.15]) by smtp.gmail.com with UTF8SMTPSA id j14-20020aa78dce000000b006eac9eb84besm2263624pfr.204.2024.04.18.20.44.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Apr 2024 20:44:23 -0700 (PDT) From: jeffxu@chromium.org To: akpm@linux-foundation.org Cc: jeffxu@google.com, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, Jeff Xu , kernel test robot Subject: [PATCH 1/1] selftest mm/mseal: fix compile warning Date: Fri, 19 Apr 2024 03:43:50 +0000 Message-ID: <20240419034350.127838-2-jeffxu@chromium.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog In-Reply-To: <20240419034350.127838-1-jeffxu@chromium.org> References: <20240419034350.127838-1-jeffxu@chromium.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: CF6CD40014 X-Stat-Signature: 93wdh1694kepaau6fajk4yskka8tyq9u X-HE-Tag: 1713498264-966244 X-HE-Meta: U2FsdGVkX1+/HnFl2sIIS5QX0lTFFnkAszwFLStgaMt0OVY1NOkEDIf+tn4QPLebucEU8VmO2X/3wq2/p/eKYdYYvu/F1P6tTL9vxh6G6fUyUOe8KWKlsQLlba47azIP7wvgyhVexuWCMn0ScyxthRp2Wm1CQ/AGZC70t+UBx4fxN0xDyT3f7KOoiV5jvY/17IDpQnHIdjsSkOvSUvCKXkEpLq/Ob+2JJ5oxVbOGrfPPuiyJkpPeYRigXkz2gPUBbS5q8ZMgDL+rznWgosBD9yqw2+0RzTfyF5eNzEmdxCpNwbTgFpCwM/OvIihe9rQomaMt+uIIPD+quAVqVExiozyzhqRLOSWOErgfNLAjev8yFew3uToHWM5Pj/ILiaBJCgI5oDzHHkL3ijYaccNO7pM1FKVoycZxa1O70uqlwztl+cJyMVsbsYDAExszWaiEPORBCzgpAL89mjBOXr4Lp0J3hYmrmX0ELuudIZ7dDjHDzPPZMx0sPeGol4QsWTVnb7NEskxSj426BTqV5rWjjtrfJVaxYlpIOIYL6QkiAy0Sp4D8iOEst4vNpmw1auifhElV+YfhlM+tgTiBDvNaa9F0BWBcY/vzfeFpV98Pnzd9LnSJpGYdJyo88pyccJBbRF7LK+XPKRHK8Zympb8eTGJZ4tdHExtXTiN1nDF/C1u5uvmMCz/YfJjg9AzGRh2ewWe70S1PyO5K3xZEi1nZbz9AFkEb7gilBW3mJzx3hVyzGFIQ3mBu5tjP7xKENu012B6MOdWz+sjoCYAGEfyXbUxPRt+Jw8f/FTRFaSeRXUShHNF6CHTIfBpT5NkMns4RcTDIIthX3TaSxazAW7simoV1ijQDujTLqd1Q/ZCu2IFaL/xN9T7yjKl5lEwyljNY0nFbnQ+/LK1wJhXM80hmrUQU3LMAeC/FC41IQs28WOl574mKaEGkLIQQQfRVaj6umvENIxonPUQBWwRdkqZ Ok1kyzmH ZbMcZ//AB5ylEXc5k3NE1CWmbhbt4Cm8zuSUgrYGicDxTwS9S61lO0OIxVqyQVJF1yWJTT7PZwP6LWE1019epb7jbTisclnGRJJuWUNjBK5VTPHlUw5O8KvoMUF7MSTFPHrxpp4DrfPO7M8VvC/vMtMQVXDOye70qLcVaV2fw1bW/z/KhT8rHajCeWNhP44mkKo2Imj674BKGE6hbcdizoSPt6wQpKW8eKS2lXA6YFfZgWh70RSXrFFK3azO6wOvlPuLejKzgqQtWKaVuLl1sr4kMpMBMolSGOWQ4Tb6B8wTSY2o0O+YHXNB1uzLVFPjEogIeTV/eRRTqconExvxuEfs0r/3cta9CLrKtA9XNGfINNO4lLYNRgdQB/apZsETVlHMRdF7/7DUaCMeI1w/iuLemrl6Tp2J1Ybe6RvrFOrD9kAYkacmqWEMnIK69wqEpjTIt 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/ 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..35cdae93e580 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, (char *) &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..b7e72f9804f8 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, (char *)&prot, (char *)&filename) == 4) { if (strlen(filename)) { /* * seal the mapping if read only.