From patchwork Tue Jun 20 01:17:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13285108 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 F100FEB64D9 for ; Tue, 20 Jun 2023 01:17:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3531A8D0005; Mon, 19 Jun 2023 21:17:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F0D08D0002; Mon, 19 Jun 2023 21:17:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE7E98D0005; Mon, 19 Jun 2023 21:17:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D37518D0002 for ; Mon, 19 Jun 2023 21:17:34 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A1AA240500 for ; Tue, 20 Jun 2023 01:17:34 +0000 (UTC) X-FDA: 80921363628.29.2847181 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2075.outbound.protection.outlook.com [40.107.101.75]) by imf20.hostedemail.com (Postfix) with ESMTP id 920D31C0004 for ; Tue, 20 Jun 2023 01:17:31 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=qRrXPykz; spf=pass (imf20.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.101.75 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687223851; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=S08M6qCxf7uj+kvbpIUgDzdHbXyg5xFGSG/3z4Es1Z0=; b=J1qz0RCFD8LVaQdt62jAR8O3927XzXchYdOqiAec5AoecdFjtvrnJ4NN9n1vlMS+Yx996k Iqu4L46zKucN6itH6gEXrXgDzGV2ZT2zvxqrZvgUl0a+WnTao87cxrSeqSSUM9ndnpiGvo i1WNDFqT/0U30jzKlZMQ/wq4byuGqXU= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1687223851; a=rsa-sha256; cv=pass; b=qyWW+NvTbv0hMdFIVdRKkbBDt4R/+fNumKwugF94309Hg3S2p69kUKA3Vow6ztJmUO/iMk /JZvu6zTJTKn8fJlhSL0KoscPhjzqzoLzYFGRt16SDt+//iCHL982ZNv3Twl7jODuHblgZ qam/Y1M92vw+8d11HjNa5kvcjWJ3Ah4= ARC-Authentication-Results: i=2; imf20.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=qRrXPykz; spf=pass (imf20.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.101.75 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gJh/ElfXvtySmgnjlyNkeXRiq9BFzj5R2n1acYXzC38k295aSHHkAjOEVMYMpyhIn1ID5lPUd4+4dzM2qFiFr2p5gFk5QhUWkx0mk90St+3LbvRaAt+hO7njJWns5KHvsdo2hNOJfsabJGrzyrjyPq38g/BdLX/XJMEBcS0duKf3V6yP23kWVKd25a+MBumIg+ghMdy6R/hmDZQhHAOhathvLk3ubP5W4fwbd44Np31qC0rIg4SIfwHA330OfHgmi9QhFfIfdRLDL5u3JkdpyNf4HcJ4HaeuGb0R1yde0Z/+iTl98XdAn/RVz6eMpsL2k7WAgDktHyIxrjfWnJKtDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S08M6qCxf7uj+kvbpIUgDzdHbXyg5xFGSG/3z4Es1Z0=; b=LbzunH2C7NTPTh9MIZ9lAjGBJH+odC6Ym1EcrKHmXfISRJpOaiTVmyY74caDHQHEsTryOuBmCN2wTFCUaa5WgWx6chgG47C4oIVZzM+2f4CF+Ik2DQXyWCYHwiA3SrqNY0SLrYLhPnAkJfsKh6xjU0Bh6DETX7ZdmnJppcXR8fh3ou8HBLdPfAVBbtBJiK7zphukCK0rIV3pMDkvo9L4XPAmiAm7XNj5VqSn82rOsNsVfBydWzLJ8MJ1XcW67AzbpPr8tFalN9X4UUmAiAn4K7vy1SOcJUDP7uuEcJGKgOFI+yP0SdlxfPrCtkeBMA5V/oOE4In5z2uGQ1TKAeK03g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S08M6qCxf7uj+kvbpIUgDzdHbXyg5xFGSG/3z4Es1Z0=; b=qRrXPykzU07YXHBWaouyzmJ2ngdu8d1Oqm/M2PUnQY0LQCm+W5bER51V0K84vvfMQdT/qvz+t/P7JfeKjimE3bmRaH4VF001839ny0XRw9v79JEMG74ypSgO5+MYMp+d154RRWfWUdL2Wd3PCHCaJzyvRsQ1WqFxxo+EN2w3hsnwzHxnKlyPk7rOna+gV/gI+PP5k9raWM5nw4iVctGmyxdGEofK71QIegaD4qCSE86rIVGLy/ZMsGPQoNIB5yJuQ0TgnvLwtzvBW2keiPlK97lW4dN0qCrXfTVPZKuiGL/FOF8qZCGRDHLVQs+Tx2FhoTjzF8WW2iParTmpdRMKpw== Received: from SA1P222CA0010.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:22c::12) by PH0PR12MB5629.namprd12.prod.outlook.com (2603:10b6:510:141::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.36; Tue, 20 Jun 2023 01:17:28 +0000 Received: from SA2PEPF00001504.namprd04.prod.outlook.com (2603:10b6:806:22c:cafe::d8) by SA1P222CA0010.outlook.office365.com (2603:10b6:806:22c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.44 via Frontend Transport; Tue, 20 Jun 2023 01:17:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SA2PEPF00001504.mail.protection.outlook.com (10.167.242.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.17 via Frontend Transport; Tue, 20 Jun 2023 01:17:28 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 19 Jun 2023 18:17:22 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 19 Jun 2023 18:17:22 -0700 Received: from blueforge.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Mon, 19 Jun 2023 18:17:21 -0700 From: John Hubbard To: David Hildenbrand , Oscar Salvador CC: Andrew Morton , LKML , , John Hubbard , Peter Xu Subject: [PATCH v2 03/11] selftests/mm: fix "warning: expression which evaluates to zero..." in mlock2-tests.c Date: Mon, 19 Jun 2023 18:17:11 -0700 Message-ID: <20230620011719.155379-5-jhubbard@nvidia.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230620011719.155379-1-jhubbard@nvidia.com> References: <20230620011719.155379-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001504:EE_|PH0PR12MB5629:EE_ X-MS-Office365-Filtering-Correlation-Id: 5dc43935-c505-4b20-cc17-08db712c1d15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ao0QKS/BWIR/4K+dSl1hpv/tFm7clkZKgDV72RcTulKklp9YYH5eeVA7to2OnPEywNmrE9UKlRK073iigo0f+yFRJrcP0Np2yx9A2VHB1JDTcBRmS3BQ7Q41GaBAVJcnTZd9dWGY+AhUJZV2mlvfbNKyOpSFNjetEJnmMEkJdcuvTNYjwFIWy/4aA0ZG1b+3CuEOhXYuZvHd0TOV3nAl0+JIHMJ8QKdN3ibGGHyypMeUX+cH7lqxYemvMawXClUbZJaIjnWad/EsE1UrgBuygeUMUtFrcdnWMgWlMnSVcwQVKRiuHBJDdvpYFn6DSZ0HvxaCp2KqLp49wCE8f5wauelXofbG2Y87QBmVtN3f7mK0iugXeVnaSOy/EVRTPV8WvLcU4vJ+cytF3og1O1I+jod0GxYEkzhbGXDg8RF/izcXVbX01kACuI8axMwHFZwVCoY9l23wdDW7OfgQQjQYQLGNj6/bTJutKz5WVFdC9Fvx5XCHAlZ6i7fKeR0F2oXYdx9yVuP3wvG78+qIKxQ3bDcXahaix2Tqt+y8AsXo2E/0lf0Y52NZ/xJFTp4o+cTpTFUfU3VgQL4OmtOaPH+Rpfk82JwML2DuK+Qx+TTQbYkezZ6nBdPMI2/1XPLANaB8rDe5mejUzdTuVqcERR4jG90VF9OfBgKOJJiXCWB6JzjD+AykkzRHGJgNr5jeNBGoud/OP1OmTsodqmbslt+TVMsnipwqKuDdJPfd/PYzXzKUg4J1nJ/6mIopEiqrurm6 X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(376002)(39860400002)(396003)(451199021)(36840700001)(40470700004)(46966006)(356005)(336012)(426003)(2616005)(86362001)(7636003)(83380400001)(4744005)(47076005)(36860700001)(2906002)(5660300002)(82740400003)(4326008)(40460700003)(54906003)(110136005)(82310400005)(70586007)(186003)(8676002)(70206006)(8936002)(478600001)(36756003)(41300700001)(40480700001)(1076003)(26005)(7696005)(6666004)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 01:17:28.2274 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5dc43935-c505-4b20-cc17-08db712c1d15 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001504.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5629 X-Rspamd-Queue-Id: 920D31C0004 X-Rspam-User: X-Stat-Signature: gan88bjw66khe7q5mgkbfcxjzac8orqy X-Rspamd-Server: rspam03 X-HE-Tag: 1687223851-252650 X-HE-Meta: U2FsdGVkX180wU2V3Qt8RDBNISNOanumHIK4czQsErxCtvmUUuA1E08P9cVO4J4WHxJFI9SttNQzqdRSC2fKwActG+gFwjTR1I2CVHP++a3vVdrertGfQDoyxQf2ss5sVTGGqY9OXd+r0+Bc4WYIBaQGkFw+gOVGvmI9sNN8mxt3fINmXIX/B/ka4PyZS50lfS9j2Z733tjYlzzVcOraGIl/8t6keIqiiSNV7+wWCv04RYaYy26TEJdMgNU4+R4IY4yXfFycHHsMBJxWF+fJUutcml0SsyDU+obAq01Jy/4wTzeX6yrbanGMxLNglJXYzWkmcT2DaaHOzfYg1uROczXKitgb6WsbweoVyl9hbFO7nppNiMCWPFbcE/LgM13HNjb6NrEL8yghzXCYR18imMc2f7J7cjeQJkAC+QzS8+XubDG+4KCEyjCcMAc3sZx2zoQV09GQjEFYd3hCD27tutAajfMD/HtCgZ5AkoYEjGV2lhpD0XCG5AlFRPg6OZfTuBlMCiNrztFzShCVtzdrJQqP2bqTW9qbbXTmyo5NpnQ57JWCyIQGsWaRP0yJRrko2zzz8nZ5UguX8jYpSBVyUXD4w4Lu4guHyRNUORO3Y1V8RM0qIMPsjg0MGKvjv4bAFdVwAwRoVuumytwIavph+vsJhPkohZ7Wmm7NJnAzSzU8XnGHs8b3ZqLjkM/qALA9e0/DXX6yvFaGAhYXbfjauiHYW6sqftKFup5q8lk855uYcDBTTIsH6InOkww5IAXQujdzVXcL1lORVWXgYW5tXe2mNjSpE6SINb4ZyQ8oc+CAtfojMDoETFvI0WTE3vIfKlK3SE4KUWHIkaAjY/8MJWQg4u8s/2s8VfTudde73dB48p59nd+J9/BurqFQMQ8/WgfnKtISACUUSEw1s8mRMg1cKhsWLDfQqbDIGAg5i28jty9XJNeU5Ff4LgjroSYqo/V/JkeYt3pV7BjOWZv 8g5stHaj Z/hwnM20Jc8qqSPobP85iMUis2Zlkww2VJxvF+15Rqz/HbSWtgPmByvDtT4j7LFUH4H4/dhsiwp5bhoSdMAnfZxcHG5ROgfcOR/y4rtuJ2izJ0Vb/ji2DWD3GwfIhPc2B+6yY0GuZnEy0pYbyT8RIbuoBWB8lLQRwXTbGtW/acaTR5xH+wRVsht/kxvsnOODZ7OnKLDYBaPTQff0O636/+a+aWMingeqFu6qixk23hICcKGU1KyuWhBGUgbP2MpMY0pDxROty04ZPStw= 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: The stop variable is a char*, and the code was assigning a char value to it. This was generating a warning when compiling with clang. However, as both David and Peter pointed out, stop is not even used after the problematic assignment to a char type. So just delete that line entirely. Cc: David Hildenbrand Cc: Peter Xu Signed-off-by: John Hubbard --- tools/testing/selftests/mm/mlock2-tests.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/mm/mlock2-tests.c b/tools/testing/selftests/mm/mlock2-tests.c index 11b2301f3aa3..80cddc0de206 100644 --- a/tools/testing/selftests/mm/mlock2-tests.c +++ b/tools/testing/selftests/mm/mlock2-tests.c @@ -50,7 +50,6 @@ static int get_vm_area(unsigned long addr, struct vm_boundaries *area) printf("cannot parse /proc/self/maps\n"); goto out; } - stop = '\0'; sscanf(line, "%lx", &start); sscanf(end_addr, "%lx", &end);