From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF39B1552FE for ; Fri, 3 May 2024 17:55:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714758929; cv=none; b=G1dATj5vOcfxcYxLb2te2zKzCJ7Obdf0AB2Wgm8T0r7C9+va5SoTtMUvDps6IJOFQYrvtdZQq0WDrkCKPq5wqxs43CqSXiSxHXZrVAdsS1PFHrtGQbHfRogmU01xoh37LrCaf6/SJgdqfcPzZXHsLDzkepRQMAr070d67B3kR8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714758929; c=relaxed/simple; bh=XThys+ktto6hQQOqPTl+PFdGrawJ1c4UzykbwV+R3xQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MSE288MfMgkxQbSvl42oiZGigGYJUsM3RXK1QC11haUEwPDYud9+ubmaDOZY9Z5UsLZJpiNRV+s+9/ZKqUoX1Xm3Un7k1dki+epSsYZxxGEa/DqA9yFM3SoWa/7TH6OqSqv2qyG7hSO0Jo/ODpK3kYn1TXu5bbLtYkUd5YkOyNM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=G2jsJzdv; arc=none smtp.client-ip=95.215.58.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="G2jsJzdv" Date: Fri, 3 May 2024 10:55:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714758925; 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: in-reply-to:in-reply-to:references:references; bh=cNuFKKqLOLJhX8SMJaQF7/ByglEMXWCW5PIO2/lIa4I=; b=G2jsJzdvuUZLp4eVhkc8hSzuT9z9bvTkl0J5Q0mseVFULP7/68+AzPCz89WfVZFXA9LVrc 6LhE6NmD0yFvLnnUDePInuiyk3TBhDTnw/qv0m2zg+DHau2DtgaDKLsmCGlAZwTCs52jZo 0ppd4S6dB02WPP20Vu4C7t0AMo3Ys5k= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: John Hubbard Cc: Shuah Khan , Tejun Heo , Zefan Li , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Waiman Long , Yosry Ahmed , Nhat Pham , Chengming Zhou , Valentin Obst , linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, LKML , llvm@lists.linux.dev Subject: Re: [PATCH 3/4] selftests/cgroup: cpu_hogger init: use {} instead of {NULL} Message-ID: References: <20240503035105.93280-1-jhubbard@nvidia.com> <20240503035105.93280-4-jhubbard@nvidia.com> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240503035105.93280-4-jhubbard@nvidia.com> X-Migadu-Flow: FLOW_OUT On Thu, May 02, 2024 at 08:51:04PM -0700, John Hubbard wrote: > First of all, in order to build with clang at all, one must first apply > Valentin Obst's build fix for LLVM [1]. Once that is done, then when > building with clang, via: > > make LLVM=1 -C tools/testing/selftests > > ...clang generates warning here, because struct cpu_hogger has multiple > fields, and the code is initializing an array of these structs, and it > is incorrect to specify a single NULL value as the initializer. > > Fix this by initializing with {}, so that the compiler knows to use > default initializer values for all fields in each array entry. > > [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ > > Signed-off-by: John Hubbard Reviewed-by: Roman Gushchin