Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1011062rwd; Sun, 14 May 2023 10:33:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4T63Qp/nFk0WGSd7NPiQl13AnbqUTR7YeuKHqQk5n/6VxIVHqpjimvAGwJKZw/KeFjMvT0 X-Received: by 2002:a17:902:f552:b0:1ac:a058:555e with SMTP id h18-20020a170902f55200b001aca058555emr26032642plf.8.1684085628104; Sun, 14 May 2023 10:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684085628; cv=none; d=google.com; s=arc-20160816; b=zhgZuQ/JRAm4HW+B499KLbQwJYglxr04P736YKcQ/nZ36YCOvzNbY39rv4tsyUTDC5 NPFWOq5ubHZ0pL+/1JiAYpV8ziGOlwQ8/zXEvKyTHCfYuNZe409uAeSNAHNDh1T7AZtK CT0copy0KYmuPNwoiSiMAKeGrEpbvZdDIL0Lzf9pBQbLCcTrQGjqKrMZW6i0pFeA+HND IUM41KJIgdH9u59hm1h4qwV8XBAzXD46RPLurBxXKAO4awKmDj1zEeMHEk3LXlV0msH4 +2efdyM5SuOAd/j/GhLgfIUXtp29vSLWM/EYiCpqbaSuIaB9MjWTzp+BbmXy0RFB+qGC zY7Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=IENsND1np6J/rLyHblKjvAzLL1b2z/sAgmijvedzrLM=; b=MogtUrl6DAoCY8xwjpsZ8EGAnSDHWX4po3nly9ogmKkR9N+X4LrM/Xk03uROo3ME9K GwEf4WaxoDn4svtyIhz6vh30kNpiJEvvNNmmEuytDkb+W4DmNEGEl302ALD7sLcXfX5U mmLA1cnFWwVozCL/QX2RTnTykDkWaSgsK6hiwkLE19uOycfxiHwlHxQeRg7kGheO0yWn lMXz3LFYBFAZKpImPdbdv6s2iDzXdTIn3p5kxgiNCn/zUfnbjRm6Hkpln/Fn+3zNwlJL 78yfmKNFfGVIo8uY0ZlV/xLL3xg5Rg7SsW5bgaDU2WtehQT1+2mwLPjL269TpyTM+fKN 9ndw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=OQgMQLuF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p18-20020a170902b09200b001a92a507187si13031021plr.80.2023.05.14.10.33.31; Sun, 14 May 2023 10:33:48 -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; dkim=pass header.i=@163.com header.s=s110527 header.b=OQgMQLuF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235619AbjENRAJ (ORCPT + 99 others); Sun, 14 May 2023 13:00:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbjENRAI (ORCPT ); Sun, 14 May 2023 13:00:08 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E3B73A8F; Sun, 14 May 2023 10:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=IENsN D1np6J/rLyHblKjvAzLL1b2z/sAgmijvedzrLM=; b=OQgMQLuFxOPi2gynFpw7R EIrruI9dqi764WomABsUY3q1nsvOJETragCYY75b22Oi30+iqWcxnI5jfduEBymd Mc/vurOHOeIXtdscmHQX144HamLwZWVU9jbbe6jOA11Jhd6df4zX4AL6ow+ewRku GHTUjtSxvQCynB4NgDoMj4= Received: from lizhe.. (unknown [120.245.132.205]) by zwqz-smtp-mta-g3-2 (Coremail) with SMTP id _____wB3pRl2E2FkWM+gBw--.149S4; Mon, 15 May 2023 01:00:00 +0800 (CST) From: Lizhe To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH v1] drivers/pinconf.c: Remove redundant check for the existence of the member Date: Mon, 15 May 2023 00:59:32 +0800 Message-Id: <20230514165932.251200-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wB3pRl2E2FkWM+gBw--.149S4 X-Coremail-Antispam: 1Uf129KBjvJXoW7ury5CryUurW5CFyfXry3twb_yoW8Gr47pa yfWr15Ar1rKFs8Ca1UGay0gFyYk3Z7GanrCw47tas3AF13AFyDArn5Kw4Iy34jkrn5uw1a q34ruFyY934kKFUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zi1rWxUUUUU= X-Originating-IP: [120.245.132.205] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBlxBvq2I0ZA6V4wAAsJ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 "pin_config_set" in pinconf_ops. In the function of registering pinctrl_dev, pinctrl_init_controller(), a non-null check has already been performed on the members pin_config_set and pin_config_group_set in the ops structure. Signed-off-by: Lizhe --- drivers/pinctrl/pinconf.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index d9d54065472e..7b078d4ab61e 100644 --- a/drivers/pinctrl/pinconf.c +++ b/drivers/pinctrl/pinconf.c @@ -158,10 +158,6 @@ int pinconf_apply_setting(const struct pinctrl_setting *setting) switch (setting->type) { case PIN_MAP_TYPE_CONFIGS_PIN: - if (!ops->pin_config_set) { - dev_err(pctldev->dev, "missing pin_config_set op\n"); - return -EINVAL; - } ret = ops->pin_config_set(pctldev, setting->data.configs.group_or_pin, setting->data.configs.configs, @@ -174,11 +170,6 @@ int pinconf_apply_setting(const struct pinctrl_setting *setting) } break; case PIN_MAP_TYPE_CONFIGS_GROUP: - if (!ops->pin_config_group_set) { - dev_err(pctldev->dev, - "missing pin_config_group_set op\n"); - return -EINVAL; - } ret = ops->pin_config_group_set(pctldev, setting->data.configs.group_or_pin, setting->data.configs.configs, -- 2.34.1