Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp238078pxa; Wed, 26 Aug 2020 09:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhcPqEhUBrCOYU0Xfi5iDTKnBfZpiWEqgJoKIZ6RXp2n/QRDIBtU0O/GJTX8qPS0r3uZG8 X-Received: by 2002:a17:906:48c8:: with SMTP id d8mr15728690ejt.331.1598458578841; Wed, 26 Aug 2020 09:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598458578; cv=none; d=google.com; s=arc-20160816; b=d7baikDA+f5RtFAyFCpEfJ6tS2bEROmgvChkqmpsqixL/2UYk/Mjo4o/kSxlFGbipk SxsL9biMGGACJcZt3Wj4kPBy/qwpBt0gPaPADgfU5JAVd1bn/hg/wDulpxE4dGGZvqbr jhpKsIqsmxAkUjJF2AD9Bq5kOT/SvCJIYziafL3wMw53oC80Tx/lATux9B5HT4VVlR2G wNcA2cGpdte31QTCgfuOYO3FgfABjPSl4JWz1BR6QZBLIPJnEkjZe8mFaHC3wxv0NajT RmA/F1J/3NlbIAyhKyjXV0H+WqqFc+Ugh0kZIZivf7M/sjkLERiQoM75/n0oVwqEc7Jb cS8g== 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=9ihQSpWZ77ywitARtuYD2VjepYoFWFioZiDPaDzDUPI=; b=HybZ45hSvfe/NJaCYDRcez/7HserT5IHP7EXXksyg9XEDF602aWq6K9ULIT7nfIESj zo3JOD0mv1lxv4KICYcYQeZ0qo1lnT+0o49r5LNsaYmS9HfXLknNBSkW7zaHlk7QJVSl ffNK4G/ci7hzpijjh0Y065X15DeccnvR+BBV91g3wo81gc/Y+XQ/ZLrlvbdU4KxsZ5S7 +w41s/XArltnSPCQ1YpwXQZTEpG1Qtf0FnNiiscQgGKUEduKkGk4YkuALvuCH6FJHncm H6pF57rhivlpTzkuYm3w03ikVPkNPjusWBF8GXnO0uUAq0n9kh/xfigKxD/kZBvB5G0d cZRg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd2si1681481edb.82.2020.08.26.09.15.56; Wed, 26 Aug 2020 09:16:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727906AbgHZQOl (ORCPT + 99 others); Wed, 26 Aug 2020 12:14:41 -0400 Received: from smtprelay0065.hostedemail.com ([216.40.44.65]:51500 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727860AbgHZQOW (ORCPT ); Wed, 26 Aug 2020 12:14:22 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 420C018224506; Wed, 26 Aug 2020 16:14:20 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2110:2393:2553:2559:2562:2828:2917:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3870:3871:3872:4321:5007:10004:10400:11026:11232:11658:11914:12297:12663:12740:12760:12895:13069:13161:13229:13311:13357:13439:14001:14096:14097:14180:14659:21080:21433:21627:21990:30012:30025:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: rail44_10129d627065 X-Filterd-Recvd-Size: 2123 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA; Wed, 26 Aug 2020 16:14:19 +0000 (UTC) Message-ID: <973f4d54da796db4fcc9b643b10889cbc8839989.camel@perches.com> Subject: Re: [PATCH v1] driver core: Annotate dev_err_probe() with __must_check From: Joe Perches To: Andy Shevchenko Cc: Andrzej Hajda , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J . Wysocki" Date: Wed, 26 Aug 2020 09:14:17 -0700 In-Reply-To: <20200826155507.GV1891694@smile.fi.intel.com> References: <20200826104459.81979-1-andriy.shevchenko@linux.intel.com> <9635eaa4ccc1141fb0dd8c3687f46da7149206ad.camel@perches.com> <20200826155507.GV1891694@smile.fi.intel.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2020-08-26 at 18:55 +0300, Andy Shevchenko wrote: > On Wed, Aug 26, 2020 at 08:44:30AM -0700, Joe Perches wrote: > > On Wed, 2020-08-26 at 13:44 +0300, Andy Shevchenko wrote: > > ... > > > > -int dev_err_probe(const struct device *dev, int err, const char *fmt, ...); > > > +int __must_check dev_err_probe(const struct device *dev, int err, const char *fmt, ...); > > > > Generally, the __must_check should go before the return type > > and the extern isn't necessary and is also generally not used > > in device.h, so I'd prefer: > > > > __printf(3, 4) > > __must_check int dev_err_probe(...); > > I grepped the current code... I don't see support of your preference. > Maybe I missed something? (I'm talking about include/*) Hey Andy. The __must_check location is just personal belief as it makes grep significantly easier type function(args...) is a much easier grep pattern than type function(args...) extern function declarations are generally unnecessary and should be avoided. cheers, Joe