Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3290154pxa; Tue, 18 Aug 2020 11:15:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/jFkasoOcNJ5o2EzlLQVOoWz41Yyyr4kBn0SK01UIVjjbaefRTzLX1VIPhzrVRNptS+kP X-Received: by 2002:a05:6402:3199:: with SMTP id di25mr21532725edb.315.1597774506101; Tue, 18 Aug 2020 11:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597774506; cv=none; d=google.com; s=arc-20160816; b=DJfH2siPj+vr8CGEttFJFFxUUhdk5kq0hnyqv85aLVTc95aOrhGicTYaWkZFhytnVG NaSAhY4JugDHuTVARc/RBZEt+LThAia1/4j9BbXmz4sxjtlHRPRTtnYte/vyl+GRMPXk a88DjxoO9CbrD2M9/G33qZCSwyJouy5zm+85hkwHmZK0vkhYkRFwbTgYujiM398Fxik7 yNtcn8Bc8388aPSkP18A4fnDSap2X9fn9Gx7q547LHc4nzWy+MumyvZYFACYYJrswAFF z5ne7vD7SV9jjlyJoPp09wWW7uVogKLh8IIrKDRDQ9lMuhGEq8Hjdhv41RLudBf7akFm De8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OPoLhWCuLlQUnGgkEzwWtnOhSRQmEhC1TsY+WB80aKc=; b=YuKinYZe+NbgZE9/bYFlC0YofQV//N014jHMnZOJ9ocQwpj45ZjknL1i8Fz3kuLwqs vs0BtiufpqftQQ0M7XPTUIZ9nknJZsqYT7UpXF8zUjsxlreag423r+r2lc4SgyParvCQ it2Lj6ZQ6oLytGdHLewjCcvbBJDnmqBiKV6C/1Eq/TORX8m1ht05t2CHkmZbGjds6Pau VbXGmt9JtFKA4Wvb7a5MjcgzYWujeESiJ1kxEnrXhQ/QAc8UhZt2HjX8uIDEvA+RbIdI Im9t3pSb3J0jCu53u4kVINghEBgOU8pUqAxsBB50vDMUdXWtLMjgoVBZi1pXXlGpwtJ6 5B8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=U8MxrtiM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gl17si13630653ejb.589.2020.08.18.11.14.41; Tue, 18 Aug 2020 11:15:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=U8MxrtiM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbgHRSNa (ORCPT + 99 others); Tue, 18 Aug 2020 14:13:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726588AbgHRSNW (ORCPT ); Tue, 18 Aug 2020 14:13:22 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E20B1C061389 for ; Tue, 18 Aug 2020 11:13:21 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id a79so10352654pfa.8 for ; Tue, 18 Aug 2020 11:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OPoLhWCuLlQUnGgkEzwWtnOhSRQmEhC1TsY+WB80aKc=; b=U8MxrtiMjqpFFaQCHDS9rCBze3AlW09ghWWFKCMIPFTSVqEpViPeAhaVKCcTB8o05X EtgOeHGeutGGY6dvi2+tEvlbyvYt0BlbUfFyrxRdocV4NPTY5EB/OLrQdrhG5ZLZNa2e 5zrHyFxQqhyIuGfsRMJ8QOZYr9vvLbXYFH36Ax6iWdYN9QB7Uwtx4Y1C1J17+2jXgBjT qIWDvUYJe5k/qTHlXl1FGbwlPuxMZ8Eti9ePpmtGrkGnmgN1jFn9Bh5ksziJY+8BD/vW gzThbyvsCKuLQim4aC2JG0FW14+DDY2Pa2sh+hhswLuX7w9PaqMF0d+qxMA5nfQxHfo3 FgCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OPoLhWCuLlQUnGgkEzwWtnOhSRQmEhC1TsY+WB80aKc=; b=VTTF/NIGqwC1Av6PQR+SJ/kPekB/ozsvEjbkd3ychqVd8MIQm0nYErf8F3Ih0lJaS+ Jt0RwuRcgexZqZrhiZLjWTfDUURRWe7/YFJPkDd9Fq4ZKJ0MyraUmIHapSkvFQ6qJ79R SP/Um3GqjjLDLZH/mVSe7t5YnK1JlQ4q8Bl9CpXLUsIAHnQjrGKnh9Hyaq++Jn0ZAMRT dIQyJamHA8YgA47Ggnp+bBpEVhvmMtFsKzSFfhQF5KZUv2HO7jjhvMDM6vw55U76MEDQ Yct+l3z+FTGTImioYjO9HgYQTj8SCOt3c+FatfR0ECMGBg+eYPvnxPSkieCDQR3do5H5 f9NQ== X-Gm-Message-State: AOAM533NSMxBW0t1DhBz9Ew+E31w3Cr/XT6nBKsp0EnsDrQa+YJpfJSN toYbnDCCQBHS0KBrFjqqhJPX6sthbotrud+AoQcTIWb/kss= X-Received: by 2002:a05:6a00:14d0:: with SMTP id w16mr15947397pfu.39.1597774401186; Tue, 18 Aug 2020 11:13:21 -0700 (PDT) MIME-Version: 1.0 References: <20200818170337.805624-1-alex.dewar90@gmail.com> In-Reply-To: <20200818170337.805624-1-alex.dewar90@gmail.com> From: Nick Desaulniers Date: Tue, 18 Aug 2020 11:13:10 -0700 Message-ID: Subject: Re: [PATCH] sched/cputime: Mark function as __maybe_unused To: Alex Dewar Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 10:04 AM Alex Dewar wrote: > > Depending on config options, account_other_time() may not be called > anywhere. Add __maybe_unused flag to fix clang warning. Just curious, would moving this definition to be within an existing preprocessor guard for a particular config also fix the issue? If so, prefer that. If not, __maybe_unused is the way to go. > > Signed-off-by: Alex Dewar > --- > kernel/sched/cputime.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c > index 5a55d2300452..43ede0d6661c 100644 > --- a/kernel/sched/cputime.c > +++ b/kernel/sched/cputime.c > @@ -252,7 +252,7 @@ static __always_inline u64 steal_account_process_time(u64 maxtime) > /* > * Account how much elapsed time was spent in steal, irq, or softirq time. > */ > -static inline u64 account_other_time(u64 max) > +static inline u64 __maybe_unused account_other_time(u64 max) > { > u64 accounted; > > -- > 2.28.0 > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200818170337.805624-1-alex.dewar90%40gmail.com. -- Thanks, ~Nick Desaulniers