Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1162767ybp; Wed, 9 Oct 2019 09:41:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzq8z/0y8nwliQWukO1YR0hkxJvfJ8G3eA4aF0EuRNFvbDYCPFOwiAvne66CYU/t4Vw2Dgg X-Received: by 2002:a50:fc8b:: with SMTP id f11mr3917073edq.98.1570639280407; Wed, 09 Oct 2019 09:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570639280; cv=none; d=google.com; s=arc-20160816; b=l6Ol1B4a5B0+wYXNtbWXCVA9XzLuDaVtBmY84g5t6cBGChvTThjFji4yp7u8Pa/2nk yWLrp+GDxtZVlsAcUomUJ979uonC6glYT1WYU6ITY8qhFwBubZhGoi+wXpTVxbMH8XT5 VIYOyfHbx0M4xKWlZG5yt17DxZnzBNlQQyXkW7Ci5uDPLeHS5lveMDHQ+dyvLzmmTxbu RlX+Eanz2LGuqDT05mdbwjII6/cZ0PD/fNEh1f0wuc/wjiktFrQ46TcFTEEbnF5yh4ys o3O6OyaOwbjkvKx18rifNjU0yrcVTyVFr+IJ48U07ORSl7ZNl5oCO5w4GAhdPnhGonBb gnSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=zUX4ub76AvhF7Wlo7kqT4DxdpxJxkZFLtEEzJxbpBek=; b=kk/ZaiSLEyWiN0s6YHwMyCu8xxhnxikt85wdhznR6JQFdlX2HydcA3aTkCxLV5xY4L sWaX+IUW/XbWL+X9GWZ0q3y0EBc7Ql1lqnsv6joNxsDl467JI49GxG2c0/w7pmv815bI DBFMSyAv/HklW/WkPScOSWRx/H4Ct5954QrisTX+ubidEEc+Y2ydsycQlbCWPQ+zaA7l XFfhq/vIctbDLQbQBqRtSX8cFAIW0pYxtzDCOyFkVOI+5bXm+C+Ids95AfcgfLQtoJh/ VN0uVuKw9LMP3ki8FKdGm/zJ8SplSV2MAZrTAeq1cx7aPd/8Lutd9TE3kH5hbS/tF0wx yiKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r19si1491884eji.376.2019.10.09.09.40.56; Wed, 09 Oct 2019 09:41:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731836AbfJIQij (ORCPT + 99 others); Wed, 9 Oct 2019 12:38:39 -0400 Received: from smtprelay0225.hostedemail.com ([216.40.44.225]:59804 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731824AbfJIQii (ORCPT ); Wed, 9 Oct 2019 12:38:38 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id AE55918224D75; Wed, 9 Oct 2019 16:38:36 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:152:355:379:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2691:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:5007:8660:9108:10004:10400:10848:10967:11232:11658:11914:12297:12663:12740:12895:13069:13148:13230:13311:13357:13894:14181:14659:14721:21080:21627:21790:21881:30054:30090:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: cry32_10c0bd5169c3e X-Filterd-Recvd-Size: 2450 Received: from XPS-9350.home (unknown [47.151.152.152]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Wed, 9 Oct 2019 16:38:34 +0000 (UTC) Message-ID: <4d890cae9cbbd873096cb1fadb477cf4632ddb9a.camel@perches.com> Subject: Re: [PATCH] string.h: Mark 34 functions with __must_check From: Joe Perches To: Nick Desaulniers , Steven Rostedt Cc: Markus Elfring , kernel-janitors@vger.kernel.org, Alexander Shishkin , Andrew Morton , Andy Shevchenko , Kees Cook , LKML Date: Wed, 09 Oct 2019 09:38:33 -0700 In-Reply-To: References: <75f70e5e-9ece-d6d1-a2c5-2f3ad79b9ccb@web.de> <20191009110943.7ff3a08a@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-10-09 at 09:13 -0700, Nick Desaulniers wrote: > On Wed, Oct 9, 2019 at 8:09 AM Steven Rostedt wrote: > > On Wed, 9 Oct 2019 14:14:28 +0200 Markus Elfring wrote: [] > > > Several functions return values with which useful data processing > > > should be performed. These values must not be ignored then. > > > Thus use the annotation “__must_check” in the shown function declarations. [] > > I'm curious. How many warnings showed up when you applied this patch? > > I got zero for x86_64 and arm64 defconfig builds of linux-next with > this applied. Hopefully that's not an argument against the more > liberal application of it? I view __must_check as a good thing, and > encourage its application, unless someone can show that a certain > function would be useful to call without it. stylistic trivia, neither agreeing nor disagreeing with the patch as I generally avoid reading Markus' patches. I believe __must_check is best placed before the return type as that makes grep for function return type easier to parse. i.e. prefer [static inline] __must_check (); over [static inline] __must_check ();