Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753920AbbFDU0S (ORCPT ); Thu, 4 Jun 2015 16:26:18 -0400 Received: from ozlabs.org ([103.22.144.67]:44302 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752230AbbFDU0R (ORCPT ); Thu, 4 Jun 2015 16:26:17 -0400 From: Rusty Russell To: Tejun Heo Cc: Louis Langholtz , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: kernel/params.c: 'err' variable "set but not used" and perhaps should be? In-Reply-To: <20150604021935.GN20091@mtj.duckdns.org> References: <87vbf628uy.fsf@rustcorp.com.au> <7E8FFE0D-B9F7-4816-8ECF-2AA5980F3890@me.com> <20150603202237.GI20091@mtj.duckdns.org> <87eglsuujn.fsf@rustcorp.com.au> <20150604021935.GN20091@mtj.duckdns.org> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Fri, 05 Jun 2015 05:16:53 +0930 Message-ID: <878ubzuuhe.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 972 Lines: 28 Tejun Heo writes: > On Thu, Jun 04, 2015 at 11:03:16AM +0930, Rusty Russell wrote: >> Please describe the circumstances under which this function can fail. > > Allocation failure obviously Won't happen here, this is a boot-time function. version_sysfs_builtin. The __init is the clue. > and violatin of certain API rules - > e.g. dup names, wrong nesting, activation rule violations. Duplicated names imply some weird build error, and we get an warning in that case already. Not sure how we'd get wrong nesting or whatever activation rule violations are, but happy to be enlightened? Neither of the others justify version_sysfs_builtin checking the return value of sysfs_create_file(). Thanks, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/