Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1856796ybi; Sat, 13 Jul 2019 01:53:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8fvX3hcM4dJx2H1zIEw668b2lkH4BJqZgeyhDIkMrcP5X8PVr0ldnp/6a4PVy1BxqrlMO X-Received: by 2002:a17:90a:6097:: with SMTP id z23mr17252899pji.75.1563008016010; Sat, 13 Jul 2019 01:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563008016; cv=none; d=google.com; s=arc-20160816; b=JTiVNYC5xvJrsfXjNTNofwl+RSMo3/fVr4ScKbFcyaFlysUCuKhQ/qZ7P6EhIMoqoL ym7zfMo10Xg2I+9lCxob62eMxrKXikHA4UU+hhbubIN0e7ObHpka3IqSSI18+L5x2dHc 2EH5bi2vPl6OZ4Kvq5CxClRI3KcD0m2isSv0QeMKorYA2ZGfFyV79W06iBc7CtXf/ijU FFcKDjaVeSxx5HBr4/s+be3EKu3xseOfQylvtgcQJyx4SNFhbGDQ4amZkGjkWKrm149i 89Jw5rnf3GE3tOzn0mQMZ3RHiRuGvGISzNHtZiW6n4NlXn49O7vu71YTZAhwSLU1xWZX vr6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ye7CFB+RNkDFFPibm62xijLFC7byqXV66LMUUwrJqM0=; b=mDYevz+8CBpfDHnJ1Qtkhnlv9lQc9O5OiLoa4/+T59jGg1ddQXy42h77HueaGDNBco cqaA6ir51D5o6Kc/zjENJI/jIpVEHC8XF44c8T6aeT6Gp68t6NMdlHT0fcKxD7eoABNq yOmekthhaNanACUB00fqZk07Dhv+MFuZ2YgbQd50BGIEOR1ZZaGejOW5pcRccOF/JTtW 4AriWYeTScD7iT5zA1TNZ/8uQrYbLNkpp81LOafS/UbZyAuuIWIBjRfDDX8HCHI2H5ll a4ewU50LZyesSEwgIte1CIlcLCRD1EEg+ssVBojstf1kWOJ5AdVwOUNQlkrSXGv/jlnY Tt1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iPRiaoV0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si10241225pll.333.2019.07.13.01.53.20; Sat, 13 Jul 2019 01:53:35 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iPRiaoV0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727489AbfGMIwk (ORCPT + 99 others); Sat, 13 Jul 2019 04:52:40 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42808 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726419AbfGMIwk (ORCPT ); Sat, 13 Jul 2019 04:52:40 -0400 Received: by mail-pg1-f194.google.com with SMTP id t132so5574100pgb.9; Sat, 13 Jul 2019 01:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ye7CFB+RNkDFFPibm62xijLFC7byqXV66LMUUwrJqM0=; b=iPRiaoV0fDW3wzE3blxO0+ssT/u9Q759YjTI1r+tgcGM2BbA5Do9nTfkEN0ONYbn+V 53I4ALG6Z/7RjE/+DyLNaeusK+5f+9I+VhY7MVOH1PhiA57E833ya/AB0+2Gw/k44Lh9 fwVYmRaHKeGMotizenBdVYpJXp1RmCwX4xNgrXP0PkV8ggiZaUDrmC2vfSb5zVRmcPcK yRPw5LbO83UqO8e1ShKshujfPwHvQ6fDjJoYl3HQZ+U5yGinFrJvqcvjBXDd5q2SVw1O XGRo2G6Wo4p3Gedj3YbcqQ79+nmXU1MQ2TPP0Hprsl5xIm/kb4OpK9nbvK93JAY/sOWi U6QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ye7CFB+RNkDFFPibm62xijLFC7byqXV66LMUUwrJqM0=; b=kmcN+iVgDlH4ab1xIqrMayjZhz7foJ6/yr1hi/Eo0BQjxvoBG0L40R1U/ngdAfStrM d2G63LU+qLGz//ehi9reSIySRUvaSgMyIvvBhrIp4NHxO3ImM6azd9zTFcwakHIjA5FG kqUJu4GQH30PFuNJo2F/Ir/w5vvYmdyFTtFUO6Rp8c/Htwu8/DpF8qlgOfenlSCBEgbK z3/TyXGNqRX9VBFhcdBMWQbTb3bPiAVk+40xe721UDbbWYeoY1rOn8+unwCM80dBrUDw Pe1dWXWF/arGWcrqj4DGRpJ1p6LPyF9muxhn3ZMugIjl2t7+L5+YoeF/K6Kjc0JaAXsO OUcg== X-Gm-Message-State: APjAAAWnS+eZZtt8i09+aaa/4k26xlwBY+EPbvtARU3RRJl4+mYf/QZ6 9p/FKrF/d9YUrcdNKB4fQBo= X-Received: by 2002:a17:90a:8c06:: with SMTP id a6mr17499768pjo.45.1563007959665; Sat, 13 Jul 2019 01:52:39 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id a16sm11385795pfd.68.2019.07.13.01.52.38 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 13 Jul 2019 01:52:39 -0700 (PDT) Date: Sat, 13 Jul 2019 01:52:37 -0700 From: Dmitry Torokhov To: Fuqian Huang Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/14] Input: cyapa - Replace devm_add_action() followed by failure action with devm_add_action_or_reset() Message-ID: <20190713085237.GC103820@dtor-ws> References: <20190708123323.11943-1-huangfq.daxian@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190708123323.11943-1-huangfq.daxian@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 08, 2019 at 08:33:23PM +0800, Fuqian Huang wrote: > devm_add_action_or_reset() is introduced as a helper function which > internally calls devm_add_action(). If devm_add_action() fails > then it will execute the action mentioned and return the error code. > This reduce source code size (avoid writing the action twice) > and reduce the likelyhood of bugs. > > Signed-off-by: Fuqian Huang I'll apply parts of this as the driver should use devm_device_add_group() for the main sysfs group. Thanks. -- Dmitry