Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2500812rwb; Mon, 3 Oct 2022 01:25:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4wOFx9VCyjKS4YixdwxFgqiDYHapiXE8EmsmiI/THo+NqGul55rvwgf3kDGkVtdpCtMRPV X-Received: by 2002:a17:903:1110:b0:178:9f67:b543 with SMTP id n16-20020a170903111000b001789f67b543mr20704563plh.131.1664785518114; Mon, 03 Oct 2022 01:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664785518; cv=none; d=google.com; s=arc-20160816; b=iDPf1P0V//YoS0nRzAVP7+JRrFZIoWDUNNMzMjRt/FLpIIAYNgz8BMtKnyOrNwOjxj JQFiAheg6ukDAloes+NytZhyZB8bW3ONINBfpUBhKX9BCEAd/EwedJNLNBD+g4X9t6L/ o0p4jXbL7HstYKmdpSAGfJHKNIzYIRtu1CfQ3I8UUWoryApcp6mGkMiCGiJyYN/NqGpG lA2wpwcx1j694qYlH1gJDeBo/8Rq1soe1G1asgO19Qz5NDGnJbQSiudxWnWpR5QI/qJG vnBj6BOaeLZaEJYQYWO4AT6m3J4yPU1zAERhZRJF5ZbINKp/GOdglvbUrpBJybSe9Ynr VyUQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5lUKvisQtGtU9b2piyqm4BNIeedER4Z8tC3ea8WItOw=; b=Hu1cmY45kVZe1WwiEKVt5UHRRvUkkMvK+4RrLXWz6ztTy/RA8G8t3PB8Umf5XxLvQ7 4t1cQlkbfvnWFF0zD+lYHesmUZtAp8NaHCM8AXtP4XMqzMK761jIZve6D9oZvJqJH9+F VjZEQYSYgB8b8tZ9UmCXuxFubYj63OHEhRvovYFtQ4o6v0bUePfDAhamOyPQIHqn9hEg 4ZG8HIWyRg4Q2ydDCYM0oL04ciE+TGE6jIr0yMCLKHEdiL8lNp6tWx65oLjOXu4tT52S GBD5tZapg4itPWnPbR6tgNQLqBuStSnyzbCqNDxCa5P98owvt9CpBInjQfO9wqXVAq9r UOqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LkHygsya; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020a62840b000000b00560ad1951e7si4332604pfd.356.2022.10.03.01.25.06; Mon, 03 Oct 2022 01:25:18 -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=@linuxfoundation.org header.s=korg header.b=LkHygsya; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232306AbiJCHvv (ORCPT + 99 others); Mon, 3 Oct 2022 03:51:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232252AbiJCHvQ (ORCPT ); Mon, 3 Oct 2022 03:51:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 844EF5BC23; Mon, 3 Oct 2022 00:29:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6371260FA8; Mon, 3 Oct 2022 07:16:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70AA9C43143; Mon, 3 Oct 2022 07:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781410; bh=sYll7ZP2PDZtg5d9aDoiVEZ7UY8f0WBXmTE27CYtDp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LkHygsyaCLQHeXgrUWw34jnNrMJWo4NvzvNKnK1k5CuiFDkId61YigTA4rFdUquNW Xb65OXhkE8VdbSMmVrr34esG5ZOPcmuTIuSaNu6x59nnYU/T1FyKDMHrT70FSHdNKT B51EzB4kkSJZycXNqh9TlAT3cg6mxvuhONFt159w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Menzel , Heikki Krogerus Subject: [PATCH 5.15 10/83] usb: typec: ucsi: Remove incorrect warning Date: Mon, 3 Oct 2022 09:10:35 +0200 Message-Id: <20221003070722.244913101@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070721.971297651@linuxfoundation.org> References: <20221003070721.971297651@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 From: Heikki Krogerus commit 415ba26cb73f7d22a892043301b91b57ae54db02 upstream. Sink only devices do not have any source capabilities, so the driver should not warn about that. Also DRP (Dual Role Power) capable devices, such as USB Type-C docking stations, do not return any source capabilities unless they are plugged to a power supply themselves. Fixes: 1f4642b72be7 ("usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4") Reported-by: Paul Menzel Cc: Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220922145924.80667-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/ucsi/ucsi.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -515,8 +515,6 @@ static int ucsi_get_pdos(struct ucsi_con num_pdos * sizeof(u32)); if (ret < 0) dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret); - if (ret == 0 && offset == 0) - dev_warn(ucsi->dev, "UCSI_GET_PDOS returned 0 bytes\n"); return ret; }