From patchwork Tue Nov 1 21:13:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3212836wru; Tue, 1 Nov 2022 14:16:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4O2XofZw2esX3dy8C6QF1LQ1gQYTgq/UwX3tTRkWkU7bB9yMFpj+pESHeVtaM+eYrZY0yO X-Received: by 2002:a17:90a:de13:b0:213:eab9:5e38 with SMTP id m19-20020a17090ade1300b00213eab95e38mr11722134pjv.44.1667337411760; Tue, 01 Nov 2022 14:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667337411; cv=none; d=google.com; s=arc-20160816; b=EhKGkpThHF365UkBKWHcbVkqi991PPnu0ZXvlLj4O5DoyJ8E0tSH6L/djKW0X73H+z ZZo2N48eH3cFWk5LGqbxyQlw8+9YpFnH4n7CyNUBYaKgqbli4eDXGwOXT4VMuAYvTEKs KVOeXUnt4oAFSRW67UcLD3t+skRWzgSt/g7K8+bLc94tgoeLoH81J7HER7owqGYgCSOX EcWkX4Pbolw/UERydJUps+5lf37s2yPJhq+lRCtcn0009tRJrr7oFltTD0r1ySxJfZ2I hGqeW7BJea0p2QqaP+aHplrKu+6ajWIvuehyeeB3rR2sWkpBvzZKBe8ZnH3cNLEePI8L PFTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=cKPgq5XPQ0c1r0QSZwUMIYc6znIdIn1ZQ5IvQZC+n2Y=; b=sWSH5ZXwWSR8MxFQsNl0+Gf3xHxSRsMw1zgJkjqWIbZCkguC+C/BbzEQaFf39l98TO NKdZXIqURkkjqrXcE4YARqy8i1FGM4LsdjXqoAavAhSvpvewZ+On+VhYveSLzhl0fDWd lcj9o8MTMR1cRAqBusB2GO90P4hDqFDeNdnFpAsXYCUsTshahi9B3weJLHp9+Zn9ey7U C5VRO0x98mUBN16x7EnUjiczw7Cl9ttLVvSjcrB/RWJuWKjGdO84M8Banfz30zuxMDJn 8wzBniYL6gupRGa0ZvDv/ICZAQ7se4oK3oGOV0zqvZpAD2lo9Do75dLC/0dMbw9HDXbc 5LKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w200-20020a627bd1000000b0056bc64d158csi12646787pfc.172.2022.11.01.14.16.36; Tue, 01 Nov 2022 14:16:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230426AbiKAVPz (ORCPT + 99 others); Tue, 1 Nov 2022 17:15:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbiKAVPb (ORCPT ); Tue, 1 Nov 2022 17:15:31 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C20541EEFA for ; Tue, 1 Nov 2022 14:15:16 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybKoWfJO; Tue, 01 Nov 2022 22:15:15 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:15 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Johan Hovold , Alex Elder , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , greybus-dev@lists.linaro.org Subject: [PATCH 11/30] greybus: svc: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:13:59 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748329994174509982?= X-GMAIL-MSGID: =?utf-8?q?1748329994174509982?= strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Reviewed-by: Alex Elder Reviewed-by: Johan Hovold --- This patch is part of a serie that axes all usages of strtobool(). Each patch can be applied independently from the other ones. The last patch of the serie removes the definition of strtobool(). You may not be in copy of the cover letter. So, if needed, it is available at [1]. [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ --- drivers/greybus/svc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c index 56d2b44d6fef..16cced80867a 100644 --- a/drivers/greybus/svc.c +++ b/drivers/greybus/svc.c @@ -7,6 +7,7 @@ */ #include +#include #include #include @@ -83,7 +84,7 @@ static ssize_t watchdog_store(struct device *dev, int retval; bool user_request; - retval = strtobool(buf, &user_request); + retval = kstrtobool(buf, &user_request); if (retval) return retval;