From patchwork Thu Nov 23 14:47:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 168965 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp498166vqx; Thu, 23 Nov 2023 06:48:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFx+QAORGh9PKn7tyrrPUd31nG5jTtiNklL+YjpT8Ve4PpNododu5KuyADDNZ6HJxbLROLm X-Received: by 2002:a05:6a00:1784:b0:6c3:468c:6caa with SMTP id s4-20020a056a00178400b006c3468c6caamr3712001pfg.6.1700750902453; Thu, 23 Nov 2023 06:48:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700750902; cv=none; d=google.com; s=arc-20160816; b=eXVtx5ktFYGMH6u8FLO7i/ipMG9VMfSVvp7fe08XVwuPVJIUJjGsK5kPY3kNhDgyOL JPwQGkVkpwPH1F+j6Lmk3/3GeNY7HCvguKtobMeMlZvQnAI6dKcKI8+izqYVJmYyNYD0 bFaaRFeWcDdiwGbrDtvDrjyWCsxyEcpjBEvmIGw4dp3mVVkhjmDsGRvabdQOu7c4eAk1 FuKl5BimUDwCGEJ1LQDd6UnR9a7VFPEZ+L5witMpdN9Df4FjMDEyOlXg9IAmwDr56pKy eP6Fw1ULynZTub7F1JKYmk57nUivwSo/FjivCVhENh+mQgC68PXxB6tnSimCKWUIHUa7 +6/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=MZPJxfvoysVpxIWKBdmpAvA0+UBzj52BEZXDkonKlNQ=; fh=6be6z+hfVH/NreflYVJTVfBnJhapt+W/eCbe9OFoYe4=; b=J3Uf6hLs/6Q2LjTNKHjrhzyVfBw92PnFyoC75EEAvqerKXM3IMmM7GwLvaIPLtjD8E ns2OrYSFLK27bWD3oTzC/GkXqhwAbEe4q4lchQodc/0sMphA6dSnMW+HgCj/SPsMJzhk KoKjyENL+5N3YbHaeRRLD1eheBoLffHiJP9rNMpdIIU9xKaE18u4JXjTZz9kbf5quL+i nd18C5y/I5lvKY/clO5mFffm8HSlEAcZkLtXDQhwr/OLhplY7xHToVKGejiXovn0WKPJ yoqvhOMIUQ3C1vqlMaf5odIRQQCWb6tCgdeTW2w+rGJLNMwE4u1tOYpB8DRCrFmklPNw rDZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TcENdRs3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id j1-20020a056a00234100b006c4d1f10b8asi1416535pfj.99.2023.11.23.06.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 06:48:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TcENdRs3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C00398290BB5; Thu, 23 Nov 2023 06:48:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345927AbjKWOrm (ORCPT + 99 others); Thu, 23 Nov 2023 09:47:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345905AbjKWOrk (ORCPT ); Thu, 23 Nov 2023 09:47:40 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3AF3D4A; Thu, 23 Nov 2023 06:47:45 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2CEEAE0002; Thu, 23 Nov 2023 14:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700750864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZPJxfvoysVpxIWKBdmpAvA0+UBzj52BEZXDkonKlNQ=; b=TcENdRs3kz8fi6vTvuiHsyqu9OJv6uHiR+bRPRhy8PQDSLgM2G0CWPJNjDggo9N67ByqMp KUcURLficapDrJ+MR6fO0R6raSrIkzwIbKKpzLy83l44CYmItZTfHz8lefwAtq+5U30oQv llDWdphYiFVsHbPtO84+JgZDJlFbGZ/hqIKwUM02DG0I7Car4ma43yF2tdTCPxGT52jQpe pf2dMrOQdC6mozfR1EIeBIdxnroShqdZ+3+q2oLB7MWLxJH7BRlY8n0nDzwQY0Pka3AueG d8xSZQvcZox56d4/r3djwELkwtb9f4RKaav38RqfGD4LUNbgR86+TPUm/UmApQ== From: Luca Ceresoli Date: Thu, 23 Nov 2023 15:47:18 +0100 Subject: [PATCH] of: dynamic: Fix of_reconfig_get_state_change() return value documentation MIME-Version: 1.0 Message-Id: <20231123-fix-of_reconfig_get_state_change-docs-v1-1-f51892050ff9@bootlin.com> X-B4-Tracking: v=1; b=H4sIAPVlX2UC/y2NywrDIBBFf0VmXcFHAm1+pRQJzmhmo8GREgj59 0jp8sA995wg1JgEFnVCoy8L1zLAPhTEbS2ZNONgcMZ5a53XiQ9dU2gUa0mcQ6YepK+dwn+PNYp G88RpRovTy8P42hsN8dd5f67rBmhAxBN3AAAA To: Rob Herring , Frank Rowand , Grant Likely , Pantelis Antoniou Cc: Thomas Petazzoni , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.12.3 X-GND-Sasl: luca.ceresoli@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 06:48:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783366578241114118 X-GMAIL-MSGID: 1783366578241114118 The documented numeric return values do not match the actual returned values. Fix them by using the enum names instead of raw numbers. Fixes: b53a2340d0d3 ("of/reconfig: Add of_reconfig_get_state_change() of notifier helper.") Signed-off-by: Luca Ceresoli --- drivers/of/dynamic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- base-commit: f364a65e37ec9e57809642b00b39e7a530d9cbde change-id: 20231123-fix-of_reconfig_get_state_change-docs-d08d45d1d493 Best regards, diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 0a3483e247a8..a5afe14eef28 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -98,8 +98,9 @@ int of_reconfig_notify(unsigned long action, struct of_reconfig_data *p) * * Returns the new state of a device based on the notifier used. * - * Return: 0 on device going from enabled to disabled, 1 on device - * going from disabled to enabled and -1 on no change. + * Return: OF_RECONFIG_CHANGE_REMOVE on device going from enabled to + * disabled, OF_RECONFIG_CHANGE_ADD on device going from disabled to + * enabled and OF_RECONFIG_NO_CHANGE on no change. */ int of_reconfig_get_state_change(unsigned long action, struct of_reconfig_data *pr) {