From patchwork Tue Nov 1 21:14:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3213048wru; Tue, 1 Nov 2022 14:17:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7DDAclUsmFC7mPtA5OQGl3QuLpIiSa+Y3QuQi2nfA6pk4ebBCNmSsX8vnQ0RY1FQrVzPp+ X-Received: by 2002:a05:6a00:170a:b0:563:a40a:b5e1 with SMTP id h10-20020a056a00170a00b00563a40ab5e1mr21430429pfc.40.1667337437272; Tue, 01 Nov 2022 14:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667337437; cv=none; d=google.com; s=arc-20160816; b=DInvVgfH8NG1BK6atQNrmh/rtzszZBSnofXWDFkqjUUE3sErdetRTZtj7JhgrOk3J4 VGY489jfUHQ+TPd2RsmkKn652wf1LCEK0Rm7Qfkjp+BfxoaTjxHVOHUkP/D3Vlboiotl E8CM70qjGFFtyNJZgswfE4HzLwso8ysS+BxuK7m9D3x7DC7Qj0ohU0k9neOqsnKr0BT3 +UmiJKUKRqgn0mVo0ZUmzg3V6YV8hkANLU+dcZNuOQKcjay01SPMIhQTB0OrZXW+ow6A 973dzuYmJ2OX94eIxdFwAsLCQRDa+o3YuT+3MUulFUdaGggmkMmQqDUyLywItptUPzzs 8AfA== 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=54d3Izzjov4Mk45ZeRZ2rrE0vKTtxWzxTjwzMfKheaY=; b=KUSOYhBUTPBXswxdE+SfFpxjsAoQeT8NN/uuIXkoRRbjwxWKjXnsZX1ZRg4PvEr8SA g9YgVfl07zEscTkDJDT3FO1UllsD+hZHRglyoCCaRofnJ+Wt41QcNSco80fD47HXEu/v H1t3jLFJGXbWBJkIgSdE9jYgYnJ32PcKSgoDmMNzTUxKs7OdhoRs68IgFGo4ZTlllnR9 vR9ZcbK87wYhxS68d1Her8o1TbZRk1/NTaN8/t5WUxCk1y125MB6QQhUQxJU2m0BpaZa 19/kmaNQQAXU15o9qKF1xZeasGhMDf+vn9bX7P58Aj5JNQ1gT/dlvQYHC3DP/BQqrug1 H4vA== 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 lw8-20020a17090b180800b002006ace0cc4si15231486pjb.138.2022.11.01.14.17.04; Tue, 01 Nov 2022 14:17:17 -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 S230495AbiKAVQR (ORCPT + 99 others); Tue, 1 Nov 2022 17:16:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbiKAVPf (ORCPT ); Tue, 1 Nov 2022 17:15:35 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 924C61F2EB for ; Tue, 1 Nov 2022 14:15:20 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybOoWfJm; Tue, 01 Nov 2022 22:15:19 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:19 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Helge Deller Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 15/30] video: fbdev: omapfb: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:03 +0100 Message-Id: <49e4f12b45470c02e4b7c64cc20939667690f948.1667336095.git.christophe.jaillet@wanadoo.fr> 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=unavailable 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?1748330020802626186?= X-GMAIL-MSGID: =?utf-8?q?1748330020802626186?= 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 --- 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/video/fbdev/omap2/omapfb/dss/display-sysfs.c | 7 ++++--- drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c | 7 ++++--- drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c | 3 ++- drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c | 3 ++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c index bc5a44c2a144..ae937854403b 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c @@ -10,6 +10,7 @@ #define DSS_SUBSYS_NAME "DISPLAY" #include +#include #include #include #include @@ -36,7 +37,7 @@ static ssize_t display_enabled_store(struct omap_dss_device *dssdev, int r; bool enable; - r = strtobool(buf, &enable); + r = kstrtobool(buf, &enable); if (r) return r; @@ -73,7 +74,7 @@ static ssize_t display_tear_store(struct omap_dss_device *dssdev, if (!dssdev->driver->enable_te || !dssdev->driver->get_te) return -ENOENT; - r = strtobool(buf, &te); + r = kstrtobool(buf, &te); if (r) return r; @@ -183,7 +184,7 @@ static ssize_t display_mirror_store(struct omap_dss_device *dssdev, if (!dssdev->driver->set_mirror || !dssdev->driver->get_mirror) return -ENOENT; - r = strtobool(buf, &mirror); + r = kstrtobool(buf, &mirror); if (r) return r; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c index ba21c4a2633d..1b644be5fe2e 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c @@ -10,6 +10,7 @@ #define DSS_SUBSYS_NAME "MANAGER" #include +#include #include #include #include @@ -246,7 +247,7 @@ static ssize_t manager_trans_key_enabled_store(struct omap_overlay_manager *mgr, bool enable; int r; - r = strtobool(buf, &enable); + r = kstrtobool(buf, &enable); if (r) return r; @@ -290,7 +291,7 @@ static ssize_t manager_alpha_blending_enabled_store( if(!dss_has_feature(FEAT_ALPHA_FIXED_ZORDER)) return -ENODEV; - r = strtobool(buf, &enable); + r = kstrtobool(buf, &enable); if (r) return r; @@ -329,7 +330,7 @@ static ssize_t manager_cpr_enable_store(struct omap_overlay_manager *mgr, if (!dss_has_feature(FEAT_CPR)) return -ENODEV; - r = strtobool(buf, &enable); + r = kstrtobool(buf, &enable); if (r) return r; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c index 601c0beb6de9..1da4fb1c77b4 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include