Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759629AbcLPP3U (ORCPT ); Fri, 16 Dec 2016 10:29:20 -0500 Received: from mail.kernel.org ([198.145.29.136]:41358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757726AbcLPP3K (ORCPT ); Fri, 16 Dec 2016 10:29:10 -0500 MIME-Version: 1.0 In-Reply-To: <20161216112700.GB29069@amd> References: <20161213030828.17820-1-mcgrof@kernel.org> <20161213030828.17820-6-mcgrof@kernel.org> <20161213190429.GC8676@amd> <20161216092241.GO13946@wotan.suse.de> <20161216092919.GA26091@amd> <20161216095906.GS13946@wotan.suse.de> <20161216101405.GA29069@amd> <20161216105648.GT13946@wotan.suse.de> <20161216112700.GB29069@amd> From: "Luis R. Rodriguez" Date: Fri, 16 Dec 2016 09:19:47 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/5] firmware: add DECLARE_FW_CUSTOM_FALLBACK() annotation To: Pavel Machek Cc: Greg Kroah-Hartman , Ming Lei , Daniel Wagner , Tom Gundersen , Mauro Carvalho Chehab , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , "linux-kernel@vger.kernel.org" , Vikram Mulukutla , Stephen Boyd , Mark Brown , Mimi Zohar , Takashi Iwai , Johannes Berg , Christian Lamparter , Hauke Mehrtens , Josh Boyer , Dmitry Torokhov , David Woodhouse , Jiri Slaby , Linus Torvalds , Andy Lutomirski , Fengguang Wu , Richard Purdie , Jacek Anaszewski , Abhay Salunke , Julia Lawall , Gilles Muller , Nicolas Palix , David Howells , Bjorn Andersson , Arend Van Spriel , Kalle Valo , linux-leds@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 29 On Fri, Dec 16, 2016 at 5:27 AM, Pavel Machek wrote: > On Fri 2016-12-16 11:56:48, Luis R. Rodriguez wrote: >> On Fri, Dec 16, 2016 at 11:14:05AM +0100, Pavel Machek wrote: >> > >> > Well, I was asking if the above snipped looks like valid use. Because >> > AFAICT, the "custom fallback" is just dev_err(), see above. Coccinelle >> > rules don't help me... >> >> Its not. Its when you ask for no uevent. Only 2 drivers do this. > > That was one of two you listed. If that is not valid use, perhaps it > should be removed, not annotated? Pavel, the annotation was added on top of: static int lp55xx_request_firmware(struct lp55xx_chip *chip) { const char *name = chip->cl->name; struct device *dev = &chip->cl->dev; return request_firmware_nowait(THIS_MODULE, false, name, dev, GFP_KERNEL, chip, lp55xx_firmware_loaded); } Note the second argument is false. This matches the grammar and the definition for a custom fallback mechanism since uevents are not used. What am I missing? Luis