Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1996540rwd; Fri, 2 Jun 2023 03:22:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ZRH1/Il76WnXNKE3zgivExrVuhjWTAwyJpcxcJCfX4kbjyqvNYalZC7pgNe79miwpUdPz X-Received: by 2002:a9d:7841:0:b0:6ac:8801:24d6 with SMTP id c1-20020a9d7841000000b006ac880124d6mr2107302otm.26.1685701352747; Fri, 02 Jun 2023 03:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685701352; cv=none; d=google.com; s=arc-20160816; b=ZZpu5LmlfALQq3OTTGIQ3qUonw7r5zU69fbRo8L6bMzxHwovvXE+7HYKOdvhihAzhi +lpvsJGNU1T1NgBkOm33bg4rns7bzeGpkpc94++5z9rxevd7o8sDqYgjYsAi4pqme4VF IJ1fk6XUx5gIG53SAT6AEOGg6nmq7iy6y50B9hgoQlqt6EgUL+8GB0AfU/Y9Lu1bADb2 7eY0bf65jMpPFp6wHh+h5fdab7xIHzQPlKlff16i/ce47V/wYcFkajEJDYPN2PxYw77L 8wxE3sGii5wveXLoExdH2YcAY7xKosdQEwHVCldNOEd7WWGsUiBNxQK3+6QAcTm0Snmk YO6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=2hyZGB3MGa7vf2rLRzCGFNwMw9GG2IWMkUvaL/SujQg=; b=WIxYBw/9M9qwBsJXv7MPvPv52YciATSMM0g6sd6RkP3gslGBRfo2ddy8i2FrLHdlOK KISiARQMaxm541ZQZc90RuI7oXs3qWzPIdj/ilNHF0ImAjuoTQqh/jC2Bf+K4BbMB9JX indCVZ9t4C76IRdabIFMM47HRUnr6bVRunF4HC1npE03yA2YnMg6FCilC0g+RgcMDYqN hcKwfS3U3v7bV31Mdis9VskFLxi1uDqr94csxlJbQ8TEd+xX3+lLtLHWc1ASkWwP9QPD poqtT91bmY+NP6kNIp+r1cbquhMh0/iXMC7x2vGk+tD4wPPx2WH5eKrFRK+zcyNm4A5U w48w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c2q8LjwN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l192-20020a6391c9000000b00514477c4416si728202pge.801.2023.06.02.03.22.18; Fri, 02 Jun 2023 03:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c2q8LjwN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234460AbjFBKFp (ORCPT + 99 others); Fri, 2 Jun 2023 06:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233639AbjFBKFo (ORCPT ); Fri, 2 Jun 2023 06:05:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 866ED180 for ; Fri, 2 Jun 2023 03:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685700301; h=from:from: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; bh=2hyZGB3MGa7vf2rLRzCGFNwMw9GG2IWMkUvaL/SujQg=; b=c2q8LjwNnRvS/SDTzF5myjeC9SPBkFI231d2+ubaSMIdYTcbUdzzxsVcuVlaftsV0ZEuqU guBy3HHni/Nf5g5i7mZb7kkG2g7VkfM/Yl0YfwaX+wlCQUPxdMNqD3vHfXQVeGYAHikUWW kVuBm45ccJ7rgWHb1CqHbyQP1Usew74= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-StvabDJ4My6MPxNirynWNQ-1; Fri, 02 Jun 2023 06:05:00 -0400 X-MC-Unique: StvabDJ4My6MPxNirynWNQ-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-4f59c4df0f9so1391847e87.1 for ; Fri, 02 Jun 2023 03:05:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685700299; x=1688292299; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2hyZGB3MGa7vf2rLRzCGFNwMw9GG2IWMkUvaL/SujQg=; b=ASNCgFmh90AIvQsyWLDFUs4Uc73mjass/h4gJ3QaSN3NF2Yk54+ur9PWBgeIgugXFx LEhh8hn0mk1o/ubOfzNEFe4TBeQtsqdlxv6B21+ZL8AEDxRoeKt5iZ9G7BlqEHkqr0Zq ZF4CTNdOoq7CeAt/osMqNIHJtUpKZMh7XfIPgd3WNNwnSJqOL4QceHQnXfsNVjFEk7k1 3y6TmcHxj6Rs4JGcRGlT8iPA2w8aHVmtDV1kZrTnJqBKRpd4SK5loNCEA+B6cQwQYrbx qvVpvW8HRAiGzgTB82bZ0PfzhNv3bQd6NPYV6BviM0KpK68jEn1zinY93Vu7bYTdw+o+ wcbg== X-Gm-Message-State: AC+VfDyPzJQX6cNYp/WBBme3MuyodE93JLkaiDEHOdl5+MNllkJjhO3G 8KGxSlDOOX47UFyHtGr9gT/FzLSeqkHoP90kUAWDChfNFVOnWmPqNNi9snUX8MeuM/ED3jOX8BW t5MttSS+thpPt3MDAiwnucfCg X-Received: by 2002:a19:c214:0:b0:4f4:b92c:eef5 with SMTP id l20-20020a19c214000000b004f4b92ceef5mr1538956lfc.68.1685700299105; Fri, 02 Jun 2023 03:04:59 -0700 (PDT) X-Received: by 2002:a19:c214:0:b0:4f4:b92c:eef5 with SMTP id l20-20020a19c214000000b004f4b92ceef5mr1538940lfc.68.1685700298705; Fri, 02 Jun 2023 03:04:58 -0700 (PDT) Received: from ?IPV6:2003:d8:2f2e:ae00:f2e3:50e0:73f7:451? (p200300d82f2eae00f2e350e073f70451.dip0.t-ipconnect.de. [2003:d8:2f2e:ae00:f2e3:50e0:73f7:451]) by smtp.gmail.com with ESMTPSA id h4-20020adff4c4000000b0030647d1f34bsm1244929wrp.1.2023.06.02.03.04.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jun 2023 03:04:58 -0700 (PDT) Message-ID: <18e69073-1007-07d8-bf0d-5f400ecab8ea@redhat.com> Date: Fri, 2 Jun 2023 12:04:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 04/12] selftests/mm: fix a char* assignment in mlock2-tests.c Content-Language: en-US To: John Hubbard , Andrew Morton Cc: Peter Xu , Shuah Khan , Nathan Chancellor , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML References: <20230602013358.900637-1-jhubbard@nvidia.com> <20230602013358.900637-5-jhubbard@nvidia.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230602013358.900637-5-jhubbard@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02.06.23 03:33, John Hubbard wrote: > The stop variable is a char*, so use "\0" when assigning to it, rather > than attempting to assign a character type. This was generating a > warning when compiling with clang. > > Signed-off-by: John Hubbard > --- > tools/testing/selftests/mm/mlock2-tests.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/mm/mlock2-tests.c b/tools/testing/selftests/mm/mlock2-tests.c > index 11b2301f3aa3..8ee95077dc25 100644 > --- a/tools/testing/selftests/mm/mlock2-tests.c > +++ b/tools/testing/selftests/mm/mlock2-tests.c > @@ -50,7 +50,7 @@ static int get_vm_area(unsigned long addr, struct vm_boundaries *area) > printf("cannot parse /proc/self/maps\n"); > goto out; > } > - stop = '\0'; > + stop = "\0"; > > sscanf(line, "%lx", &start); > sscanf(end_addr, "%lx", &end); I'm probably missing something, but what is the stop variable supposed to do here? It's completely unused, no? if (!strchr(end_addr, ' ')) { printf("cannot parse /proc/self/maps\n"); goto out; } -- Thanks, David / dhildenb