From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB343ECE58C for ; Wed, 9 Oct 2019 16:38:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B75B206BB for ; Wed, 9 Oct 2019 16:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731842AbfJIQij (ORCPT ); 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-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 ();