From patchwork Tue Feb 2 09:55:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Tso X-Patchwork-Id: 12061267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53EBAC433E0 for ; Tue, 2 Feb 2021 09:57:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECD9664E27 for ; Tue, 2 Feb 2021 09:57:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231356AbhBBJ4y (ORCPT ); Tue, 2 Feb 2021 04:56:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbhBBJ40 (ORCPT ); Tue, 2 Feb 2021 04:56:26 -0500 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C582AC0613D6 for ; Tue, 2 Feb 2021 01:55:45 -0800 (PST) Received: by mail-pl1-x64a.google.com with SMTP id ba10so11434890plb.11 for ; Tue, 02 Feb 2021 01:55:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=/woBNkPyfXPtz4J97ZLqnvUhpU4+65VNdf461PNMr+Y=; b=iuHnPKYRQFO4Ev9Hl4nSpqskb+hHDTNFd0RvDgvajNk3jf02FPwo8bdymkTGF43KJt NV1sN/9ASB+NipnHeGMZ1rvtwjDDsiplQYYuifOThJX7wr4RHhWSI7gKmAGvecNO6mHg z6mps+0aX0yeEDkIqXl/VZhLV2O1KF1D6g2q8XsEdTViK86l7LuqeJvj2MiCbpHCfQG6 Ugn5hyGCWS8h1g7Hbk+TdbkAHq+224UX6YMqzT7hbphG9pA96Or8wV9ggIGpKpTHMnhj MuN7kbFb2IoSbODTaUg7yQyIw6neUm/oLw480v7uJfH82XnxTeJ3fB0B5mwqtvbdebnz msrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=/woBNkPyfXPtz4J97ZLqnvUhpU4+65VNdf461PNMr+Y=; b=Xmgh2wwvoSJF9SHjDtOKFqzjgBbrtwS6J2wCBs2Bu78e3pvGRzIIS/RDJQpeiSe4Ba rvnVpXld5nqCY1Ndj4TCsULmlhbHcPEvFQ3+ij3VVlq4xZ0nuLMEik91pV9iJMlm1QGU ExDIC6/GBULyVWOZVsKtl3BryGkcRSXlvJFis0CoVy51NGFFg9oIXdRLKmds+lFU3tFw xe470/jhgZGJ31ACYzaW6GJzij9nFG+8Raan+77cvHamRSCOQCs4tF3O7ZPbffII14zI RDe4hq3ptubyKoDNLoOR1KC90MKRqtAfAmZ+N18rEYixaQ8PKSy1NjVymGxwBaRn1Ibv MTTg== X-Gm-Message-State: AOAM530nxFWhKaScOmGm5t3PvEZKCfs0IdL0CreSee8q232OsbopFuC/ eedDHt9cH/9B3dxcIjUchn/1tX8LQKFs X-Google-Smtp-Source: ABdhPJxJCicdafW+g5T8+94AHXI8qFLeRK6IMc+oMSzUtqK3EHOHPsRX1DgvxCCXLrveM11matXnWO85XsJ2 Sender: "kyletso via sendgmr" X-Received: from kyletso.ntc.corp.google.com ([2401:fa00:fc:202:dd94:c753:a81d:c855]) (user=kyletso job=sendgmr) by 2002:a17:902:bd97:b029:de:abc4:fec7 with SMTP id q23-20020a170902bd97b02900deabc4fec7mr21506129pls.7.1612259745282; Tue, 02 Feb 2021 01:55:45 -0800 (PST) Date: Tue, 2 Feb 2021 17:55:12 +0800 Message-Id: <20210202095512.761214-1-kyletso@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.365.g02bc693789-goog Subject: [PATCH] usb: typec: Return void in typec_partner_set_pd_revision From: Kyle Tso To: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org Cc: bleung@chromium.org, badhri@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kyle Tso Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org typec_partner_set_pd_revision doesn't need any return value. Fixes: 29b01295a829 ("usb: typec: Add typec_partner_set_pd_revision") Signed-off-by: Kyle Tso Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus --- drivers/usb/typec/class.c | 10 ++-------- include/linux/usb/typec.h | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index b6ceab3dc16b..a7d1bc83c2d4 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -755,15 +755,11 @@ EXPORT_SYMBOL_GPL(typec_partner_set_identity); * * This routine is used to report that the PD revision of the port partner has * become available. - * - * Returns 0 on success or negative error number on failure. */ -int typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision) +void typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision) { - int ret; - if (partner->pd_revision == pd_revision) - return 0; + return; partner->pd_revision = pd_revision; sysfs_notify(&partner->dev.kobj, NULL, "usb_power_delivery_revision"); @@ -773,8 +769,6 @@ int typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision "supports_usb_power_delivery"); } kobject_uevent(&partner->dev.kobj, KOBJ_CHANGE); - - return 0; } EXPORT_SYMBOL_GPL(typec_partner_set_pd_revision); diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h index 4946eca742d5..a94df82ab62f 100644 --- a/include/linux/usb/typec.h +++ b/include/linux/usb/typec.h @@ -126,7 +126,7 @@ struct typec_altmode_desc { enum typec_port_data roles; }; -int typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision); +void typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision); int typec_partner_set_num_altmodes(struct typec_partner *partner, int num_altmodes); struct typec_altmode *typec_partner_register_altmode(struct typec_partner *partner,