From patchwork Sun May 14 16:46:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 93736 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6413031vqo; Sun, 14 May 2023 10:03:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Ntrxg3JRyEk4vdJSTYbaAl7ZLmt19mTZiFjmk1NclrQNc3HY+SccvVORAv/Vj2IxmpXP6 X-Received: by 2002:a05:6a00:1d14:b0:643:90ee:56f with SMTP id a20-20020a056a001d1400b0064390ee056fmr40509319pfx.1.1684083822538; Sun, 14 May 2023 10:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684083822; cv=none; d=google.com; s=arc-20160816; b=ZggXdPrd3B6tlbTdHFsvnMe8COtVgVH5Rkl/52Cj8DXu2yTzy5a8Ui5soPkyVbZih4 WviyMot4GWrJN4jl1ab0kFRnmyJsUHUtuE+pqcC4hEPkCmZmeJW/bGWm7VKK24qRi0yf vbHQ0cNXEEXrPQQ5+/5dqWJLgLYNwJxaZ7rTqOT5e7/sAZ5VXpxkiBmmHu/GlkKR38fe ACqpKYgORdYs4YgDO+NSYi44XPs6mfs2Vr1Ut3WKdppdPsoBphjs1UsKCktIOatWSgyt qg4vVH/2nMRK1GgctL6ZoPQE5KidJdZOtu9e2mlgbsMOqJ6XpUs7vq4Swc/gBhHbZ/Hj KeWA== 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=rXLNrrQ2Y423zWrRyCGFEOlcg07uqKROXf9zZcuH+wI=; b=YVOjm/slcUpvef5mxncVKUTI3FNvT/mFzn58dhB1JUjJAo0TY1uYZpdkwdk1BWj0NN y5FyCcP+P0+XhlDgd9yw+SjS58nrc4De5JT0PMRtuoAd59v8XA8Yd8EP1OEV4gB3fBN5 YjnVkebvhZZuryZD4Ugu5jgU/pAr+m5bu2X8zETK8tFZVYcqOhfUfxlnYRJiW83guO39 fZDIPX7/AOBPlGBO0s8UmjGmj/0g1U1IPipENmCqS6N/F4T4waeU4E/yvTkOXgLBsuBH oLYKdSKgILFo/acdaOEMAEjiND3j/75uvklPihf8BUtCarKUwtT7Ap4kBdi8NBb1PF38 uyOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=crGWH7uS; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a63f20a000000b005309e9ab3afsi5960720pgh.792.2023.05.14.10.03.27; Sun, 14 May 2023 10:03:42 -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=crGWH7uS; 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 S233935AbjENQru (ORCPT + 99 others); Sun, 14 May 2023 12:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbjENQrs (ORCPT ); Sun, 14 May 2023 12:47:48 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.216]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 43D871FC8; Sun, 14 May 2023 09:47:45 -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=rXLNr rQ2Y423zWrRyCGFEOlcg07uqKROXf9zZcuH+wI=; b=crGWH7uShgXwegJOiN9JX rRxblWm8EPfWOQ4llDz2qu3x9ij5jASbZ85oYGjsJtal8YRM8vjHOdKmE8l2CSu1 XaNaj7o+hL43QwqUxvxpkdsyJFSuelb9EIZw0X0z4usDMIInzIPMxmUGWvhjotf1 cd1R9gstOcJLZ3ZvInebOs= Received: from lizhe.. (unknown [120.245.132.205]) by zwqz-smtp-mta-g5-4 (Coremail) with SMTP id _____wB3S3WEEGFktc6EBw--.6929S4; Mon, 15 May 2023 00:47:31 +0800 (CST) From: Lizhe To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH] drivers/pinconf.c: Remove redundant check for the existence of the member Date: Mon, 15 May 2023 00:46:58 +0800 Message-Id: <20230514164658.246613-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wB3S3WEEGFktc6EBw--.6929S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Wr1DJryxtFyxuw4UWr1UGFg_yoWkAFg_uF WrJry7JrWkCa4Ikr109rs5Zr92ya10kF1xKF1qvay7AFy7Zw17J3ykKFsFqr97X3yfKFyq qrWrZr9aqr4kAjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRt6wZJUUUUU== X-Originating-IP: [120.245.132.205] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBlwRvq2I0ZA6G8gAAsf 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,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765889877958639594?= X-GMAIL-MSGID: =?utf-8?q?1765889877958639594?= "pin_config_set" in pinconf_ops. 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,